/* ============================================
   متجر مكتبة بر الوالدين - Premium Shop Stylesheet
   Design: Deep Navy, Gold, Cream — Luxurious theme
   Features: Particles, Glassmorphism, 3D Cards,
             Skeleton Loading, Scroll Animations
   ============================================ */

/* ========== DESIGN TOKENS ========== */
:root {
  /* Background & Surface */
  --bg-main: #f5f0e6;
  --bg-card: #ffffff;
  --bg-card-hover: #fffdf8;
  --bg-elevated: #fffcf5;
  --bg-glass: rgba(255, 255, 255, 0.65);

  /* Text */
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #7a7a9a;
  --text-on-dark: #e8e0d0;

  /* Core brand colors */
  --navy: #0a1628;
  --navy-light: #132240;
  --navy-mid: #1a2d50;
  --navy-deep: #060e1a;
  --gold: #c5a044;
  --gold-light: #dbb960;
  --gold-pale: #f0d88a;
  --gold-dark: #9e7e2e;
  --gold-glow: rgba(197, 160, 68, 0.35);
  --cream: #f5f0e6;
  --cream-dark: #e8dfc9;
  --white: #ffffff;

  /* Semantic */
  --success: #2ecc71;
  --success-dark: #27ae60;
  --danger: #e74c3c;
  --info: #3498db;
  --warning: #f39c12;

  /* Borders */
  --border-color: rgba(10, 22, 40, 0.07);
  --border-gold: rgba(197, 160, 68, 0.25);

  /* Shadows */
  --shadow-xs: 0 2px 6px rgba(10, 22, 40, 0.03);
  --shadow-sm: 0 4px 12px rgba(10, 22, 40, 0.05);
  --shadow-md: 0 10px 35px rgba(10, 22, 40, 0.08);
  --shadow-lg: 0 20px 60px rgba(10, 22, 40, 0.12);
  --shadow-xl: 0 30px 80px rgba(10, 22, 40, 0.18);
  --shadow-gold: 0 5px 25px rgba(197, 160, 68, 0.2);
  --shadow-gold-lg: 0 10px 40px rgba(197, 160, 68, 0.3);
  --shadow-card-hover: 0 20px 50px rgba(10, 22, 40, 0.12), 0 8px 30px rgba(197, 160, 68, 0.15);

  /* Layout */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --radius-full: 50px;
  --navbar-h: 72px;

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: all 0.35s var(--ease-out-expo);
  --transition-fast: all 0.2s var(--ease-smooth);

  /* Typography */
  --font: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

/* ========== RESETS & BASE ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background-color: var(--bg-main);
  color: var(--text-primary);
  direction: rtl;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.4s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol { list-style: none; }

button {
  border: none;
  outline: none;
  background: none;
  font-family: var(--font);
  cursor: pointer;
}

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

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

/* ========== SELECTION ========== */
::selection {
  background: var(--gold);
  color: var(--navy);
}

::-moz-selection {
  background: var(--gold);
  color: var(--navy);
}

/* ========== CUSTOM SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--cream-dark);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-dark), var(--gold));
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-light);
}

/* ========== NAVBAR ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-h);
  z-index: 1000;
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(197, 160, 68, 0.15);
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(10, 22, 40, 0.97);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  border-bottom-color: rgba(197, 160, 68, 0.25);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}

.nav-brand:hover {
  transform: scale(1.02);
}

.nav-brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  box-shadow: 0 0 15px rgba(197, 160, 68, 0.3);
  transition: var(--transition);
}

.nav-brand:hover img {
  box-shadow: 0 0 25px rgba(197, 160, 68, 0.5);
}

.nav-brand span {
  color: var(--gold-light);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-links a {
  color: #c4c4d4;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  right: 16px;
  left: 16px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease-out-expo);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-light);
  background: rgba(197, 160, 68, 0.08);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-portal-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(197, 160, 68, 0.1);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
  border: 1px solid rgba(197, 160, 68, 0.2);
}

.admin-portal-link:hover {
  background: var(--gold);
  color: var(--navy);
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-gold);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
  z-index: 1001;
}

.hamburger span {
  width: 24px;
  height: 2.5px;
  background: var(--gold-light);
  border-radius: 3px;
  transition: var(--transition);
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ========== HERO SECTION ========== */
.shop-hero {
  position: relative;
  min-height: 55vh;
  margin-top: var(--navbar-h);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--navy);
  text-align: center;
  padding: 70px 20px 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  filter: blur(2px);
  transform: scale(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(197, 160, 68, 0.08) 0%, transparent 60%),
    linear-gradient(180deg,
      rgba(10, 22, 40, 0.3) 0%,
      rgba(10, 22, 40, 0.65) 50%,
      rgba(10, 22, 40, 0.9) 80%,
      var(--bg-main) 100%
    );
}

/* Floating Particles Container */
.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-pale), var(--gold));
  opacity: 0;
  animation: floatParticle var(--duration, 8s) var(--delay, 0s) infinite ease-in-out;
}

@keyframes floatParticle {
  0% {
    opacity: 0;
    transform: translateY(100%) scale(0.3);
  }
  20% {
    opacity: var(--max-opacity, 0.4);
  }
  80% {
    opacity: var(--max-opacity, 0.4);
  }
  100% {
    opacity: 0;
    transform: translateY(-200%) scale(0.1);
  }
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 820px;
  animation: heroFadeIn 1s var(--ease-out-expo) 0.2s both;
}

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

.badge-gold {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-light));
  color: var(--navy);
  padding: 7px 22px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.82rem;
  display: inline-block;
  margin-bottom: 18px;
  box-shadow: var(--shadow-gold);
  text-shadow: none;
  letter-spacing: 0.3px;
  animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: var(--shadow-gold); }
  50% { box-shadow: var(--shadow-gold-lg); }
}

.shop-hero h1 {
  font-size: clamp(2rem, 4.5vw + 0.8rem, 3.4rem);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 14px;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.5);
  line-height: 1.3;
}

.shop-hero .tagline {
  font-size: clamp(0.95rem, 1.5vw + 0.6rem, 1.2rem);
  color: var(--cream);
  margin-bottom: 20px;
  font-weight: 500;
  line-height: 1.8;
  max-width: 700px;
  margin-inline: auto;
}

.shipping-info {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid rgba(46, 204, 113, 0.25);
  color: #2ecc71;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  animation: heroFadeIn 1s var(--ease-out-expo) 0.6s both;
}

.shipping-info i {
  font-size: 1.1rem;
  animation: truckMove 2s ease-in-out infinite;
}

@keyframes truckMove {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-5px); }
}

/* Hero Stats Bar */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
  animation: heroFadeIn 1s var(--ease-out-expo) 0.8s both;
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
  padding: 14px 28px;
  border-radius: var(--radius);
  min-width: 130px;
  transition: var(--transition);
}

.hero-stat-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-gold);
  transform: translateY(-3px);
}

.hero-stat-item .stat-icon {
  font-size: 1.4rem;
  color: var(--gold-light);
}

.hero-stat-item .stat-number {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
}

.hero-stat-item .stat-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
}

/* ========== MAIN CONTENT ========== */
.shop-main {
  padding: 50px 0 100px 0;
  flex: 1;
}

/* ========== CONTROLS: SEARCH & FILTERS ========== */
.controls-section {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 50px;
}

.search-box-wrapper {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.search-box-wrapper input {
  width: 100%;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid var(--border-color);
  padding: 17px 55px 17px 50px;
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 1.02rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.search-box-wrapper input:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--white);
  box-shadow: var(--shadow-gold), var(--shadow-md);
  transform: scale(1.01);
}

.search-box-wrapper input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.search-icon {
  position: absolute;
  top: 50%;
  right: 22px;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 1.2rem;
  pointer-events: none;
  transition: var(--transition);
}

.search-box-wrapper input:focus ~ .search-icon {
  color: var(--gold-light);
  transform: translateY(-50%) scale(1.1);
}

.clear-search-btn {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.05rem;
  transition: var(--transition);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.clear-search-btn:hover {
  color: var(--danger);
  background: rgba(231, 76, 60, 0.08);
  transform: translateY(-50%) scale(1.1);
}

/* Category Filter Pills */
.categories-wrapper {
  overflow-x: auto;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.categories-wrapper::-webkit-scrollbar {
  height: 4px;
}
.categories-wrapper::-webkit-scrollbar-track {
  background: transparent;
}
.categories-wrapper::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
}
.categories-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

.categories-pills {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
  width: max-content;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .categories-pills {
    justify-content: flex-start;
    padding: 0 8px;
  }
}

.category-pill {
  padding: 9px 24px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1.5px solid var(--border-color);
  font-size: 0.9rem;
  font-weight: 700;
  transition: var(--transition);
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}

.category-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.category-pill span,
.category-pill {
  position: relative;
  z-index: 1;
}

.category-pill:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.category-pill.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy);
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}

.category-pill .pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  background: rgba(10, 22, 40, 0.12);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
  margin-right: 6px;
  padding: 0 5px;
}

.category-pill.active .pill-count {
  background: rgba(10, 22, 40, 0.2);
}

/* ========== BOOKS GRID ========== */
.books-section {
  position: relative;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

/* ========== BOOK CARD ========== */
.book-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: var(--transition);
  position: relative;
  opacity: 0;
  transform: translateY(30px);
}

.book-card.visible {
  animation: cardReveal 0.6s var(--ease-out-expo) forwards;
}

@keyframes cardReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.book-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(197, 160, 68, 0.35);
}

/* Subtle gold glow on hover */
.book-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--gold-glow), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.book-card:hover::after {
  opacity: 1;
}

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

/* Book Image */
.book-image-wrapper {
  position: relative;
  padding-bottom: 130%;
  background: linear-gradient(135deg, var(--navy-mid), var(--navy));
  overflow: hidden;
}

/* 3D Book Spine Effect */
.book-image-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 14px;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.05) 40%, rgba(255, 255, 255, 0) 100%);
  z-index: 4;
  pointer-events: none;
}

.book-image-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  right: 14px;
  width: 1px;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  z-index: 4;
  pointer-events: none;
}

.book-image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out-expo);
}

.book-card:hover .book-image-wrapper img {
  transform: scale(1.07);
}

/* Category Badge on Image */
.book-cat-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(10px);
  color: var(--gold-light);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid rgba(197, 160, 68, 0.25);
  z-index: 5;
  letter-spacing: 0.3px;
}

/* Status Badges */
.book-status-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  z-index: 5;
  letter-spacing: 0.3px;
}

.book-status-badge.badge-new {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: white;
  box-shadow: 0 3px 12px rgba(46, 204, 113, 0.3);
}

.book-status-badge.badge-featured {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy);
  box-shadow: var(--shadow-gold);
}

/* Book Details */
.book-details {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.book-details h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.5;
  height: 3.0em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.book-author i {
  color: var(--gold);
  font-size: 0.75rem;
}

.book-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
  height: 3.2em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.6;
}

/* Book Footer */
.book-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.book-price-box {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.book-price-box .price {
  font-size: 1.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.book-price-box .currency {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 700;
}

.btn-order {
  width: 100%;
  background: linear-gradient(135deg, var(--navy-mid), var(--navy));
  color: var(--gold-light);
  border: 1.5px solid var(--gold-dark);
  padding: 13px 16px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.93rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}

.btn-order::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.btn-order:hover {
  color: var(--navy);
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold);
}

.btn-order:hover::before {
  opacity: 1;
}

.btn-order i,
.btn-order span {
  position: relative;
  z-index: 1;
}

.btn-order:active {
  transform: translateY(-1px);
}

/* ========== SKELETON LOADING ========== */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.skeleton-image {
  width: 100%;
  padding-bottom: 130%;
  position: relative;
}

.skeleton-body {
  padding: 22px;
}

.skeleton-line {
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.skeleton-line:last-child {
  margin-bottom: 0;
}

.skeleton-line.title {
  height: 20px;
  width: 80%;
}

.skeleton-line.author {
  height: 14px;
  width: 50%;
}

.skeleton-line.desc {
  height: 14px;
  width: 100%;
}

.skeleton-line.desc-short {
  height: 14px;
  width: 65%;
}

.skeleton-line.price {
  height: 26px;
  width: 35%;
  margin-top: 16px;
}

.skeleton-line.btn {
  height: 46px;
  width: 100%;
  margin-top: 14px;
  border-radius: var(--radius);
}

/* Shimmer animation */
.skeleton-image,
.skeleton-line {
  background: linear-gradient(
    90deg,
    var(--cream-dark) 25%,
    var(--cream) 50%,
    var(--cream-dark) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Loading & Empty States */
.loading-state,
.empty-state {
  text-align: center;
  padding: 70px 20px;
  grid-column: 1 / -1;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(197, 160, 68, 0.12);
  border-left-color: var(--gold);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-icon {
  font-size: 4rem;
  color: var(--gold-dark);
  margin-bottom: 20px;
  opacity: 0.6;
}

.empty-state h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ========== ORDER MODAL ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 14, 26, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  padding: 20px;
}

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

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.92) translateY(25px);
  transition: transform 0.5s var(--ease-spring), opacity 0.4s ease;
  padding: 32px;
  box-shadow: var(--shadow-xl);
}

/* Custom scrollbar for modal */
.modal::-webkit-scrollbar {
  width: 5px;
}
.modal::-webkit-scrollbar-track {
  background: transparent;
}
.modal::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: 10px;
}

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

.modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  z-index: 10;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--danger);
  color: white;
  transform: rotate(90deg) scale(1.1);
}

/* Modal Header */
.order-modal-header {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 18px;
}

.order-modal-header h3 {
  font-size: 1.35rem;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-weight: 800;
}

.order-modal-header p {
  color: var(--text-muted);
  font-size: 0.83rem;
  line-height: 1.7;
}

/* Steps Indicator */
.order-steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.order-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid transparent;
  transition: var(--transition);
}

.order-step.active {
  color: var(--gold-dark);
  background: rgba(197, 160, 68, 0.08);
  border-color: var(--border-gold);
}

.order-step .step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
}

.order-step.active .step-num {
  background: var(--gold);
  color: var(--navy);
}

/* Book Preview in Modal */
.book-preview-card {
  display: flex;
  gap: 18px;
  background: linear-gradient(135deg, rgba(197, 160, 68, 0.04), rgba(197, 160, 68, 0.02));
  border: 1px solid var(--border-gold);
  padding: 16px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.book-preview-card img {
  width: 62px;
  height: 82px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.book-preview-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.book-preview-details h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.4;
}

.book-preview-details .badge-gold {
  font-size: 0.72rem;
  padding: 3px 12px;
  margin-bottom: 0;
  animation: none;
}

.book-preview-details .price-wrapper {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.book-preview-details .price-val {
  color: var(--gold);
  font-weight: 800;
  font-size: 1.15rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-group label i {
  margin-left: 6px;
}

.input-with-icon {
  position: relative;
  width: 100%;
}

.input-with-icon .input-icon {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 0.92rem;
  pointer-events: none;
  transition: var(--transition);
}

.form-group input,
.form-group select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-color);
  padding: 13px 16px;
  padding-right: 44px;
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.93rem;
  transition: var(--transition);
  box-shadow: none;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197, 160, 68, 0.1);
  background: var(--white);
}

.form-group input:focus ~ .input-icon {
  color: var(--gold-light);
  transform: translateY(-50%) scale(1.1);
}

.form-group select option {
  background-color: var(--white);
  color: var(--text-primary);
  padding: 8px;
}

.form-note {
  display: block;
  color: var(--text-muted);
  margin-top: 6px;
  font-size: 0.75rem;
  line-height: 1.5;
}

.form-note i {
  color: var(--gold);
  margin-left: 4px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .col {
  flex: 1;
}

/* Quantity Selector */
.quantity-input-wrapper {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated);
  max-width: 150px;
}

.qty-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.02);
  color: var(--text-primary);
  font-size: 0.85rem;
  transition: var(--transition);
}

.qty-btn:hover {
  background: var(--gold);
  color: var(--navy);
}

.qty-btn:active {
  transform: scale(0.92);
}

.quantity-input-wrapper input {
  border: none !important;
  box-shadow: none !important;
  text-align: center;
  background: transparent !important;
  font-weight: 800;
  font-size: 1.1rem;
  width: 60px;
  padding: 0 !important;
  padding-right: 0 !important;
}

/* Total Price */
.total-price-box {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(197, 160, 68, 0.06), rgba(197, 160, 68, 0.12));
  border: 1.5px dashed var(--gold);
  border-radius: var(--radius);
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--gold);
  gap: 5px;
}

/* WhatsApp Submit Button */
.btn-whatsapp {
  width: 100%;
  background: linear-gradient(135deg, #25d366, #20ba5a);
  color: white;
  padding: 15px 20px;
  border-radius: var(--radius);
  font-size: 1.02rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 5px 20px rgba(37, 211, 102, 0.25);
  transition: var(--transition);
  margin-top: 12px;
  position: relative;
  overflow: hidden;
}

.btn-whatsapp::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
}

.btn-whatsapp:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 35px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp:hover::before {
  width: 400px;
  height: 400px;
}

.btn-whatsapp:active {
  transform: translateY(-1px);
}

/* ========== TOAST NOTIFICATIONS ========== */
.toast-container {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  width: 100%;
  max-width: 480px;
  padding: 0 20px;
}

.toast {
  background: var(--white);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px 28px;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  width: 100%;
  pointer-events: auto;
  transform: translateY(120px);
  opacity: 0;
  transition: all 0.5s var(--ease-spring);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.hiding {
  transform: translateY(-30px);
  opacity: 0;
}

.toast-icon {
  font-size: 2.5rem;
  color: var(--success);
}

.toast-title {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--gold);
}

.toast-message {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.toast .spinner {
  width: 26px;
  height: 26px;
  border-width: 3px;
  margin: 8px auto 0;
}

/* ========== BACK TO TOP ========== */
.back-to-top {
  position: fixed;
  bottom: calc(30px + env(safe-area-inset-bottom));
  left: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 900;
  box-shadow: var(--shadow-gold);
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  cursor: pointer;
  border: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  line-height: 1;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (hover: hover) {
  .back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-gold-lg);
  }
}

.back-to-top:active {
  transform: translateY(-2px);
}

/* ========== FOOTER ========== */
.footer {
  background: linear-gradient(180deg, var(--navy), var(--navy-deep));
  border-top: 1px solid rgba(197, 160, 68, 0.2);
  color: var(--text-on-dark);
  padding: 60px 0 20px 0;
  font-size: 0.9rem;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 45px;
  margin-bottom: 45px;
}

.footer-brand .nav-brand {
  margin-bottom: 18px;
}

.footer-brand p {
  color: #8a9ab5;
  line-height: 1.8;
  margin-bottom: 25px;
  font-size: 0.88rem;
}

/* Visitor Counter */
.visitor-counter {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 20px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(197, 160, 68, 0.12);
  transition: var(--transition);
}

.visitor-counter:hover {
  border-color: var(--border-gold);
  background: rgba(255, 255, 255, 0.06);
}

.counter-icon {
  color: var(--gold-light);
  font-size: 1.2rem;
}

.counter-details {
  display: flex;
  flex-direction: column;
}

.counter-label {
  font-size: 0.72rem;
  color: #8a9ab5;
  font-weight: 600;
}

.counter-number {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--gold-light);
}

/* Footer Links & Contact */
.footer-links h4,
.footer-contact h4 {
  color: var(--gold-light);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}

.footer-links h4::after,
.footer-contact h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 35px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  border-radius: 2px;
}

.footer-links {
  display: flex;
  flex-direction: column;
}

.footer-links a {
  margin-bottom: 12px;
  color: #a0b4cc;
  transition: var(--transition);
  width: fit-content;
  position: relative;
  padding-bottom: 2px;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}

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

.footer-links a:hover::after {
  width: 100%;
}

.footer-location {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: #a0b4cc;
}

.footer-location i {
  color: var(--gold);
  font-size: 1rem;
}

.footer-contact .whatsapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #25d366, #20ba5a);
  color: white;
  padding: 11px 24px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.88rem;
  transition: var(--transition);
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
}

.footer-contact .whatsapp-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.3);
}

.footer-map {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(197, 160, 68, 0.15);
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  color: #6a7a90;
  font-size: 0.83rem;
}

.footer-bottom .developer a {
  color: var(--gold-light);
  font-weight: 600;
  transition: var(--transition);
}

.footer-bottom .developer a:hover {
  color: var(--gold);
  text-decoration: underline;
}

/* ========== RESULTS COUNT ========== */
.results-count {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 20px;
  padding: 8px 0;
}

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

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 992px) {
  .books-grid,
  .skeleton-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .footer-contact {
    grid-column: 1 / -1;
  }

  .hero-stats {
    gap: 16px;
    flex-wrap: wrap;
  }

  .hero-stat-item {
    min-width: 110px;
    padding: 12px 20px;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--navbar-h);
    right: -100%;
    width: 260px;
    height: calc(100vh - var(--navbar-h));
    background: rgba(10, 22, 40, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 24px;
    gap: 8px;
    border-left: 1px solid rgba(197, 160, 68, 0.15);
    transition: right 0.4s var(--ease-out-expo);
    z-index: 999;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    width: 100%;
  }

  .shop-hero {
    min-height: 45vh;
    padding: 50px 16px 60px;
  }

  .hero-stats {
    gap: 10px;
  }

  .hero-stat-item {
    min-width: 95px;
    padding: 10px 16px;
  }

  .hero-stat-item .stat-number {
    font-size: 1.3rem;
  }

  .hero-stat-item .stat-label {
    font-size: 0.7rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .modal {
    padding: 20px 16px;
    border-radius: var(--radius);
    max-height: 96vh;
    overflow-y: auto;
  }

  .books-grid,
  .skeleton-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .order-steps {
    flex-wrap: wrap;
    gap: 6px;
  }

  .order-step {
    font-size: 0.72rem;
    padding: 5px 10px;
  }

  .back-to-top {
    bottom: calc(25px + env(safe-area-inset-bottom));
    left: 25px;
    width: 44px;
    height: 44px;
    font-size: 1.05rem;
  }

  .whatsapp-float {
    bottom: calc(25px + env(safe-area-inset-bottom));
    right: 25px;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
}

@media (max-width: 600px) {
  .books-grid,
  .skeleton-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .book-card {
    border-radius: var(--radius-sm);
  }
  .book-image-wrapper {
    padding-bottom: 120%;
  }
  .book-details {
    padding: 12px;
    gap: 6px;
  }
  .book-details h3 {
    font-size: 0.9rem;
    height: 2.8em;
    line-height: 1.4;
  }
  .book-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.75rem;
    line-height: 1.5;
    height: 3.0em;
    margin-bottom: 8px;
    color: var(--text-secondary);
  }
  .book-author {
    font-size: 0.72rem;
    margin-bottom: 4px;
  }
  .book-price-box .price {
    font-size: 1.1rem;
  }
  .book-price-box .currency {
    font-size: 0.75rem;
  }
  .btn-order {
    padding: 10px 12px;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
  }
  .book-cat-badge, 
  .book-status-badge {
    top: 6px;
    right: 6px;
    font-size: 0.65rem;
    padding: 3px 8px;
  }
  .book-status-badge {
    left: 6px;
    right: auto;
  }
  
  .category-pill {
    padding: 8px 14px;
    font-size: 0.82rem;
  }
  
  .categories-pills {
    gap: 6px;
    padding-bottom: 6px;
  }
}

@media (max-width: 480px) {
  .books-grid,
  .skeleton-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .shop-hero h1 {
    font-size: 1.6rem;
  }

  .hero-stats {
    flex-direction: row;
    justify-content: center;
    gap: 6px;
    width: 100%;
  }

  .hero-stat-item {
    width: 33.33%;
    max-width: none;
    flex-direction: column;
    gap: 4px;
    padding: 10px 4px;
  }

  .hero-stat-item .stat-icon {
    font-size: 1.1rem;
  }

  .hero-stat-item .stat-number {
    font-size: 1.15rem;
  }

  .hero-stat-item .stat-label {
    font-size: 0.65rem;
  }

  .footer-contact .whatsapp-btn {
    font-size: 0.74rem;
    padding: 10px 14px;
    gap: 6px;
  }

  .back-to-top {
    bottom: calc(20px + env(safe-area-inset-bottom));
    left: 20px;
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }

  .whatsapp-float {
    bottom: calc(20px + env(safe-area-inset-bottom));
    right: 20px;
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }

  .search-box-wrapper input {
    font-size: 0.92rem;
    padding: 14px 45px 14px 42px;
  }

  .book-preview-card {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding: 12px;
  }
  
  .book-preview-card img {
    width: 75px;
    height: 105px;
    margin: 0 auto;
  }
}

@media (max-width: 380px) {
  .books-grid,
  .skeleton-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .book-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.72rem;
    line-height: 1.4;
    height: 2.8em;
    margin-bottom: 6px;
  }

  .footer-contact .whatsapp-btn {
    font-size: 0.68rem;
    padding: 8px 10px;
    gap: 4px;
  }
}

/* ========== UTILITIES ========== */
.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;
}

/* ========== WHATSAPP FLOATING BUTTON ========== */
.whatsapp-float {
  position: fixed;
  bottom: calc(30px + env(safe-area-inset-bottom));
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #128C7E);
  color: white;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  z-index: 800;
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.35);
  transition: var(--transition);
  text-decoration: none;
  animation: whatsappPulse 2s ease-in-out infinite;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  line-height: 1;
}

@media (min-width: 993px) {
  .whatsapp-float {
    display: flex;
  }
}

@media (hover: hover) {
  .whatsapp-float:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 10px 35px rgba(37, 211, 102, 0.5);
  }
}

@keyframes whatsappPulse {
  0%, 100% { box-shadow: 0 6px 25px rgba(37, 211, 102, 0.35); }
  50% { box-shadow: 0 6px 25px rgba(37, 211, 102, 0.55), 0 0 0 8px rgba(37, 211, 102, 0.1); }
}

.whatsapp-float .tooltip {
  position: absolute;
  right: 65px;
  background: var(--navy);
  color: var(--gold-light);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: var(--transition);
  pointer-events: none;
  box-shadow: var(--shadow-md);
}

.whatsapp-float .tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent transparent var(--navy);
}

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

/* ========== MOBILE MENU OVERLAY ========== */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 14, 26, 0.6);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* ========== IMAGE LAZY LOAD EFFECT ========== */
.book-image-wrapper img[loading="lazy"] {
  transition: opacity 0.5s ease, transform 0.6s var(--ease-out-expo), filter 0.5s ease;
}

/* ========== FOCUS VISIBLE ACCESSIBILITY ========== */
*:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

/* ========== BOOK COUNT BADGE ========== */
.books-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(197, 160, 68, 0.08), rgba(197, 160, 68, 0.03));
  border: 1px solid var(--border-gold);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.books-count-badge i {
  color: var(--gold);
}

.books-count-badge strong {
  color: var(--gold-dark);
}

/* ========== ENHANCED EMPTY STATE ========== */
.empty-state {
  background: linear-gradient(135deg, rgba(197, 160, 68, 0.03), rgba(197, 160, 68, 0.01));
  border: 1px dashed var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 60px 30px;
  margin-top: 20px;
}

.empty-state .empty-icon {
  animation: emptyBounce 2s ease-in-out infinite;
}

@keyframes emptyBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ========== PAGE LOAD ANIMATION ========== */
@keyframes pageLoad {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

body {
  animation: pageLoad 0.5s ease-out;
}

/* ========== PRINT STYLES ========== */
@media print {
  .navbar,
  .back-to-top,
  .whatsapp-float,
  .toast-container,
  .modal-overlay,
  .hero-particles,
  .shipping-info,
  .hero-stats {
    display: none !important;
  }

  .shop-hero {
    min-height: auto;
    padding: 20px;
    margin-top: 0;
  }

  .book-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .books-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========== SMOOTH QUANTITY ANIMATION ========== */
.quantity-input-wrapper input {
  transition: transform 0.15s ease;
}

.quantity-input-wrapper input.bump {
  transform: scale(1.2);
}

/* ========== ENHANCED ORDER FORM VALIDATION ========== */
.form-group input:invalid:not(:placeholder-shown) {
  border-color: var(--danger);
}

.form-group input:valid:not(:placeholder-shown) {
  border-color: var(--success);
}

/* ========== NO JS FALLBACK ========== */
noscript .fallback-message {
  text-align: center;
  padding: 60px 20px;
  font-size: 1.1rem;
  color: var(--danger);
}
