/* Khoshroz Kitab Mahal — dark blue and beige, same as the app. Mobile first. */
:root {
  --ink: #14295C;
  --ink-deep: #0D1C40;
  --beige: #EADFC8;
  --beige-soft: #EFE6D3;
  --paper: #FFFDF8;
  --mist: #F7F2E7;
  --rule: #E5DAC4;
  --text: #1A1F33;
  --muted: #6A6656;
  --sale: #B42318;
  --ok: #1F7A4D;
  --wa: #1F8F4E;
  --radius: 10px;
  --gutter: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Hind Siliguri', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--mist);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .4em; color: var(--text); }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .6em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 680px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.note { color: var(--muted); font-size: .9rem; }
.ok-txt { color: var(--ok); }
.err-txt { color: var(--sale); }
.sr, .skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }
.block { padding-top: 24px; padding-bottom: 8px; }

/* Header */
.promo { background: var(--ink-deep); color: var(--beige); font-size: .8rem; padding: 5px 0; }
.promo-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; line-height: 1.35; }
.top { background: var(--ink); color: var(--beige); padding: 10px 0 12px; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--beige); text-decoration: none; min-width: 0; }
.brand img { width: 46px; height: auto; flex: none; }
.brand-txt { display: flex; flex-direction: column; min-width: 0; }
.brand-txt strong { font-size: .98rem; line-height: 1.2; color: #fff; }
.brand-txt small { font-size: .8rem; color: var(--beige); }
.top-links { display: flex; align-items: center; gap: 6px; flex: none; }
.lang { display: flex; flex: none; border: 1px solid rgba(234,223,200,.5); border-radius: 999px; overflow: hidden; }
.lang a { color: var(--beige); text-decoration: none; font-size: .78rem; padding: 3px 8px; }
.lang a.on { background: var(--beige); color: var(--ink); font-weight: 600; }
.icon-link { position: relative; display: flex; align-items: center; gap: 4px; color: #fff; text-decoration: none; padding: 6px; font-size: .9rem; }
.icon-link svg { width: 22px; height: 22px; fill: currentColor; }
.icon-link .lbl { display: none; }
.badge { position: absolute; top: -2px; right: -4px; background: var(--sale); color: #fff; font-size: .7rem; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; line-height: 1; }
.search { display: flex; margin-top: 10px; background: #fff; border-radius: var(--radius); overflow: hidden; }
.search input { flex: 1; min-width: 0; border: 0; padding: 11px 14px; font: inherit; font-size: 1rem; }
.search button { border: 0; background: var(--beige); color: var(--ink); width: 50px; cursor: pointer; }
.search svg { width: 22px; height: 22px; fill: currentColor; }

/* Buttons and forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 10px 18px; border-radius: var(--radius); border: 1px solid var(--ink);
  background: var(--ink); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center;
}
.btn:hover { background: var(--ink-deep); }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: .92rem; }
.btn-big { min-height: 54px; font-size: 1.08rem; }
.btn-block { display: flex; width: 100%; margin-top: 10px; }
.btn-outline { background: var(--paper); color: var(--text); border-color: var(--rule); }
.btn-outline:hover { background: var(--beige-soft); }
.btn-light { background: var(--beige); color: var(--ink); border-color: var(--beige); }
.btn-light:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--beige); border-color: rgba(234,223,200,.6); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-wa { background: var(--wa); border-color: var(--wa); }
.link-btn { background: none; border: 0; color: var(--sale); font: inherit; cursor: pointer; padding: 4px 0; text-decoration: underline; }
.link-btn.light { color: var(--beige); }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; font-size: .95rem; }
.form input:not([type=checkbox]):not([type=radio]), .form textarea, .form select, .filters select, .a-filter input, .a-filter select {
  width: 100%; font: inherit; font-size: 1rem; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 8px; background: #fff; color: var(--text);
}
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
fieldset { border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; margin: 0; background: var(--paper); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
legend { font-weight: 600; padding: 0 6px; }
.form label.check, label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.form label.radio { flex-direction: row; align-items: flex-start; gap: 10px; border: 1px solid var(--rule); border-radius: 8px; padding: 10px 12px; background: #fff; cursor: pointer; }
.radio input { margin-top: 6px; }
.radio span { display: flex; flex-direction: column; }
.radio small { color: var(--muted); font-weight: 400; }
.mb-box { background: var(--beige-soft); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.flash { padding: 12px 14px; border-radius: 8px; margin: 14px 0; }
.flash p { margin: 0; }
.flash-ok { background: #E6F4EC; color: #14532D; border: 1px solid #B7E0C6; }
.flash-err { background: #FDECEA; color: #7A1A12; border: 1px solid #F1C8C4; }
.box { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px; margin: 12px 0; }
.box h2 { font-size: 1.05rem; }
.box ul { margin: 0; padding-left: 1.2em; }
.empty { text-align: center; padding: 30px 10px; background: var(--paper); border: 1px dashed var(--rule); border-radius: var(--radius); }

/* Home */
.hero { background: linear-gradient(160deg, var(--ink) 0%, var(--ink-deep) 100%); color: var(--beige); }
.hero-in { padding-top: 34px; padding-bottom: 38px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-mark { width: 120px; margin-bottom: 10px; }
.kicker { text-transform: none; letter-spacing: .02em; font-size: .9rem; margin-bottom: 6px; }
.hero h1 { color: #fff; font-size: 1.7rem; max-width: 22ch; }
.hero-p { max-width: 60ch; opacity: .92; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 10px; }
.trust { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.trust div { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; }
.trust strong { font-size: .95rem; }
.trust span { font-size: .82rem; color: var(--muted); }
.sec-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-bottom: 12px; }
.sec-h p { margin: 0; color: var(--muted); font-size: .92rem; }
.see-all { white-space: nowrap; font-weight: 600; text-decoration: none; }
.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cat { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px; text-decoration: none; color: var(--text); display: flex; flex-direction: column; }
.cat:hover { border-color: var(--ink); }
.cat span { color: var(--muted); font-size: .85rem; }
.about { background: var(--ink); color: var(--beige); margin-top: 28px; }
.about-in { padding-top: 28px; padding-bottom: 28px; display: flex; flex-direction: column; gap: 6px; }
.about h2 { color: #fff; }
.yr { font-size: 2.6rem; font-weight: 700; line-height: 1; margin: 0; color: var(--beige); }
.faq details { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 8px 0 0; }

/* Book grid */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.card-img { position: relative; display: block; background: var(--beige-soft); aspect-ratio: 5 / 7; }
.card-img img { width: 100%; height: 100%; object-fit: contain; }
.tag-off, .tag-out { position: absolute; top: 8px; left: 8px; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.tag-off { background: var(--sale); color: #fff; }
.tag-out { background: var(--text); color: #fff; }
.card-body { padding: 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.card-body form { margin-top: auto; }
.card-t { font-size: .95rem; margin: 0; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-t a { color: var(--text); text-decoration: none; }
.card-a { font-size: .82rem; color: var(--muted); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price { margin: 4px 0 6px; }
.price s { color: var(--muted); font-size: .85em; }
.price.big { font-size: 1.5rem; }
.pill-off { background: var(--sale); color: #fff; font-size: .8rem; padding: 2px 8px; border-radius: 999px; vertical-align: middle; }

/* Book list filters */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; scrollbar-width: thin; }
.chip { flex: none; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); text-decoration: none; color: var(--text); font-size: .9rem; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.filters label { display: flex; align-items: center; gap: 6px; font-size: .92rem; }
.filters select { width: auto; padding: 6px 10px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 20px 0; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }

/* Book page */
.book { display: grid; gap: 18px; }
.book-gallery img#mainCover { width: 100%; max-width: 380px; margin: 0 auto; border-radius: var(--radius); background: var(--beige-soft); }
.thumbs { display: flex; gap: 8px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.thumb { border: 2px solid var(--rule); background: #fff; padding: 2px; border-radius: 6px; width: 58px; cursor: pointer; }
.thumb.on { border-color: var(--ink); }
.by { color: var(--muted); }
.stock.ok { color: var(--ok); font-weight: 600; }
.stock.no { color: var(--sale); font-weight: 600; }
.buy { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 12px 0; }
.buy .btn { flex: 1 1 140px; }
.qty { display: flex; flex-direction: column; font-size: .85rem; }
.qty input { width: 78px; padding: 9px; border: 1px solid var(--rule); border-radius: 8px; font: inherit; }
.specs { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; margin: 12px 0; }
.specs th, .specs td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; font-size: .93rem; }
.specs th { width: 40%; color: var(--muted); font-weight: 500; }
.about-book { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; margin-top: 18px; }

/* Bag and checkout */
.bag-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: start; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px; margin-bottom: 10px; }
.bag-line img { border-radius: 4px; }
.bag-info { display: flex; flex-direction: column; min-width: 0; }
.bag-t { color: var(--text); text-decoration: none; font-weight: 600; line-height: 1.35; }
.bag-ctl { display: flex; gap: 14px; align-items: center; margin-top: 6px; }
.bag-sum { white-space: nowrap; }
.totals { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px; margin: 14px 0; display: flex; flex-direction: column; gap: 6px; }
.totals > div { display: flex; justify-content: space-between; gap: 12px; }
.totals .small-line { font-size: .9rem; color: var(--muted); }
.totals .grand { border-top: 1px solid var(--rule); padding-top: 8px; font-size: 1.12rem; }
.done { background: #E6F4EC; border: 1px solid #B7E0C6; border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.st { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: .82rem; font-weight: 600; background: var(--beige-soft); color: var(--ink); }
.st-new { background: #FFF4D6; color: #7A5300; }
.st-confirmed { background: #E3ECFB; color: var(--ink); }
.st-shipped { background: #E9E3FB; color: #3E2A8C; }
.st-delivered { background: #E6F4EC; color: #14532D; }
.st-cancelled { background: #FDECEA; color: #7A1A12; }
.list { display: flex; flex-direction: column; gap: 8px; }
.list-row { display: flex; justify-content: space-between; gap: 12px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px; text-decoration: none; color: var(--text); }
.list-row span { display: flex; flex-direction: column; }
.list-row small { color: var(--muted); }
.list-row .right { align-items: flex-end; gap: 4px; }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* Footer */
.foot { background: var(--ink-deep); color: var(--beige); margin-top: 36px; padding-top: 28px; font-size: .92rem; }
.foot a { color: #fff; }
.foot h3 { color: #fff; font-size: 1rem; }
.foot-grid { display: grid; gap: 22px; }
.foot-brand { font-weight: 600; color: #fff; margin-top: 8px; }
.muted-l { color: rgba(234,223,200,.85); }
.copy { border-top: 1px solid rgba(234,223,200,.2); margin-top: 20px; padding-top: 12px; padding-bottom: 20px; font-size: .82rem; color: rgba(234,223,200,.8); }

@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cats { grid-template-columns: repeat(3, 1fr); }
  .icon-link .lbl { display: inline; }
}
@media (min-width: 820px) {
  :root { --gutter: 24px; }
  h1 { font-size: 1.9rem; }
  .brand img { width: 56px; }
  .brand-txt strong { font-size: 1.15rem; }
  .top-row { gap: 20px; }
  .top-links { gap: 14px; }
  .hero h1 { font-size: 2.3rem; }
  .trust { grid-template-columns: repeat(4, 1fr); }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .cats { grid-template-columns: repeat(4, 1fr); }
  .book { grid-template-columns: minmax(260px, 380px) 1fr; gap: 32px; }
  .about-in { flex-direction: row; gap: 30px; align-items: center; }
  .yr { font-size: 4rem; }
  .foot-grid { grid-template-columns: 1.3fr 1fr 1fr; }
}
@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
