/* ===========================
   Bookoe - Book Store Website (Bilingual AR/EN)
   Based on Figma design by Peterdraw
   Customized for That Al Salasil Bookstore - Kuwait
   =========================== */

:root {
  /* Colors */
  --purple: #6A5AE0;
  --purple-dark: #5847CC;
  --purple-light: #EFEEFB;
  --purple-soft: #F5F4FE;
  --orange: #FF8C42;
  --orange-light: #FFE8D6;
  --peach: #FCEBDC;
  --peach-light: #FDF4EC;
  --red: #E94E32;
  --green: #2EB67D;
  --star: #FF9F43;
  --text: #1F1F39;
  --text-2: #2A2A4A;
  --muted: #6C6B80;
  --muted-2: #9695A8;
  --border: #ECECEF;
  --border-2: #E5E5EF;
  --bg: #FFFFFF;
  --bg-soft: #F8F8FB;

  /* Type */
  --font-en: "Mulish", "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-ar: "Tajawal", "Mulish", "Segoe UI", Tahoma, sans-serif;
  --font: var(--font-ar);

  /* Radius */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Shadow */
  --sh-sm: 0 2px 8px rgba(31, 31, 57, 0.05);
  --sh-md: 0 8px 24px rgba(31, 31, 57, 0.08);
  --sh-lg: 0 16px 40px rgba(31, 31, 57, 0.10);
  --sh-purple: 0 10px 30px rgba(106, 90, 224, 0.25);

  --container: 1240px;
  --t: 0.25s ease;
}

[lang="en"] { --font: var(--font-en); }
[lang="ar"] { --font: var(--font-ar); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-weight: 800; color: var(--text); line-height: 1.3; }
h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

a { color: inherit; text-decoration: none; transition: color var(--t); }
a:hover { color: var(--purple); }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
input, select, textarea { font-family: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Hide elements based on language */
[lang="ar"] .lang-en-only { display: none !important; }
[lang="en"] .lang-ar-only { display: none !important; }

/* ===========================
   Buttons
   =========================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
}
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-dark); color: #fff; box-shadow: var(--sh-purple); }
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--border-2); }
.btn-outline:hover { border-color: var(--purple); color: var(--purple); }
.btn-light { background: var(--purple-light); color: var(--purple); }
.btn-light:hover { background: var(--purple); color: #fff; }
.btn-white { background: #fff; color: var(--purple); }
.btn-white:hover { background: var(--purple); color: #fff; }
.btn-sm { padding: 10px 18px; font-size: 0.8rem; }
.btn-block { width: 100%; }

/* ===========================
   Header
   =========================== */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 80px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--purple);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 1.4rem;
  position: relative;
  flex-shrink: 0;
}
.logo-icon::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 8px;
  width: 14px; height: 2px;
  background: #fff;
  transform: translateX(-50%);
  border-radius: 2px;
}
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text .name { font-size: 1.3rem; font-weight: 800; color: var(--text); }
.logo-text .sub { font-size: 0.7rem; color: var(--muted); margin-top: 3px; }

.menus-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--purple-light);
  color: var(--purple);
  padding: 10px 16px;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: 0.85rem;
}
.menus-btn .grid-ico {
  display: grid;
  grid-template-columns: repeat(2, 5px);
  gap: 2px;
}
.menus-btn .grid-ico span {
  width: 5px; height: 5px;
  background: currentColor;
  border-radius: 1px;
}

.search-box {
  flex: 1;
  max-width: 560px;
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 12px 50px 12px 18px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  background: #fff;
  outline: none;
  transition: border-color var(--t);
}
[dir="rtl"] .search-box input { padding: 12px 18px 12px 50px; }
.search-box input:focus { border-color: var(--purple); }
.search-box .search-ico {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--purple);
  display: flex; align-items: center; justify-content: center;
}
[dir="rtl"] .search-box .search-ico { right: auto; left: 6px; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-inline-start: auto;
}
.action-ico {
  position: relative;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  transition: color var(--t);
}
.action-ico:hover { color: var(--purple); }
.action-ico .badge {
  position: absolute;
  top: -2px;
  inset-inline-end: -2px;
  background: var(--orange);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.user-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--orange));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  overflow: hidden;
}
.lang-toggle {
  display: flex; align-items: center; gap: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-2);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--r-xs);
  border: 1px solid var(--border-2);
  transition: all var(--t);
}
.lang-toggle:hover { background: var(--purple-light); color: var(--purple); border-color: var(--purple-light); }

.menu-toggle { display: none; }

/* ===========================
   Breadcrumb
   =========================== */
.breadcrumb {
  padding: 18px 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.breadcrumb a { color: var(--purple); font-weight: 600; }
.breadcrumb .sep { margin: 0 8px; color: var(--muted-2); }

/* ===========================
   Hero (Homepage)
   =========================== */
.hero { padding: 16px 0 40px; }
.hero-row { display: grid; grid-template-columns: 1fr 280px; gap: 24px; }

.hero-banner {
  background: linear-gradient(135deg, var(--peach-light) 0%, var(--peach) 60%, #FFD6BA 100%);
  border-radius: var(--r-xl);
  padding: 50px 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero-banner::before {
  content: '';
  position: absolute;
  inset-inline-end: -50px; top: -50px;
  width: 300px; height: 300px;
  background: var(--orange);
  border-radius: 50%;
  opacity: 0.6;
}
.hero-content { position: relative; z-index: 2; }
.hero-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  text-transform: uppercase;
}
[dir="rtl"] .hero-eyebrow { letter-spacing: normal; }
.hero-content h1 {
  font-size: 2.6rem;
  line-height: 1.15;
  margin-bottom: 8px;
  font-weight: 900;
}
.hero-content .sub-h1 {
  font-size: 1.2rem;
  color: var(--text-2);
  font-weight: 600;
  margin-bottom: 16px;
}
.hero-content p { color: var(--muted); margin-bottom: 24px; max-width: 380px; font-size: 0.9rem; }
.hero-actions { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.hero-dots { display: flex; gap: 6px; }
.hero-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(31, 31, 57, 0.2);
}
.hero-dots span.active { background: var(--purple); width: 24px; border-radius: 4px; }

.hero-image {
  position: relative;
  z-index: 2;
  min-height: 420px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-book-showcase {
  position: relative;
  width: 100%;
  max-width: 380px;
  height: 420px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-book-cover {
  position: relative;
  width: 240px;
  height: 340px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  box-shadow:
    0 30px 60px rgba(31, 31, 57, 0.25),
    0 15px 30px rgba(106, 90, 224, 0.15);
  transform: rotate(-6deg);
  z-index: 3;
  transition: transform 0.4s ease;
}
.hero-book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-book-cover.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: serif;
  font-weight: 800;
  font-size: 1.1rem;
  padding: 20px;
  text-align: center;
}
.hero-book-cover.no-image::after {
  content: '📚';
  font-size: 5rem;
}
.hero-book-cover-bg {
  position: absolute;
  width: 220px;
  height: 320px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--orange), #D86B22);
  box-shadow: 0 20px 50px rgba(255, 140, 66, 0.3);
  transform: rotate(8deg) translateX(40px);
  z-index: 2;
  opacity: 0.85;
}
[dir="rtl"] .hero-book-cover-bg { transform: rotate(8deg) translateX(-40px); }
.hero-book-cover-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-book-cover-bg.no-image {
  background: linear-gradient(135deg, var(--orange), #D86B22);
}
.hero-book-cover:hover {
  transform: rotate(-3deg) scale(1.03);
}
.hero-illustration[hidden] { display: none; }

.best-seller-card {
  background: linear-gradient(180deg, #2B2B5C, #1A1A3F);
  border-radius: var(--r-xl);
  padding: 30px 24px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.best-seller-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(106, 90, 224, 0.4), transparent 60%);
}
.best-seller-card > * { position: relative; z-index: 2; }
.best-seller-card h3 { color: #fff; font-size: 1.5rem; margin-bottom: 4px; }
.best-seller-card .label { font-size: 0.75rem; opacity: 0.7; margin-bottom: 20px; }
.bs-book {
  width: 120px; height: 170px;
  margin: 0 auto 16px;
  border-radius: 6px;
  box-shadow: var(--sh-lg);
  overflow: hidden;
  background: #2A2A4A;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bs-book img { width: 100%; height: 100%; object-fit: cover; }
.bs-book.placeholder {
  background: linear-gradient(160deg, #4A3B8C, #1A1A3F);
  font-family: serif;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px;
  text-align: center;
}
.bs-title { font-family: var(--font); font-size: 1.1rem; font-weight: 700; margin-top: 12px; }
.bs-price {
  margin-top: 12px;
  display: flex; justify-content: center; align-items: baseline; gap: 8px;
}
.bs-price .now { font-weight: 800; font-size: 1.1rem; color: var(--orange); }
.bs-price .was { font-size: 0.85rem; text-decoration: line-through; opacity: 0.5; }

/* ===========================
   Features Bar
   =========================== */
.features-bar {
  background: var(--purple-light);
  padding: 28px 0;
  margin: 40px 0;
  border-radius: var(--r-xl);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 0 24px;
}
.feature-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: center;
}
.feature-ico {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.feature-item h5 { font-size: 0.9rem; margin-bottom: 4px; }
.feature-item p { font-size: 0.75rem; color: var(--muted); line-height: 1.5; }

/* ===========================
   Two-column Recommended
   =========================== */
.rec-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 80px;
}
.rec-card {
  background: var(--peach-light);
  border-radius: var(--r-xl);
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.rec-card::before {
  content: '';
  position: absolute;
  inset-inline-end: 20px; top: 20px;
  width: 60px; height: 60px;
  background: repeating-radial-gradient(circle, var(--orange) 0 1px, transparent 1px 6px);
  opacity: 0.5;
}
.rec-card h2 { font-size: 1.4rem; margin-bottom: 8px; font-weight: 800; }
.rec-card p { font-size: 0.8rem; color: var(--muted); margin-bottom: 20px; max-width: 380px; }
.rec-books {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
.rec-book {
  aspect-ratio: 3/4;
  border-radius: var(--r-sm);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  background: var(--purple-light);
}
.rec-book img { width: 100%; height: 100%; object-fit: cover; }
.rec-book.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.15;
}
.rec-nav { display: flex; justify-content: flex-end; gap: 8px; }
[dir="rtl"] .rec-nav { justify-content: flex-start; }
.nav-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  color: var(--text);
  transition: all var(--t);
}
.nav-circle:hover, .nav-circle.active { background: var(--purple); color: #fff; border-color: var(--purple); }

/* ============================================
   Universal cover image system
   - Each cover has a fallback layer (.cover-fallback) underneath
   - <img> is positioned on top
   - If image loads, it covers the fallback
   - If image fails (onerror hides img), fallback shows
   ============================================ */
.book-cover, .rec-book, .bs-book, .product-cover,
.featured-spotlight .cover, .featured-thumbs .cover,
.list-card .cover, .related-card .cover, .offer-card .cover {
  position: relative;
}
.book-cover > img, .rec-book > img, .bs-book > img, .product-cover > img,
.featured-spotlight .cover > img, .featured-thumbs .cover > img,
.list-card .cover > img, .related-card .cover > img, .offer-card .cover > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}
.cover-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  color: #fff;
  font-family: serif;
  font-weight: 800;
  text-align: center;
  line-height: 1.15;
  z-index: 1;
  font-size: 0.95rem;
  word-break: break-word;
}
.product-cover .cover-fallback { font-size: 1.4rem; padding: 30px; }
.bs-book .cover-fallback { font-size: 0.8rem; padding: 10px; }
.related-card .cover .cover-fallback { font-size: 0.55rem; padding: 4px; }
.featured-thumbs .cover .cover-fallback,
.featured-spotlight .cover .cover-fallback { font-size: 0.85rem; }
.list-card .cover .cover-fallback { font-size: 0.8rem; padding: 8px; }
.offer-card .cover .cover-fallback {
  font-family: serif;
  color: var(--red);
  font-weight: 900;
  font-size: 1.6rem;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.4);
  letter-spacing: 0.05em;
}

/* Cover colors (used as background behind fallback) */
.cv-orange1 { background: linear-gradient(160deg, #FF9866, #E96B2D); }
.cv-orange2 { background: linear-gradient(160deg, #FF6F4E, #C8412E); }
.cv-red    { background: linear-gradient(160deg, #E94E32, #B33020); }
.cv-yellow { background: linear-gradient(160deg, #FFC149, #E89B00); color: #2A2A4A; }
.cv-dark1  { background: linear-gradient(160deg, #2F3447, #16182B); }
.cv-dark2  { background: linear-gradient(160deg, #2A2A4A, #0F0F26); }
.cv-blue1  { background: linear-gradient(160deg, #2C4D8B, #182F5F); }
.cv-blue2  { background: linear-gradient(160deg, #1F2548, #0E1230); }
.cv-purple { background: linear-gradient(160deg, #6A5AE0, #3B2EAA); }
.cv-green  { background: linear-gradient(160deg, #2EB67D, #186C49); }
.cv-pink   { background: linear-gradient(160deg, #E2557B, #A1304F); }
.cv-teal   { background: linear-gradient(160deg, #1E8E93, #0E5256); }
.cv-brown  { background: linear-gradient(160deg, #8C6A4C, #4E3A26); }

/* ===========================
   Section header
   =========================== */
.section { padding: 50px 0; }
.section-title-center {
  text-align: center;
  margin-bottom: 40px;
}
.section-title-center h2 { font-size: 1.8rem; margin-bottom: 8px; }
.section-title-center p { color: var(--muted); max-width: 420px; margin: 0 auto; font-size: 0.85rem; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: 1.6rem; }
.section-head .controls { display: flex; gap: 8px; }

/* ===========================
   Special Offers (horizontal card with portrait cover)
   =========================== */
.offers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.offer-card {
  background: #fff;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all var(--t);
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 16px;
}
.offer-card:hover { box-shadow: var(--sh-md); transform: translateY(-4px); }
.offer-card .cover {
  aspect-ratio: 3/4;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg-soft);
}
.offer-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.offer-card .body { padding: 0; display: flex; flex-direction: column; }
.offer-card h3 { font-size: 1.05rem; margin-bottom: 6px; line-height: 1.3; }
.offer-tags {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.offer-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}
[dir="rtl"] .offer-tag { letter-spacing: normal; text-transform: none; }
.offer-card p {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.offer-card .author {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 6px;
  font-weight: 600;
}
.offer-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto;
  padding-top: 6px;
  gap: 8px;
  flex-wrap: wrap;
}
.offer-foot .add-cart-btn { padding: 8px 12px; font-size: 0.72rem; }
.offer-foot .price {
  font-weight: 800;
  color: var(--red);
  font-size: 1rem;
}
.offer-foot .price .was {
  font-size: 0.75rem;
  color: var(--muted-2);
  text-decoration: line-through;
  margin-inline-start: 4px;
  font-weight: 500;
}

.add-cart-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px;
  background: var(--purple);
  color: #fff;
  border-radius: var(--r-sm);
  font-size: 0.78rem;
  font-weight: 700;
  transition: all var(--t);
}
.add-cart-btn:hover { background: var(--purple-dark); color: #fff; }
.add-cart-btn .cart-ico { font-size: 0.9rem; }

.dots-row { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.dots-row .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border-2);
  cursor: pointer;
  transition: all var(--t);
}
.dots-row .dot:hover { background: var(--purple-light); }
.dots-row .dot.active { background: var(--purple); width: 20px; border-radius: 4px; }
.hero-dots span { cursor: pointer; transition: all var(--t); }
.hero-dots span:hover:not(.active) { background: var(--purple-light); }
.test-avatars .avt { cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.test-avatars .avt:hover:not(.active) { transform: scale(1.1); box-shadow: var(--sh-sm); }
.test-card.faded { cursor: pointer; transition: opacity 0.2s ease; }
.test-card.faded:hover { opacity: 0.7; }

/* ===========================
   Flash Sale
   =========================== */
.flash-sale { text-align: center; }
.countdown {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 24px 0 40px;
  flex-wrap: wrap;
}
.cd-cell { text-align: center; }
.cd-cell .num { font-size: 1.8rem; font-weight: 800; color: var(--red); }
.cd-cell .lbl { font-size: 0.75rem; color: var(--muted); text-transform: capitalize; }
.cd-sep { font-size: 1.8rem; font-weight: 800; color: var(--red); }

.flash-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

/* ===========================
   Book card
   =========================== */
.book-card {
  background: transparent;
  text-align: start;
}
.book-cover {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sh-sm);
  margin-bottom: 12px;
  background: var(--bg-soft);
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover.placeholder {
  padding: 18px;
  color: #fff;
  font-family: serif;
  font-weight: 800;
  font-size: 1rem;
  text-align: center;
  line-height: 1.15;
}
.book-cover .heart {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  transition: all var(--t);
  z-index: 2;
}
.book-cover .heart:hover, .book-cover .heart.active {
  background: var(--purple); color: #fff;
}
.discount-tag {
  position: absolute;
  top: 0;
  inset-inline-start: 12px;
  background: var(--red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  z-index: 2;
}

.book-meta h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
  font-weight: 700;
}
.book-meta .cat {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 6px;
}
[dir="rtl"] .book-meta .cat { letter-spacing: normal; text-transform: none; }
.book-meta .rating {
  display: flex; align-items: center; gap: 4px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.book-meta .stars { color: var(--star); letter-spacing: 1px; }
.book-meta .price { font-size: 0.95rem; font-weight: 800; color: var(--red); }
.book-meta .price .was { font-size: 0.75rem; color: var(--muted-2); text-decoration: line-through; margin-inline-start: 4px; font-weight: 500; }

/* ===========================
   Featured Books
   =========================== */
.featured-bg {
  background: var(--purple-soft);
  padding: 60px 0;
  border-radius: var(--r-xl);
}
.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: center;
}
.featured-spotlight {
  background: #fff;
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--sh-sm);
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
}
.featured-spotlight .cover {
  aspect-ratio: 3/4;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg-soft);
}
.featured-spotlight .cover img { width: 100%; height: 100%; object-fit: cover; }
.featured-spotlight .cover.placeholder {
  display: flex; align-items: flex-end;
  padding: 14px;
  font-family: serif;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.1;
}
.fs-content { display: flex; flex-direction: column; justify-content: space-between; }
.fs-content .tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--purple);
  font-weight: 800;
  margin-bottom: 6px;
}
[dir="rtl"] .fs-content .tag { letter-spacing: normal; text-transform: none; }
.fs-content h3 { font-size: 1.2rem; margin-bottom: 8px; }
.fs-content h5 { font-size: 0.85rem; color: var(--muted); margin-bottom: 4px; font-weight: 700; }
.fs-content p { font-size: 0.78rem; color: var(--muted); line-height: 1.6; margin-bottom: 12px; }
.fs-meta { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); margin-bottom: 14px; }
.fs-meta strong { color: var(--text); }
.fs-foot { display: flex; align-items: center; justify-content: space-between; }
.fs-foot .price { font-weight: 800; color: var(--red); font-size: 1rem; }
.add-sq {
  width: 36px; height: 36px;
  border-radius: var(--r-xs);
  background: var(--purple);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}

.featured-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.featured-thumbs .cover {
  aspect-ratio: 3/4;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg-soft);
}
.featured-thumbs .cover img { width: 100%; height: 100%; object-fit: cover; }
.featured-thumbs .cover.placeholder {
  display: flex; align-items: center; justify-content: center;
  font-family: serif;
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  text-align: center;
  padding: 12px;
  line-height: 1.1;
}

/* ===========================
   Testimonials
   =========================== */
.testimonials {
  text-align: center;
}
.test-avatars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}
.test-avatars .avt {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--orange));
  border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}
.test-avatars .avt.active { transform: scale(1.2); box-shadow: var(--sh-md); }

.test-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}
.test-card {
  background: #fff;
  border-radius: var(--r-md);
  padding: 24px;
  text-align: start;
  border: 1px solid var(--border);
}
.test-card.faded { opacity: 0.4; }
.test-card.featured { box-shadow: var(--sh-md); border-color: transparent; }
.test-card p { font-size: 0.9rem; color: var(--text-2); margin-bottom: 16px; line-height: 1.7; }
.test-foot {
  display: flex; align-items: center; justify-content: space-between;
}
.test-user { display: flex; align-items: center; gap: 12px; }
.test-user .avt {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--orange));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.7rem; font-weight: 700;
}
.test-user .name { font-size: 0.9rem; font-weight: 700; }
.test-user .role { font-size: 0.7rem; color: var(--muted); }

/* ===========================
   Latest News
   =========================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.news-card {
  background: #fff;
  border-radius: var(--r-md);
  overflow: hidden;
  transition: all var(--t);
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.news-card .img {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--purple-light), var(--peach));
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  overflow: hidden;
}
.news-card .img img { width: 100%; height: 100%; object-fit: cover; }
.news-card .body { padding: 16px 4px; }
.news-card h4 { font-size: 1rem; margin-bottom: 8px; line-height: 1.5; font-weight: 700; }
.news-card p { font-size: 0.82rem; color: var(--muted); margin-bottom: 14px; line-height: 1.6; }
.news-foot { display: flex; align-items: center; gap: 10px; }
.news-foot .avt {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--orange));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.65rem; font-weight: 700;
}
.news-foot .name { font-size: 0.85rem; font-weight: 700; }
.news-foot .date { font-size: 0.72rem; color: var(--muted); }

/* ===========================
   Stats
   =========================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-item .ico {
  font-size: 2rem;
  color: var(--purple);
  margin-bottom: 12px;
}
.stat-item .num { font-size: 1.8rem; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.stat-item .lbl { font-size: 0.85rem; color: var(--muted); }

/* ===========================
   Newsletter
   =========================== */
.newsletter {
  background: var(--purple);
  border-radius: var(--r-xl);
  padding: 50px 40px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin: 50px 0;
}
.newsletter::before {
  content: '';
  position: absolute;
  inset-inline-start: -40px; bottom: -40px;
  width: 140px; height: 140px;
  background: var(--orange);
  border-radius: 50%;
  opacity: 0.9;
}
.newsletter::after {
  content: '';
  position: absolute;
  inset-inline-end: -30px; top: -30px;
  width: 100px; height: 100px;
  background: var(--orange);
  border-radius: 50%;
  opacity: 0.9;
}
.newsletter > * { position: relative; z-index: 2; }
.newsletter h2 { color: #fff; font-size: 1.6rem; margin-bottom: 6px; font-weight: 800; }
.newsletter p { opacity: 0.95; font-size: 0.95rem; margin-bottom: 24px; }
.newsletter-form {
  display: flex;
  gap: 0;
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--r-pill);
  padding: 6px;
}
.newsletter-form input {
  flex: 1;
  border: none;
  padding: 10px 18px;
  font-size: 0.9rem;
  background: transparent;
  outline: none;
  color: var(--text);
  font-family: inherit;
}
.newsletter-form button {
  background: var(--purple);
  color: #fff;
  padding: 10px 28px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

/* ===========================
   Brand logos strip
   =========================== */
.brands {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding: 40px 0;
  opacity: 0.45;
}
.brand-name {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ===========================
   Footer
   =========================== */
.site-footer {
  background: #fff;
  padding: 60px 0 24px;
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p { font-size: 0.85rem; color: var(--muted); margin: 16px 0; line-height: 1.7; }
.footer-brand h5 { margin-bottom: 12px; }
.social-row { display: flex; gap: 10px; }
.social-row a {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--purple-light);
  color: var(--purple);
  font-size: 0.85rem;
  font-weight: 700;
  transition: all var(--t);
}
.social-row a:hover { background: var(--purple); color: #fff; }
.social-row a.yt { background: #FF0000; color: #fff; }
.social-row a.fb { background: #1877F2; color: #fff; }

.footer-col h5 { font-size: 1rem; margin-bottom: 18px; }
.footer-col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.footer-col-grid a { font-size: 0.85rem; color: var(--muted); }
.footer-col-grid a:hover { color: var(--purple); }
.footer-col ul li { margin-bottom: 10px; font-size: 0.85rem; }
.footer-col ul li a { color: var(--muted); }
.footer-col ul li a:hover { color: var(--purple); }
.view-more-link { color: var(--purple); font-weight: 700; font-size: 0.85rem; }

.footer-store-map {
  width: 100%;
  height: 100px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, #C6DEC4 0%, #E7F0DA 50%, #C6DEC4 100%);
  position: relative;
  margin-bottom: 14px;
  overflow: hidden;
}
.footer-store-map::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 50%, rgba(255,255,255,0.7) 50%, rgba(255,255,255,0.7) 51%, transparent 51%),
    linear-gradient(0deg, transparent 30%, rgba(255,255,255,0.5) 30%, rgba(255,255,255,0.5) 31%, transparent 31%),
    linear-gradient(0deg, transparent 70%, rgba(255,255,255,0.5) 70%, rgba(255,255,255,0.5) 71%, transparent 71%);
}
.footer-store-map::after {
  content: '📍';
  position: absolute;
  left: 50%; top: 40%;
  transform: translate(-50%, -50%);
  font-size: 1.4rem;
}
.footer-store-info { font-size: 0.85rem; color: var(--muted); line-height: 1.8; }
.footer-store-info > div { display: flex; gap: 8px; align-items: start; margin-bottom: 6px; }
.footer-store-info .ico { color: var(--purple); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex; justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom .credit { color: var(--purple); font-weight: 700; }

/* ===========================
   Shop layout
   =========================== */
.shop-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  padding: 24px 0 60px;
}
.shop-sidebar h3 {
  font-size: 1rem;
  margin-bottom: 18px;
}
.filter-card {
  background: #fff;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.filter-head {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 10px;
  cursor: pointer;
}
.filter-head .chev { color: var(--muted); font-size: 0.7rem; }
.filter-body ul li {
  font-size: 0.85rem;
  color: var(--text-2);
  padding: 4px 0;
  cursor: pointer;
}
.filter-body ul li.active { color: var(--purple); font-weight: 700; }
.filter-body ul li .num { color: var(--muted); margin-inline-start: 4px; }
.filter-body .nested { padding-inline-start: 12px; font-size: 0.78rem; color: var(--muted); }
.filter-body .nested li { padding: 3px 0; }

.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cat-grid label {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem;
  color: var(--text-2);
  cursor: pointer;
}
.cat-grid input { accent-color: var(--purple); width: 16px; height: 16px; }

.price-slider input[type="range"] {
  width: 100%;
  accent-color: var(--purple);
  margin: 12px 0 4px;
}
.price-values {
  display: flex; justify-content: space-between;
  font-size: 0.75rem; color: var(--muted);
}

.refine-actions { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.reset-link { text-align: center; font-size: 0.85rem; color: var(--muted); cursor: pointer; }

.view-more-btn {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--purple);
  font-weight: 700;
  cursor: pointer;
}

.shop-main h2 { margin-bottom: 18px; }
.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.tab-row { display: flex; gap: 4px; }
.tab-row button {
  padding: 8px 14px;
  border-radius: var(--r-xs);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  transition: all var(--t);
}
.tab-row button.active { background: var(--purple-light); color: var(--purple); }

.view-options { display: flex; align-items: center; gap: 12px; }
.view-toggle { display: flex; gap: 4px; }
.view-toggle a {
  width: 32px; height: 32px;
  border-radius: var(--r-xs);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border-2);
  font-size: 0.85rem;
}
.view-toggle a.active { background: var(--purple-light); color: var(--purple); border-color: var(--purple-light); }

.sort-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.82rem; color: var(--muted);
}
.sort-row select {
  border: none;
  background: transparent;
  font-weight: 700;
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
}

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

/* List view */
.shop-list { display: grid; gap: 18px; }
.list-card {
  background: #fff;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  padding: 20px;
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 20px;
}
.list-card.active-card { border-color: var(--purple); box-shadow: var(--sh-purple); }
.list-card .cover {
  aspect-ratio: 3/4;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg-soft);
}
.list-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.list-card .cover.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: serif;
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  text-align: center;
  padding: 12px;
  line-height: 1.1;
}
.list-info h3 { font-size: 1.15rem; margin-bottom: 4px; }
.list-info .cat-row {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
}
[dir="rtl"] .list-info .cat-row { letter-spacing: normal; text-transform: none; }
.list-info .rating {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.82rem; color: var(--muted);
  margin-bottom: 8px;
}
.list-info .rating .stars { color: var(--star); letter-spacing: 1px; font-size: 0.85rem; }
.list-info p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; margin: 8px 0; }
.list-info .price { font-size: 1.05rem; font-weight: 800; color: var(--red); margin-bottom: 8px; }
.list-info .price .was { font-size: 0.85rem; color: var(--muted-2); text-decoration: line-through; margin-inline-start: 6px; font-weight: 500; }
.coupons { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.coupon-tag {
  background: var(--purple-light);
  color: var(--purple);
  padding: 4px 10px;
  border-radius: var(--r-xs);
  font-size: 0.75rem;
  font-weight: 700;
}
.list-publisher {
  display: flex; gap: 24px;
  font-size: 0.78rem;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-2);
}
.list-publisher > div { display: flex; flex-direction: column; }
.list-publisher .lbl { color: var(--muted-2); font-size: 0.72rem; margin-bottom: 2px; }
.list-publisher .val { font-weight: 700; color: var(--text); }

.list-actions { display: flex; flex-direction: column; align-items: end; gap: 10px; }
[dir="rtl"] .list-actions { align-items: start; }
.heart-sq {
  width: 36px; height: 36px;
  border-radius: var(--r-xs);
  background: var(--purple-light);
  color: var(--purple);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t);
}
.heart-sq:hover, .heart-sq.active { background: var(--purple); color: #fff; }
.in-cart-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px;
  background: var(--purple-light);
  color: var(--purple);
  border-radius: var(--r-sm);
  font-size: 0.8rem;
  font-weight: 700;
}

/* Pagination */
.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 6px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.pagination a {
  min-width: 36px; height: 36px;
  border-radius: var(--r-xs);
  background: #fff;
  border: 1px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-2);
  padding: 0 10px;
  transition: all var(--t);
}
.pagination a:hover, .pagination a.active {
  background: var(--purple); color: #fff; border-color: var(--purple);
}
.pagination a.nav-text { gap: 6px; padding: 0 14px; }

/* ===========================
   Book Detail
   =========================== */
.product-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 50px;
  padding: 20px 0 50px;
}
.product-cover {
  aspect-ratio: 3/4;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: var(--sh-md);
}
.product-cover img { width: 100%; height: 100%; object-fit: cover; }
.product-cover.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: serif;
  color: #fff;
  font-weight: 800;
  font-size: 1.8rem;
  text-align: center;
  padding: 30px;
  line-height: 1.15;
}
.pd-meta h1 { font-size: 2rem; margin-bottom: 12px; }
.pd-rating-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.pd-rating-row .stars { color: var(--star); letter-spacing: 1px; font-size: 1rem; }
.pd-rating-row .num { font-weight: 800; color: var(--text); }
.pd-share { display: flex; gap: 6px; margin-inline-start: auto; flex-wrap: wrap; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
}
.share-btn.fb { background: #1877F2; }
.share-btn.tw { background: #1DA1F2; }
.share-btn.wa { background: #25D366; }
.share-btn.email { background: #6C6B80; }

.pd-desc { color: var(--muted); margin-bottom: 20px; font-size: 0.92rem; line-height: 1.8; }

.pd-author-row {
  display: flex; gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.pd-author-row .col { display: flex; flex-direction: column; }
.pd-author-row .lbl { font-size: 0.72rem; color: var(--muted); margin-bottom: 4px; }
.pd-author-row .val { font-size: 0.88rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.pd-author-row .avt-sm {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--orange));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.6rem; font-weight: 700;
}

.pd-price-row {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px dashed var(--border-2);
  flex-wrap: wrap;
}
.pd-price { font-size: 1.8rem; font-weight: 800; color: var(--red); }
.pd-price .was { font-size: 1rem; color: var(--muted-2); text-decoration: line-through; margin-inline-start: 8px; font-weight: 500; }
.pd-free-badge {
  background: var(--orange);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--r-xs);
}

.pd-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.qty-sel {
  display: flex; align-items: center;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.qty-sel button {
  width: 36px; height: 40px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
}
.qty-sel input {
  width: 44px;
  border: none;
  text-align: center;
  font-weight: 700;
  background: #fff;
  outline: none;
}

.pd-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.pd-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--purple-light);
  color: var(--purple);
}
.pd-badge.in-stock { background: rgba(46, 182, 125, 0.12); color: var(--green); }

/* Tabs */
.detail-tabs {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  padding-bottom: 30px;
}
.tabs-head {
  display: flex; gap: 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.tabs-head button {
  font-size: 1.1rem;
  font-weight: 800;
  padding: 12px 0;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs-head button.active {
  color: var(--text);
  border-bottom-color: var(--purple);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.details-table { width: 100%; }
.details-table tr { border-bottom: 1px solid var(--border); }
.details-table td { padding: 14px 0; font-size: 0.88rem; }
.details-table td:first-child { color: var(--muted); width: 30%; }
.details-table td:last-child { font-weight: 700; color: var(--text); }
.tags-row { display: flex; gap: 6px; flex-wrap: wrap; }
.tag-pill {
  padding: 4px 10px;
  background: var(--purple-light);
  color: var(--purple);
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 700;
}

.related-books { display: grid; gap: 14px; }
.related-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: center;
}
.related-card .cover {
  aspect-ratio: 3/4;
  border-radius: var(--r-xs);
  overflow: hidden;
  background: var(--bg-soft);
}
.related-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.related-card .cover.placeholder {
  display: flex; align-items: center; justify-content: center;
  font-family: serif;
  color: #fff;
  font-weight: 800;
  font-size: 0.6rem;
  padding: 6px;
  text-align: center;
  line-height: 1.05;
}
.related-card h5 { font-size: 0.88rem; margin-bottom: 4px; }
.related-card .cat-mini { font-size: 0.65rem; color: var(--muted); margin-bottom: 4px; font-weight: 700; }
.related-card .rating-mini { font-size: 0.72rem; color: var(--muted); }
.related-card .rating-mini .stars { color: var(--star); font-size: 0.78rem; }
.related-card .price-mini { font-size: 0.88rem; font-weight: 800; color: var(--red); margin: 4px 0; }
.related-card .add-mini {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.72rem; padding: 6px 10px;
  background: var(--purple); color: #fff;
  border-radius: var(--r-xs); font-weight: 700;
}

/* Reviews */
.rating-summary {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 40px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.rs-bars { display: grid; gap: 8px; }
.rs-bar {
  display: grid;
  grid-template-columns: 30px 1fr 40px;
  gap: 10px;
  align-items: center;
  font-size: 0.78rem;
}
.rs-bar .bar {
  height: 6px;
  background: var(--border-2);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.rs-bar .fill { height: 100%; background: var(--purple); border-radius: var(--r-pill); }
.rs-bar .pct { text-align: end; color: var(--muted); }

.rs-score { text-align: center; }
.rs-score .big {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--text);
}
.rs-score .of { color: var(--muted); font-size: 0.85rem; font-weight: 600; margin-inline-start: 4px; }
.rs-score .stars { color: var(--star); font-size: 1.1rem; letter-spacing: 1px; margin: 4px 0; }
.rs-score .reviews-count { font-size: 0.78rem; color: var(--muted); }

.reviews-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
  font-size: 0.85rem; color: var(--muted);
  flex-wrap: wrap; gap: 10px;
}

.review-item {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.review-item .avt {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--orange));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}
.review-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.review-head .name { font-weight: 700; font-size: 0.92rem; }
.review-head .date { font-size: 0.72rem; color: var(--muted); }
.review-item p { font-size: 0.85rem; color: var(--muted); line-height: 1.7; }
.review-rating { text-align: end; }
.review-rating .score-num { font-weight: 800; font-size: 0.95rem; }
.review-rating .stars-r { color: var(--star); font-size: 0.85rem; }

.view-more-btn-block {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px;
  background: var(--purple);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 700;
  margin-top: 16px;
  cursor: pointer;
}

/* ===========================
   Checkout
   =========================== */
.checkout-page { padding: 30px 0 50px; }
.stepper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 40px;
  gap: 0;
  max-width: 720px;
  margin-inline: auto;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  position: relative;
}
.step .circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1.5px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--muted);
  transition: all var(--t);
}
.step.done .circle { background: var(--purple); color: #fff; border-color: var(--purple); }
.step.active .circle { background: var(--purple); color: #fff; border-color: var(--purple); box-shadow: 0 0 0 6px rgba(106, 90, 224, 0.15); }
.step .lbl { font-size: 0.82rem; color: var(--muted); font-weight: 700; }
.step.done .lbl, .step.active .lbl { color: var(--text); }
.step-line {
  flex: 1;
  height: 2px;
  background: var(--border-2);
  margin: 0 0 24px;
  align-self: center;
  min-width: 60px;
}
.step-line.done { background: var(--purple); }

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.co-block { margin-bottom: 32px; }
.co-block > h2 { font-size: 1.4rem; margin-bottom: 24px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 6px;
}
[dir="rtl"] .form-group label { text-transform: none; letter-spacing: normal; font-size: 0.82rem; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: all var(--t);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--purple); }
.form-group textarea { min-height: 100px; resize: vertical; }
.form-group select { cursor: pointer; }

.pay-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.pay-method {
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-md);
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t);
  position: relative;
  background: #fff;
}
.pay-method:hover { border-color: var(--purple); }
.pay-method.active { border-color: var(--purple); background: var(--purple-soft); }
.pay-method .pay-ico { font-size: 1.6rem; margin-bottom: 10px; color: var(--text); }
.pay-method .pay-name { font-size: 0.85rem; font-weight: 700; }
.pay-check {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--purple);
  color: #fff;
  display: none;
  align-items: center; justify-content: center;
  font-size: 0.7rem;
}
.pay-method.active .pay-check { display: flex; }

.place-order-btn {
  width: 100%;
  padding: 16px;
  background: var(--purple);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all var(--t);
}
[dir="rtl"] .place-order-btn { letter-spacing: normal; text-transform: none; }
.place-order-btn:hover { background: var(--purple-dark); box-shadow: var(--sh-purple); }

/* ===========================
   Auth Pages (Login / Signup)
   =========================== */
.auth-page {
  min-height: calc(100vh - 80px);
  background: linear-gradient(135deg, #FDF4EC 0%, #FFFFFF 50%, #EFEEFB 100%);
  padding: 30px 0;
  display: flex;
  align-items: center;
}
.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}

.auth-visual {
  position: relative;
  padding: 30px;
}
.auth-visual h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 16px;
  line-height: 1.3;
}
.auth-visual h1 .accent { color: var(--purple); }
.auth-visual p {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 28px;
  line-height: 1.7;
}
.auth-benefits {
  display: grid;
  gap: 14px;
  margin-bottom: 30px;
}
.auth-benefit {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.7);
  padding: 12px 18px;
  border-radius: var(--r-md);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-2);
  border: 1px solid rgba(106, 90, 224, 0.1);
  backdrop-filter: blur(10px);
}

.auth-decoration {
  position: relative;
  margin-top: 30px;
  display: flex;
  justify-content: center;
  height: 220px;
}
.auth-decoration .deco-book {
  position: absolute;
  width: 130px;
  height: 180px;
  border-radius: 8px;
  box-shadow: var(--sh-lg);
  background: var(--bg-soft);
  overflow: hidden;
}
.auth-decoration .deco-book img { width: 100%; height: 100%; object-fit: cover; }
.auth-decoration .deco-book.b1 { transform: rotate(-10deg) translateX(-90px); z-index: 1; }
.auth-decoration .deco-book.b2 { transform: rotate(0deg); z-index: 3; box-shadow: 0 25px 50px rgba(31,31,57,0.25); }
.auth-decoration .deco-book.b3 { transform: rotate(10deg) translateX(90px); z-index: 1; }
[dir="rtl"] .auth-decoration .deco-book.b1 { transform: rotate(-10deg) translateX(90px); }
[dir="rtl"] .auth-decoration .deco-book.b3 { transform: rotate(10deg) translateX(-90px); }

.auth-card {
  background: #fff;
  border-radius: var(--r-xl);
  padding: 40px;
  box-shadow: 0 20px 60px rgba(31, 31, 57, 0.08);
  border: 1px solid var(--border);
}
.auth-card-head { margin-bottom: 28px; }
.auth-card-head h2 {
  font-size: 1.6rem;
  margin-bottom: 6px;
}
.auth-card-head p {
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-form .form-group { margin-bottom: 16px; }
.auth-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 6px;
}
.auth-form .req { color: var(--red); }
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="tel"] {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  font-size: 0.92rem;
  font-family: inherit;
  background: var(--bg-soft);
  outline: none;
  transition: all var(--t);
  color: var(--text);
}
.auth-form input:focus {
  border-color: var(--purple);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(106, 90, 224, 0.1);
}
.auth-form .input-with-icon {
  position: relative;
}
.auth-form .input-with-icon input {
  padding-inline-start: 44px;
}
.auth-form .input-with-icon .field-icon {
  position: absolute;
  top: 50%;
  inset-inline-start: 14px;
  transform: translateY(-50%);
  color: var(--muted-2);
  font-size: 1rem;
  pointer-events: none;
}
.auth-form .password-toggle {
  position: absolute;
  top: 50%;
  inset-inline-end: 12px;
  transform: translateY(-50%);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 600;
}
.auth-form .password-toggle:hover { color: var(--purple); }

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

.auth-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0 22px;
  flex-wrap: wrap;
  gap: 8px;
}
.auth-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-2);
  cursor: pointer;
  font-weight: 600;
}
.auth-options input[type="checkbox"] {
  accent-color: var(--purple);
  width: 16px; height: 16px;
}
.auth-options .forgot {
  font-size: 0.85rem;
  color: var(--purple);
  font-weight: 700;
}

.terms-row {
  display: flex;
  align-items: start;
  gap: 10px;
  margin: 16px 0 22px;
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.6;
}
.terms-row input[type="checkbox"] {
  accent-color: var(--purple);
  width: 16px; height: 16px;
  margin-top: 3px;
}
.terms-row a { color: var(--purple); font-weight: 700; }

.auth-submit {
  width: 100%;
  padding: 15px;
  background: var(--purple);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 800;
  font-size: 0.95rem;
  transition: all var(--t);
  margin-top: 6px;
}
.auth-submit:hover {
  background: var(--purple-dark);
  box-shadow: var(--sh-purple);
  transform: translateY(-1px);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-2);
}

.social-auth {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
  transition: all var(--t);
  cursor: pointer;
}
.social-btn:hover { border-color: var(--purple); transform: translateY(-1px); box-shadow: var(--sh-sm); }
.social-btn .ico { font-size: 1.1rem; font-weight: 900; }
.social-btn.google .ico { color: #DB4437; }
.social-btn.facebook .ico { color: #1877F2; }
.social-btn.apple .ico { color: #000; }

.auth-bottom {
  text-align: center;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--muted);
}
.auth-bottom a { color: var(--purple); font-weight: 800; }
.auth-bottom a:hover { text-decoration: underline; }

.auth-error {
  background: rgba(233, 78, 50, 0.1);
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: none;
  border-inline-start: 3px solid var(--red);
}
.auth-error.show { display: block; }

/* ===========================
   Slider (horizontal scrollable carousel)
   =========================== */
.slider-grid {
  display: flex !important;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 6px;
}
.slider-grid::-webkit-scrollbar { display: none; }
.slider-grid > * {
  flex: 0 0 calc((100% - 22px * 5) / 6);
  scroll-snap-align: start;
  min-width: 0;
}
.slider-grid.cols-5 > * { flex-basis: calc((100% - 22px * 4) / 5); }
.slider-grid.cols-4 > * { flex-basis: calc((100% - 22px * 3) / 4); }
.slider-grid.cols-3 > * { flex-basis: calc((100% - 22px * 2) / 3); }

@media (max-width: 1024px) {
  .slider-grid > * { flex-basis: calc((100% - 22px * 3) / 4); }
  .slider-grid.cols-3 > * { flex-basis: calc((100% - 22px) / 2); }
}
@media (max-width: 768px) {
  .slider-grid > * { flex-basis: calc((100% - 22px) / 2); }
}
@media (max-width: 480px) {
  .slider-grid > * { flex-basis: 80%; }
}

/* Filter checkbox list (Publisher / Year) */
.filter-list {
  max-height: 220px;
  overflow-y: auto;
  padding-inline-end: 4px;
}
.filter-list::-webkit-scrollbar { width: 4px; }
.filter-list::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }
.filter-list li {
  list-style: none;
  padding: 4px 0;
}
.filter-list label {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem;
  color: var(--text-2);
  cursor: pointer;
  width: 100%;
}
.filter-list input[type="checkbox"] {
  accent-color: var(--purple);
  width: 16px; height: 16px;
}
.filter-list .count {
  margin-inline-start: auto;
  color: var(--muted-2);
  font-size: 0.75rem;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 24px;
  background: #fff;
  border-radius: var(--r-md);
  border: 1px dashed var(--border-2);
  color: var(--muted);
}
.no-results-ico { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }
.no-results h3 { font-size: 1.2rem; margin-bottom: 8px; color: var(--text); }
.no-results p { font-size: 0.9rem; }

/* ===========================
   Toast Notification
   =========================== */
.toast {
  position: fixed;
  bottom: 30px;
  inset-inline-end: 30px;
  background: var(--text);
  color: #fff;
  padding: 14px 22px;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--sh-lg);
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
  max-width: 320px;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ===========================
   Cart Page
   =========================== */
.page-hero {
  background: var(--purple-light);
  padding: 40px 0;
  margin-bottom: 30px;
  text-align: center;
  border-radius: var(--r-xl);
  margin-top: 12px;
}
.page-hero h1 { font-size: 2rem; margin-bottom: 6px; }
.page-hero p { color: var(--muted); font-size: 0.95rem; }
.page-hero .pill {
  display: inline-block;
  margin-top: 10px;
  background: var(--purple);
  color: #fff;
  padding: 6px 16px;
  border-radius: var(--r-pill);
  font-size: 0.8rem;
  font-weight: 700;
}

.cart-page-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  padding: 20px 0 50px;
}

.cart-items-wrap {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.cart-items-head {
  display: grid;
  grid-template-columns: 80px 1fr 110px 130px 110px 40px;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
[dir="rtl"] .cart-items-head { text-transform: none; letter-spacing: normal; font-size: 0.85rem; }

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr 110px 130px 110px 40px;
  gap: 16px;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t);
}
.cart-item:last-child { border-bottom: none; }
.cart-item:hover { background: var(--bg-soft); }
.cart-item-cover {
  position: relative;
  width: 80px;
  aspect-ratio: 3/4;
  border-radius: var(--r-xs);
  overflow: hidden;
  background: var(--bg-soft);
}
.cart-item-info { display: flex; flex-direction: column; gap: 4px; }
.cart-item-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.4;
}
.cart-item-author { font-size: 0.8rem; color: var(--muted); }
.cart-item-cat { font-size: 0.75rem; color: var(--muted-2); }
.cart-item-mobile-price { display: none; font-size: 1rem; font-weight: 800; color: var(--red); }
.cart-item-price { font-weight: 700; color: var(--text); }
.cart-item-subtotal { font-weight: 800; font-size: 1.05rem; color: var(--red); }
.cart-item-remove {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  transition: all var(--t);
}
.cart-item-remove:hover { background: rgba(233, 78, 50, 0.1); color: var(--red); }

.qty-sel.small button { width: 30px; height: 32px; font-size: 0.95rem; }
.qty-sel.small input { width: 36px; font-size: 0.9rem; }

.cart-actions-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.cart-clear-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px;
  background: transparent;
  color: var(--red);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 700;
  transition: all var(--t);
}
.cart-clear-btn:hover { border-color: var(--red); background: rgba(233, 78, 50, 0.05); }

.cart-summary {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 24px;
  height: fit-content;
  position: sticky;
  top: 100px;
}
.cart-summary h3 { font-size: 1.15rem; margin-bottom: 18px; }
.summary-row {
  display: flex; justify-content: space-between;
  padding: 10px 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.summary-row strong, .summary-row .val { color: var(--text); font-weight: 700; }
.summary-row.grand-total {
  border-top: 1.5px solid var(--border-2);
  margin-top: 8px;
  padding-top: 16px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}
.summary-row.grand-total .val { color: var(--red); font-size: 1.3rem; }

.promo-row {
  display: flex;
  gap: 8px;
  margin: 20px 0;
}
.promo-row input {
  flex: 1;
  padding: 11px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  font-family: inherit;
  background: var(--bg-soft);
  outline: none;
  font-size: 0.85rem;
}
.promo-row button {
  background: var(--text);
  color: #fff;
  padding: 11px 18px;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: 0.85rem;
}

.sm-saved {
  background: rgba(46, 182, 125, 0.1);
  color: var(--green);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  text-align: center;
  margin: 12px 0;
}

.checkout-cta {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--purple);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 800;
  text-align: center;
  font-size: 0.95rem;
  margin-top: 14px;
  transition: all var(--t);
}
.checkout-cta:hover { background: var(--purple-dark); color: #fff; box-shadow: var(--sh-purple); }
.continue-shopping {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}
.continue-shopping:hover { color: var(--purple); }

.cart-empty, .wishlist-empty {
  text-align: center;
  padding: 60px 30px;
  background: #fff;
  border-radius: var(--r-md);
  border: 1px dashed var(--border-2);
}
.empty-ico { font-size: 4rem; margin-bottom: 16px; opacity: 0.5; }
.cart-empty h3, .wishlist-empty h3 { font-size: 1.4rem; margin-bottom: 8px; }
.cart-empty p, .wishlist-empty p { color: var(--muted); margin-bottom: 24px; }

/* ===========================
   Wishlist Page
   =========================== */
.wishlist-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.wishlist-header-actions .info { font-size: 0.9rem; color: var(--muted); }
.wishlist-header-actions .info strong { color: var(--text); }
.wishlist-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.wishlist-actions button {
  padding: 10px 16px;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 700;
  transition: all var(--t);
}
.wishlist-actions .add-all {
  background: var(--purple);
  color: #fff;
}
.wishlist-actions .add-all:hover { background: var(--purple-dark); }
.wishlist-actions .clear {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--border-2);
}
.wishlist-actions .clear:hover { border-color: var(--red); }

.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 50px;
}
.wishlist-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: all var(--t);
}
.wishlist-card:hover { box-shadow: var(--sh-md); transform: translateY(-3px); }
.wishlist-card .cover {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 0;
  overflow: hidden;
  display: block;
  background: var(--bg-soft);
}
.wish-remove {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 3;
  transition: all var(--t);
}
.wish-remove:hover { background: var(--red); color: #fff; }
.wishlist-info { padding: 16px; }
.wishlist-info h4 { font-size: 1rem; margin-bottom: 6px; line-height: 1.4; }
.wishlist-info .cat {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); font-weight: 700; margin-bottom: 8px;
}
[dir="rtl"] .wishlist-info .cat { letter-spacing: normal; text-transform: none; }
.wishlist-info .rating { font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; }
.wishlist-info .rating .stars { color: var(--star); letter-spacing: 1px; }
.wishlist-info .price { font-weight: 800; color: var(--red); font-size: 1rem; margin-bottom: 12px; }
.wishlist-info .price .was { font-size: 0.8rem; color: var(--muted-2); text-decoration: line-through; margin-inline-start: 6px; font-weight: 500; }

.add-cart-btn.block, .add-cart-btn.small {
  display: inline-flex; padding: 8px 14px;
  font-size: 0.78rem;
}
.add-cart-btn.block { width: 100%; justify-content: center; }

/* ===========================
   Responsive
   =========================== */
@media (max-width: 1024px) {
  .auth-grid { grid-template-columns: 1fr; gap: 30px; max-width: 500px; margin: 0 auto; }
  .auth-visual { padding: 10px; text-align: center; }
  .auth-decoration { margin-top: 20px; }
  .cart-page-grid { grid-template-columns: 1fr; gap: 24px; }
  .cart-summary { position: relative; top: 0; }
  .wishlist-grid { grid-template-columns: repeat(3, 1fr); }
  .header-inner { flex-wrap: wrap; height: auto; padding: 16px 0; gap: 12px; }
  .search-box { order: 5; flex: 1 0 100%; }
  .hero-row { grid-template-columns: 1fr; }
  .hero-banner { padding: 40px 32px; grid-template-columns: 1fr; gap: 24px; }
  .hero-content h1 { font-size: 2rem; }
  .best-seller-card { max-width: 360px; margin: 0 auto; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .rec-row { grid-template-columns: 1fr; }
  .offers-grid { grid-template-columns: repeat(2, 1fr); }
  .flash-grid { grid-template-columns: repeat(3, 1fr); }
  .featured-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .shop-layout { grid-template-columns: 1fr; }
  .shop-grid { grid-template-columns: repeat(3, 1fr); }
  .product-hero { grid-template-columns: 1fr; gap: 30px; }
  .product-cover { max-width: 280px; }
  .detail-tabs { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; gap: 40px; }
  .test-row { grid-template-columns: 1fr; }
  .test-card.faded { display: none; }
}

@media (max-width: 768px) {
  .auth-card { padding: 24px; }
  .social-auth { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .wishlist-grid { grid-template-columns: repeat(2, 1fr); }
  .cart-items-head { display: none; }
  .cart-item {
    grid-template-columns: 80px 1fr 32px;
    grid-template-areas:
      "cover info  remove"
      "cover qty   subtotal";
    gap: 12px;
  }
  .cart-item-cover { grid-area: cover; }
  .cart-item-info { grid-area: info; }
  .cart-item-price { display: none; }
  .cart-item-mobile-price { display: block; }
  .cart-item-qty { grid-area: qty; }
  .cart-item-subtotal { grid-area: subtotal; text-align: end; }
  .cart-item-remove { grid-area: remove; }
  .menu-toggle {
    display: flex;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
  }
  .menu-toggle span { width: 22px; height: 2px; background: var(--text); position: relative; }
  .menu-toggle span::before, .menu-toggle span::after { content: ''; position: absolute; left: 0; width: 100%; height: 2px; background: var(--text); }
  .menu-toggle span::before { top: -6px; }
  .menu-toggle span::after { top: 6px; }
  .menus-btn { display: none; }
  .hero-content h1 { font-size: 1.7rem; }
  .hero-image { height: 240px; }
  .hero-image-placeholder { width: 220px; height: 240px; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .offers-grid { grid-template-columns: 1fr; }
  .flash-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-spotlight { grid-template-columns: 1fr; }
  .featured-spotlight .cover { max-width: 160px; margin: 0 auto; aspect-ratio: 3/4; }
  .news-grid { grid-template-columns: 1fr; }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .list-card { grid-template-columns: 100px 1fr; }
  .list-actions { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; }
  .product-hero { gap: 24px; }
  .product-cover { font-size: 1.4rem; }
  .pd-meta h1 { font-size: 1.4rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .stepper { flex-wrap: wrap; gap: 12px; }
  .step-line { display: none; }
  .pay-methods { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .section { padding: 30px 0; }
  .newsletter { padding: 36px 24px; }
  .newsletter h2 { font-size: 1.3rem; }
}

@media (max-width: 480px) {
  .wishlist-grid { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  .hero-banner { padding: 24px 20px; }
  .shop-grid { grid-template-columns: 1fr; }
  .countdown { gap: 8px; }
  .cd-cell .num { font-size: 1.4rem; }
  .cd-sep { font-size: 1.4rem; }
  .featured-thumbs { grid-template-columns: repeat(2, 1fr); }
}
