/* Katral by Zha — store styles */
:root {
  --navy: #1F2A5A;
  --navy-2: #2E3C7A;
  --sun: #FFC93C;
  --coral: #FF6B4A;
  --coral-dark: #E8512F;
  --cream: #FFF8EC;
  --paper: #FFFFFF;
  --green: #2E9E6A;
  --red: #D64545;
  --ink: #1F2A5A;
  --muted: #5E6787;
  --line: #E9E2D3;
  --radius: 18px;
  --shadow: 0 6px 20px rgba(31, 42, 90, .10);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
  font-size: 16px;
}
h1, h2, h3, .brand { font-family: 'Baloo 2', 'Nunito', sans-serif; line-height: 1.15; margin: 0; }
a { color: var(--navy-2); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 18px; }
.hidden { display: none !important; }

/* Header */
.site-header { background: var(--navy); color: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { color: #fff; text-decoration: none; font-size: 26px; font-weight: 800; letter-spacing: .3px; }
.brand span { color: var(--sun); }
.brand small { display: block; font-family: 'Nunito', sans-serif; font-size: 11px; font-weight: 600; opacity: .8; letter-spacing: .5px; margin-top: -4px; }
.nav-link { color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; border: 2px solid rgba(255,255,255,.35); padding: 7px 14px; border-radius: 999px; }
.nav-link:hover { border-color: var(--sun); color: var(--sun); }

/* Hero */
.hero { background: var(--navy); color: #fff; padding: 26px 0 70px; position: relative; overflow: hidden; }
.hero h1 { font-size: clamp(30px, 6vw, 48px); font-weight: 800; max-width: 640px; }
.hero h1 em { font-style: normal; color: var(--sun); }
.hero p { font-size: 17px; opacity: .9; max-width: 560px; margin: 12px 0 0; }
.hero .dots { position: absolute; right: -40px; top: -30px; width: 240px; height: 240px; border-radius: 50%; background: var(--coral); opacity: .9; }
.hero .dots::after { content: ''; position: absolute; left: -70px; top: 150px; width: 110px; height: 110px; border-radius: 50%; background: var(--sun); }
.hero .wrap { position: relative; z-index: 1; }
@media (max-width: 640px) {
  .hero .dots { width: 150px; height: 150px; right: -70px; top: -60px; opacity: .55; }
  .hero .dots::after { display: none; }
}

/* Steps strip */
.steps { margin-top: -44px; position: relative; z-index: 2; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.steps li { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 14px; }
.steps b { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--sun); display: grid; place-items: center; font-family: 'Baloo 2', sans-serif; font-size: 18px; }
@media (max-width: 640px) { .steps ol { grid-template-columns: 1fr; gap: 8px; } .steps li { padding: 10px 14px; } }

/* Books */
.section-title { font-size: 28px; font-weight: 800; margin: 34px 0 16px; }
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; padding-bottom: 120px; }
.book { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.book .cover { aspect-ratio: 3 / 4; background: #f1ece1; overflow: hidden; }
.book .cover img { width: 100%; height: 100%; object-fit: cover; }
.book .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.book h3 { font-size: 21px; font-weight: 800; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 12px; font-weight: 800; background: var(--cream); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; color: var(--muted); }
.book p { margin: 0; color: var(--muted); font-size: 15px; }
.book .buy { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 8px; }
.price { font-family: 'Baloo 2', sans-serif; font-size: 28px; font-weight: 800; }
.price small { font-size: 13px; color: var(--muted); font-family: 'Nunito', sans-serif; font-weight: 700; }
.bundle-note { background: var(--sun); border-radius: var(--radius); padding: 14px 18px; font-weight: 700; margin: 0 0 20px; }

/* Buttons */
.btn { appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 800; border-radius: 12px; padding: 12px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; transition: transform .05s ease, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--coral); color: #fff; }
.btn-primary:hover { background: var(--coral-dark); }
.btn-primary:disabled { background: #F3B9AA; cursor: not-allowed; }
.btn-outline { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-added { background: var(--green); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); padding: 8px 10px; }
.btn-wa { background: #25D366; color: #fff; }
.btn-block { width: 100%; padding: 15px 18px; font-size: 17px; }

/* Cart bar */
.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 12px; pointer-events: none; }
.cart-bar .inner { pointer-events: auto; max-width: 720px; margin: 0 auto; background: var(--navy); color: #fff; border-radius: 18px; padding: 12px 12px 12px 18px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.cart-bar .sum { font-weight: 800; }
.cart-bar .sum small { display: block; font-weight: 600; opacity: .8; font-size: 13px; }

/* Checkout sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(20, 26, 56, .55); z-index: 30; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--cream); width: 100%; max-width: 560px; max-height: 94vh; overflow-y: auto; border-radius: 24px 24px 0 0; padding: 18px 20px 28px; }
@media (min-width: 700px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 24px; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sheet-head h2 { font-size: 24px; font-weight: 800; }
.progress { display: flex; gap: 6px; margin: 6px 0 18px; }
.progress span { height: 6px; flex: 1; border-radius: 3px; background: var(--line); }
.progress span.on { background: var(--coral); }
.card { background: var(--paper); border-radius: 16px; padding: 16px; box-shadow: 0 2px 8px rgba(31,42,90,.06); margin-bottom: 14px; }
.line-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; font-weight: 700; }
.line-item .x { color: var(--muted); font-size: 13px; background: none; border: 0; cursor: pointer; text-decoration: underline; }
.total { border-top: 2px dashed var(--line); margin-top: 8px; padding-top: 10px; display: flex; justify-content: space-between; font-weight: 800; font-size: 18px; }
.saving { color: var(--green); font-size: 14px; font-weight: 800; }

label.field { display: block; margin-bottom: 12px; font-weight: 800; font-size: 14px; }
label.field span.opt { font-weight: 600; color: var(--muted); }
input[type=text], input[type=tel], input[type=email] {
  width: 100%; margin-top: 5px; font: inherit; font-size: 17px; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--ink);
}
input:focus { outline: none; border-color: var(--navy-2); }
.hint { font-size: 13px; color: var(--muted); margin: -4px 0 10px; }
.error { background: #FDECEC; color: var(--red); border-radius: 12px; padding: 10px 14px; font-weight: 700; font-size: 14px; margin-bottom: 12px; }

.policy-list { margin: 0; padding-left: 20px; }
.policy-list li { margin-bottom: 8px; font-size: 15px; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-weight: 800; background: #fff; border: 2px solid var(--sun); border-radius: 14px; padding: 14px; cursor: pointer; margin-bottom: 14px; }
.agree input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--coral); }

.pay-amount { text-align: center; }
.pay-amount .big { font-family: 'Baloo 2', sans-serif; font-size: 44px; font-weight: 800; }
.qr { display: grid; place-items: center; background: #fff; border-radius: 16px; padding: 12px; margin: 10px auto; width: fit-content; }
.qr svg { width: 220px; height: 220px; }
.upi-id { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; margin-top: 6px; }
.copy { font-size: 13px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 800; color: var(--navy); }
.or { text-align: center; color: var(--muted); font-size: 13px; margin: 10px 0; }
.help { font-size: 14px; color: var(--muted); }
.help summary { cursor: pointer; font-weight: 800; color: var(--navy); }

.success { text-align: center; }
.success .tick { width: 72px; height: 72px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 38px; margin: 6px auto 12px; }
.order-id { font-family: 'Baloo 2', sans-serif; font-size: 30px; font-weight: 800; letter-spacing: 1px; background: #fff; border: 2px dashed var(--navy); border-radius: 14px; padding: 8px 16px; display: inline-block; margin: 8px 0; }

/* My Order page */
.page { padding: 28px 0 60px; }
.page h1 { font-size: 34px; font-weight: 800; margin-bottom: 8px; }
.narrow { max-width: 560px; }
.status-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: 13px; }
.pill-pending { background: #FFF1C7; color: #8A6200; }
.pill-paid { background: #DDF3E8; color: var(--green); }
.pill-rejected { background: #FDECEC; color: var(--red); }
.pill-expired { background: #ECEDF3; color: var(--muted); }
.dl-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dl-row:last-child { border-bottom: 0; }
.dl-row .t { font-weight: 800; }
.dl-row small { display: block; color: var(--muted); font-weight: 700; }

/* Terms */
.terms h2 { font-size: 22px; margin: 22px 0 6px; }
.terms p, .terms li { font-size: 16px; }

/* Footer */
.site-footer { background: var(--navy); color: rgba(255,255,255,.85); padding: 22px 0 110px; font-size: 14px; }
.site-footer a { color: var(--sun); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; }

.loading { text-align: center; color: var(--muted); padding: 40px 0; font-weight: 700; }
.spinner { width: 28px; height: 28px; border: 4px solid var(--line); border-top-color: var(--coral); border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.demo-banner { background: var(--sun); color: var(--navy); text-align: center; font-size: 13px; font-weight: 800; padding: 6px; }

/* v1.2: look inside, share, screenshot upload */
.book-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-small { padding: 8px 12px; font-size: 14px; border-radius: 10px; }
.btn-soft { background: var(--cream); color: var(--navy); border: 2px solid var(--line); }
.sample-sheet { max-width: 760px; }
.sample-frame { position: relative; width: 100%; height: min(72vh, 900px); background: #fff; border-radius: 14px; overflow: hidden; }
.sample-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.upload { display: block; border: 2px dashed var(--navy-2); border-radius: 14px; padding: 14px; text-align: center; font-weight: 800; cursor: pointer; background: #fff; }
.upload input { display: none; }
.shot-preview { display: block; max-width: 160px; max-height: 220px; margin: 10px auto 0; border-radius: 10px; border: 1px solid var(--line); }
.share-box { margin-top: 18px; padding-top: 14px; border-top: 2px dashed var(--line); }
.share-box p { margin: 0 0 8px; }
.book:target { outline: 4px solid var(--sun); }
button.x { display: block; margin: 8px auto 0; background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; border-radius: 14px; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery figure { flex: 0 0 100%; min-width: 0; margin: 0; scroll-snap-align: center; background: #fff; border-radius: 14px; padding: 8px; }
.gallery img { width: 100%; height: auto; max-height: 70vh; object-fit: contain; display: block; margin: 0 auto; border-radius: 6px; }
.gallery figcaption { text-align: center; font-size: 13px; color: var(--muted); font-weight: 700; margin-top: 6px; }
.gal-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 12px; font-weight: 800; }
.gal-nav .btn { width: 48px; height: 44px; padding: 0; font-size: 26px; }
.book .cover { position: relative; }
.book .cover[data-sample] { cursor: pointer; }
.peek { position: absolute; left: 12px; bottom: 12px; background: rgba(31, 42, 90, .9); color: #fff; font-weight: 800; font-size: 14px; padding: 8px 12px; border-radius: 999px; }
