/* Cairo & Amiri fonts import - Ultra Premium Book Theme */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800;900&family=Amiri:wght@400;700&family=Tajawal:wght@300;400;500;700;900&display=swap');

:root {
  /* Brand Color Palette */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: rgba(248, 249, 250, 0.95);
  --text-primary: #1a1817;
  --text-secondary: #495057;
  --accent-gold: #d95d4e;
  --accent-copper: #ce3a33;
  --accent-bronze: #f18268;
  --accent-light: #f4e4d4;
  --glow-gold: rgba(217, 93, 78, 0.3);
  --success: #4caf50;
  --danger: #d02d21;
  
  /* Advanced Shadows & Effects */
  --shadow-glow: 0 0 20px var(--glow-gold);
  --shadow-elevated: 0 20px 60px rgba(217, 93, 78, 0.3);
  --shadow-inset: inset 0 2px 10px rgba(0, 0, 0, 0.3);
  
  /* Smooth Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --transition-elastic: 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Animations simplifiées pour performance */
@keyframes blink { 
  50% { opacity: 0; } 
}

html { 
  direction: rtl; 
  overflow-x: hidden;
  max-width: 100vw;
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

/* Ultra Premium Body with Animated Background */
body {
  margin: 0;
  font-family: 'Cairo', 'Tajawal', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  max-width: 100vw;
  position: relative;
}

/* Sophisticated Animated Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(217, 93, 78, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(206, 58, 51, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(241, 130, 104, 0.02) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: gradientShift 20s ease infinite;
  background-size: 400% 400%;
}

/* Mesh Gradient Overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    repeating-linear-gradient(0deg, rgba(217, 93, 78, 0.02) 0px, transparent 2px, transparent 40px),
    repeating-linear-gradient(90deg, rgba(217, 93, 78, 0.02) 0px, transparent 2px, transparent 40px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.2;
}

main { 
  flex: 1 0 auto; 
  position: relative;
  z-index: 1;
}

a { 
  color: inherit; 
  text-decoration: none;
  transition: var(--transition-smooth);
}

img { 
  max-width: 100%; 
  height: auto; 
  display: block; 
}

.container { 
  width: min(1300px, 94%); 
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.hero.container { 
  width: 100%; 
  margin-inline: 0; 
  max-width: 100vw;
  overflow-x: hidden;
}

/* ========================================
   MINIMALIST WHITE HEADER - NEW DESIGN
   ======================================== */
.site-header {
  position: sticky; 
  top: 0; 
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: var(--transition-fast);
}

.nav {
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  padding: 12px 0;
  gap: 24px;
  position: relative;
}

/* Clean Brand Logo */
.brand { 
  display: flex; 
  align-items: center; 
  gap: 12px;
  position: relative;
  transition: var(--transition-smooth);
  padding: 0;
}

.brand:hover {
  transform: translateY(-1px);
}

.brand img { 
  width: 50px; 
  height: 50px; 
  object-fit: contain;
  transition: var(--transition-smooth);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.08));
}

.brand:hover img {
  transform: scale(1.05);
}

.brand .name { 
  font-weight: 800; 
  font-size: 20px;
  color: #1a1817;
  letter-spacing: -0.5px;
  position: relative;
}

/* Clean Navigation Links */
.nav-links { 
  display: flex; 
  align-items: center; 
  gap: 4px;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-size: 15px;
  position: relative;
  transition: all 0.25s ease;
  color: #495057;
  background: transparent;
  border: none;
}

.nav-links a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #d95d4e, #f18268);
  transform: translateX(-50%);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-links a:hover {
  color: #d95d4e;
  background: rgba(217, 93, 78, 0.05);
}

.nav-links a:hover::before {
  width: 70%;
}

.nav-links a.active { 
  color: #d95d4e;
  background: rgba(217, 93, 78, 0.08);
  font-weight: 700;
}

.nav-links a.active::before {
  width: 70%;
  background: linear-gradient(90deg, #d95d4e, #f18268);
}

/* Clean Login Lock Icon */
.login-lock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: transparent;
  border: 2px solid #e0e0e0;
  transition: all 0.3s ease;
  position: relative;
}

.login-lock-icon i {
  font-size: 18px;
  color: #495057;
  transition: var(--transition-smooth);
}

.login-lock-icon:hover {
  background: rgba(217, 93, 78, 0.05);
  border-color: #d95d4e;
  transform: translateY(-1px);
}

.login-lock-icon:hover i {
  transform: scale(1.1);
  color: #d95d4e;
}

/* Clean Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 2px solid #e0e0e0;
  cursor: pointer;
  padding: 10px 12px;
  z-index: 1001;
  position: relative;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.hamburger:hover {
  border-color: #d95d4e;
  background: rgba(217, 93, 78, 0.05);
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: #1a1817;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger:hover span {
  background: #d95d4e;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(9px, -9px);
}

/* ========================================
   ULTRA PREMIUM BUTTON STYLES
   ======================================== */
.btn {
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  padding: 16px 32px; 
  border-radius: 16px; 
  border: none;
  background: linear-gradient(135deg, 
    var(--accent-gold) 0%, 
    var(--accent-copper) 50%,
    var(--accent-bronze) 100%);
  background-size: 200% 200%;
  color: #ffffff; 
  font-weight: 900;
  font-size: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 8px 24px rgba(217, 93, 78, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  transition: var(--transition-smooth);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: gradientShift 3s ease infinite;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.4), 
    transparent);
  transition: left var(--transition-smooth);
}

.btn:hover::before {
  left: 100%;
}

.btn::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-copper));
  z-index: -1;
  opacity: 0;
  filter: blur(15px);
  transition: var(--transition-smooth);
}

.btn:hover::after {
  opacity: 0.8;
}

.btn:hover { 
  transform: translateY(-4px) scale(1.05); 
  box-shadow: 
    0 16px 48px rgba(217, 93, 78, 0.6),
    0 0 40px rgba(217, 93, 78, 0.4);
  animation: glowPulse 1.5s ease-in-out infinite;
}

.btn:active {
  transform: translateY(-2px) scale(1.02);
}

/* ========================================
   ANIMATED ORDER CTA BUTTON (INCITATIF)
   ======================================== */
.btn-order-cta {
  position: relative;
  animation: ctaPulse 2s ease-in-out infinite;
  box-shadow: 
    0 8px 32px rgba(217, 93, 78, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset,
    0 0 30px rgba(217, 93, 78, 0.4);
}

.btn-order-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.6), 
    transparent);
  animation: shimmerSweep 3s ease-in-out infinite;
}

.btn-order-cta::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-copper));
  z-index: -1;
  opacity: 0.6;
  filter: blur(20px);
  animation: glowExpand 2s ease-in-out infinite;
}

.btn-order-cta:hover {
  animation: ctaBounce 0.6s ease-in-out infinite;
  transform: translateY(-6px) scale(1.08);
  box-shadow: 
    0 20px 60px rgba(217, 93, 78, 0.7),
    0 0 50px rgba(217, 93, 78, 0.6),
    0 0 0 2px rgba(255, 255, 255, 0.3) inset;
}

.btn-order-cta:hover::after {
  opacity: 1;
  filter: blur(25px);
}

/* Keyframes for CTA Animations */
@keyframes ctaPulse {
  0%, 100% {
    box-shadow: 
      0 8px 32px rgba(217, 93, 78, 0.5),
      0 0 0 1px rgba(255, 255, 255, 0.2) inset,
      0 0 30px rgba(217, 93, 78, 0.4);
  }
  50% {
    box-shadow: 
      0 12px 48px rgba(217, 93, 78, 0.7),
      0 0 0 1px rgba(255, 255, 255, 0.3) inset,
      0 0 50px rgba(217, 93, 78, 0.6);
    transform: translateY(-2px) scale(1.02);
  }
}

@keyframes ctaBounce {
  0%, 100% {
    transform: translateY(-6px) scale(1.08);
  }
  50% {
    transform: translateY(-8px) scale(1.1);
  }
}

/* Heartbeat Animation - Fast & Infinite for CTA buttons */
.btn-heartbeat {
  animation: heartbeat 1s ease-in-out infinite !important;
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.1);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.1);
  }
  70% {
    transform: scale(1);
  }
}

/* Enhanced CTA Button - Ultra Incitative */
.btn-cta-enhanced {
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 10px 40px rgba(217, 93, 78, 0.6),
    0 0 30px rgba(217, 93, 78, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-copper), var(--accent-gold)) !important;
  background-size: 200% 200% !important;
  animation: heartbeat 1s ease-in-out infinite, gradient-shift 3s ease infinite !important;
  cursor: pointer;
  gap: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Gradient animation */
@keyframes gradient-shift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Shopping cart icon animation */
.btn-cta-enhanced i {
  animation: cart-bounce 2s ease-in-out infinite;
  display: inline-block;
}

@keyframes cart-bounce {
  0%, 100% {
    transform: translateX(0) rotate(0deg);
  }
  25% {
    transform: translateX(-3px) rotate(-5deg);
  }
  50% {
    transform: translateX(3px) rotate(5deg);
  }
  75% {
    transform: translateX(-2px) rotate(-3deg);
  }
}

/* Shine effect */
.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.6), 
    transparent);
  transform: skewX(-20deg);
  animation: shine-slide 3s infinite;
}

@keyframes shine-slide {
  0% {
    left: -100%;
  }
  20%, 100% {
    left: 200%;
  }
}

/* Hover effect - Extra incitative */
.btn-cta-enhanced:hover {
  transform: translateY(-4px) scale(1.08) !important;
  box-shadow: 
    0 15px 50px rgba(217, 93, 78, 0.8),
    0 0 50px rgba(217, 93, 78, 0.6),
    inset 0 2px 0 rgba(255, 255, 255, 0.4) !important;
  animation: heartbeat 0.5s ease-in-out infinite, gradient-shift 1.5s ease infinite, glow-pulse 1s ease-in-out infinite !important;
}

@keyframes glow-pulse {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.2);
  }
}

/* Active/Click effect */
.btn-cta-enhanced:active {
  transform: translateY(-2px) scale(1.05) !important;
  box-shadow: 
    0 8px 30px rgba(217, 93, 78, 0.7) !important;
}

@keyframes shimmerSweep {
  0% {
    left: -100%;
  }
  50%, 100% {
    left: 200%;
  }
}

@keyframes glowExpand {
  0%, 100% {
    inset: -4px;
    opacity: 0.6;
  }
  50% {
    inset: -8px;
    opacity: 0.8;
  }
}

.btn-outline { 
  background: rgba(26, 24, 23, 0.6); 
  color: var(--accent-gold); 
  border: 2px solid var(--accent-gold);
  box-shadow: 
    0 4px 16px rgba(217, 93, 78, 0.3),
    0 0 0 1px rgba(217, 93, 78, 0.2) inset;
  
}

.btn-outline:hover { 
  background: rgba(217, 93, 78, 0.2);
  border-color: var(--accent-copper);
  color: white;
}

/* ========================================
   MODERN CENTERED HERO SECTION - NEW DESIGN
   ======================================== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 0 80px;
  min-height: 85vh;
  position: relative;
  overflow: hidden;
  /* Default background - will be overridden by inline style if hero_bg_path is set */
  background: linear-gradient(135deg, 
    #ffffff 0%,
    #f8f9fa 50%,
    #ffffff 100%);
}

/* Overlay for better text readability when background image is present */
.hero-section[style*="background-image"]::before,
.hero[style*="background-image"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 1;
}

/* Subtle Background Pattern (only if no background image) */
.hero:not([style*="background-image"])::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(217, 93, 78, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(206, 58, 51, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%,
    rgba(217, 93, 78, 0.2) 50%,
    transparent 100%);
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

/* Hero Content Container */
.hero > div:first-child {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero Title - Clean & Modern */
.hero .title {
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.2;
  font-weight: 900;
  color: #1a1817;
  margin: 0;
  letter-spacing: -1.5px;
  position: relative;
}

/* White text when background image is present */
.hero-section[style*="background-image"] .title,
.hero[style*="background-image"] .title {
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero .title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #d95d4e, #f18268);
  border-radius: 2px;
}

/* Ligne décorative visible sur fond sombre */
.hero-section[style*="background-image"] .title::after,
.hero[style*="background-image"] .title::after {
  background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.8));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Typewriter Effect - Clean */
.typewriter {
  display: inline-block;
  border: none;
  padding: 0;
  box-shadow: none;
}

.typewriter .caret {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: #d95d4e;
  margin-inline-start: 6px;
  vertical-align: text-bottom;
  animation: blinkCaret 1s steps(1) infinite;
}

/* Caret blanc sur fond sombre */
.hero-section[style*="background-image"] .typewriter .caret,
.hero[style*="background-image"] .typewriter .caret {
  background: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

@keyframes blinkCaret {
  50% {
    opacity: 0;
  }
}

/* Hero Subtitle */
.hero .subtitle {
  color: #6c757d;
  margin-top: 40px;
  font-size: clamp(18px, 2.5vw, 24px);
  line-height: 1.8;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
}

/* White subtitle when background image is present */
.hero-section[style*="background-image"] .subtitle,
.hero[style*="background-image"] .subtitle {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Hero CTA */
.hero .cta {
  margin-top: 50px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}


/* ========================================
   ULTRA PREMIUM BOOK CARDS WITH 3D
   ======================================== */
.section { 
  padding: 80px 0;
  animation: textReveal 1s ease-out;
}

.section-header { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  margin-bottom: 48px;
  position: relative;
}

.section-header::after {
  content: '';
  position: absolute;
  bottom: -24px;
  left: 0;
  width: 120px;
  height: 4px;
  background: linear-gradient(90deg, 
    var(--accent-gold), 
    var(--accent-copper),
    transparent);
  border-radius: 2px;
  box-shadow: 0 0 20px rgba(217, 93, 78, 0.6);
  animation: borderGlow 2s ease-in-out infinite;
}

.section-title { 
  font-weight: 900; 
  font-size: 42px;
  background: linear-gradient(135deg, 
    var(--accent-gold) 0%,
    var(--accent-copper) 50%,
    var(--accent-gold) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  letter-spacing: -1.5px;
  animation: gradientShift 5s ease infinite;
  filter: drop-shadow(0 4px 20px rgba(217, 93, 78, 0.5));
}

/* Book Grid */
.grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
  gap: 24px;
}

/* Ultra Premium Book Card with Glassmorphism */
.card { 
  background: rgba(255, 255, 255, 0.95); 
  border: 1px solid rgba(217, 93, 78, 0.3); 
  border-radius: 16px; 
  overflow: visible;
  display: flex; 
  flex-direction: column;
  padding-bottom: 14px;
  position: relative;
  transition: var(--transition-fast);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(217, 93, 78, 0.3);
  border-color: var(--accent-gold);
}

/* Ultra Realistic 3D Book Cover */
.card .thumb { 
  aspect-ratio: 3/4; 
  width: calc(100% - 48px);
  max-width: 180px;
  margin: 14px auto 0;
  object-fit: contain; 
  background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
  box-shadow: 
    8px 0 16px -4px rgba(217, 93, 78, 0.35),
    -2px 0 8px rgba(0, 0, 0, 0.1),
    inset -2px 0 8px rgba(0, 0, 0, 0.08),
    0 4px 20px rgba(217, 93, 78, 0.2);
  transform: perspective(1500px) rotateY(-8deg);
  transition: var(--transition-smooth);
  position: relative;
  border-radius: 5px;
  border-right: 3px solid rgba(217, 93, 78, 0.8);
  border-left: 1px solid rgba(217, 93, 78, 0.3);
  border-top: 2px solid rgba(206, 58, 51, 0.6);
  border-bottom: 2px solid rgba(241, 130, 104, 0.6);
}

/* Premium Light Reflection */
.card .thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, 
    rgba(217, 93, 78, 0) 0%,
    rgba(217, 93, 78, 0.15) 40%,
    rgba(255, 255, 255, 0.4) 100%);
  pointer-events: none;
  border-radius: 8px;
  opacity: 0.8;
  transition: var(--transition-smooth);
}

/* Glowing Book Spine */
.card .thumb::after {
  content: '';
  position: absolute;
  top: 0;
  right: -15px;
  width: 15px;
  height: 100%;
  background: linear-gradient(180deg,
    rgba(217, 93, 78, 0.9) 0%,
    rgba(241, 130, 104, 0.8) 15%,
    rgba(206, 58, 51, 0.7) 30%,
    rgba(139, 99, 71, 0.6) 45%,
    rgba(206, 58, 51, 0.7) 60%,
    rgba(241, 130, 104, 0.8) 75%,
    rgba(217, 93, 78, 0.9) 90%,
    rgba(255, 215, 0, 1) 100%);
  box-shadow: 
    5px 0 20px rgba(217, 93, 78, 0.6),
    inset -3px 0 5px rgba(0, 0, 0, 0.4),
    inset 3px 0 3px rgba(255, 255, 255, 0.5);
  transform: skewY(1deg);
  pointer-events: none;
  border-radius: 0 4px 4px 0;
  transition: var(--transition-smooth);
}

.card:hover .thumb {
  transform: perspective(1500px) rotateY(-3deg) scale(1.08);
  box-shadow: 
    25px 0 50px -10px rgba(217, 93, 78, 0.7),
    -5px 0 20px rgba(0, 0, 0, 0.4),
    inset -6px 0 20px rgba(0, 0, 0, 0.4),
    0 20px 60px rgba(217, 93, 78, 0.5);
}

.card:hover .thumb::before {
  opacity: 1;
}

.card:hover .thumb::after {
  right: -18px;
  width: 18px;
  box-shadow: 
    8px 0 30px rgba(217, 93, 78, 0.8),
    inset -4px 0 6px rgba(0, 0, 0, 0.5),
    inset 4px 0 4px rgba(255, 255, 255, 0.6);
}

/* Card Content */
.card .content { 
  padding: 12px 16px; 
  display: grid; 
  gap: 4px;
}

.card .title { 
  font-weight: 900; 
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.3;
  transition: var(--transition-fast);
}

.card:hover .title {
  color: var(--accent-gold);
  text-shadow: 0 0 20px rgba(217, 93, 78, 0.5);
}

.price { 
  color: var(--accent-gold); 
  font-weight: 900; 
  font-size: 18px;
  background: linear-gradient(135deg, 
    var(--accent-gold) 0%,
    var(--accent-copper) 50%,
    var(--accent-gold) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease infinite;
  filter: drop-shadow(0 2px 8px rgba(217, 93, 78, 0.4));
}

.muted { 
  color: var(--text-secondary); 
  font-size: 12px;
  font-weight: 500;
}

.card .actions { 
  display: flex; 
  gap: 10px; 
  margin-top: 4px;
}

/* ========================================
   PREMIUM FOOTER
   ======================================== */
.site-footer { 
  margin-top: 100px; 
  padding: 50px 0 60px; 
  color: var(--text-secondary); 
  background: linear-gradient(135deg, 
    rgba(248, 249, 250, 0.95) 0%, 
    rgba(243, 244, 246, 0.98) 100%);
  border-top: 1px solid rgba(217, 93, 78, 0.3);
  position: relative;
  
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--accent-gold) 25%,
    var(--accent-copper) 50%,
    var(--accent-gold) 75%,
    transparent 100%);
  background-size: 200% 100%;
  animation: shimmerSlide 3s linear infinite;
  box-shadow: 0 0 20px rgba(217, 93, 78, 0.6);
}

.site-footer a.muted:hover { 
  color: var(--accent-gold); 
  text-decoration: underline;
  text-shadow: 0 0 10px rgba(217, 93, 78, 0.5);
}

/* [REST OF THE CSS - Admin, Forms, Modals, etc. - Will continue in next part due to length] */

/* ADMIN, FORMS & OTHER COMPONENTS - Continuing... */

.admin-shell { 
  min-height: 100vh; 
  display: grid; 
  grid-template-columns: 300px 1fr;
}

.side { 
  background: linear-gradient(180deg, 
    rgba(248, 249, 250, 0.98) 0%, 
    rgba(243, 244, 246, 0.98) 100%); 
  color: var(--text-primary); 
  padding: 28px;
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.08);
  border-right: 1px solid rgba(217, 93, 78, 0.3);
  
}

.side .logo { 
  display: flex; 
  align-items: center; 
  gap: 14px; 
  font-weight: 900;
  font-size: 22px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(217, 93, 78, 0.3);
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-copper));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.menu { 
  margin-top: 28px; 
  display: grid; 
  gap: 10px;
}

.menu a { 
  padding: 16px 20px; 
  border-radius: 14px; 
  color: var(--text-primary);
  transition: var(--transition-smooth);
  font-weight: 700;
  position: relative;
  overflow: hidden;
  background: rgba(248, 249, 250, 0.8);
  border: 1px solid rgba(217, 93, 78, 0.25);
}

.menu a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 0;
  background: linear-gradient(180deg, var(--accent-gold), var(--accent-copper));
  transform: translateY(-50%);
  transition: var(--transition-smooth);
  box-shadow: 0 0 10px var(--accent-gold);
}

.menu a.active::before,
.menu a:hover::before {
  height: 80%;
}

.menu a.active, 
.menu a:hover { 
  background: rgba(217, 93, 78, 0.2);
  transform: translateX(-6px);
  border-color: var(--accent-gold);
  box-shadow: 0 4px 16px rgba(217, 93, 78, 0.3);
}

.admin-main { 
  background: var(--bg-primary);
}

.admin-top { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding: 24px 32px; 
  border-bottom: 1px solid rgba(217, 93, 78, 0.3); 
  background: rgba(248, 249, 250, 0.95);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  
}

.admin-content { 
  padding: 40px;
}

.table { 
  width: 100%; 
  border-collapse: collapse; 
  background: rgba(255, 255, 255, 0.95); 
  border: 1px solid rgba(217, 93, 78, 0.3); 
  border-radius: 20px; 
  overflow: hidden;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(217, 93, 78, 0.2) inset;
  
}

.table th, 
.table td { 
  padding: 18px; 
  border-bottom: 1px solid rgba(217, 93, 78, 0.15); 
  text-align: right;
}

.table th {
  background: linear-gradient(135deg, 
    rgba(217, 93, 78, 0.2) 0%, 
    rgba(206, 58, 51, 0.15) 100%);
  font-weight: 900;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.table tr:hover {
  background: rgba(217, 93, 78, 0.1);
}

.form-grid { 
  display: grid; 
  gap: 24px; 
  grid-template-columns: repeat(2, 1fr);
}

.input { 
  width: 100%; 
  padding: 16px 20px; 
  border: 2px solid rgba(217, 93, 78, 0.3); 
  border-radius: 14px; 
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-primary);
  font-family: 'Cairo', sans-serif;
  font-size: 16px;
  transition: var(--transition-smooth);
  
}

.input:focus { 
  outline: none; 
  border-color: var(--accent-gold); 
  box-shadow: 
    0 0 0 4px rgba(217, 93, 78, 0.15),
    0 4px 16px rgba(217, 93, 78, 0.2);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 1);
}

.input::placeholder {
  color: var(--text-secondary);
}

/* Purchase Form & Other Components */
.purchase-form { 
  display: grid; 
  gap: 24px; 
  width: 100%; 
}

.purchase-form .form-grid { 
  grid-template-columns: repeat(2, minmax(240px, 1fr)); 
  gap: 20px;
}

.purchase-form label { 
  display: grid; 
  gap: 10px; 
  width: 100%;
}

.purchase-form .label-title { 
  font-size: 16px; 
  color: var(--accent-gold); 
  font-weight: 900; 
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.purchase-form .fields-card { 
  background: rgba(255, 255, 255, 0.98); 
  border: 2px solid rgba(217, 93, 78, 0.3); 
  border-radius: 24px; 
  padding: 32px; 
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(217, 93, 78, 0.2) inset; 
  width: 100%; 
  max-width: 650px; 
  
  transition: var(--transition-smooth);
}

.purchase-form .fields-card:focus-within { 
  box-shadow: 
    0 24px 64px rgba(217, 93, 78, 0.3),
    0 0 0 1px var(--accent-gold) inset,
    0 0 40px rgba(217, 93, 78, 0.4); 
  border-color: var(--accent-gold); 
  transform: translateY(-4px);
}

/* Select Styling */
select {
  appearance: none;
  background-color: rgba(255, 255, 255, 0.95);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='18 8 12 14 6 8'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  color: var(--text-primary);
  
}

select:focus {
  background-color: rgba(255, 255, 255, 1);
}

/* Modern Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal,
.wilaya-modal,
.thank-you-modal {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 28px;
  box-shadow: 
    0 32px 96px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(217, 93, 78, 0.3) inset,
    0 0 40px rgba(217, 93, 78, 0.15);
  border: 1px solid rgba(217, 93, 78, 0.3);
  
  transform: scale(0.9) translateY(30px);
  transition: var(--transition-elastic);
}

.modal-overlay.active .modal,
.modal-overlay.active .wilaya-modal,
.modal-overlay.active .thank-you-modal {
  transform: scale(1) translateY(0);
}

/* Search Container */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(248, 249, 250, 0.98) 100%);
  border: 2px solid rgba(217, 93, 78, 0.3);
  border-radius: 28px;
  padding: 10px;
  transition: var(--transition-smooth);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(217, 93, 78, 0.2) inset;
  
}

.search-container:focus-within {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 
    0 16px 48px rgba(217, 93, 78, 0.4),
    0 0 0 1px var(--accent-gold) inset,
    0 0 40px rgba(217, 93, 78, 0.3);
  border-color: var(--accent-gold);
  animation: glowPulse 2s ease-in-out infinite;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 20px 28px;
  font-size: 17px;
  font-weight: 600;
  background: transparent;
  color: var(--text-primary);
  font-family: 'Cairo', sans-serif;
}

.search-input::placeholder {
  color: var(--text-secondary);
}

.search-icon {
  padding: 20px 28px;
  font-size: 24px;
  transition: var(--transition-elastic);
  filter: drop-shadow(0 0 10px rgba(217, 93, 78, 0.5));
}

.search-container:focus-within .search-icon {
  transform: scale(1.3) rotate(20deg);
  filter: drop-shadow(0 0 20px rgba(217, 93, 78, 0.8));
}

/* Status Badges with Glow */
.badge,
.status-badge {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 16px rgba(217, 93, 78, 0.3);
  border: 1px solid rgba(217, 93, 78, 0.3);
  background: linear-gradient(135deg, 
    rgba(217, 93, 78, 0.2) 0%,
    rgba(206, 58, 51, 0.15) 100%);
  color: var(--accent-gold);
  
}

/* Book Detail Layout */
.book-detail { 
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.book-detail .container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: center;
}

.book-detail .card {
  width: 100%;
  max-width: 100%;
}

/* Purchase Button with Advanced Animation */
.purchase-btn {
  background: linear-gradient(135deg, 
    var(--accent-gold) 0%, 
    var(--accent-copper) 50%,
    var(--accent-bronze) 100%);
  background-size: 200% 200%;
  color: #ffffff;
  border: none;
  border-radius: 18px;
  padding: 20px 40px;
  font-size: 20px;
  font-weight: 900;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 
    0 8px 32px rgba(217, 93, 78, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
  display: block;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: gradientShift 3s ease infinite;
}

.purchase-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.4), 
    transparent);
  animation: shimmerSlide 2s linear infinite;
}

.purchase-btn:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 
    0 20px 60px rgba(217, 93, 78, 0.7),
    0 0 40px rgba(217, 93, 78, 0.5);
  animation: glowPulse 1s ease-in-out infinite;
}

/* Radio/Option Groups with Glow */
.option-group { 
  display: flex; 
  gap: 16px; 
  padding: 8px;
  background: rgba(248, 249, 250, 0.9);
  border-radius: 20px;
  border: 2px solid rgba(217, 93, 78, 0.3);
  
}

.option-item { 
  flex: 1;
  display: flex; 
  align-items: center; 
  justify-content: center;
  gap: 12px; 
  padding: 16px 24px; 
  border: 2px solid transparent; 
  border-radius: 16px; 
  background: transparent; 
  cursor: pointer; 
  transition: var(--transition-elastic);
  position: relative;
}

.option-item input { display: none; }

.option-item span { 
  font-weight: 800; 
  font-size: 16px;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.option-item:hover { 
  background: rgba(217, 93, 78, 0.15); 
  border-color: rgba(217, 93, 78, 0.5);
  transform: translateY(-4px) scale(1.05);
}

.option-item:hover span { 
  color: var(--accent-gold); 
}

.option-item:has(input:checked) { 
  border-color: var(--accent-gold); 
  background: linear-gradient(135deg, 
    rgba(217, 93, 78, 0.3) 0%,
    rgba(206, 58, 51, 0.2) 100%);
  box-shadow: 
    0 8px 32px rgba(217, 93, 78, 0.4),
    0 0 20px rgba(217, 93, 78, 0.3) inset;
  transform: translateY(-6px) scale(1.08);
}

.option-item input:checked + span { 
  color: var(--accent-gold); 
  font-weight: 900; 
  text-shadow: 0 0 20px rgba(217, 93, 78, 0.6);
}

.option-item:has(input:checked)::before {
  content: '✓';
  position: absolute;
  top: -10px;
  right: -10px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-copper));
  color: var(--bg-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 4px 16px rgba(217, 93, 78, 0.6);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 960px) {
  .hero {
    padding: 80px 0 60px;
    min-height: 75vh;
  }
  
  
  .grid { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 24px;
  }
  
  .book-detail { 
    display: flex;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  html, body, main {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1003;
    padding: 12px 0 !important;
  }
  
  .nav {
    padding: 12px 0 !important;
  }
  
  .brand img {
    width: 55px !important;
    height: 55px !important;
  }
  
  .brand .name {
    font-size: 20px !important;
    letter-spacing: 0 !important;
  }
  
  .brand img {
    width: 55px !important;
    height: 55px !important;
  }
  
  .nav {
    padding: 16px 0 !important;
  }
  
  .hamburger {
    display: flex;
  }
  
  main {
    padding-top: 95px !important;
  }
  
  /* Hero ne doit pas être caché par le header */
  .hero {
    padding-top: 20px !important;
    margin-top: 0 !important;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
    border-left: 1px solid #f0f0f0;
    transform: translateX(100%);
    transition: var(--transition-smooth);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 90px 0 30px 0;
    overflow-y: auto;
    z-index: 1000;
  }
  
  .nav-links.active {
    transform: translateX(0);
  }
  
  .nav-links a {
    width: 100%;
    padding: 18px 28px;
    font-size: 17px;
    border-bottom: 1px solid #f5f5f5;
    border-radius: 0;
    margin: 0;
    background: transparent;
    border-left: 3px solid transparent;
    color: #495057;
  }
  
  .nav-links a.active {
    background: rgba(217, 93, 78, 0.08);
    border-left: 3px solid #d95d4e;
    color: #d95d4e;
    font-weight: 700;
  }
  
  .nav-links a:hover {
    background: rgba(217, 93, 78, 0.05);
    border-left: 3px solid rgba(217, 93, 78, 0.5);
    color: #d95d4e;
  }
  
  .nav-links a::before {
    display: none;
  }
  
  .nav-links .btn {
    width: calc(100% - 56px);
    margin: 20px 28px;
    border-radius: 10px;
    background: linear-gradient(135deg, #d95d4e, #f18268) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 700;
  }
  
  .nav-links .btn:hover {
    background: linear-gradient(135deg, #ce3a33, #d95d4e) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 93, 78, 0.3);
  }
  
  .nav-links .login-lock-icon {
    width: calc(100% - 56px);
    margin: 20px 28px;
    height: 50px;
    border-radius: 10px;
    justify-content: center;
    background: transparent;
    border: 2px solid #e0e0e0;
  }
  
  .nav-links .login-lock-icon:hover {
    background: rgba(217, 93, 78, 0.05);
    border-color: #d95d4e;
  }
  
  .nav-links .login-lock-icon i {
    font-size: 20px;
    color: #495057;
  }
  
  .nav-links .login-lock-icon:hover i {
    color: #d95d4e;
  }
  
  /* body.menu-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    
    z-index: 999;
  } */
  
  /* body.menu-open {
    overflow: hidden;
    height: 100vh;
    position: fixed;
    width: 100%;
  } */
  
  .grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .hero {
    padding: 60px 0 40px;
    min-height: auto;
  }
  
  .hero .title {
    font-size: clamp(32px, 8vw, 48px);
  }
  
  .hero .title::after {
    width: 60px;
    height: 3px;
  }
  
  .hero .subtitle {
    font-size: 16px;
    margin-top: 30px;
  }
  
  .hero .cta {
    margin-top: 35px;
  }
  
  .section-title {
    font-size: 32px;
  }
  
  .form-grid,
  .purchase-form .form-grid {
    grid-template-columns: 1fr !important;
  }
  
  .admin-shell {
    grid-template-columns: 1fr;
  }
  
  .side {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 50px 0 30px;
  }
  
  .hero .title {
    font-size: clamp(28px, 7vw, 36px);
  }
  
  .hero .subtitle {
    font-size: 15px;
    margin-top: 24px;
  }
  
  .hero .cta {
    margin-top: 30px;
  }
  
  .section-title {
    font-size: 26px;
  }
  
  .card .thumb::after {
    right: -10px !important;
    width: 10px !important;
  }
}

/* Touch Devices Optimization */
@media (hover: none) and (pointer: coarse) {
  .btn,
  .input,
  select {
    min-height: 52px;
  }
  
  .card:hover .thumb {
    transform: perspective(1500px) rotateY(-8deg);
  }
}

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .hamburger,
  .btn {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
}
