/**
 * LANUV BOOKS - E-COMMERCE DESIGN SYSTEM
 * Theme: Midnight Obsidian & Burnished Gold Editorial
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;0,800;0,900;1,400;1,600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #090d16;
  --bg-secondary: #0f1624;
  --bg-card: #151d30;
  --bg-card-hover: #1c2740;
  --bg-darkest: #05080e;

  --gold-primary: #f59e0b;
  --gold-light: #fbbf24;
  --gold-dark: #b45309;
  --gold-glow: rgba(245, 158, 11, 0.25);
  --gold-border: rgba(245, 158, 11, 0.3);

  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border-color: rgba(255, 255, 255, 0.08);

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 8px 25px rgba(245, 158, 11, 0.2);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

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

/* Typography Helpers */
h1, h2, h3, h4, .font-serif {
  font-family: var(--font-serif);
  letter-spacing: -0.02em;
}

.text-gold { color: var(--gold-light) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-emerald { color: var(--accent-emerald) !important; }
.text-rose { color: var(--accent-rose) !important; }

/* Display & Responsive Utilities */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-flex { display: inline-flex !important; }
.d-flex { display: flex !important; }

@media (min-width: 769px) {
  .d-md-none { display: none !important; }
  .d-md-inline { display: inline !important; }
  .d-md-inline-block { display: inline-block !important; }
  .d-md-flex { display: flex !important; }
  .d-md-block { display: block !important; }
}

@media (max-width: 768px) {
  .d-md-inline { display: none !important; }
  .d-md-flex { display: none !important; }
}

/* Responsive Form Rows */
.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .form-row-2col {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }
}

.book-card-detail {
  width: 100%;
  max-width: 320px;
  height: 460px;
  margin: 0 auto;
}

.auth-card {
  padding: 2.5rem;
}

@media (max-width: 640px) {
  .auth-card {
    padding: 1.5rem 1.15rem !important;
  }
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Navigation Bar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(9, 13, 22, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 0;
  transition: all 0.3s ease;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo img {
  height: 44px;
  width: auto;
  max-width: 100%;
  display: block;
}

.nav-search {
  flex: 1;
  max-width: 440px;
  position: relative;
}

.search-input {
  width: 100%;
  background: rgba(21, 29, 48, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.65rem 1.2rem 0.65rem 2.6rem;
  color: #fff;
  font-size: 0.9rem;
  transition: all 0.25s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--gold-light);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.85rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--gold-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Cart Button & Animated Badge */
.cart-btn {
  position: relative;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--gold-border);
  color: var(--gold-light);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.cart-btn:hover {
  background: var(--gold-primary);
  color: #05080e;
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

.cart-badge {
  background: var(--accent-rose);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.95rem 2rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #080d1a;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
}

.btn-outline-gold {
  background: transparent;
  border: 1px solid var(--gold-border);
  color: var(--gold-light);
}

.btn-outline-gold:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--gold-light);
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
}

.btn-paystack {
  background: #0ba4db;
  color: #fff;
  box-shadow: 0 4px 15px rgba(11, 164, 219, 0.4);
}

.btn-paystack:hover {
  background: #0988b6;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(11, 164, 219, 0.55);
}

/* Hero Section & Slider System */
.hero-section {
  position: relative;
  padding: 3.5rem 0 4rem;
  background: radial-gradient(ellipse 70% 60% at 50% -15%, rgba(245, 158, 11, 0.18), transparent 70%);
  overflow: hidden;
}

.hero-slider-wrapper {
  position: relative;
  width: 100%;
}

.hero-slide {
  display: none;
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide.active {
  display: block;
  opacity: 1;
  animation: slideFadeIn 0.55s ease forwards;
}

@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid var(--gold-border);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  color: var(--gold-light);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 1.25rem;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 560px;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-color);
}

.hero-stat h3 {
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.2rem;
}

.hero-stat p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Slider Controls (Dots, Counter, Arrows) */
.hero-slider-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-slider-dots {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}

.hero-dot:hover {
  background: rgba(245, 158, 11, 0.6);
}

.hero-dot.active {
  width: 38px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
  border-color: #fbbf24;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
}

.hero-slider-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-counter {
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.1em;
}

.hero-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(21, 29, 48, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--gold-border);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.hero-nav-btn:hover {
  background: var(--gold-primary);
  color: #080d1a;
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

/* Hero Book Showcase (3D Spine & Glow) */
.hero-book-showcase {
  position: relative;
  display: flex;
  justify-content: center;
}

.book-card-3d {
  position: relative;
  width: 290px;
  height: 430px;
  border-radius: 12px;
  box-shadow: 
    -12px 14px 35px rgba(0, 0, 0, 0.8),
    -3px 0 10px rgba(0, 0, 0, 0.5),
    0 0 50px rgba(245, 158, 11, 0.18);
  transform: perspective(1000px) rotateY(-8deg) rotateX(4deg);
  transition: all 0.5s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.25rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.book-card-3d:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg) translateY(-8px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.85), 0 0 60px rgba(245, 158, 11, 0.35);
}

.book-spine-line {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 14px;
  background: linear-gradient(90deg, rgba(255,255,255,0.2) 0%, rgba(0,0,0,0.4) 100%);
  border-right: 1px solid rgba(0,0,0,0.5);
}

/* Category Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 1.5rem 0;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar { display: none; }

.filter-pill {
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill:hover, .filter-pill.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--gold-light);
  color: var(--gold-light);
}

/* Books Grid */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

/* Book Card */
.book-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.book-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-border);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(245, 158, 11, 0.15);
  background: var(--bg-card-hover);
}

/* Book Cover Picture & Banner */
.book-cover {
  height: 320px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--bg-card);
}

.book-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.book-card:hover .book-cover-img {
  transform: scale(1.05);
}

.book-card-3d .book-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  z-index: 1;
}

.book-cover-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.75rem 1.5rem;
  z-index: 2;
}

.book-cover::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 12px;
  background: linear-gradient(90deg, rgba(255,255,255,0.15) 0%, rgba(0,0,0,0.5) 100%);
  z-index: 3;
}

.cover-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 5;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.badge-gold {
  background: var(--gold-primary);
  color: #080d1a;
}

.badge-emerald {
  background: var(--accent-emerald);
  color: #fff;
}

.badge-rose {
  background: var(--accent-rose);
  color: #fff;
}

.cover-title {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  z-index: 1;
}

.cover-author {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.04em;
  z-index: 1;
}

/* Book Body Content */
.book-details {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.book-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.rating-stars {
  color: #fbbf24;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.book-title-link {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
  line-height: 1.35;
  display: block;
}

.book-title-link:hover {
  color: var(--gold-light);
}

.book-pricing {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0.75rem 0 1rem;
}

.price-current {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--gold-light);
  font-family: var(--font-sans);
}

.price-original {
  font-size: 0.9rem;
  color: var(--text-dim);
  text-decoration: line-through;
}

/* Detail Book Page */
.detail-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 3.5rem;
  margin: 3rem 0;
  align-items: start;
}

.detail-cover-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 6rem;
}

.format-pills {
  display: flex;
  gap: 0.75rem;
  margin: 1.25rem 0;
  flex-wrap: wrap;
}

.format-pill {
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.format-pill:hover, .format-pill.active {
  border-color: var(--gold-light);
  background: rgba(245, 158, 11, 0.12);
  color: var(--gold-light);
}

/* Cart & Checkout Layout */
.cart-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2.5rem;
  margin: 2.5rem 0;
  align-items: start;
}

.cart-table-card, .order-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
}

.cart-item-row {
  display: grid;
  grid-template-columns: 70px 1fr auto auto auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-color);
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.qty-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  font-weight: 700;
}

.qty-btn:hover { color: #fff; }

.qty-input {
  width: 40px;
  background: transparent;
  border: none;
  text-align: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--gold-light);
  background: var(--bg-darkest);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--accent-emerald);
  color: #34d399;
}

.alert-danger {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid var(--accent-rose);
  color: #fb7185;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--gold-primary);
  color: #fbbf24;
}

/* Paystack Badge */
.paystack-trust-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem;
  background: rgba(11, 164, 219, 0.08);
  border: 1px dashed rgba(11, 164, 219, 0.35);
  border-radius: var(--radius-md);
  color: #38bdf8;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 1rem;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--bg-darkest);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.65rem;
}

.footer-links a:hover {
  color: var(--gold-light);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .hero-grid { 
    grid-template-columns: 1fr; 
    text-align: center; 
    gap: 2.5rem;
  }
  .hero-desc { 
    margin: 0 auto 1.75rem; 
  }
  .hero-stats { 
    justify-content: center; 
  }
  .hero-book-showcase { 
    display: flex; 
    justify-content: center; 
    margin-top: 1rem; 
  }
  .book-card-3d { 
    transform: none; 
    width: 290px;
    height: 420px;
  }
  .book-card-3d:hover { 
    transform: translateY(-5px); 
  }
  .detail-grid { 
    grid-template-columns: 1fr; 
    gap: 2.5rem;
  }

  /* CRITICAL: Ensure cover box is NOT sticky on mobile/tablet so it NEVER covers the form */
  .detail-cover-box { 
    position: static !important; 
    top: auto !important; 
    padding: 2rem 1.5rem !important;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
  }
  .book-card-detail {
    max-width: 270px !important;
    height: 390px !important;
  }

  .cart-grid { 
    grid-template-columns: 1fr; 
    gap: 2rem;
  }
  .footer-grid { 
    grid-template-columns: 1fr 1fr; 
  }
}

@media (max-width: 768px) {
  /* Mobile Header Navigation */
  .site-header {
    padding: 0.65rem 0;
  }
  .nav-wrapper {
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    justify-content: space-between;
  }
  .brand-logo img {
    height: 32px;
    max-width: 140px;
    width: auto;
  }
  .nav-actions {
    gap: 0.4rem;
  }
  .cart-btn {
    padding: 0.42rem 0.75rem;
    font-size: 0.8rem;
    gap: 0.35rem;
  }
  .cart-badge {
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
  }

  /* Collapsible Navigation & Search on Mobile */
  .nav-search {
    display: none;
    width: 100%;
    order: 10;
    max-width: 100%;
    margin-top: 0.5rem;
  }
  .nav-search.show {
    display: block;
    animation: slideDownNav 0.2s ease forwards;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    order: 11;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    gap: 0.35rem;
    margin-top: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  }
  .nav-links.show {
    display: flex;
    animation: slideDownNav 0.2s ease forwards;
  }
  .nav-link {
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
  }
  .nav-link:hover, .nav-link.active {
    background: rgba(245, 158, 11, 0.12);
    color: var(--gold-light);
  }

  /* Typography on Mobile */
  .hero-title { font-size: 2.15rem; }
  h1 { font-size: 1.85rem !important; }

  /* Mobile Input Styling: 16px font-size prevents iOS Safari zoom that covers inputs */
  .form-input, .search-input, select.form-input, textarea.form-input {
    font-size: 16px !important;
    padding: 0.7rem 0.85rem;
  }

  /* Cards on Mobile */
  .cart-table-card, .order-summary-card {
    padding: 1.25rem !important;
  }

  /* Cart Line Items on Mobile */
  .cart-item-row { 
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.85rem !important;
    padding: 1.15rem 0 !important;
  }
  .cart-item-row > div:nth-child(2) {
    flex: 1 1 180px;
  }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .site-footer { padding: 3rem 0 1.5rem; }

  .hero-slider-controls {
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }
  .hero-slider-actions {
    width: 100%;
    justify-content: space-between;
  }
  .hero-stats {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  .book-card-3d {
    width: 100%;
    max-width: 260px;
    height: 380px;
    padding: 1.75rem 1.5rem;
  }

  /* Detail Book Page on Mobile */
  .detail-cover-box {
    position: static !important;
    top: auto !important;
    padding: 1.25rem 0.75rem !important;
    margin-bottom: 1.5rem !important;
  }
  .book-card-detail {
    max-width: 230px !important;
    height: 330px !important;
  }

  .format-pills {
    gap: 0.5rem;
  }
  .format-pill {
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
  }

  .book-order-actions {
    flex-direction: column !important;
    width: 100%;
  }
  .book-order-actions .qty-stepper {
    width: 100%;
    justify-content: center;
  }
  .book-order-actions .btn {
    width: 100% !important;
    flex: none !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.85rem;
  }
  .hero-title {
    font-size: 1.75rem;
  }
  .btn-lg {
    padding: 0.8rem 1.25rem;
    font-size: 0.95rem;
  }
  .books-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .format-pills {
    flex-direction: column;
  }
  .format-pill {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  .hero-stat h3 {
    font-size: 1.5rem;
  }
}

@keyframes slideDownNav {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
