/* Kiddo Cloud BD — storefront. Mobile-first. Palette pulled from the page cover: night sky, cloud lavender, sky blue, gold heart. */
:root {
  --night: #1c2452;
  --night-2: #2b3570;
  --sky: #6fb7e8;
  --lav: #b7a3e6;
  --gold: #e7b34a;
  --cream: #fbf8f3;
  --paper: #ffffff;
  --ink: #1f2340;
  --muted: #6b6f86;
  --line: #ebe7f2;
  --ok: #1f9d6b;
  --bad: #d64545;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(28, 36, 82, 0.08);
  --font: 'Hind Siliguri', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Baloo Da 2', 'Hind Siliguri', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--cream); font-size: 15px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.hide { display: none !important; }

/* ---------- Top ---------- */
.announce { background: var(--night); color: #fff; text-align: center; font-size: 13px; padding: 7px 12px; }
.announce b { color: var(--gold); }
.header { position: sticky; top: 0; z-index: 40; background: rgba(251, 248, 243, 0.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; gap: 12px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--night); white-space: nowrap; }
.brand img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--lav); object-fit: cover; }
.brand small { color: var(--gold); font-size: 13px; margin-left: 2px; }
.search { flex: 1; display: none; }
.search input { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 16px; outline: none; }
.search input:focus { border-color: var(--lav); }
.hdr-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 1px 0 var(--line), 0 0 0 1px var(--line) inset; display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 21px; height: 21px; }
.badge { position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--gold); color: var(--night); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.mobile-search { padding: 0 16px 10px; }
.mobile-search input { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 16px; outline: none; }
@media (min-width: 760px) { .search { display: block; max-width: 420px; margin-left: 24px; } .mobile-search { display: none; } }

/* ---------- Hero ---------- */
.hero { margin: 14px 0 6px; border-radius: 22px; overflow: hidden; position: relative; background: var(--night); }
.hero img { width: 100%; aspect-ratio: 2.7 / 1; object-fit: cover; }
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 4px; }
.trust div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px; text-align: center; font-size: 12.5px; line-height: 1.3; }
.trust b { display: block; font-size: 18px; }

/* ---------- Categories ---------- */
.cats { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 14px; white-space: nowrap; }
.chip.on { background: var(--night); color: #fff; border-color: var(--night); }

.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 14px 0 10px; gap: 10px; }
.sec-head h2 { font-family: var(--display); font-size: 21px; margin: 0; color: var(--night); }
.sec-head select { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 8px; font-size: 13px; }

/* ---------- Product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.card { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; transition: transform 0.15s, box-shadow 0.15s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card .ph { position: relative; aspect-ratio: 1; background: #f3f0f8; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; top: 8px; left: 8px; background: var(--bad); color: #fff; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.tag.out { background: #555; }
.card .bd { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .nm { font-weight: 600; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.card .meta { font-size: 12px; color: var(--muted); }
.price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price b { font-size: 17px; color: var(--night); }
.price s { color: var(--muted); font-size: 13px; }
.card .btn { margin-top: auto; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 11px 16px; font-weight: 700; cursor: pointer; font-size: 15px; transition: filter 0.15s, transform 0.05s; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--night), var(--night-2)); color: #fff; }
.btn-gold { background: var(--gold); color: var(--night); }
.btn-ghost { background: #fff; border: 1.5px solid var(--night); color: var(--night); }
.btn-wa { background: #25d366; color: #fff; }
.btn-sm { padding: 8px 10px; font-size: 13.5px; border-radius: 10px; }
.btn-block { width: 100%; }

/* ---------- Product page ---------- */
.pdp { display: grid; gap: 18px; margin: 14px 0 24px; }
@media (min-width: 860px) { .pdp { grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 24px; } }
.gallery .main { border-radius: 20px; overflow: hidden; background: #fff; border: 1px solid var(--line); aspect-ratio: 1; }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.thumbs img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; border: 2px solid transparent; cursor: pointer; }
.thumbs img.on { border-color: var(--night); }
.pdp h1 { font-family: var(--display); font-size: 25px; line-height: 1.25; margin: 0 0 6px; color: var(--night); }
.pdp .price b { font-size: 26px; }
.pdp .price .off { background: #fde8e8; color: var(--bad); font-weight: 700; font-size: 12.5px; padding: 2px 8px; border-radius: 999px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.facts span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; }
.label { font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
.variants { display: flex; flex-wrap: wrap; gap: 8px; }
.variants button { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 7px 12px; cursor: pointer; font-size: 14px; }
.variants button.on { border-color: var(--night); background: var(--night); color: #fff; }
.variants button:disabled { opacity: 0.4; text-decoration: line-through; cursor: not-allowed; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.qty button { width: 38px; height: 40px; border: 0; background: transparent; font-size: 20px; cursor: pointer; }
.qty input { width: 40px; text-align: center; border: 0; outline: none; font-weight: 700; background: transparent; -moz-appearance: textfield; }
.qty.sm button { width: 30px; height: 30px; font-size: 16px; }
.qty.sm input { width: 28px; font-size: 14px; }
.buy-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.buy-row .btn-wa { grid-column: 1 / -1; }
.stock-note { font-size: 13px; margin-top: 8px; }
.stock-note.low { color: var(--bad); }
.desc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; white-space: pre-line; margin-top: 16px; }
.perks { display: grid; gap: 6px; margin-top: 14px; font-size: 13.5px; }
.perks div { display: flex; gap: 8px; align-items: center; }
.sticky-buy { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 10px; align-items: center; box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.05); }
.sticky-buy .price b { font-size: 19px; }
.sticky-buy .btn { flex: 1; }
@media (min-width: 860px) { .sticky-buy { display: none; } }
body.has-sticky { padding-bottom: 78px; }
@media (min-width: 860px) { body.has-sticky { padding-bottom: 0; } }

/* ---------- Cart drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(20, 22, 45, 0.45); z-index: 60; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.overlay.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--cream); z-index: 61; transform: translateX(100%); transition: transform 0.25s ease; display: flex; flex-direction: column; }
.drawer.on { transform: none; }
.drawer-hd { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.drawer-hd h3 { margin: 0; font-family: var(--display); color: var(--night); }
.drawer-bd { flex: 1; overflow-y: auto; padding: 12px 16px; }
.drawer-ft { padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
.line { display: grid; grid-template-columns: 60px 1fr auto; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px; margin-bottom: 8px; }
.line img { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; }
.line .nm { font-weight: 600; font-size: 14px; line-height: 1.3; }
.line .vr { font-size: 12.5px; color: var(--muted); }
.line .rm { border: 0; background: none; color: var(--muted); font-size: 12.5px; cursor: pointer; padding: 0; text-decoration: underline; }
.line .r { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); }
.empty .e { font-size: 44px; }
.sumrow { display: flex; justify-content: space-between; margin: 4px 0; }
.sumrow.total { font-size: 18px; font-weight: 700; color: var(--night); border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 8px; }

/* ---------- Checkout ---------- */
.co { display: grid; gap: 16px; margin: 16px 0 30px; }
@media (min-width: 900px) { .co { grid-template-columns: 1.1fr 0.9fr; align-items: start; } .co .summary { position: sticky; top: 80px; } }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.panel h2 { font-family: var(--display); font-size: 19px; margin: 0 0 12px; color: var(--night); }
.field { margin-bottom: 12px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 5px; }
.field input, .field textarea, .field select { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 13px; background: #fff; outline: none; font-size: 16px; }
.field input:focus, .field textarea:focus { border-color: var(--lav); }
.radio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.radio { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.radio input { margin-top: 4px; accent-color: var(--night); }
.radio:has(input:checked) { border-color: var(--night); background: #f4f2fb; }
.pay { display: flex; gap: 10px; align-items: center; background: #f4f2fb; border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.err { background: #fde8e8; color: var(--bad); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.okbox { background: #e6f6ef; color: var(--ok); border-radius: 12px; padding: 10px 12px; font-size: 14px; }

/* ---------- Success / track ---------- */
.center-card { max-width: 560px; margin: 26px auto 40px; }
.check { width: 74px; height: 74px; border-radius: 50%; background: #e6f6ef; color: var(--ok); display: grid; place-items: center; margin: 0 auto 10px; font-size: 38px; }
.steps { display: flex; justify-content: space-between; margin: 18px 0 6px; position: relative; }
.steps::before { content: ''; position: absolute; top: 13px; left: 8%; right: 8%; height: 3px; background: var(--line); }
.step { position: relative; z-index: 1; text-align: center; font-size: 12px; flex: 1; color: var(--muted); }
.step i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 3px solid var(--line); margin: 0 auto 4px; font-style: normal; font-size: 13px; }
.step.done { color: var(--night); font-weight: 600; }
.step.done i { background: var(--night); border-color: var(--night); color: #fff; }
.status-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: #eef; color: var(--night); }

/* ---------- Footer & floating ---------- */
.footer { background: var(--night); color: #d9dcf0; margin-top: 30px; padding: 26px 0 90px; font-size: 14px; }
.footer .cols { display: grid; gap: 18px; }
@media (min-width: 760px) { .footer .cols { grid-template-columns: 1.4fr 1fr 1fr; } .footer { padding-bottom: 30px; } }
.footer h4 { color: #fff; margin: 0 0 8px; font-family: var(--display); }
.footer a { color: #fff; }
.footer .copy { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 20px; padding-top: 14px; font-size: 12.5px; opacity: 0.7; }
.fab { position: fixed; right: 16px; bottom: 18px; z-index: 35; display: flex; flex-direction: column; gap: 10px; }
.fab a { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2); }
.fab svg { width: 28px; height: 28px; fill: #fff; }
.fab .wa { background: #25d366; }
.fab .ms { background: linear-gradient(135deg, #0099ff, #a033ff); }
body.has-sticky .fab { bottom: 92px; }
@media (min-width: 860px) { body.has-sticky .fab { bottom: 18px; } }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px); background: var(--night); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 80; opacity: 0; transition: all 0.25s; pointer-events: none; white-space: nowrap; }
.toast.on { opacity: 1; transform: translateX(-50%); }
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
