/* ==========================================================================
   RAJ PUBLICATION — PREMIUM BOOKSTORE STYLESHEET
   Pure Vanilla CSS • Responsive Mobile & Desktop • SEO & Accessibility Optimized
   ========================================================================== */

:root {
  /* Color Palette */
  --primary: #1E1B4B;          /* Midnight Navy */
  --primary-light: #312E81;
  --primary-dark: #0F172A;
  --accent: #D97706;            /* Warm Amber Gold */
  --accent-gold: #F59E0B;
  --accent-light: #FEF3C7;
  --accent-hover: #B45309;
  
  --whatsapp: #25D366;          /* WhatsApp Brand Green */
  --whatsapp-dark: #128C7E;
  --whatsapp-hover: #1EBE5D;
  --whatsapp-light: #DCF8C6;

  --bg-canvas: #F8F9FA;         /* Soft clean background */
  --surface: #FFFFFF;
  --surface-alt: #F1F5F9;
  --surface-warm: #FFFBEB;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  
  --text-main: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-white: #FFFFFF;

  --success: #16A34A;
  --danger: #DC2626;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-tamil: 'Noto Sans Tamil', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 20px 35px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  --shadow-book: 0 16px 30px -10px rgba(15, 23, 42, 0.35), 0 4px 6px rgba(0, 0, 0, 0.15);

  /* Radius & Transitions */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Tamil script typography helper */
.ta, [lang="ta"] {
  font-family: var(--font-tamil), var(--font-sans);
}

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

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
  background: none;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Visually Hidden for Screen Readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   ANNOUNCEMENT BAR
   ========================================================================== */
.announcement-bar {
  background: linear-gradient(90deg, #1E1B4B 0%, #312E81 50%, #1E1B4B 100%);
  color: var(--text-white);
  padding: 8px 16px;
  font-size: 0.84rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
}

.announcement-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.announcement-text {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-text span.badge {
  background: var(--accent-gold);
  color: #0F172A;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.announcement-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.announcement-actions a {
  color: var(--accent-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.announcement-actions a:hover {
  color: var(--text-white);
  text-decoration: underline;
}

/* ==========================================================================
   SITE HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 20px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo img {
  height: 48px;
  width: auto;
}

/* Header Search */
.header-search {
  flex: 1;
  max-width: 460px;
  position: relative;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  background: var(--surface-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  transition: var(--transition);
}

.search-input-wrap:focus-within {
  background: var(--surface);
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.search-icon {
  color: var(--text-muted);
  margin-right: 8px;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  background: transparent;
  color: var(--text-main);
  font-size: 0.92rem;
}

.search-input::placeholder {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.search-clear-btn {
  color: var(--text-muted);
  font-size: 1.1rem;
  padding: 0 4px;
  display: none;
}

.search-clear-btn.visible {
  display: block;
}

.search-clear-btn:hover {
  color: var(--danger);
}

/* Navigation Links */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.nav-link {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: rgba(30, 27, 75, 0.05);
}

/* Header CTAs */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-whatsapp-header {
  background: linear-gradient(135deg, var(--whatsapp) 0%, var(--whatsapp-dark) 100%);
  color: var(--text-white);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
  transition: var(--transition);
}

.btn-whatsapp-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(37, 211, 102, 0.4);
}

.cart-icon-btn {
  position: relative;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: var(--transition);
}

.cart-icon-btn:hover {
  background: var(--surface);
  border-color: var(--accent-gold);
  color: var(--accent-hover);
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: var(--text-white);
  font-size: 0.7rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface);
}

/* Mobile Toggle */
.mobile-nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  align-items: center;
  justify-content: center;
  color: var(--text-main);
}

/* ==========================================================================
   HERO BANNER
   ========================================================================== */
.hero-section {
  background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 60%, #172554 100%);
  color: var(--text-white);
  padding: 56px 0 64px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--accent-light);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 2.6rem;
  line-height: 1.25;
  font-weight: 800;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}

.hero-title .highlight {
  background: linear-gradient(90deg, #F59E0B 0%, #FBBF24 50%, #FDE68A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #CBD5E1;
  margin-bottom: 28px;
  max-width: 540px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 32px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent) 100%);
  color: #0F172A;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 26px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.45);
  color: #000;
}

.btn-whatsapp-lg {
  background: linear-gradient(135deg, var(--whatsapp) 0%, var(--whatsapp-dark) 100%);
  color: var(--text-white);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  transition: var(--transition);
}

.btn-whatsapp-lg:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.45);
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 24px;
}

.hero-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #E2E8F0;
}

.hero-feature-item svg {
  color: var(--accent-gold);
  flex-shrink: 0;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-banner-img {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  transition: var(--transition);
}

.hero-visual:hover .hero-banner-img {
  transform: scale(1.02);
}

/* ==========================================================================
   MAIN CONTENT & CATALOG SECTION
   ========================================================================== */
.catalog-section {
  padding: 48px 0 80px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-heading-group h2 {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-heading-group p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 4px;
}

/* Filter Controls Toolbar */
.filter-toolbar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Category Pills */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.category-pill {
  background: var(--surface-alt);
  color: var(--text-secondary);
  border: 1px solid transparent;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.category-pill:hover {
  background: #E2E8F0;
  color: var(--primary);
}

.category-pill.active {
  background: var(--primary);
  color: var(--text-white);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(30, 27, 75, 0.25);
}

.category-pill .count {
  background: rgba(0, 0, 0, 0.1);
  font-size: 0.74rem;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.category-pill.active .count {
  background: rgba(255, 255, 255, 0.25);
  color: var(--text-white);
}

/* Second Row: Sort & Results Stats */
.filter-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
  flex-wrap: wrap;
  gap: 12px;
}

.results-stats {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.results-stats span.highlight-count {
  color: var(--primary);
  font-weight: 800;
}

.sort-group {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.sort-select {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

.sort-select:focus {
  border-color: var(--accent-gold);
}

/* Active Search Info Box */
.active-search-info {
  display: none;
  background: var(--surface-warm);
  border: 1px dashed var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 24px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
}

.active-search-info.visible {
  display: flex;
}

.reset-search-btn {
  color: var(--accent-hover);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

/* ==========================================================================
   BOOK CARDS GRID
   ========================================================================== */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
}

.book-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.book-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: #CBD5E1;
}

/* Book Cover Area */
.book-cover-wrap {
  position: relative;
  background: #F1F5F9;
  aspect-ratio: 4 / 5.2;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.book-cover-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform 0.4s ease;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.18));
}

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

/* Badge overlay */
.book-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: var(--accent-light);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.book-badge.bestseller {
  background: linear-gradient(135deg, #B45309 0%, #D97706 100%);
  color: #FFF;
}

.book-badge.discount {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--danger);
  color: var(--text-white);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

/* 3-Image Indicator Badge on Card */
.book-images-pill {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: var(--text-white);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
}

/* Book Body */
.book-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.book-category-tag {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-hover);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.book-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.7em;
}

.book-title-en {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
}

.book-author {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.book-author svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Rating */
.book-rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.stars {
  color: #F59E0B;
  font-size: 0.95rem;
  letter-spacing: 1px;
}

.rating-num {
  font-weight: 700;
  color: var(--text-main);
}

.review-count {
  color: var(--text-muted);
}

/* Price Box */
.book-price-box {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: auto;
  margin-bottom: 14px;
}

.price-current {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
}

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

.price-savings {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--success);
  background: rgba(22, 163, 74, 0.1);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* Card Action Buttons */
.book-card-actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 8px;
}

.btn-preview {
  background: var(--surface-alt);
  color: var(--primary);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-preview:hover {
  background: #E2E8F0;
  border-color: #CBD5E1;
}

.btn-order-wa {
  background: linear-gradient(135deg, var(--whatsapp) 0%, var(--whatsapp-dark) 100%);
  color: var(--text-white);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
  transition: var(--transition);
}

.btn-order-wa:hover {
  background: linear-gradient(135deg, var(--whatsapp-hover) 0%, var(--whatsapp-dark) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

/* No Results State */
.no-results-card {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 20px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
}

.no-results-icon {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.no-results-card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--text-main);
}

.no-results-card p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ==========================================================================
   3-IMAGE BOOK GALLERY & DETAIL VIEW MODAL
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-dialog {
  background: var(--surface);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-backdrop.active .modal-dialog {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: #E2E8F0;
  color: var(--danger);
}

.modal-body-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 36px;
  padding: 36px;
}

/* 3-Image Gallery Component */
.detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gallery-main-view {
  position: relative;
  background: #F1F5F9;
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 5.4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border);
}

.gallery-main-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s ease;
  cursor: zoom-in;
}

.gallery-nav-prev,
.gallery-nav-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  z-index: 5;
  transition: var(--transition);
}

.gallery-nav-prev:hover,
.gallery-nav-next:hover {
  background: var(--primary);
  color: var(--text-white);
}

.gallery-nav-prev { left: 10px; }
.gallery-nav-next { right: 10px; }

.gallery-image-caption {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: var(--text-white);
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  text-align: center;
  pointer-events: none;
}

/* Thumbnail Strip (3 images: Front, Back, Inside Page) */
.gallery-thumbnails {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.gallery-thumb-btn {
  background: var(--surface-alt);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-thumb-btn img {
  height: 64px;
  width: auto;
  object-fit: contain;
}

.gallery-thumb-btn span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
}

.gallery-thumb-btn:hover {
  border-color: #CBD5E1;
}

.gallery-thumb-btn.active {
  border-color: var(--accent-gold);
  background: var(--surface-warm);
}

.gallery-thumb-btn.active span {
  color: var(--accent-hover);
}

/* Detail Info Side */
.detail-info {
  display: flex;
  flex-direction: column;
}

.detail-category-badge {
  display: inline-block;
  background: rgba(217, 119, 6, 0.1);
  color: var(--accent-hover);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 8px;
  align-self: flex-start;
}

.detail-title {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 4px;
  color: var(--primary);
}

.detail-title-en {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.detail-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.detail-price-card {
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.detail-price-main {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
}

.detail-mrp {
  font-size: 1rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 8px;
}

.detail-discount-tag {
  background: var(--success);
  color: var(--text-white);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 800;
}

.detail-description {
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

/* Highlights List */
.detail-highlights {
  margin-bottom: 22px;
  background: var(--surface-warm);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 14px 18px;
  border-radius: var(--radius-md);
}

.detail-highlights h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-hover);
  margin-bottom: 8px;
}

.detail-highlights ul {
  list-style: none;
}

.detail-highlights li {
  font-size: 0.85rem;
  color: var(--text-main);
  margin-bottom: 4px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.detail-highlights li::before {
  content: '✓';
  color: var(--success);
  font-weight: bold;
}

/* Specifications Table */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  margin-bottom: 24px;
}

.specs-table tr {
  border-bottom: 1px solid var(--border-light);
}

.specs-table td {
  padding: 8px 10px;
}

.specs-table td:first-child {
  color: var(--text-muted);
  font-weight: 600;
  width: 38%;
}

.specs-table td:last-child {
  color: var(--text-main);
  font-weight: 600;
}

/* Detail Action Buttons */
.detail-actions-row {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.btn-detail-order-wa {
  flex: 1;
  background: linear-gradient(135deg, var(--whatsapp) 0%, var(--whatsapp-dark) 100%);
  color: var(--text-white);
  padding: 14px 20px;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
  transition: var(--transition);
}

.btn-detail-order-wa:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.45);
}

.btn-detail-share {
  background: var(--surface-alt);
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-detail-share:hover {
  background: #E2E8F0;
}

/* ==========================================================================
   WHATSAPP ORDER ADDRESS FORM MODAL
   ========================================================================== */
.order-modal-dialog {
  max-width: 620px;
}

.order-modal-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
}

.order-modal-header-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.15);
  color: var(--whatsapp-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.order-modal-header h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
}

.order-modal-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Order Book Summary Pill inside Modal */
.order-summary-card {
  background: var(--surface-warm);
  border: 1px solid rgba(245, 158, 11, 0.3);
  margin: 20px 28px 0;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.order-book-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.order-book-thumb {
  width: 44px;
  height: 56px;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
  border: 1px solid var(--border);
  padding: 2px;
}

.order-book-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.order-book-price {
  font-size: 0.85rem;
  color: var(--accent-hover);
  font-weight: 700;
}

.order-qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
}

.qty-btn:hover {
  background: var(--primary);
  color: #fff;
}

.qty-display {
  font-weight: 800;
  font-size: 1rem;
  min-width: 24px;
  text-align: center;
}

/* Order Form */
.order-form {
  padding: 20px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
}

.form-label .required {
  color: var(--danger);
}

.form-control {
  background: var(--surface-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--text-main);
  transition: var(--transition);
}

.form-control:focus {
  background: var(--surface);
  border-color: var(--whatsapp-dark);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

textarea.form-control {
  min-height: 70px;
  resize: vertical;
}

.payment-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.payment-radio-label {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.payment-radio-label:hover {
  border-color: #CBD5E1;
}

.payment-radio-label input:checked + span {
  color: var(--primary);
  font-weight: 700;
}

.payment-radio-label:has(input:checked) {
  border-color: var(--whatsapp-dark);
  background: rgba(37, 211, 102, 0.08);
}

.order-submit-btn {
  background: linear-gradient(135deg, var(--whatsapp) 0%, var(--whatsapp-dark) 100%);
  color: var(--text-white);
  padding: 14px 20px;
  border-radius: var(--radius-full);
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
  margin-top: 8px;
  transition: var(--transition);
}

.order-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
}

.order-disclaimer {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 4px;
}

/* ==========================================================================
   ABOUT / TRUST / WHY CHOOSE US
   ========================================================================== */
.about-section {
  background: #FFFFFF;
  padding: 64px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trust-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 36px;
}

.trust-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}

.trust-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-gold);
}

.trust-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface-warm);
  color: var(--accent-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
}

.trust-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--primary);
}

.trust-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   HOW TO ORDER VIA WHATSAPP (3 EASY STEPS)
   ========================================================================== */
.steps-section {
  padding: 64px 0;
  background: var(--bg-canvas);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 36px;
}

.step-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 28px 24px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.step-card:hover {
  border-color: var(--whatsapp);
  transform: translateY(-4px);
}

.step-num {
  position: absolute;
  top: -14px;
  left: 24px;
  background: var(--primary);
  color: var(--accent-light);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
}

.step-card h3 {
  font-size: 1.15rem;
  margin-top: 8px;
  margin-bottom: 10px;
  color: var(--text-main);
}

.step-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ==========================================================================
   SITE FOOTER
   ========================================================================== */
.site-footer {
  background: #0B0F19;
  color: #94A3B8;
  padding: 64px 0 32px;
  margin-top: auto;
  border-top: 2px solid var(--accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-col h4 {
  color: #FFFFFF;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.footer-col p {
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

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

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 0.88rem;
  color: #94A3B8;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-links a:hover {
  color: var(--accent-gold);
  transform: translateX(4px);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.88rem;
}

.footer-contact-item svg {
  color: var(--accent-gold);
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==========================================================================
   FLOATING WHATSAPP BUTTON
   ========================================================================== */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 990;
  background: linear-gradient(135deg, var(--whatsapp) 0%, var(--whatsapp-dark) 100%);
  color: #FFFFFF;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  cursor: pointer;
  transition: var(--transition);
  animation: waPulse 2.5s infinite;
}

.floating-whatsapp:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

.floating-whatsapp svg {
  width: 34px;
  height: 34px;
}

.floating-whatsapp-tooltip {
  position: absolute;
  right: 70px;
  background: #0F172A;
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  pointer-events: none;
  opacity: 0;
  transform: translateX(10px);
  transition: var(--transition);
}

.floating-whatsapp:hover .floating-whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

@keyframes waPulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
  70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION BAR
   ========================================================================== */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #FFFFFF;
  border-top: 1px solid var(--border);
  z-index: 900;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

.mobile-bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 100%;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  gap: 3px;
  transition: var(--transition);
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
  color: var(--primary);
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast-notice {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: #0F172A;
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-notice.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 36px;
  }
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-ctas {
    justify-content: center;
  }
  .hero-features {
    justify-content: center;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .announcement-actions {
    display: none;
  }
  .header-search {
    display: none; /* Accessible via mobile search button */
  }
  .nav-menu {
    display: none;
  }
  .mobile-nav-toggle {
    display: flex;
  }
  .btn-whatsapp-header span {
    display: none;
  }
  .hero-title {
    font-size: 2rem;
  }
  .modal-body-grid {
    grid-template-columns: 1fr;
    padding: 24px 20px;
    gap: 24px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .payment-options-grid {
    grid-template-columns: 1fr;
  }
  .mobile-bottom-bar {
    display: block;
  }
  body {
    padding-bottom: 64px; /* Space for mobile bar */
  }
  .floating-whatsapp {
    bottom: 80px;
    right: 16px;
    width: 52px;
    height: 52px;
  }
  .floating-whatsapp svg {
    width: 28px;
    height: 28px;
  }
  .books-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
  .book-body {
    padding: 12px;
  }
  .book-title {
    font-size: 0.98rem;
    height: 2.7em;
  }
  .book-card-actions {
    grid-template-columns: 1fr;
  }
}
