/* ═══════════════════════════════════════════════════════════════
   FARIID BOOKS — Main Stylesheet
   Theme: Luxury Dark Gold | Mobile-first 360–480px
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --bg:           #0f0f13;
  --bg-2:         #16161e;
  --bg-3:         #1e1e2a;
  --bg-card:      #1a1a24;
  --gold:         #e8b86d;
  --gold-light:   #f5d49a;
  --gold-dark:    #c4922a;
  --accent:       #7c6af7;
  --red:          #e85d75;
  --green:        #4ade80;
  --text:         #f0ede8;
  --text-muted:   #8a8799;
  --text-subtle:  #5a5870;
  --border:       #2a2a38;
  --border-light: #353548;
  --radius:       14px;
  --radius-sm:    8px;
  --radius-lg:    20px;
  --shadow:       0 4px 24px rgba(0,0,0,.45);
  --shadow-gold:  0 4px 20px rgba(232,184,109,.18);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --nav-h:        64px;
  --header-h:     56px;
  --safe-bottom:  env(safe-area-inset-bottom, 0px);
  --safe-top:     env(safe-area-inset-top, 0px);
  --transition:   0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-top: calc(var(--header-h) + var(--safe-top));
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 8px);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  color: inherit;
  outline: none;
}
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; }
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.2rem; font-weight: 600; }
h3 { font-size: 1rem;   font-weight: 600; }
p  { line-height: 1.65; color: var(--text-muted); font-size: .9rem; }

/* ── App Header ─────────────────────────────────────────────── */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(15,15,19,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding-top: var(--safe-top);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); padding: 0 16px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.logo-icon { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; }
.logo-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
}
.logo-text em { color: var(--gold); font-style: normal; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bg-3);
  transition: background var(--transition);
}
.icon-btn:active { background: var(--border-light); }
.icon-btn svg { width: 18px; height: 18px; stroke: var(--text-muted); }
.lang-select {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 10px;
  font-size: .75rem; color: var(--text-muted);
  appearance: none; cursor: pointer;
}

/* ── Search Overlay ─────────────────────────────────────────── */
.search-overlay {
  position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 99;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  transform: translateY(-110%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
}
.search-overlay.open { transform: translateY(0); }
.search-form { display: flex; gap: 8px; }
.search-input {
  flex: 1; background: var(--bg-3); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px;
  color: var(--text); font-size: .9rem;
  transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--gold); }
.search-submit {
  width: 44px; height: 44px;
  background: var(--gold); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.search-submit svg { width: 18px; height: 18px; stroke: #0f0f13; }
.autocomplete-list {
  margin-top: 8px;
  display: flex; flex-direction: column; gap: 2px;
}
.autocomplete-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.autocomplete-item:hover, .autocomplete-item:focus { background: var(--bg-3); }
.autocomplete-cover {
  width: 32px; height: 48px; object-fit: cover;
  border-radius: 4px; flex-shrink: 0;
  background: var(--bg-3);
}
.autocomplete-info { flex: 1; min-width: 0; }
.autocomplete-title { font-size: .85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.autocomplete-author { font-size: .75rem; color: var(--text-muted); }

/* ── Country Banner ─────────────────────────────────────────── */
.country-banner {
  position: fixed; top: calc(var(--header-h) + 4px);
  left: 12px; right: 12px; z-index: 98;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; color: var(--text-muted);
  box-shadow: var(--shadow);
  animation: slideDown .35s ease;
}
.country-banner.hidden { display: none; }
.country-banner button {
  margin-left: auto; font-size: 1.1rem; line-height: 1;
  color: var(--text-muted); padding: 2px 4px;
}
@keyframes slideDown { from { transform: translateY(-16px); opacity: 0; } }

/* ── Country Info Bar ────────────────────────────────────────── */
.country-info-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 16px; font-size: .8rem;
  color: var(--text-muted); background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.country-flag-display { font-size: 1.1rem; }
.city-name { opacity: .7; }

/* ── Bottom Navigation ──────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(15,15,19,.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex; align-items: stretch;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  padding: 6px 4px;
  color: var(--text-subtle);
  transition: color var(--transition);
  position: relative;
}
.nav-item svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.nav-label { font-size: .63rem; font-weight: 500; letter-spacing: .01em; }
.nav-item.active { color: var(--gold); }
.nav-item.active::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 28px; height: 2px; border-radius: 2px;
  background: var(--gold);
}
.nav-item:active { transform: scale(.92); }

/* ── Main Content ───────────────────────────────────────────── */
.main-content { min-height: 60vh; }

/* ── Sections ───────────────────────────────────────────────── */
.section { padding: 0 16px 24px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0 12px;
}
.section-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 1rem; font-weight: 600; color: var(--text);
}
.section-title svg { width: 17px; height: 17px; stroke: var(--gold); flex-shrink: 0; }
.see-all { font-size: .78rem; color: var(--gold); font-weight: 500; }

/* ── Featured Carousel ──────────────────────────────────────── */
.featured-section { position: relative; }
.carousel { position: relative; overflow: hidden; }
.carousel-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
  will-change: transform;
}
.carousel-slide {
  min-width: 100%; height: 260px; position: relative; flex-shrink: 0;
}
.carousel-link { display: block; height: 100%; }
.carousel-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(.45);
}
.carousel-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,15,19,.95) 0%, transparent 60%);
}
.carousel-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 20px 28px;
}
.carousel-badge {
  display: inline-block;
  background: var(--gold); color: #0f0f13;
  font-size: .68rem; font-weight: 700; letter-spacing: .07em;
  padding: 3px 10px; border-radius: 20px;
  margin-bottom: 8px; text-transform: uppercase;
}
.carousel-title {
  font-size: 1.45rem; font-weight: 700;
  color: #fff; margin-bottom: 4px;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.carousel-author { font-size: .82rem; color: rgba(255,255,255,.65); margin-bottom: 6px; }
.carousel-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.carousel-rating span { font-size: .75rem; color: rgba(255,255,255,.5); }
.carousel-cta {
  display: inline-flex; align-items: center;
  background: rgba(232,184,109,.15);
  border: 1px solid rgba(232,184,109,.4);
  color: var(--gold); border-radius: 20px;
  padding: 6px 14px; font-size: .78rem; font-weight: 600;
}
.carousel-dots {
  position: absolute; bottom: 10px; right: 16px;
  display: flex; gap: 5px;
}
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.3);
  transition: all var(--transition);
}
.dot.active { width: 18px; border-radius: 3px; background: var(--gold); }

/* ── Category Chips ─────────────────────────────────────────── */
.categories-scroll {
  display: flex; gap: 8px;
  overflow-x: auto; padding: 0 0 8px;
  scrollbar-width: none;
}
.categories-scroll::-webkit-scrollbar { display: none; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 5px;
  white-space: nowrap;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 14px;
  font-size: .78rem; font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}
.cat-chip svg { width: 13px; height: 13px; stroke: var(--gold); }
.cat-chip.active, .cat-chip:active { background: var(--gold); border-color: var(--gold); color: #0f0f13; }
.cat-chip-icon { font-size: .9rem; }

/* ── Books Row (horizontal scroll) ─────────────────────────── */
.books-row {
  display: flex; gap: 12px;
  overflow-x: auto; padding-bottom: 6px;
  scrollbar-width: none;
}
.books-row::-webkit-scrollbar { display: none; }

/* ── Book Card ──────────────────────────────────────────────── */
.book-card {
  flex-shrink: 0; width: 140px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.book-card:active { transform: scale(.96); }
.book-card-link { display: block; }
.book-cover-wrap {
  position: relative; width: 100%;
  padding-top: 133%; /* 3:4 ratio */
  background: var(--bg-3);
}
.book-cover {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.book-info { padding: 10px 9px 11px; }
.book-title {
  font-size: .78rem; font-weight: 600; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 3px; line-height: 1.3;
}
.book-author { font-size: .7rem; color: var(--text-muted); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-desc { display: none; }
.book-rating { display: flex; align-items: center; gap: 1px; }
.star { width: 10px; height: 10px; }
.star-full { color: var(--gold); }
.star-empty { color: var(--border-light); }

/* Books grid (2-col) */
.books-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.books-grid .book-card { width: 100%; }
.books-grid .book-title { font-size: .82rem; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  position: absolute; top: 7px; left: 7px;
  font-size: .62rem; font-weight: 700;
  padding: 2px 7px; border-radius: 10px;
  letter-spacing: .05em; text-transform: uppercase;
}
.badge-free  { background: var(--green); color: #0f0f13; }
.badge-paid  { background: var(--gold);  color: #0f0f13; }
.badge-lg    { font-size: .7rem; padding: 4px 10px; }
.free-badge  { background: var(--green); color: #0f0f13; border-radius: 10px; padding: 2px 8px; font-size: .72rem; font-weight: 700; }

/* ── Free Section BG ─────────────────────────────────────────── */
.section-free { background: linear-gradient(135deg, rgba(74,222,128,.04) 0%, transparent 60%); border-radius: var(--radius-lg); }

/* ── Donate Banner ──────────────────────────────────────────── */
.donate-banner { margin: 8px 16px 24px; }
.donate-banner-inner {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-3));
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  display: flex; align-items: center; gap: 14px;
}
.donate-banner-inner svg { width: 28px; height: 28px; stroke: var(--red); flex-shrink: 0; }
.donate-banner-inner strong { display: block; font-size: .9rem; margin-bottom: 2px; color: var(--text); }
.donate-banner-inner p { font-size: .78rem; margin: 0; }
.btn-donate-sm {
  flex-shrink: 0; background: var(--gold); color: #0f0f13;
  border-radius: 20px; padding: 7px 14px;
  font-size: .75rem; font-weight: 700;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; padding: 13px 24px;
  border-radius: var(--radius); font-weight: 600; font-size: .9rem;
  transition: all var(--transition); cursor: pointer;
}
.btn-primary { background: var(--gold); color: #0f0f13; }
.btn-primary:active { background: var(--gold-dark); }
.btn-secondary { background: var(--bg-3); border: 1.5px solid var(--border); color: var(--text); }
.btn-secondary:active { background: var(--border); }
.btn-download { width: 100%; justify-content: center; font-size: 1rem; padding: 15px; box-shadow: var(--shadow-gold); }
.btn-center { display: flex; margin: 24px auto 0; width: fit-content; }

/* ── Page Header ─────────────────────────────────────────────── */
.page-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 16px 0;
}
.page-header h1 {
  font-size: 1.3rem;
  display: flex; align-items: center; gap: 8px;
}
.page-header h1 svg { width: 20px; height: 20px; stroke: var(--gold); }
.back-btn {
  width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-3); border-radius: 50%;
}
.back-btn svg { width: 18px; height: 18px; stroke: var(--text); }
.page-header-info { display: flex; flex-direction: column; gap: 2px; }
.cat-icon-lg { font-size: 1.4rem; }

/* ── Book Detail ─────────────────────────────────────────────── */
.book-hero {
  position: relative; overflow: hidden;
  min-height: 220px; padding: 20px 16px 24px;
}
.book-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: blur(20px) brightness(.3) saturate(1.2);
  transform: scale(1.1);
}
.book-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(15,15,19,.3), var(--bg) 100%);
}
.book-hero-inner {
  position: relative; z-index: 1;
  display: flex; gap: 16px; align-items: flex-start;
}
.book-hero-cover { position: relative; flex-shrink: 0; }
.detail-cover {
  width: 120px; height: 178px; object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
}
.book-hero-info { flex: 1; min-width: 0; padding-top: 4px; }
.detail-title {
  font-size: 1.2rem; font-weight: 700;
  color: var(--text); margin-bottom: 6px; line-height: 1.25;
}
.detail-author, .detail-lang {
  display: flex; align-items: center; gap: 5px;
  font-size: .78rem; color: var(--text-muted); margin-bottom: 5px;
}
.detail-author svg, .detail-lang svg { width: 13px; height: 13px; stroke: var(--gold); }
.detail-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.rating-count { font-size: .73rem; color: var(--text-muted); }
.detail-stats { display: flex; gap: 12px; }
.stat-item {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: rgba(255,255,255,.05); border-radius: var(--radius-sm);
  padding: 6px 10px;
}
.stat-item svg { width: 13px; height: 13px; stroke: var(--gold); margin-bottom: 2px; }
.stat-item span { font-size: .8rem; font-weight: 600; }
.stat-item small { font-size: .6rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }

/* ── Preview Section ─────────────────────────────────────────── */
.preview-section { padding: 16px; }
.preview-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.preview-header {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-3);
  font-size: .82rem; font-weight: 600; color: var(--text-muted);
}
.preview-header svg { width: 15px; height: 15px; stroke: var(--gold); }
.preview-timer {
  margin-left: auto;
  display: flex; align-items: center; gap: 4px;
  background: rgba(232,184,109,.12);
  border: 1px solid rgba(232,184,109,.25);
  border-radius: 20px; padding: 3px 9px;
  color: var(--gold); font-size: .75rem; font-weight: 600;
}
.preview-timer svg { width: 12px; height: 12px; stroke: var(--gold); }
.preview-content {
  padding: 16px;
  font-size: .87rem; line-height: 1.75;
  color: var(--text-muted);
  max-height: 200px; overflow: hidden;
  position: relative;
}
.preview-content::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0; height: 60px;
  background: linear-gradient(transparent, var(--bg-card));
}
.preview-progress { height: 3px; background: var(--bg-3); }
.preview-bar {
  height: 100%; background: var(--gold);
  width: 0%; transition: width 1s linear;
}

/* ── Book CTA ───────────────────────────────────────────────── */
.book-cta { padding: 0 16px 16px; }
.cta-free, .cta-paid {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px 16px;
  text-align: center; animation: fadeUp .4s ease;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } }
.cta-icon {
  width: 56px; height: 56px;
  border-radius: 50%; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
}
.cta-icon-free { background: rgba(74,222,128,.12); }
.cta-icon-free svg { width: 24px; height: 24px; stroke: var(--green); }
.cta-icon-paid { background: rgba(232,184,109,.12); }
.cta-icon-paid svg { width: 24px; height: 24px; stroke: var(--gold); }
.cta-free h3, .cta-paid h3 { font-size: 1.05rem; margin-bottom: 8px; color: var(--text); }
.cta-price { font-size: 1.8rem; font-weight: 700; color: var(--gold); margin-bottom: 16px; font-family: var(--font-display); }
.cta-note { font-size: .72rem; color: var(--text-subtle); margin-top: 10px; }
.donation-suggest { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.donation-suggest p { font-size: .78rem; margin-bottom: 10px; }
.donation-amounts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.donate-amt-btn {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 20px; padding: 6px 14px;
  font-size: .8rem; font-weight: 600; color: var(--gold);
  transition: all var(--transition);
}
.donate-amt-btn:active { background: var(--gold); color: #0f0f13; border-color: var(--gold); }
.paypal-container { margin-top: 14px; min-height: 50px; }
.paypal-container-lg { min-height: 50px; margin: 16px 0; }

/* ── Book Sections ──────────────────────────────────────────── */
.book-section { padding: 16px; border-top: 1px solid var(--border); }
.book-section-title {
  font-size: .95rem; font-weight: 600;
  color: var(--text); margin-bottom: 12px;
}
.book-description {
  font-size: .87rem; line-height: 1.75;
  color: var(--text-muted);
  max-height: 150px; overflow: hidden;
  transition: max-height .4s ease;
}
.book-description.expanded { max-height: 1000px; }
.read-more-btn {
  display: flex; align-items: center; gap: 4px;
  margin-top: 8px; font-size: .8rem;
  color: var(--gold); font-weight: 500;
}
.read-more-btn svg { width: 14px; height: 14px; stroke: var(--gold); }

/* ── Tags ───────────────────────────────────────────────────── */
.tag-wrap { display: flex; gap: 7px; flex-wrap: wrap; }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 11px; border-radius: 20px;
  font-size: .73rem; font-weight: 500;
}
.tag-cat { background: rgba(124,106,247,.12); border: 1px solid rgba(124,106,247,.25); color: var(--accent); }
.tag-cat svg { width: 11px; height: 11px; stroke: var(--accent); }
.tag-tag { background: var(--bg-3); border: 1px solid var(--border); color: var(--text-muted); }

/* ── Stars ──────────────────────────────────────────────────── */
.stars { display: inline-flex; gap: 2px; }
.stars .icon-star-full  { color: var(--gold); }
.stars .icon-star-half  { color: var(--gold-dark); }
.stars .icon-star-empty { color: var(--border-light); }

/* ── Ratings ─────────────────────────────────────────────────── */
.ratings-summary { margin-bottom: 16px; }
.rating-big { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px; }
.rating-number { font-size: 2.5rem; font-weight: 700; font-family: var(--font-display); color: var(--gold); }
.rating-stars-big .stars { gap: 4px; }
.rating-total { font-size: .78rem; color: var(--text-muted); }

/* ── Review Form ─────────────────────────────────────────────── */
.review-form { margin-bottom: 20px; }
.review-form h3 { font-size: .9rem; margin-bottom: 10px; }
.star-picker { display: flex; gap: 6px; margin-bottom: 10px; }
.star-pick { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
.star-pick svg { width: 28px; height: 28px; }
.star-pick.active svg { fill: var(--gold); stroke: var(--gold); }
.star-pick svg { transition: fill var(--transition), stroke var(--transition); fill: none; stroke: var(--border-light); }
.review-textarea {
  width: 100%; background: var(--bg-3);
  border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; color: var(--text); resize: none;
  font-size: .87rem; line-height: 1.5; margin-bottom: 10px;
  transition: border-color var(--transition);
}
.review-textarea:focus { border-color: var(--gold); }
#submitReview { width: 100%; justify-content: center; }

/* ── Reviews List ─────────────────────────────────────────────── */
.reviews-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.review-item {
  background: var(--bg-3); border-radius: var(--radius);
  padding: 12px; border: 1px solid var(--border);
}
.review-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.reviewer-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-card); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.reviewer-avatar svg { width: 16px; height: 16px; stroke: var(--text-muted); }
.reviewer-name { font-size: .82rem; font-weight: 600; }
.review-date { font-size: .72rem; color: var(--text-muted); }
.review-stars { margin-left: auto; }
.review-text { font-size: .83rem; color: var(--text-muted); line-height: 1.55; }

/* ── Store Filter Tabs ──────────────────────────────────────── */
.store-filter-tabs { display: flex; gap: 0; padding: 12px 16px; }
.filter-tab {
  flex: 1; text-align: center; padding: 9px 0;
  font-size: .82rem; font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  transition: all var(--transition);
}
.filter-tab.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ── Search Inline ───────────────────────────────────────────── */
.search-bar-inline { padding-top: 16px; }
.search-form-inline { display: flex; gap: 8px; }
.search-input-wrap {
  flex: 1; position: relative;
  display: flex; align-items: center;
}
.search-input-wrap svg {
  position: absolute; left: 12px;
  width: 16px; height: 16px; stroke: var(--text-muted); pointer-events: none;
}
.search-input-inline {
  width: 100%; background: var(--bg-card);
  border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 10px 14px 10px 38px;
  color: var(--text); font-size: .9rem;
}
.search-input-inline:focus { border-color: var(--gold); }
.results-count { font-size: .82rem; color: var(--text-muted); padding-top: 12px; }

/* ── Popular searches ────────────────────────────────────────── */
.popular-searches h2 { font-size: .95rem; margin-bottom: 10px; }
.search-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.search-chip {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; padding: 6px 14px;
  font-size: .78rem; color: var(--text-muted);
  transition: all var(--transition);
}
.search-chip:active { background: var(--gold); color: #0f0f13; border-color: var(--gold); }

/* ── About ──────────────────────────────────────────────────── */
.content-page { max-width: 100%; }
.about-logo-center { text-align: center; padding: 20px 0 16px; }
.about-logo-center h2 { font-size: 1.4rem; margin-top: 10px; }
.tagline { font-size: .85rem; color: var(--gold); margin-top: 4px; }
.about-text { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.about-text p { font-size: .87rem; }
.about-stats { display: flex; gap: 0; margin-bottom: 20px; }
.astat {
  flex: 1; text-align: center; padding: 14px;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 3px;
}
.astat:last-child { border-right: none; }
.astat strong { font-size: 1.3rem; font-weight: 700; color: var(--gold); font-family: var(--font-display); }
.astat span { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }

/* ── Donate Page ─────────────────────────────────────────────── */
.donate-intro { margin-bottom: 20px; font-size: .9rem; }
.donate-amounts-large {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: 16px;
}
.donate-tile {
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  text-align: center; cursor: pointer;
  transition: all var(--transition);
  display: flex; flex-direction: column; gap: 4px;
}
.donate-tile.selected, .donate-tile:active { border-color: var(--gold); background: rgba(232,184,109,.08); }
.donate-tile-amount { font-size: 1.4rem; font-weight: 700; color: var(--gold); font-family: var(--font-display); }
.donate-tile-label { font-size: .73rem; color: var(--text-muted); }
.donate-tile-custom { padding: 12px; }
.donate-custom-input {
  width: 100%; background: none; border-bottom: 1.5px solid var(--border);
  padding: 6px 0; font-size: 1rem; text-align: center; color: var(--text);
}
.donate-note { font-size: .75rem; color: var(--text-muted); text-align: center; margin-top: 8px; }
.donate-other { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.donate-email-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px; color: var(--gold); font-size: .83rem;
}
.donate-email-link svg { width: 14px; height: 14px; stroke: var(--gold); }
.donate-other p { font-size: .82rem; }

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; padding: 48px 16px; text-align: center;
}
.empty-state svg { width: 48px; height: 48px; stroke: var(--text-subtle); }
.empty-state p { font-size: .9rem; }

/* ── Error / 404 ─────────────────────────────────────────────── */
.error-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 60vh; padding: 24px;
}
.error-inner { text-align: center; }
.error-illustration { margin-bottom: 20px; }
.error-inner h1 { margin-bottom: 8px; }
.error-inner p { margin-bottom: 20px; }

/* ── Chat FAB ─────────────────────────────────────────────────── */
.chat-fab-wrap {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 14px);
  right: 16px; z-index: 90;
}
.chat-fab {
  width: 52px; height: 52px;
  background: var(--gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(232,184,109,.45);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}
.chat-fab:active { transform: scale(.9); }
.fab-icon { width: 22px; height: 22px; stroke: #0f0f13; }
.chat-badge {
  position: absolute; top: -2px; right: -2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--bg);
  display: none;
}
.chat-badge.visible { display: block; }

/* ── Chat Panel ──────────────────────────────────────────────── */
.chat-panel {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 72px);
  right: 12px; left: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex; flex-direction: column;
  max-height: 72vh;
  transform: scale(.92) translateY(20px);
  opacity: 0; pointer-events: none;
  transition: all .28s cubic-bezier(0.4,0,0.2,1);
  transform-origin: bottom right;
}
.chat-panel.open {
  transform: scale(1) translateY(0);
  opacity: 1; pointer-events: all;
}
.chat-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-avatar {
  width: 36px; height: 36px;
  background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.chat-avatar svg { width: 18px; height: 18px; stroke: #0f0f13; }
.chat-name { font-size: .87rem; font-weight: 600; }
.chat-status { display: flex; align-items: center; gap: 5px; font-size: .72rem; color: var(--text-muted); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.chat-close { margin-left: auto; padding: 6px; }
.chat-close svg { width: 18px; height: 18px; stroke: var(--text-muted); }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
  scroll-behavior: smooth;
}
.chat-msg { display: flex; flex-direction: column; max-width: 82%; }
.chat-msg.ai { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; }
.msg-bubble {
  padding: 9px 12px; border-radius: 16px;
  font-size: .83rem; line-height: 1.55;
}
.chat-msg.ai .msg-bubble {
  background: var(--bg-3); border-bottom-left-radius: 4px;
  color: var(--text);
}
.chat-msg.user .msg-bubble {
  background: var(--gold); color: #0f0f13;
  border-bottom-right-radius: 4px; font-weight: 500;
}
.msg-time { font-size: .65rem; color: var(--text-subtle); margin-top: 3px; }
.chat-msg.user .msg-time { text-align: right; }
.typing-bubble .msg-bubble { padding: 11px 14px; }
.typing-dots { display: flex; gap: 4px; }
.typing-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-muted); animation: typingDot 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }
@keyframes typingDot { 0%,80%,100%{transform:scale(1)} 40%{transform:scale(1.4)} }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chat-book-link {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(232,184,109,.12);
  border: 1px solid rgba(232,184,109,.3);
  border-radius: 10px; padding: 4px 9px;
  font-size: .73rem; color: var(--gold); font-weight: 500;
}

.chat-quick-btns {
  display: flex; gap: 6px; padding: 8px 12px;
  overflow-x: auto; scrollbar-width: none;
  border-top: 1px solid var(--border); flex-shrink: 0;
}
.chat-quick-btns::-webkit-scrollbar { display: none; }
.quick-btn {
  white-space: nowrap; background: var(--bg-3);
  border: 1px solid var(--border); border-radius: 16px;
  padding: 6px 12px; font-size: .75rem; color: var(--text-muted);
  transition: all var(--transition);
}
.quick-btn:active { background: var(--gold); color: #0f0f13; border-color: var(--gold); }

.chat-input-row {
  display: flex; gap: 8px; align-items: flex-end;
  padding: 10px 12px;
  border-top: 1px solid var(--border); flex-shrink: 0;
}
.chat-input {
  flex: 1; background: var(--bg-3);
  border: 1.5px solid var(--border); border-radius: 16px;
  padding: 9px 12px; color: var(--text);
  font-size: .85rem; resize: none; line-height: 1.4;
  max-height: 90px; overflow-y: auto;
  transition: border-color var(--transition);
}
.chat-input:focus { border-color: var(--gold); }
.chat-send {
  width: 38px; height: 38px;
  background: var(--gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: transform var(--transition);
}
.chat-send:active { transform: scale(.88); }
.chat-send svg { width: 16px; height: 16px; stroke: #0f0f13; }

/* ── Toast ───────────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: calc(var(--nav-h) + var(--safe-bottom) + 10px);
  left: 12px; right: 12px; z-index: 200;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
  font-size: .83rem; color: var(--text);
  box-shadow: var(--shadow);
  animation: toastIn .3s ease;
  display: flex; align-items: center; gap: 8px;
}
.toast.toast-success { border-left: 3px solid var(--green); }
.toast.toast-error   { border-left: 3px solid var(--red); }
.toast.toast-info    { border-left: 3px solid var(--gold); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }
.toast-icon { font-size: 1rem; flex-shrink: 0; }

/* ── Utilities ───────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }

/* ── Accessibility ───────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ── Loading Skeleton ────────────────────────────────────────── */
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position:  200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-3) 25%, var(--border) 50%, var(--bg-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
