/* DELHI BOOK STORY - single landing page stylesheet */

:root {
  --color-primary: #e63946;
  --color-primary-dark: #c1121f;
  --color-cta: #2fa84f;
  --color-cta-dark: #24893e;
  --color-dark: #1a1a2e;
  --color-text: #2b2b33;
  --color-muted: #6b6b76;
  --color-bg: #ffffff;
  --color-bg-alt: #f7f7fb;
  --color-border: #e6e6ee;
  --color-success: #2a9d8f;
  --max-width: 1140px;
  --narrow-width: 720px;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
button { font-family: inherit; }

/* ---------- Top info bar + announcement ---------- */
.top-info-bar { background: var(--color-dark); color: #fff; text-align: center; font-size: 13px; padding: 10px 16px; position: sticky; top: 0; z-index: 70; }
.top-info-bar strong { font-weight: 800; }
.announce-bar { background: var(--color-primary); color: #fff; text-align: center; font-size: 15px; font-weight: 700; padding: 12px 16px; }
.site-header { border-bottom: 1px solid var(--color-border); position: sticky; top: 0; background: #fff; z-index: 60; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: 0.5px; color: var(--color-dark); }
.cart-icon-btn { font-size: 20px; position: relative; background: none; border: none; cursor: pointer; padding: 6px; }
.cart-count { position: absolute; top: -6px; right: -8px; background: var(--color-primary); color: #fff; font-size: 11px; font-weight: 700; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 14px 28px; border-radius: 8px; font-weight: 700; font-size: 16px; border: none; cursor: pointer; text-align: center; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 2px solid var(--color-dark); color: var(--color-dark); }
.btn-cta { background: var(--color-cta); color: #fff; box-shadow: 0 4px 14px rgba(47,168,79,0.35); }
.btn-cta:hover { background: var(--color-cta-dark); transform: translateY(-1px); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 32px; font-size: 18px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Hero (single-column, centered, narrow) ---------- */
.hero { background: #fff; padding: 32px 0 24px; text-align: center; }
.hero-narrow { max-width: var(--narrow-width); margin: 0 auto; padding: 0 20px; }
.badge { display: inline-block; background: #ffe8e8; color: var(--color-primary-dark); font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 20px; margin-bottom: 12px; }
.product-title { font-size: 32px; font-weight: 800; margin: 0 0 16px; line-height: 1.3; }
.product-title .highlight { color: var(--color-primary); text-decoration: underline; text-decoration-color: var(--color-primary); text-underline-offset: 4px; }
.product-short-desc { color: var(--color-muted); font-size: 16px; margin-bottom: 20px; }

.price-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; justify-content: center; }
.price-original { text-decoration: line-through; color: var(--color-muted); font-size: 18px; }
.price-sale { font-size: 30px; font-weight: 800; color: var(--color-primary); }
.price-note { color: var(--color-muted); font-size: 14px; margin-bottom: 20px; }
.discount-chip { background: var(--color-success); color: #fff; font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 6px; }

.hero-image { margin: 20px auto; max-width: 420px; }
.hero-image img { border-radius: var(--radius); box-shadow: var(--shadow); margin: 0 auto; }

.hero-meta-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--color-muted); margin-bottom: 20px; }
.hero-meta-row .dot { color: var(--color-border); }

.hero-cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.hero-subnote { font-size: 13px; color: var(--color-muted); margin-top: 10px; }
.trust-row { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 18px; font-size: 13px; color: var(--color-muted); }
.qty-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.qty-control { display: flex; align-items: center; gap: 10px; border: 1px solid var(--color-border); border-radius: 8px; padding: 4px; width: fit-content; }
.qty-control button { width: 32px; height: 32px; border-radius: 6px; border: none; background: var(--color-bg-alt); cursor: pointer; font-size: 18px; }
.qty-control span { min-width: 24px; text-align: center; font-weight: 700; }

/* ---------- Countdown ---------- */
.countdown-bar { background: var(--color-dark); color: #fff; text-align: center; padding: 14px 16px; font-weight: 600; }
.countdown-timer { display: inline-flex; gap: 10px; margin-left: 12px; font-variant-numeric: tabular-nums; }
.countdown-timer span { background: rgba(255,255,255,0.15); padding: 4px 8px; border-radius: 4px; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-title { font-size: 28px; font-weight: 800; text-align: center; margin-bottom: 10px; }
.section-subtitle { text-align: center; color: var(--color-muted); max-width: 620px; margin: 0 auto 36px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 24px; }
.card-icon { font-size: 32px; margin-bottom: 12px; }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { color: var(--color-muted); margin: 0; font-size: 14px; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 10px 0 10px 32px; position: relative; border-bottom: 1px dashed var(--color-border); }
.checklist li:before { content: "✔"; position: absolute; left: 0; color: var(--color-success); font-weight: 800; }

.checklist-card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 24px 28px; max-width: var(--narrow-width); margin: 0 auto;
}
.checklist-card .checklist li { border-bottom: none; padding: 8px 0 8px 32px; }

.prose { font-size: 15px; }
.prose p { margin: 0 0 16px; }
.narrative { max-width: var(--narrow-width); margin: 0 auto; font-size: 16px; color: var(--color-text); }
.narrative p { margin: 0 0 18px; }

.details-table { width: 100%; border-collapse: collapse; }
.details-table td { padding: 10px 12px; border-bottom: 1px solid var(--color-border); font-size: 14px; }
.details-table td:first-child { color: var(--color-muted); width: 40%; }

.quote-card {
  border: 1px solid var(--color-border); border-radius: var(--radius); padding: 24px 28px;
  max-width: var(--narrow-width); margin: 0 auto 24px; font-style: italic; color: var(--color-muted); font-size: 16px;
}

/* Single-column "who is this for" list with icon circles (matches reference layout) */
.audience-list { max-width: var(--narrow-width); margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.audience-item { display: flex; gap: 16px; align-items: flex-start; }
.audience-icon {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%;
  background: #ffe8e8; color: var(--color-primary); display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.audience-item h3 { margin: 4px 0 6px; font-size: 17px; }
.audience-item p { margin: 0; color: var(--color-muted); font-size: 14px; }

/* Honest trust box (no fabricated sales counts) */
.trust-stat-box {
  border: 1px solid #f4d7d7; background: #fff8f8; border-radius: var(--radius);
  padding: 24px; max-width: var(--narrow-width); margin: 0 auto 24px; text-align: center;
}
.trust-stat-box .trust-stat-icon { font-size: 30px; margin-bottom: 8px; }
.trust-stat-box h3 { margin: 0 0 8px; font-size: 18px; }
.trust-stat-box p { margin: 0; color: var(--color-muted); font-size: 14px; }

/* Final CTA block (matches reference's bold closing section) */
.final-cta-section { background: var(--color-primary); color: #fff; text-align: center; padding: 48px 20px; }
.final-cta-section h2 { font-size: 24px; margin: 0 0 20px; }
.final-cta-section .countdown-timer span { background: rgba(255,255,255,0.2); }
.final-cta-section .hero-subnote { color: rgba(255,255,255,0.85); }

.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-question { width: 100%; text-align: left; background: none; border: none; padding: 18px 4px; font-size: 16px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; color: var(--color-muted); font-size: 14px; }
.faq-item.open .faq-answer { max-height: 400px; padding-bottom: 16px; }
.faq-icon { transition: transform 0.2s ease; }
.faq-item.open .faq-icon { transform: rotate(45deg); }

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--color-border); padding: 10px 16px; display: none; align-items: center; justify-content: space-between; gap: 12px; z-index: 90; box-shadow: 0 -4px 12px rgba(0,0,0,0.08); }
.sticky-cta .price-sale { font-size: 20px; }
.sticky-cta-left { display: flex; flex-direction: column; gap: 2px; }
.sticky-cta-prices { display: flex; align-items: baseline; gap: 8px; }
.sticky-cta-offer { font-size: 11px; color: var(--color-primary-dark); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-dark); color: #cfcfe0; padding: 40px 0 24px; margin-top: 40px; }
.footer-brand { color: #fff; font-weight: 800; font-size: 20px; text-align: center; }
.footer-tagline { text-align: center; font-size: 13px; margin: 4px 0 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; font-size: 13px; margin-bottom: 20px; }
.footer-links a { cursor: pointer; }
.footer-support, .footer-copy { text-align: center; font-size: 12px; color: #9a9ab0; }

/* ---------- Cart drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 150; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer { position: fixed; top: 0; right: -420px; width: 400px; max-width: 92vw; height: 100%; background: #fff; z-index: 200; transition: right 0.25s ease; display: flex; flex-direction: column; box-shadow: -8px 0 24px rgba(0,0,0,0.15); }
.cart-drawer.open { right: 0; }
.drawer-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--color-border); }
.drawer-close { background: none; border: none; font-size: 22px; cursor: pointer; }
.drawer-body { padding: 20px; overflow-y: auto; flex: 1; }
.drawer-footer { padding: 20px; border-top: 1px solid var(--color-border); }

.cart-item { display: flex; gap: 14px; align-items: center; }
.cart-item img { width: 64px; height: 84px; object-fit: cover; border-radius: 6px; }
.cart-item-info { flex: 1; }

.summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.summary-row.total { font-weight: 800; font-size: 18px; border-top: 1px dashed var(--color-border); margin-top: 8px; padding-top: 12px; }

/* ---------- Checkout modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 300; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop.open { display: flex; }
.modal-box { background: #fff; border-radius: var(--radius); max-width: 460px; width: 100%; max-height: 92vh; overflow-y: auto; padding: 28px; position: relative; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 22px; cursor: pointer; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.form-group input { width: 100%; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: 8px; font-size: 15px; }
.form-group input:focus { outline: 2px solid var(--color-primary); border-color: var(--color-primary); }
.form-error { color: var(--color-primary-dark); font-size: 13px; margin-top: 4px; display: none; }
.form-group.has-error input { border-color: var(--color-primary-dark); }
.form-group.has-error .form-error { display: block; }

/* ---------- Success / failed / pending states ---------- */
.status-page { max-width: 560px; margin: 60px auto; padding: 0 20px; text-align: center; }
.status-icon { font-size: 56px; margin-bottom: 12px; }
.status-box { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.status-details { text-align: left; margin: 20px 0; }
.status-details .summary-row { border-bottom: 1px dashed var(--color-border); }
.status-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.spinner { width: 36px; height: 36px; border: 4px solid var(--color-border); border-top-color: var(--color-primary); border-radius: 50%; margin: 0 auto 16px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--color-dark); color: #fff; padding: 12px 20px; border-radius: 8px; font-size: 14px; opacity: 0; pointer-events: none; transition: all 0.25s ease; z-index: 400; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .product-title { font-size: 26px; }
  .price-sale { font-size: 26px; }
  .sticky-cta { display: flex; }
  body.cart-open, body.modal-open { overflow: hidden; }
}
@media (max-width: 480px) {
  .container, .hero-narrow { padding-left: 16px; padding-right: 16px; }
  .section { padding: 40px 0; }
  .btn-lg { width: 100%; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .cart-drawer { width: 100%; max-width: 100vw; right: -100%; }
  .modal-box { padding: 20px; }
  .checklist-card, .quote-card, .trust-stat-box { padding: 18px; }
}
