/* palette comes from tokens.css (loaded by theme.css) */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Vazirmatn', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── HEADER (same pattern as other pages) ── */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(0,0,0,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}
.back-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--border);
  color: var(--muted); font-family: 'Vazirmatn', sans-serif;
  font-size: 12px; font-weight: 500;
  padding: 7px 14px; border-radius: 6px;
  cursor: pointer; text-decoration: none;
  transition: border-color 0.18s, color 0.18s;
  flex-shrink: 0; white-space: nowrap;
}
.back-btn:hover { border-color: var(--accent); color: var(--heading); }
.back-btn i { font-size: 11px; }
html[dir="ltr"] .back-btn i { transform: scaleX(-1); }

.hd-center {
  position: absolute; left: 50%; transform: translateX(-50%);
  pointer-events: none;
}
.logo-sm {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px; letter-spacing: 3px;
  color: var(--muted); user-select: none; white-space: nowrap;
}
.logo-sm .dot { color: var(--accent); }

.hd-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lang-btn {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--muted); font-family: 'Vazirmatn', sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; padding: 5px 10px;
  border-radius: 5px; cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
}
.lang-btn:hover { border-color: var(--accent); color: var(--heading); }

.avatar-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 14px;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.avatar-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-d); }
.avatar-btn.logged-in { border-color: var(--accent); color: var(--accent); }

/* ── PAGE SHELL ── */
.shop-wrap {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 40px 32px 72px;
}

.page-eyebrow {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 8px;
}
.page-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 34px; letter-spacing: 2px;
  color: var(--heading); margin-bottom: 4px;
}
.page-sub {
  font-size: 12px; color: var(--muted); margin-bottom: 36px;
  max-width: 520px; line-height: 1.7;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 44px 0 40px;
}

/* ── ENTRY VIEW (single, small, centered book-cover card) ── */
.entry-wrap {
  display: flex;
  justify-content: center;
}

.entry-card {
  width: 100%;
  max-width: 220px;
}

.entry-cover {
  width: 100%;
  aspect-ratio: 2048 / 3508;
  max-height: 55vh;
  background: #F2EAE3;
  overflow: hidden;
  flex-shrink: 0;
}
.entry-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.entry-card .shop-card-body {
  text-align: center;
}
.entry-card .shop-card-title {
  font-size: 15px;
}

@media (max-width: 640px) {
  .entry-card { max-width: 160px; }
}

/* ── FULL VIEW WRAPPER ── */
.shop-full { display: none; }
.shop-full.visible { display: block; }

/* ── BOOK ABOUT SECTION ── */
.book-about {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.book-about-cover {
  flex-shrink: 0;
  width: 200px;
  aspect-ratio: 2048 / 3508;
  background: #F2EAE3;
  border-radius: 8px;
  overflow: hidden;
}
.book-about-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book-about-text {
  flex: 1;
  font-size: 13px;
  color: var(--text);
  line-height: 2;
  white-space: pre-line;
}

@media (max-width: 640px) {
  .book-about {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .book-about-cover {
    width: 160px;
  }
}

/* ── PRODUCT GRID ── */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.shop-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.shop-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.shop-card-icon-wrap {
  background: #1a1a1a;
  height: 110px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.shop-card-icon-wrap i {
  font-size: 40px;
  color: #6e1225;
}
.shop-card-stripe { height: 3px; background: var(--accent); flex-shrink: 0; }

.shop-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}
.shop-card-title {
  font-size: 16px; font-weight: 700;
  color: var(--heading);
  line-height: 1.3;
}
.shop-card-desc {
  font-size: 12px; color: var(--muted);
  line-height: 1.7; flex: 1;
}
.shop-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 6px;
}
.shop-card-price {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px; letter-spacing: 1px;
  color: #F2EAE3;
}

.shop-card-btn {
  background: var(--accent-d);
  border: 1px solid rgba(255,7,58,0.3);
  color: var(--accent);
  font-family: 'Vazirmatn', sans-serif;
  font-size: 11px; font-weight: 700;
  padding: 8px 14px; border-radius: 6px;
  white-space: nowrap;
  transition: background 0.18s;
  pointer-events: none; /* whole card is the click target */
}

/* ── PAYMENT INSTRUCTIONS SECTION ── */
.pay-section { scroll-margin-top: 80px; }
.pay-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px; letter-spacing: 2px;
  color: var(--heading); margin-bottom: 8px;
  text-align: center;
}
.pay-note {
  font-size: 12px; color: var(--muted);
  text-align: center; max-width: 520px;
  margin: 0 auto 28px; line-height: 1.8;
}
.pay-note.highlight { color: var(--accent); font-weight: 600; }

.gateway-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto 28px;
  padding: 14px 18px;
  background: var(--accent-d);
  border: 1px solid var(--accent);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--heading);
  text-align: center;
}
.gateway-notice i {
  color: var(--accent);
  font-size: 14px;
  flex-shrink: 0;
}

.pay-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 32px;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}
.pay-row {
  font-size: 12px; color: var(--muted);
}
.pay-label { font-weight: 600; color: var(--text); }
.pay-value { color: var(--heading); font-weight: 600; }
.pay-row-highlight {
  font-family: 'Vazirmatn', sans-serif;
  font-size: 16px; font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  direction: ltr;
}
.pay-footnote {
  font-size: 11px; color: var(--muted);
  margin-top: 10px; line-height: 1.7;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .shop-wrap { padding: 24px 16px 56px; }
  .site-header { padding: 0 14px; }
  .shop-grid { grid-template-columns: 1fr; }
  .pay-card { padding: 22px 20px; }
}
/* ── ONLINE BOOK (protected reader) ── */
.book-about-body { flex: 1; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.book-about-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.read-online-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255, 7, 58, 0.35);
  transition: filter 0.18s, transform 0.18s;
}
.read-online-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }

.book-online-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--muted);
}
.book-online-note i { color: #4caf50; }

.book-online-teaser {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px dashed rgba(255, 7, 58, 0.4);
  color: var(--accent);
  font-family: 'Vazirmatn', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}
.book-online-teaser:hover { background: var(--accent-d); border-color: var(--accent); }

.shop-card.online { border-color: rgba(76, 175, 80, 0.45); }
.shop-card.online .shop-card-btn {
  background: rgba(76, 175, 80, 0.14);
  border-color: rgba(76, 175, 80, 0.45);
  color: #66bb6a;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.shop-card.online .shop-card-icon-wrap i { color: #66bb6a; }
.owned-badge {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 700;
  color: #66bb6a;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(76, 175, 80, 0.4);
  padding: 3px 8px;
  border-radius: 20px;
}
.shop-card { position: relative; }