/* ==========================================================================
   Adhunik Prokashoni — theme layer on top of Bootstrap 5.3
   Colours come from the logo: calligraphy green (brand/action) and
   sun-ray red (attention only). Warm paper background lets covers lead.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --brand-950: #06291a;
  --brand-900: #0a3d25;
  --brand-800: #0b5130;
  --brand-700: #0c6638;
  --brand:     #0f7a43;
  --brand-500: #179a55;
  --brand-300: #8fd0aa;
  --brand-100: #d9efe2;
  --brand-50:  #eef7f1;

  --sun:    #e23d2d;
  --sun-600:#c42e20;
  --sun-50: #fdeeec;

  --gold:    #a8761c;
  --gold-500:#c8952e;
  --gold-50: #fbf3e1;

  --ink:   #17231c;
  --ink-2: #33433a;
  --muted: #687870;
  --faint: #98a59d;
  --line:  #e6e2d6;
  --line-2:#efece3;

  --paper:    #f6f4ee;
  --surface:  #ffffff;
  --surface-2:#fbfaf6;

  --r-xs: 6px;
  --r-sm: 9px;
  --r:    13px;
  --r-lg: 18px;
  --r-xl: 24px;

  --sh-1: 0 1px 2px rgba(23, 35, 28, .05);
  --sh-2: 0 6px 18px -8px rgba(10, 61, 37, .18), 0 1px 2px rgba(23, 35, 28, .04);
  --sh-3: 0 22px 44px -18px rgba(10, 61, 37, .32);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 72px;

  --font-ui: 'Hind Siliguri', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Noto Serif Bengali', 'Hind Siliguri', serif;

  /* Bootstrap variable overrides */
  --bs-body-font-family: var(--font-ui);
  --bs-body-font-size: .9375rem;
  --bs-body-line-height: 1.6;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--paper);
  --bs-border-color: var(--line);
  --bs-border-radius: var(--r-sm);
  --bs-border-radius-lg: var(--r);
  --bs-border-radius-sm: var(--r-xs);
  --bs-primary: var(--brand);
  --bs-primary-rgb: 15, 122, 67;
  --bs-success: var(--brand-500);
  --bs-success-rgb: 23, 154, 85;
  --bs-danger: var(--sun);
  --bs-danger-rgb: 226, 61, 45;
  --bs-link-color: var(--brand);
  --bs-link-color-rgb: 15, 122, 67;
  --bs-link-hover-color: var(--brand-800);
  --bs-link-hover-color-rgb: 11, 81, 48;
  --bs-secondary-color: var(--muted);
  --bs-emphasis-color: var(--ink);
  --bs-focus-ring-color: rgba(15, 122, 67, .25);
}

/* ---------- 2. Base ---------- */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.modal-lock { overflow: hidden; }
[x-cloak] { display: none !important; }
a { color: var(--brand); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand-800); }
img { max-width: 100%; }
::selection { background: var(--brand-100); color: var(--brand-900); }
h1, h2, h3, h4, h5 { color: var(--ink); font-weight: 600; letter-spacing: -.005em; }
.font-display { font-family: var(--font-display); }
mark { background: #fff1b8; padding: 0 1px; border-radius: 3px; color: inherit; }
:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }

.container, .container-fluid { --bs-gutter-x: 2rem; }
@media (max-width: 575.98px) { .container { --bs-gutter-x: 2rem; } } /* 16px side gutter */
@media (min-width: 1400px) { .container { max-width: 1340px; } }

.text-muted { color: var(--muted) !important; }
.text-success { color: var(--brand-500) !important; }
.text-danger { color: var(--sun) !important; }
.small, small { font-size: .84em; }

/* ---------- 3. Buttons & form controls ---------- */
.btn {
  --bs-btn-font-weight: 600;
  --bs-btn-padding-y: .55rem;
  --bs-btn-padding-x: 1.1rem;
  --bs-btn-border-radius: var(--r-sm);
  --bs-btn-focus-box-shadow: 0 0 0 .2rem rgba(15, 122, 67, .2);
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  transition: background-color .18s var(--ease), border-color .18s, color .18s, transform .12s, box-shadow .18s;
}
.btn:active { transform: translateY(1px); }
.btn-lg { --bs-btn-padding-y: .75rem; --bs-btn-padding-x: 1.5rem; --bs-btn-font-size: 1.02rem; --bs-btn-border-radius: var(--r); }
.btn-sm { --bs-btn-padding-y: .35rem; --bs-btn-padding-x: .75rem; --bs-btn-font-size: .85rem; --bs-btn-border-radius: var(--r-xs); }
.btn-primary {
  --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-700); --bs-btn-hover-border-color: var(--brand-700);
  --bs-btn-active-bg: var(--brand-800); --bs-btn-active-border-color: var(--brand-800);
  --bs-btn-disabled-bg: var(--brand-300); --bs-btn-disabled-border-color: var(--brand-300);
  box-shadow: 0 6px 16px -8px rgba(15, 122, 67, .55);
}
.btn-outline-primary {
  --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand-300);
  --bs-btn-hover-bg: var(--brand-50); --bs-btn-hover-color: var(--brand-800); --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-bg: var(--brand-100); --bs-btn-active-color: var(--brand-900); --bs-btn-active-border-color: var(--brand);
}
.btn-soft {
  --bs-btn-bg: var(--brand-50); --bs-btn-color: var(--brand-800); --bs-btn-border-color: transparent;
  --bs-btn-hover-bg: var(--brand-100); --bs-btn-hover-color: var(--brand-900); --bs-btn-hover-border-color: transparent;
  --bs-btn-active-bg: var(--brand-100); --bs-btn-active-color: var(--brand-900);
}
.btn-light {
  --bs-btn-bg: var(--surface); --bs-btn-border-color: var(--line); --bs-btn-color: var(--ink-2);
  --bs-btn-hover-bg: var(--surface-2); --bs-btn-hover-border-color: #d7d2c3; --bs-btn-hover-color: var(--ink);
}
.btn-gold {
  --bs-btn-bg: var(--gold-500); --bs-btn-border-color: var(--gold-500); --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--gold); --bs-btn-hover-border-color: var(--gold); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--gold); --bs-btn-active-color: #fff;
}
.btn-gold.is-added { --bs-btn-bg: var(--brand-50); --bs-btn-color: var(--brand-800); --bs-btn-border-color: var(--brand-100); }
.btn-danger-soft {
  --bs-btn-bg: var(--sun-50); --bs-btn-color: var(--sun-600); --bs-btn-border-color: transparent;
  --bs-btn-hover-bg: #fbdcd8; --bs-btn-hover-color: var(--sun-600); --bs-btn-hover-border-color: transparent;
}
.btn .spinner-border { width: 1rem; height: 1rem; border-width: .15em; }

.form-label { font-weight: 600; font-size: .9rem; color: var(--ink-2); margin-bottom: .35rem; }
.form-control, .form-select {
  --bs-border-radius: var(--r-sm);
  border-color: var(--line); background-color: var(--surface);
  padding: .65rem .9rem; font-size: .95rem;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.form-control::placeholder { color: var(--faint); }
.form-control:hover, .form-select:hover { border-color: #d3cdbd; }
.form-control:focus, .form-select:focus { border-color: var(--brand-500); box-shadow: 0 0 0 .2rem rgba(23, 154, 85, .14); }
.form-control.is-invalid { border-color: var(--sun); background-image: none; padding-right: .9rem; }
.invalid-feedback { color: var(--sun); font-size: .82rem; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(15, 122, 67, .18); border-color: var(--brand-500); }
.form-switch .form-check-input { width: 2.4em; }
.input-icon { position: relative; }
.input-icon > .bi { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.input-icon > .form-control { padding-left: 2.5rem; }
.input-icon > .input-suffix { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); padding: .35rem .5rem; }

.alert { --bs-alert-border-radius: var(--r-sm); font-size: .9rem; display: flex; gap: .55rem; align-items: flex-start; padding: .7rem .9rem; }
.alert-danger { --bs-alert-bg: var(--sun-50); --bs-alert-border-color: #f7cfca; --bs-alert-color: var(--sun-600); }
.alert-success { --bs-alert-bg: var(--brand-50); --bs-alert-border-color: var(--brand-100); --bs-alert-color: var(--brand-800); }
.alert-info { --bs-alert-bg: #eef5fb; --bs-alert-border-color: #d6e6f5; --bs-alert-color: #1f5585; }
.alert-warning { --bs-alert-bg: var(--gold-50); --bs-alert-border-color: #f1e0b8; --bs-alert-color: #7b5612; }

.dropdown-menu {
  --bs-dropdown-border-color: var(--line); --bs-dropdown-border-radius: var(--r);
  --bs-dropdown-link-active-bg: var(--brand-50); --bs-dropdown-link-active-color: var(--brand-800);
  --bs-dropdown-link-hover-bg: var(--surface-2);
  --bs-dropdown-item-padding-y: .5rem; --bs-dropdown-item-padding-x: 1rem;
  box-shadow: var(--sh-3); padding: .4rem; font-size: .92rem;
}
.dropdown-item { border-radius: var(--r-xs); display: flex; gap: .6rem; align-items: center; }
.dropdown-item .bi { color: var(--muted); }

.breadcrumb { --bs-breadcrumb-divider: '›'; --bs-breadcrumb-item-padding-x: .45rem; font-size: .85rem; margin-bottom: 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb-item.active { color: var(--ink-2); }

/* ---------- 4. Pills, chips, avatars ---------- */
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; font-size: .78rem; font-weight: 600; border-radius: 99px; line-height: 1.5; white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-soft::before { display: none; }
.pill-success { background: var(--brand-50); color: var(--brand-700); }
.pill-primary { background: #e8f1fb; color: #1e5f9e; }
.pill-info { background: #eaf4f6; color: #1d6a78; }
.pill-warning { background: var(--gold-50); color: #8a5f12; }
.pill-danger { background: var(--sun-50); color: var(--sun-600); }
.pill-muted { background: var(--line-2); color: var(--muted); }

.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem; padding: .32rem .75rem;
  border: 1px solid var(--line); border-radius: 99px; background: var(--surface);
  font-size: .84rem; color: var(--ink-2); cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--brand-300); color: var(--brand-800); background: var(--brand-50); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .bi-x { margin-right: -.2rem; }

.avatar {
  position: relative; display: inline-grid; place-items: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, var(--brand-100), var(--brand-50)); color: var(--brand-800);
  font-weight: 700;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.avatar-sm { width: 34px; height: 34px; font-size: .9rem; }
.avatar-lg { width: 96px; height: 96px; font-size: 2rem; }

/* ---------- 5. Skeleton ---------- */
.sk, .is-skeleton .bk-cover {
  background: linear-gradient(90deg, #ece8dd 0%, #f6f3eb 40%, #ece8dd 80%);
  background-size: 300% 100%;
  animation: shimmer 1.3s linear infinite;
  border-radius: var(--r-xs);
}
.sk-line { height: .7rem; margin-bottom: .5rem; }
.w-60 { width: 60%; } .w-40 { width: 40%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.is-skeleton { pointer-events: none; }

/* ---------- 6. Header ---------- */
.topbar { background: var(--brand-900); color: #cfe7d9; font-size: .8rem; }
.topbar .container { min-height: 34px; }
.topbar a { color: #e5f3ea; }
.topbar a:hover { color: #fff; }
.topbar .bi { opacity: .7; margin-right: .2rem; }
.topbar-promo, .topbar-links { display: flex; gap: 1.4rem; }

.site-header {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s;
}
.site-header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(10, 61, 37, .35); }
.header-main { display: flex; align-items: center; gap: 1.25rem; min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand img { width: 46px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-display); font-size: 1.22rem; color: var(--brand-800); font-weight: 700; }
.brand-text small { font-size: .72rem; color: var(--muted); letter-spacing: .02em; }

.header-actions { display: flex; align-items: center; gap: .35rem; margin-left: auto; flex-shrink: 0; }
.h-action {
  position: relative; display: flex; align-items: center; gap: .55rem;
  padding: .45rem .6rem; border: 0; border-radius: var(--r-sm); background: none;
  color: var(--ink-2); font-size: 1.3rem; line-height: 1; transition: background .15s, color .15s;
}
.h-action:hover { background: var(--brand-50); color: var(--brand-800); }
.h-label { display: flex; flex-direction: column; font-size: .86rem; font-weight: 600; line-height: 1.2; text-align: left; }
.h-label small { font-size: .72rem; font-weight: 400; color: var(--muted); }
.h-cart { background: var(--brand-50); color: var(--brand-800); }
.h-cart:hover { background: var(--brand-100); }
.badge-dot {
  position: absolute; top: 0; left: 1.35rem; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 99px; background: var(--sun); color: #fff; font-size: .68rem; font-weight: 700;
  display: grid; place-items: center; line-height: 1; border: 2px solid #fff; font-style: normal;
}

/* Search */
.search { position: relative; flex: 1; max-width: 640px; display: flex; align-items: center; }
.search input {
  width: 100%; height: 46px; padding: 0 7.2rem 0 2.75rem;
  border: 1.5px solid var(--line); border-radius: 99px; background: var(--surface-2);
  font-size: .95rem; color: var(--ink); transition: border-color .15s, box-shadow .15s, background .15s;
}
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus { outline: 0; border-color: var(--brand-500); background: #fff; box-shadow: 0 0 0 4px rgba(23, 154, 85, .1); }
.search-icon { position: absolute; left: 1rem; color: var(--muted); font-size: 1.05rem; pointer-events: none; }
.search-btn {
  position: absolute; right: 4px; height: 38px; padding: 0 1.1rem; border: 0; border-radius: 99px;
  background: var(--brand); color: #fff; font-weight: 600; font-size: .9rem; transition: background .15s;
}
.search-btn:hover { background: var(--brand-700); }
.search-clear { position: absolute; right: 5.6rem; border: 0; background: none; color: var(--faint); padding: .3rem; font-size: .85rem; }
.search-spin {
  position: absolute; right: 5.9rem; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--brand-100); border-top-color: var(--brand); animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.search-pop {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 50;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-3); padding: .5rem; max-height: min(70vh, 560px); overflow: auto;
}
.search-label { display: flex; justify-content: space-between; align-items: center; font-size: .75rem; font-weight: 600; color: var(--muted); padding: .55rem .6rem .3rem; text-transform: uppercase; letter-spacing: .04em; }
.search-label button { border: 0; background: none; color: var(--brand); font-size: .75rem; }
.search-idle { padding: 0 .1rem .4rem; }
.search-idle .chip-row { padding: .1rem .5rem .4rem; }
.search-item { display: flex; align-items: center; gap: .75rem; padding: .45rem .6rem; border-radius: var(--r-sm); color: var(--ink); }
.search-item:hover, .search-item.is-active { background: var(--brand-50); color: var(--ink); }
.si-thumb { position: relative; width: 36px; height: 50px; border-radius: 4px; overflow: hidden; background: var(--line-2); display: grid; place-items: center; flex-shrink: 0; color: var(--muted); }
.si-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.t-author .si-thumb { width: 40px; height: 40px; border-radius: 50%; }
.t-cat .si-thumb { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-50); color: var(--brand); }
.si-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.si-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-sub { font-size: .8rem; color: var(--muted); }
.si-price { font-weight: 700; color: var(--brand-700); font-size: .9rem; }
.search-all { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: .3rem; padding: .65rem; border-radius: var(--r-sm); background: var(--surface-2); font-weight: 600; font-size: .9rem; }
.search-all:hover, .search-all.is-active { background: var(--brand-50); }
.search-none { padding: 1.5rem 1rem; text-align: center; color: var(--muted); }
.search-sk .sk-row { height: 50px; margin: .4rem; border-radius: var(--r-sm); background: linear-gradient(90deg, #f0ede4, #f8f6f0, #f0ede4); background-size: 300% 100%; animation: shimmer 1.3s linear infinite; }

/* Category nav */
.navbar-cats { border-top: 1px solid var(--line-2); }
.navbar-cats .container { min-height: 46px; gap: 1rem; }
.btn-cats {
  display: flex; align-items: center; gap: .5rem; height: 36px; padding: 0 1rem;
  border: 0; border-radius: var(--r-sm); background: var(--brand); color: #fff; font-weight: 600; font-size: .9rem;
}
.btn-cats:hover, .btn-cats[aria-expanded="true"] { background: var(--brand-700); }
.nav-links { display: flex; list-style: none; margin: 0; padding: 0; gap: .15rem; }
.nav-links a { display: flex; align-items: center; gap: .35rem; padding: .4rem .8rem; border-radius: var(--r-xs); color: var(--ink-2); font-weight: 500; font-size: .92rem; }
.nav-links a:hover { color: var(--brand-800); background: var(--brand-50); }
.nav-links a.active { color: var(--brand-800); background: var(--brand-50); font-weight: 600; }
.nav-badge { font-size: .65rem; padding: .05rem .4rem; border-radius: 99px; background: var(--gold-50); color: var(--gold); font-weight: 700; }
.nav-track { font-size: .88rem; font-weight: 500; color: var(--ink-2); display: flex; align-items: center; gap: .4rem; }
.mega-menu { width: min(880px, 92vw); padding: .75rem; margin-top: .4rem !important; }
.mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .2rem; }
.mega-item { display: flex; align-items: center; gap: .7rem; padding: .55rem .6rem; border-radius: var(--r-sm); color: var(--ink); font-size: .9rem; line-height: 1.3; }
.mega-item:hover { background: var(--brand-50); color: var(--brand-900); }
.mega-item small { display: block; color: var(--muted); font-size: .75rem; }
.cat-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--brand-50); color: var(--brand); font-size: 1.05rem; flex-shrink: 0; transition: all .2s; }
.mega-item:hover .cat-ico { background: var(--brand); color: #fff; }

@media (max-width: 991.98px) {
  :root { --header-h: 60px; }
  .header-main { flex-wrap: wrap; gap: .5rem .75rem; padding-top: .5rem; padding-bottom: .6rem; min-height: 0; }
  .brand img { width: 38px; }
  .brand-text strong { font-size: 1.08rem; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .search input { height: 42px; padding-right: 2.6rem; }
  .search-btn { display: none; }
  .search-clear { right: .7rem; }
  .search-spin { right: 1rem; }
  .h-action { font-size: 1.25rem; }
  .badge-dot { left: 1.2rem; }
}

/* Mobile bottom nav */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -8px 24px -18px rgba(10, 61, 37, .4);
}
.bottom-nav a, .bottom-nav button {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: .1rem;
  padding: .5rem 0 .45rem; border: 0; background: none; color: var(--muted); font-size: .7rem; font-weight: 500;
}
.bottom-nav .bi { font-size: 1.25rem; line-height: 1; }
.bottom-nav .active { color: var(--brand); }
.bottom-nav .badge-dot { top: .2rem; left: calc(50% + .3rem); }
@media (max-width: 991.98px) { body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); } }

/* Offcanvas (mini-cart, mobile menu) */
.offcanvas { --bs-offcanvas-width: 400px; --bs-offcanvas-border-color: var(--line); }
.offcanvas-header { border-bottom: 1px solid var(--line-2); padding: 1rem 1.25rem; }
.offcanvas-title { font-weight: 600; font-size: 1.05rem; display: flex; align-items: center; gap: .45rem; }
.offcanvas-footer { padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); background: var(--surface-2); }
.mini-cart .offcanvas-body { padding: .5rem 1.25rem; }
.cart-line { position: relative; display: flex; gap: .8rem; padding: .85rem 0; border-bottom: 1px dashed var(--line); }
.cart-line img { width: 54px; height: 76px; object-fit: cover; border-radius: 5px; box-shadow: var(--sh-2); flex-shrink: 0; }
.cart-line-body { flex: 1; min-width: 0; padding-right: 1.25rem; }
.cart-line-title { font-weight: 600; font-size: .9rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-line-sub { font-size: .78rem; color: var(--muted); }
.cart-line-x { position: absolute; top: .7rem; right: -.3rem; border: 0; background: none; color: var(--faint); font-size: 1.1rem; }
.cart-line-x:hover { color: var(--sun); }
.m-links { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: 1rem; border-bottom: 1px solid var(--line-2); }
.m-links a { display: flex; align-items: center; gap: .45rem; padding: .6rem .75rem; border-radius: var(--r-sm); background: var(--brand-50); color: var(--brand-900); font-weight: 500; font-size: .88rem; }
.m-cats a { display: flex; align-items: center; gap: .75rem; padding: .55rem 1rem; color: var(--ink); font-size: .92rem; border-bottom: 1px solid var(--line-2); }
.m-cats small { margin-left: auto; color: var(--muted); }
.m-cats .cat-ico { width: 32px; height: 32px; }

/* Qty stepper */
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; overflow: hidden; }
.qty button { width: 38px; height: 40px; border: 0; background: none; color: var(--ink-2); font-size: 1rem; }
.qty button:hover { background: var(--brand-50); color: var(--brand); }
.qty span, .qty input { min-width: 34px; text-align: center; font-weight: 600; border: 0; }
.qty-sm button { width: 28px; height: 28px; font-size: .85rem; }
.qty-sm span { min-width: 24px; font-size: .85rem; }

/* ---------- 7. Sections & layout helpers ---------- */
.section { padding: 1.75rem 0; }
.section-tight { padding: 1rem 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.section-head h2 { font-family: var(--font-display); font-size: 1.32rem; margin: 0; display: flex; align-items: center; gap: .5rem; }
.section-head h2 .bi { color: var(--brand); font-size: 1.1rem; }
.section-head p { margin: .15rem 0 0; color: var(--muted); font-size: .88rem; }
.section-actions { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.link-more { font-weight: 600; font-size: .88rem; display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.link-more .bi { transition: transform .2s var(--ease); }
.link-more:hover .bi { transform: translateX(3px); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.panel-pad { padding: 1.25rem; }
@media (min-width: 768px) { .panel-pad { padding: 1.5rem; } }
.panel-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }
.panel-title .bi { color: var(--brand); }
.page-head { padding: 1.25rem 0 .75rem; }
.page-head h1 { font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: .35rem 0 .2rem; }
.page-head p { color: var(--muted); margin: 0; }

.rail-nav { display: flex; gap: .35rem; }
.rail-nav button {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  display: grid; place-items: center; transition: all .15s;
}
.rail-nav button:hover:not(:disabled) { background: var(--brand); border-color: var(--brand); color: #fff; }
.rail-nav button:disabled { opacity: .35; cursor: default; }

/* ---------- 8. Book card ---------- */
.book-grid { display: grid; gap: 1rem .85rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 480px)  { .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 768px)  { .book-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.15rem 1rem; } }
@media (min-width: 992px)  { .book-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .book-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 992px)  { .with-sidebar .book-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .with-sidebar .book-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .with-sidebar .book-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.grid-empty { grid-column: 1 / -1; }

.rail {
  display: grid; grid-auto-flow: column; gap: .85rem;
  grid-auto-columns: calc((100% - .85rem * 1.4) / 2.4);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0 1rem;
  padding: .25rem 1rem .9rem; margin: -.25rem -1rem 0;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
@media (min-width: 480px)  { .rail { grid-auto-columns: calc((100% - .85rem * 2.3) / 3.3); } }
@media (min-width: 768px)  { .rail { grid-auto-columns: calc((100% - 1rem * 3.3) / 4.3); gap: 1rem; } }
@media (min-width: 992px)  { .rail { grid-auto-columns: calc((100% - 1rem * 4) / 5); padding-left: 0; padding-right: 0; margin-left: 0; margin-right: 0; scroll-padding: 0; } }
@media (min-width: 1200px) { .rail { grid-auto-columns: calc((100% - 1rem * 5) / 6); } }
@media (min-width: 1400px) { .rail { grid-auto-columns: calc((100% - 1rem * 6) / 7); } }

.bk-card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: .55rem .55rem .65rem; box-shadow: var(--sh-1);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
@media (hover: hover) {
  .bk-card:not(.is-skeleton):hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line); }
  .bk-card:hover .bk-cover img { transform: scale(1.035); }
}
.bk-cover {
  position: relative; display: block; aspect-ratio: 5 / 7; border-radius: var(--r-sm); overflow: hidden;
  background: linear-gradient(160deg, #efebe0, #e4dfd1);
}
.bk-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease); }
.bk-cover::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 4px 0 6px -4px rgba(0, 0, 0, .25), inset 0 0 0 1px rgba(0, 0, 0, .04); pointer-events: none; }
.bk-cover.no-img img { display: none; }
.bk-cover.no-img::before { content: '\F194'; font-family: bootstrap-icons; position: absolute; inset: 0; display: grid; place-items: center; font-size: 2rem; color: #c9c2ad; }
.bk-off {
  position: absolute; top: .45rem; left: .45rem; z-index: 2;
  padding: .1rem .42rem; border-radius: 6px; background: var(--sun); color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .01em; box-shadow: 0 3px 8px -3px rgba(226, 61, 45, .6);
}
.bk-sample {
  position: absolute; left: .45rem; bottom: .45rem; z-index: 2;
  padding: .12rem .5rem; border-radius: 99px; background: rgba(255, 255, 255, .92); color: var(--brand-800);
  font-size: .7rem; font-weight: 600; backdrop-filter: blur(4px); box-shadow: var(--sh-1);
}
.bk-oos { position: absolute; inset: auto 0 0 0; z-index: 2; padding: .3rem; text-align: center; background: rgba(23, 35, 28, .72); color: #fff; font-size: .75rem; font-weight: 600; }
.is-oos .bk-cover img { filter: grayscale(.45) opacity(.85); }
.is-oos .bk-sample { bottom: 2rem; }
.bk-wish {
  position: absolute; top: .95rem; right: .95rem; z-index: 3;
  width: 30px; height: 30px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(255, 255, 255, .92); color: var(--ink-2); font-size: .9rem; box-shadow: var(--sh-2);
  transition: transform .15s, color .15s, opacity .2s;
}
.bk-wish:hover { transform: scale(1.1); color: var(--sun); }
.bk-wish.is-on { color: var(--sun); }
@media (hover: hover) { .bk-wish:not(.is-on) { opacity: 0; } .bk-card:hover .bk-wish { opacity: 1; } }

.bk-body { display: flex; flex-direction: column; flex: 1; padding: .55rem .15rem 0; min-width: 0; }
.bk-title {
  color: var(--ink); font-weight: 600; font-size: .9rem; line-height: 1.38;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.76em;
}
.bk-title:hover { color: var(--brand-800); }
.bk-author { color: var(--muted); font-size: .78rem; margin-top: .1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-author:hover { color: var(--brand); }
.bk-rating { font-size: .75rem; color: var(--ink-2); margin-top: .15rem; }
.bk-rating .bi { color: #f2a91d; }
.bk-rating span { color: var(--faint); }
.bk-foot { display: flex; align-items: center; justify-content: space-between; gap: .3rem; margin-top: auto; padding-top: .45rem; }
.bk-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 .35rem; line-height: 1.2; }
.bk-price strong { color: var(--brand-700); font-size: 1.02rem; font-weight: 700; }
.bk-price del { color: var(--faint); font-size: .78rem; }
.bk-add {
  width: 34px; height: 34px; border-radius: 10px; border: 0; flex-shrink: 0;
  display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-size: 1.02rem;
  transition: background .18s, color .18s, transform .12s;
}
.bk-add:hover { background: var(--brand); color: #fff; }
.bk-add:active { transform: scale(.92); }
.bk-add.is-added { background: var(--brand); color: #fff; }
.bk-add.is-disabled { background: var(--line-2); color: var(--faint); cursor: not-allowed; }
@media (max-width: 479.98px) {
  .bk-card { padding: .45rem .45rem .55rem; }
  .bk-title { font-size: .86rem; }
  .bk-price strong { font-size: .96rem; }
}

/* ---------- 9. Home ---------- */
.hero { padding: 1.25rem 0 .5rem; }
.hero-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 992px) { .hero-grid { grid-template-columns: minmax(0, 2.05fr) minmax(0, 1fr); } }
.hero-carousel { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-2); background: var(--brand-900); }
.hero-carousel .carousel-item img { width: 100%; aspect-ratio: 2400 / 1002; object-fit: cover; display: block; }
.hero-carousel .carousel-indicators { margin-bottom: .6rem; }
.hero-carousel .carousel-indicators [data-bs-target] { width: 8px; height: 8px; border-radius: 99px; border: 0; transition: width .3s; }
.hero-carousel .carousel-indicators .active { width: 22px; }
.hero-carousel .carousel-control-prev, .hero-carousel .carousel-control-next { width: 3.5rem; opacity: 0; transition: opacity .2s; }
.hero-carousel:hover .carousel-control-prev, .hero-carousel:hover .carousel-control-next { opacity: .9; }
.hero-side { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (min-width: 992px) { .hero-side { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; } }
.promo {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 1.1rem 1.2rem;
  display: flex; flex-direction: column; justify-content: center; min-height: 150px; color: #fff; isolation: isolate;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.promo:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--sh-3); }
.promo h3 { font-family: var(--font-display); color: inherit; font-size: 1.18rem; margin: .3rem 0 .25rem; line-height: 1.35; max-width: 62%; }
.promo p { font-size: .82rem; opacity: .85; margin: 0 0 .6rem; max-width: 60%; line-height: 1.45; }
.promo .eyebrow { font-size: .72rem; font-weight: 600; letter-spacing: .04em; opacity: .9; }
.promo .promo-cta { font-weight: 600; font-size: .85rem; display: inline-flex; align-items: center; gap: .3rem; }
.promo-gold { background: linear-gradient(135deg, #5b3d0d 0%, #8a5f15 55%, #b98a2a 100%); }
.promo-green { background: linear-gradient(135deg, var(--brand-950) 0%, var(--brand-800) 60%, var(--brand) 100%); }
.promo-art { position: absolute; right: -.5rem; bottom: -1.2rem; z-index: -1; display: flex; }
.promo-art img { width: 74px; aspect-ratio: 5/7; object-fit: cover; border-radius: 5px; box-shadow: -6px 8px 18px rgba(0, 0, 0, .35); margin-left: -38px; transform: rotate(var(--r, 0deg)); border: 2px solid rgba(255, 255, 255, .85); }
.promo-art img:nth-child(1) { --r: -10deg; margin-left: 0; }
.promo-art img:nth-child(2) { --r: -2deg; transform: translateY(-14px) rotate(var(--r)); }
.promo-art img:nth-child(3) { --r: 8deg; }
.promo-green::before {
  content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; z-index: -1;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .09) 0deg 4deg, transparent 4deg 18deg); border-radius: 50%;
}
.promo-green .promo-icon { position: absolute; right: 1.2rem; bottom: 1rem; font-size: 3.4rem; opacity: .22; z-index: -1; }
@media (max-width: 575.98px) {
  .promo { min-height: 132px; padding: .9rem; }
  .promo h3 { font-size: 1rem; max-width: 100%; }
  .promo p { display: none; }
  .promo-art { opacity: .45; }
}

.usp-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin-top: 1rem; }
@media (min-width: 768px) { .usp-strip { grid-template-columns: repeat(4, 1fr); } }
.usp { display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); }
.usp .bi { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-size: 1.1rem; flex-shrink: 0; }
.usp strong { display: block; font-size: .88rem; line-height: 1.3; }
.usp span { font-size: .76rem; color: var(--muted); line-height: 1.3; }

.cat-tiles {
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: 132px; gap: .6rem;
  overflow-x: auto; scrollbar-width: none; padding: .1rem 1rem .4rem; margin: 0 -1rem; scroll-snap-type: x proximity;
}
.cat-tiles::-webkit-scrollbar { display: none; }
@media (min-width: 992px) {
  .cat-tiles { grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(8, minmax(0, 1fr)); overflow: visible; padding: 0; margin: 0; }
}
.cat-tile {
  display: flex; align-items: center; gap: .6rem; padding: .6rem .7rem; scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); color: var(--ink);
  font-size: .84rem; line-height: 1.3; transition: all .2s var(--ease);
}
.cat-tile:hover { border-color: var(--brand-300); color: var(--brand-900); box-shadow: var(--sh-2); transform: translateY(-2px); }
.cat-tile:hover .cat-ico { background: var(--brand); color: #fff; }
.cat-tile small { display: block; color: var(--muted); font-size: .72rem; }
.ct-text { min-width: 0; display: flex; flex-direction: column; }
.ct-name { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-weight: 500; }
.ct-all { background: var(--brand-50); border-color: var(--brand-100); }
.ct-all .cat-ico { background: var(--brand); color: #fff; }

.tabs-pill { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; padding: .2rem; background: var(--surface); border: 1px solid var(--line-2); border-radius: 99px; }
.tabs-pill::-webkit-scrollbar { display: none; }
.tabs-pill button { flex-shrink: 0; display: flex; align-items: center; gap: .35rem; padding: .38rem .9rem; border: 0; border-radius: 99px; background: none; color: var(--ink-2); font-weight: 500; font-size: .88rem; transition: all .18s; }
.tabs-pill button:hover { color: var(--brand-800); }
.tabs-pill button.active { background: var(--brand); color: #fff; box-shadow: 0 4px 10px -4px rgba(15, 122, 67, .6); }
.shelf-tabs .section-head { flex-wrap: wrap; align-items: center; }
@media (max-width: 767.98px) { .shelf-tabs .section-head .tabs-pill { order: 3; width: 100%; } }

.band { background: var(--surface); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.band-green { background: linear-gradient(180deg, var(--brand-50), var(--paper)); border: 0; }

/* Combo card */
.combo-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 576px) { .combo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .combo-grid { grid-template-columns: repeat(3, 1fr); } }
.rail-combos { grid-auto-columns: 86% !important; }
@media (min-width: 576px) { .rail-combos { grid-auto-columns: calc((100% - 1rem) / 2) !important; } }
@media (min-width: 1200px) { .rail-combos { grid-auto-columns: calc((100% - 2rem) / 3) !important; } }
.combo-card {
  display: flex; gap: 1rem; padding: .9rem; background: var(--surface);
  border: 1px solid #efe3c6; border-radius: var(--r-lg); box-shadow: var(--sh-1);
  background-image: linear-gradient(135deg, var(--gold-50) 0%, #fff 45%);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.combo-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.combo-stack { position: relative; width: 128px; flex-shrink: 0; aspect-ratio: 4 / 5; }
.combo-stack img {
  position: absolute; bottom: 0; width: 64%; aspect-ratio: 5 / 7; object-fit: cover; border-radius: 5px;
  left: calc(var(--i) * 12%); transform: translateY(calc(var(--i) * -6%)) rotate(calc((var(--i) - 1.5) * 4deg));
  box-shadow: -4px 6px 14px -4px rgba(0, 0, 0, .35); border: 2px solid #fff; background: #e9e4d6; transition: transform .35s var(--ease);
}
.combo-card:hover .combo-stack img { transform: translateY(calc(var(--i) * -9%)) rotate(calc((var(--i) - 1.5) * 6deg)); }
.combo-count { position: absolute; top: 0; left: 0; z-index: 5; padding: .1rem .5rem; border-radius: 99px; background: var(--gold-500); color: #fff; font-size: .7rem; font-weight: 700; }
.combo-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.combo-title { color: var(--ink); font-weight: 700; font-size: 1rem; line-height: 1.35; }
.combo-title:hover { color: var(--gold); }
.combo-tag { font-size: .8rem; color: var(--muted); margin: .25rem 0 .5rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.combo-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.save-pill { font-size: .7rem; font-weight: 700; padding: .08rem .45rem; border-radius: 99px; background: var(--sun-50); color: var(--sun-600); }

/* Author chips */
.author-rail { display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: .75rem; overflow-x: auto; scrollbar-width: none; padding: .2rem 1rem .6rem; margin: 0 -1rem; }
.author-rail::-webkit-scrollbar { display: none; }
@media (min-width: 992px) { .author-rail { padding: .2rem 0 .6rem; margin: 0; } }
.author-chip { display: flex; flex-direction: column; align-items: center; text-align: center; padding: .9rem .5rem .75rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); transition: all .2s var(--ease); }
.author-chip:hover { border-color: var(--brand-300); box-shadow: var(--sh-2); transform: translateY(-2px); color: var(--ink); }
.author-chip .avatar { width: 64px; height: 64px; font-size: 1.5rem; margin-bottom: .5rem; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--brand-100); }
.author-chip-name { font-size: .8rem; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.author-chip small { color: var(--muted); font-size: .72rem; }

.spotlight {
  display: grid; gap: 1.25rem; align-items: center; padding: 1.25rem; border-radius: var(--r-xl);
  background: linear-gradient(120deg, var(--brand-900), var(--brand-800)); color: #e3f1e9; position: relative; overflow: hidden;
}
@media (min-width: 992px) { .spotlight { grid-template-columns: 300px minmax(0, 1fr); padding: 1.75rem; } }
.spotlight::after { content: ''; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: repeating-conic-gradient(rgba(255, 255, 255, .05) 0 4deg, transparent 4deg 16deg); pointer-events: none; }
.spotlight-who { display: flex; align-items: center; gap: 1rem; }
@media (min-width: 992px) { .spotlight-who { flex-direction: column; align-items: flex-start; } }
.spotlight .avatar { width: 84px; height: 84px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .15); }
.spotlight h3 { color: #fff; font-family: var(--font-display); font-size: 1.3rem; margin: 0 0 .25rem; }
.spotlight p { font-size: .86rem; color: #b8d7c6; margin: 0 0 .75rem; line-height: 1.55; }
.spotlight .eyebrow { color: #f3c96b; font-size: .75rem; font-weight: 600; letter-spacing: .05em; }
.spotlight .rail { position: relative; z-index: 1; }
.spotlight .bk-card { border-color: transparent; }

/* ---------- 10. Listing ---------- */
.listing { display: grid; gap: 1.5rem; padding-bottom: 2rem; }
@media (min-width: 992px) { .listing { grid-template-columns: 250px minmax(0, 1fr); } }
@media (min-width: 992px) {
  .filters { position: sticky; top: calc(var(--header-h) + 62px); align-self: start; max-height: calc(100vh - var(--header-h) - 80px); overflow: auto; scrollbar-width: thin; }
}
@media (max-width: 991.98px) { .filters .offcanvas-body { padding: 1rem 1.25rem 2rem; } }
.filter-block { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.filter-block:first-child { padding-top: 0; }
.filter-block h6 { font-size: .82rem; font-weight: 700; color: var(--ink-2); margin-bottom: .6rem; text-transform: uppercase; letter-spacing: .03em; }
.filter-list { max-height: 260px; overflow: auto; margin: 0 -.4rem; scrollbar-width: thin; }
.filter-opt { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .32rem .4rem; border: 0; background: none; border-radius: var(--r-xs); font-size: .86rem; color: var(--ink-2); text-align: left; line-height: 1.35; }
.filter-opt:hover { background: var(--brand-50); color: var(--brand-900); }
.filter-opt.is-active { background: var(--brand-50); color: var(--brand-800); font-weight: 600; }
.filter-opt .bi-check2 { margin-left: auto; color: var(--brand); }
.filter-opt small { margin-left: auto; color: var(--faint); font-size: .75rem; }
.filter-opt.is-active small { display: none; }
.price-inputs { display: flex; gap: .5rem; align-items: center; }
.price-inputs .form-control { padding: .45rem .6rem; font-size: .88rem; }
.toolbar { position: sticky; top: var(--header-h); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .7rem 0; margin-bottom: .5rem; background: var(--paper); }
@media (min-width: 992px) { .toolbar { top: calc(var(--header-h) + 47px); } }
.toolbar .form-select { width: auto; padding: .45rem 2.2rem .45rem .8rem; font-size: .88rem; border-radius: 99px; }
.toolbar-count { font-size: .9rem; color: var(--muted); }
.toolbar-count strong { color: var(--ink); }
.progress-line { height: 3px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress-line > div { height: 100%; background: linear-gradient(90deg, var(--brand-500), var(--brand)); border-radius: inherit; transition: width .4s var(--ease); }
.load-status { display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: 1.75rem 0 .5rem; color: var(--muted); font-size: .88rem; }
.load-status .progress-line { width: 220px; }
.grid-replacing { opacity: .45; pointer-events: none; transition: opacity .2s; }

.listing-hero { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; border-radius: var(--r-lg); background: linear-gradient(120deg, var(--brand-50), #fff); border: 1px solid var(--brand-100); margin-bottom: 1rem; }
.listing-hero .cat-ico { width: 52px; height: 52px; font-size: 1.5rem; background: var(--brand); color: #fff; border-radius: 14px; }
.listing-hero h1 { font-family: var(--font-display); font-size: clamp(1.2rem, 2.3vw, 1.6rem); margin: 0; }
.listing-hero p { margin: 0; color: var(--muted); font-size: .88rem; }

/* ---------- 11. Book detail ---------- */
.pd { display: grid; gap: 1.5rem; padding: .5rem 0 1.5rem; }
@media (min-width: 768px) { .pd { grid-template-columns: 260px minmax(0, 1fr); } }
@media (min-width: 1200px) { .pd { grid-template-columns: 300px minmax(0, 1fr) 300px; gap: 2rem; } }
.pd-cover { position: relative; align-self: start; }
@media (min-width: 768px) { .pd-cover { position: sticky; top: calc(var(--header-h) + 64px); } }
.pd-cover-img {
  position: relative; display: block; width: 100%; aspect-ratio: 5 / 7; border-radius: 6px 12px 12px 6px; overflow: hidden;
  box-shadow: -10px 18px 34px -14px rgba(10, 30, 20, .5), 0 2px 4px rgba(0, 0, 0, .08); background: var(--line-2);
}
.pd-cover-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-cover-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .18) 0, rgba(255, 255, 255, .15) 2.5%, transparent 6%); }
@media (max-width: 767.98px) { .pd-cover { max-width: 230px; margin: 0 auto; } }
.btn-read {
  position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 2; white-space: nowrap;
  background: rgba(255, 255, 255, .96); color: var(--brand-800); border: 0; border-radius: 99px; padding: .55rem 1.1rem;
  font-weight: 700; font-size: .9rem; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .45); display: flex; align-items: center; gap: .45rem;
  animation: nudge 3s var(--ease) 1.5s 2;
}
.btn-read:hover { background: var(--brand); color: #fff; }
@keyframes nudge { 0%, 100% { transform: translateX(-50%); } 10% { transform: translateX(-50%) translateY(-4px); } 20% { transform: translateX(-50%); } }
.pd-actions-mini { display: flex; justify-content: center; gap: .5rem; margin-top: .9rem; }
.pd-info h1 { font-family: var(--font-display); font-size: clamp(1.35rem, 2.6vw, 1.85rem); line-height: 1.35; margin: 0 0 .5rem; }
.pd-meta { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; font-size: .9rem; color: var(--muted); margin-bottom: 1rem; }
.pd-meta a { font-weight: 600; }
.pd-price { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .75rem; padding: .9rem 1rem; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-2); margin-bottom: 1rem; }
.pd-price strong { font-size: 1.9rem; color: var(--brand-700); line-height: 1; font-weight: 700; }
.pd-price del { color: var(--faint); font-size: 1.05rem; }
.pd-price .save { font-size: .8rem; font-weight: 700; padding: .2rem .6rem; border-radius: 99px; background: var(--sun-50); color: var(--sun-600); }
.pd-stock { margin-left: auto; font-size: .85rem; font-weight: 600; display: flex; align-items: center; gap: .3rem; }
.pd-stock.in { color: var(--brand-500); }
.pd-stock.out { color: var(--sun); }
.pd-label { font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: .4rem; }
.ed-opts { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.ed-opt { padding: .4rem .8rem; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff; font-size: .85rem; line-height: 1.3; text-align: left; transition: all .15s; }
.ed-opt small { display: block; color: var(--muted); font-size: .72rem; }
.ed-opt:hover { border-color: var(--brand-300); }
.ed-opt.is-active { border-color: var(--brand); background: var(--brand-50); color: var(--brand-900); box-shadow: 0 0 0 3px rgba(15, 122, 67, .1); }
.pd-buy { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1.1rem; }
.pd-buy .btn { flex: 1 1 150px; }
.pd-buy .qty button { height: 48px; }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin-bottom: 1rem; }
@media (min-width: 576px) { .specs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.spec { padding: .55rem .7rem; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line-2); }
.spec span { display: flex; align-items: center; gap: .3rem; font-size: .74rem; color: var(--muted); }
.spec strong { font-size: .9rem; font-weight: 600; }
.delivery-card { border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.delivery-card > div { display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line-2); font-size: .86rem; }
.delivery-card > div:last-child { border-bottom: 0; }
.delivery-card .bi { font-size: 1.15rem; color: var(--brand); width: 1.4rem; text-align: center; }
.delivery-card strong { display: block; font-size: .88rem; }
.delivery-card span { color: var(--muted); font-size: .8rem; }
.pd-side { display: none; }
@media (min-width: 1200px) { .pd-side { display: flex; flex-direction: column; gap: 1rem; align-self: start; position: sticky; top: calc(var(--header-h) + 64px); } }
.mini-list a { display: flex; gap: .7rem; padding: .55rem 0; border-bottom: 1px dashed var(--line); color: var(--ink); }
.mini-list a:last-child { border-bottom: 0; }
.mini-list img { width: 44px; height: 62px; object-fit: cover; border-radius: 4px; box-shadow: var(--sh-2); flex-shrink: 0; }
.mini-list .t { font-size: .84rem; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-list .p { font-size: .82rem; color: var(--brand-700); font-weight: 700; }
.mini-list a:hover .t { color: var(--brand-800); }

.tabs-line { display: flex; gap: 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 1.1rem; overflow-x: auto; scrollbar-width: none; }
.tabs-line button { position: relative; padding: .7rem 0; border: 0; background: none; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tabs-line button.active { color: var(--brand-800); }
.tabs-line button.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2.5px; border-radius: 2px; background: var(--brand); }
.prose { font-size: .98rem; line-height: 1.85; color: var(--ink-2); white-space: pre-line; }
.prose.clamp { max-height: 11.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.review { padding: .9rem 0; border-bottom: 1px solid var(--line-2); }
.stars { color: #f2a91d; font-size: .85rem; letter-spacing: .05em; }

.sticky-buy {
  position: fixed; left: 0; right: 0; bottom: calc(62px + env(safe-area-inset-bottom)); z-index: 1030;
  display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -10px 24px -18px rgba(10, 61, 37, .5); transform: translateY(120%); transition: transform .3s var(--ease);
}
.sticky-buy.show { transform: none; }
.sticky-buy strong { font-size: 1.15rem; color: var(--brand-700); }
.sticky-buy .btn { margin-left: auto; }

/* ---------- 12. Flipbook ---------- */
.fb-overlay {
  position: fixed; inset: 0; z-index: 1080; display: flex; flex-direction: column;
  background: radial-gradient(ellipse at center, #2b3a31 0%, #111a15 75%);
}
.fb-top { display: flex; align-items: center; gap: .75rem; padding: .7rem 1rem; color: #e6efe9; }
.fb-top h5 { color: #fff; margin: 0; font-size: 1rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-top small { color: #9fb5a8; }
.fb-close { margin-left: auto; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: #fff; font-size: 1.1rem; flex-shrink: 0; }
.fb-close:hover { background: rgba(255, 255, 255, .2); }
.fb-stage { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; padding: .5rem 3.5rem 1rem; min-height: 0; }
@media (max-width: 575.98px) { .fb-stage { padding: .5rem .75rem 1rem; } }
.fb-book { width: 100%; max-width: 1100px; height: 100%; display: flex; align-items: center; justify-content: center; }
.fb-book > div { margin: 0 auto; }
.fb-page { background: #fff; overflow: hidden; }
.fb-page img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.fb-end > div { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1.5rem; background: linear-gradient(180deg, var(--brand-50), #fff); }
.fb-end img { width: 42%; height: auto; border-radius: 4px; box-shadow: var(--sh-3); margin-bottom: 1rem; }
.fb-end h4 { font-family: var(--font-display); font-size: 1.1rem; }
.fb-end p { color: var(--muted); font-size: .88rem; }
.fb-blank { background: #f5f2ea; }
.fb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.3rem; z-index: 5; }
.fb-nav:hover { background: rgba(255, 255, 255, .25); }
.fb-prev { left: .75rem; }
.fb-next { right: .75rem; }
@media (max-width: 575.98px) { .fb-nav { display: none; } }
.fb-bottom { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: .5rem 1rem calc(.9rem + env(safe-area-inset-bottom)); color: #c9d8cf; font-size: .85rem; }
.fb-bottom .btn { --bs-btn-padding-y: .4rem; }
.fb-loading { text-align: center; color: #dbe7e0; width: min(340px, 85vw); }
.fb-loading .book-anim { font-size: 3rem; color: var(--brand-300); animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-4deg); } }
.fb-loading .progress-line { background: rgba(255, 255, 255, .12); margin: 1rem 0 .5rem; height: 5px; }
.fb-loading small { color: #9fb5a8; }
.stf__parent { margin: 0 auto; }

/* ---------- 13. Cart & checkout ---------- */
.checkout-grid { display: grid; gap: 1.25rem; padding-bottom: 2rem; align-items: start; }
@media (min-width: 992px) { .checkout-grid { grid-template-columns: minmax(0, 1fr) 390px; gap: 1.75rem; } }
.summary { position: sticky; top: calc(var(--header-h) + 64px); }
.sum-row { display: flex; justify-content: space-between; padding: .35rem 0; font-size: .92rem; color: var(--ink-2); }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: .75rem; margin-top: .5rem; border-top: 1px dashed var(--line); font-weight: 700; font-size: 1.05rem; }
.sum-total strong { font-size: 1.45rem; color: var(--brand-700); }
.sum-items { max-height: 290px; overflow: auto; margin: 0 -.25rem .75rem; padding: 0 .25rem; scrollbar-width: thin; }
.sum-item { display: flex; gap: .65rem; align-items: center; padding: .45rem 0; font-size: .86rem; }
.sum-item img { width: 38px; height: 54px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.sum-item .t { flex: 1; min-width: 0; line-height: 1.35; }
.sum-item .t div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.sum-item .t small { color: var(--muted); }
.cart-table .cart-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: .9rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--line-2); }
.cart-row img { width: 72px; height: 100px; object-fit: cover; border-radius: 6px; box-shadow: var(--sh-2); }
.cart-row .t { font-weight: 600; line-height: 1.4; }
.cart-row .meta { font-size: .82rem; color: var(--muted); }
.cart-row .right { display: flex; flex-direction: column; align-items: flex-end; gap: .45rem; }
.cart-row .price { font-weight: 700; font-size: 1.05rem; color: var(--brand-700); }
.link-x { border: 0; background: none; color: var(--muted); font-size: .8rem; padding: 0; }
.link-x:hover { color: var(--sun); }

.choice-grid { display: grid; gap: .65rem; grid-template-columns: 1fr; }
@media (min-width: 576px) { .choice-grid { grid-template-columns: 1fr 1fr; } }
.choice { position: relative; display: flex; gap: .75rem; align-items: flex-start; padding: .85rem 1rem; border: 1.5px solid var(--line); border-radius: var(--r); background: #fff; cursor: pointer; transition: all .15s; margin: 0; }
.choice:hover { border-color: var(--brand-300); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #cfc9b8; flex-shrink: 0; margin-top: .1rem; display: grid; place-items: center; transition: all .15s; }
.choice .radio::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .15s; }
.choice.is-on { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 3px rgba(15, 122, 67, .08); }
.choice.is-on .radio { border-color: var(--brand); background: var(--brand); }
.choice.is-on .radio::after { transform: scale(1); }
.choice strong { display: block; font-size: .94rem; }
.choice span { font-size: .8rem; color: var(--muted); line-height: 1.4; display: block; }
.choice .price-tag { margin-left: auto; font-weight: 700; color: var(--ink); }
.choice .pay-logos { display: flex; gap: .3rem; margin-top: .4rem; flex-wrap: wrap; }
.choice .pay-logos b { font-size: .65rem; font-weight: 700; padding: .1rem .35rem; border-radius: 4px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.step-title { display: flex; align-items: center; gap: .6rem; font-weight: 600; font-size: 1.02rem; margin-bottom: .9rem; }
.step-title .n { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: .82rem; }
.secure-note { display: flex; gap: .5rem; align-items: center; justify-content: center; margin-top: .75rem; font-size: .78rem; color: var(--muted); }

/* ---------- 14. Auth ---------- */
.auth-wrap { min-height: calc(100vh - 200px); display: grid; place-items: center; padding: 2rem 0 3rem; }
.auth-card { width: 100%; max-width: 940px; display: grid; overflow: hidden; border-radius: var(--r-xl); background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-3); }
@media (min-width: 768px) { .auth-card { grid-template-columns: 1fr 1.1fr; } }
.auth-art { position: relative; padding: 2rem; color: #dcefe4; background: linear-gradient(150deg, var(--brand-950), var(--brand-800) 70%, var(--brand)); display: none; flex-direction: column; justify-content: space-between; overflow: hidden; }
@media (min-width: 768px) { .auth-art { display: flex; } }
.auth-art::before { content: ''; position: absolute; left: 50%; bottom: -170px; width: 420px; height: 420px; transform: translateX(-50%); border-radius: 50%; background: repeating-conic-gradient(from -90deg, rgba(226, 61, 45, .28) 0 2deg, transparent 2deg 15deg); -webkit-mask: radial-gradient(circle, transparent 28%, #000 29%); mask: radial-gradient(circle, transparent 28%, #000 29%); }
.auth-art img.logo { width: 120px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .3)); background: #fff; border-radius: 50%; padding: 14px; position: relative; }
.auth-art h2 { color: #fff; font-family: var(--font-display); font-size: 1.6rem; line-height: 1.4; margin: 1.25rem 0 .5rem; }
.auth-art ul { list-style: none; padding: 0; margin: 0; position: relative; }
.auth-art li { display: flex; gap: .5rem; align-items: center; font-size: .9rem; padding: .25rem 0; }
.auth-art li .bi { color: #f3c96b; }
.auth-form { padding: 2rem 1.5rem; }
@media (min-width: 576px) { .auth-form { padding: 2.5rem; } }
.auth-form h1 { font-family: var(--font-display); font-size: 1.6rem; margin-bottom: .3rem; }
.auth-form .lead { color: var(--muted); font-size: .92rem; margin-bottom: 1.5rem; }
.steps { display: flex; gap: .5rem; margin-bottom: 1.5rem; }
.steps > div { flex: 1; }
.steps .bar { height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; }
.steps .bar::after { content: ''; display: block; height: 100%; width: 0; background: var(--brand); transition: width .35s var(--ease); }
.steps .done .bar::after, .steps .on .bar::after { width: 100%; }
.steps small { display: block; margin-top: .35rem; font-size: .75rem; color: var(--faint); font-weight: 600; }
.steps .on small, .steps .done small { color: var(--brand-800); }
.otp-boxes { display: flex; gap: .5rem; justify-content: space-between; }
.otp-boxes input { width: 100%; max-width: 54px; aspect-ratio: 1 / 1.12; text-align: center; font-size: 1.4rem; font-weight: 700; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); transition: all .15s; padding: 0; }
.otp-boxes input:focus { outline: 0; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(15, 122, 67, .12); }
.otp-boxes input:not(:placeholder-shown) { border-color: var(--brand-300); background: #fff; }
.demo-otp { display: flex; align-items: center; gap: .5rem; padding: .55rem .8rem; border-radius: var(--r-sm); background: var(--gold-50); border: 1px dashed #e4cc95; font-size: .85rem; color: #7b5612; margin-bottom: 1rem; }
.demo-otp b { font-size: 1.05rem; letter-spacing: .2em; }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; margin-top: .5rem; }
.strength i { height: 4px; border-radius: 99px; background: var(--line); transition: background .25s; }
.strength.s1 i:nth-child(-n+1) { background: var(--sun); }
.strength.s2 i:nth-child(-n+2) { background: #f2a91d; }
.strength.s3 i:nth-child(-n+3) { background: var(--brand-500); }
.strength.s4 i { background: var(--brand); }
.auth-alt { text-align: center; font-size: .9rem; color: var(--muted); margin-top: 1.25rem; }
.demo-hint { font-size: .8rem; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line); border-radius: var(--r-sm); padding: .5rem .75rem; margin-top: 1rem; }

/* ---------- 15. Account ---------- */
.account { display: grid; gap: 1.25rem; padding: 1.25rem 0 2.5rem; align-items: start; }
@media (min-width: 992px) { .account { grid-template-columns: 260px minmax(0, 1fr); gap: 1.75rem; } }
.acc-nav { position: sticky; top: calc(var(--header-h) + 64px); }
.acc-user { display: flex; align-items: center; gap: .75rem; padding: 1.1rem; border-bottom: 1px solid var(--line-2); }
.acc-user .avatar { width: 48px; height: 48px; font-size: 1.2rem; background: var(--brand); color: #fff; }
.acc-user strong { display: block; line-height: 1.3; }
.acc-user small { color: var(--muted); }
.acc-links { padding: .5rem; }
.acc-links a { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 500; font-size: .92rem; }
.acc-links a:hover { background: var(--surface-2); color: var(--ink); }
.acc-links a.active { background: var(--brand-50); color: var(--brand-800); font-weight: 600; }
.acc-links a .bi { font-size: 1.05rem; color: var(--muted); }
.acc-links a.active .bi { color: var(--brand); }
.acc-links a .count { margin-left: auto; font-size: .75rem; background: var(--line-2); color: var(--muted); padding: 0 .45rem; border-radius: 99px; }
@media (max-width: 991.98px) {
  .acc-nav { position: static; }
  .acc-user { display: none; }
  .acc-links { display: flex; overflow-x: auto; gap: .25rem; scrollbar-width: none; }
  .acc-links a { white-space: nowrap; }
  .acc-links a .count { display: none; }
}
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 768px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 1rem; border-radius: var(--r); background: #fff; border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: .2rem; }
.stat .bi { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-size: 1.05rem; margin-bottom: .35rem; }
.stat strong { font-size: 1.5rem; line-height: 1.1; }
.stat span { font-size: .82rem; color: var(--muted); }
.stat.t-gold .bi { background: var(--gold-50); color: var(--gold); }
.stat.t-blue .bi { background: #e8f1fb; color: #1e5f9e; }
.stat.t-red .bi { background: var(--sun-50); color: var(--sun); }
.welcome { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; border-radius: var(--r-lg); color: #e3f1e9; background: linear-gradient(120deg, var(--brand-900), var(--brand-700)); margin-bottom: 1rem; }
.welcome h2 { color: #fff; font-family: var(--font-display); font-size: 1.25rem; margin: 0; }
.welcome p { margin: 0; font-size: .88rem; color: #b8d7c6; }

.order-tabs { display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; margin-bottom: 1rem; }
.order-tabs a { flex-shrink: 0; padding: .45rem .9rem; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-size: .86rem; color: var(--ink-2); font-weight: 500; }
.order-tabs a b { font-weight: 600; margin-left: .25rem; color: var(--faint); }
.order-tabs a.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.order-tabs a.active b { color: #cdebd9; }
.order-card { background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-lg); margin-bottom: .85rem; overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.order-card:hover { box-shadow: var(--sh-2); border-color: var(--line); }
.oc-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .8rem 1.1rem; background: var(--surface-2); border-bottom: 1px solid var(--line-2); font-size: .85rem; color: var(--muted); }
.oc-head strong { color: var(--ink); font-size: .92rem; letter-spacing: .02em; }
.oc-head .pills { margin-left: auto; display: flex; gap: .35rem; }
.oc-body { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 1rem 1.1rem; }
.oc-thumbs { display: flex; }
.oc-thumbs img, .oc-thumbs span { width: 46px; height: 64px; object-fit: cover; border-radius: 5px; border: 2px solid #fff; box-shadow: var(--sh-2); margin-left: -14px; background: var(--line-2); }
.oc-thumbs > :first-child { margin-left: 0; }
.oc-thumbs span { display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: var(--muted); }
.oc-info { flex: 1; min-width: 180px; }
.oc-info .t { font-weight: 600; font-size: .92rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.oc-info small { color: var(--muted); }
.oc-total { text-align: right; }
.oc-total strong { display: block; font-size: 1.1rem; color: var(--ink); }
.oc-total small { color: var(--muted); }
.oc-progress { padding: 0 1.1rem 1rem; }
.mini-track { display: flex; align-items: center; gap: .25rem; }
.mini-track i { flex: 1; height: 4px; border-radius: 99px; background: var(--line); }
.mini-track i.on { background: var(--brand-500); }
.mini-track-labels { display: flex; justify-content: space-between; font-size: .72rem; color: var(--faint); margin-top: .3rem; }
.oc-actions { display: flex; gap: .5rem; flex-wrap: wrap; padding: .75rem 1.1rem; border-top: 1px solid var(--line-2); }

/* Tracking timeline */
.track { display: grid; grid-template-columns: repeat(5, 1fr); position: relative; margin: .5rem 0 .25rem; }
.track-step { position: relative; text-align: center; padding: 0 .25rem; }
.track-step::before { content: ''; position: absolute; top: 21px; left: -50%; right: 50%; height: 3px; background: var(--line); z-index: 0; }
.track-step:first-child::before { display: none; }
.track-step.done::before, .track-step.current::before { background: var(--brand-500); }
.track-dot { position: relative; z-index: 1; width: 44px; height: 44px; margin: 0 auto .5rem; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line); color: var(--faint); font-size: 1.1rem; transition: all .3s; }
.track-step.done .track-dot { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.track-step.current .track-dot { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 6px rgba(23, 154, 85, .15); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(23, 154, 85, .06); } }
.track-step strong { display: block; font-size: .85rem; }
.track-step small { color: var(--muted); font-size: .74rem; }
.track-step:not(.done):not(.current) strong { color: var(--faint); }
@media (max-width: 575.98px) {
  .track { grid-template-columns: 1fr; gap: 0; }
  .track-step { display: grid; grid-template-columns: 40px 1fr; gap: .1rem .8rem; text-align: left; padding: 0 0 1rem; }
  .track-step::before { top: -50%; bottom: 50%; left: 19px; right: auto; width: 3px; height: auto; }
  .track-dot { width: 40px; height: 40px; margin: 0; grid-row: span 2; }
  .track-step strong { align-self: end; }
}
.track-cancel { display: flex; gap: .75rem; align-items: center; padding: 1rem; border-radius: var(--r); background: var(--sun-50); color: var(--sun-600); }
.track-cancel .bi { font-size: 1.6rem; }
.history { list-style: none; padding: 0; margin: 0; }
.history li { position: relative; padding: 0 0 .9rem 1.4rem; font-size: .86rem; }
.history li::before { content: ''; position: absolute; left: 4px; top: .45rem; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-300); }
.history li::after { content: ''; position: absolute; left: 7px; top: 1rem; bottom: 0; width: 2px; background: var(--line-2); }
.history li:last-child::after { display: none; }
.history li:first-child::before { background: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
.history small { display: block; color: var(--muted); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; font-size: .9rem; margin: 0; }
.kv dt { color: var(--muted); font-weight: 400; }
.kv dd { margin: 0; font-weight: 500; }

/* Simple modal (Alpine) */
.amodal { position: fixed; inset: 0; z-index: 1070; display: grid; place-items: center; padding: 1rem; background: rgba(12, 22, 16, .55); backdrop-filter: blur(3px); }
.amodal-box { width: 100%; max-width: 460px; max-height: 90vh; overflow: auto; background: #fff; border-radius: var(--r-xl); box-shadow: var(--sh-3); padding: 1.5rem; }
.amodal-box h3 { font-size: 1.15rem; margin-bottom: .25rem; }
.reason-list { display: grid; gap: .4rem; margin: 1rem 0; }
.reason-list label { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; border: 1.5px solid var(--line); border-radius: var(--r-sm); font-size: .9rem; cursor: pointer; transition: all .15s; margin: 0; }
.reason-list label.is-on { border-color: var(--brand); background: var(--brand-50); }
.reason-list input { accent-color: var(--brand); }

/* Success page */
.success-hero { text-align: center; padding: 2rem 1rem 1rem; }
.success-check { width: 84px; height: 84px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 2.6rem; box-shadow: 0 0 0 10px var(--brand-50), 0 0 0 20px rgba(23, 154, 85, .06); animation: pop .5s var(--ease); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.success-hero h1 { font-family: var(--font-display); font-size: 1.7rem; }
.order-id-box { display: inline-flex; align-items: center; gap: .6rem; padding: .5rem .9rem; border-radius: var(--r-sm); background: var(--surface-2); border: 1px dashed var(--line); font-weight: 700; letter-spacing: .04em; }

/* Payment gateway simulator */
.gw { max-width: 460px; margin: 2rem auto; }
.gw-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; background: #1a3c6e; color: #fff; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.gw-body { padding: 1.25rem; background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* Empty state */
.empty-state { text-align: center; padding: 2.5rem 1rem; }
.empty-state.small { padding: 2rem .5rem; }
.empty-icon { width: 76px; height: 76px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-500); font-size: 2rem; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.empty-state p { color: var(--muted); font-size: .9rem; margin-bottom: 1rem; }

/* Author page */
.author-hero { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; padding: 1.5rem; border-radius: var(--r-xl); background: linear-gradient(120deg, #fff, var(--brand-50)); border: 1px solid var(--brand-100); margin: 1rem 0 1.25rem; }
.author-hero .avatar { width: 112px; height: 112px; font-size: 2.4rem; box-shadow: 0 0 0 5px #fff, var(--sh-2); }
.author-hero h1 { font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 0 0 .25rem; }
.author-hero .meta { color: var(--muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.author-cards { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 576px) { .author-cards { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .author-cards { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .author-cards { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 1400px) { .author-cards { grid-template-columns: repeat(7, 1fr); } }

/* Combo detail */
.combo-hero { display: grid; gap: 1.5rem; padding: 1.5rem; border-radius: var(--r-xl); background: linear-gradient(135deg, var(--gold-50), #fff 60%); border: 1px solid #efe3c6; margin: 1rem 0 1.5rem; }
@media (min-width: 768px) { .combo-hero { grid-template-columns: 280px minmax(0, 1fr); align-items: center; padding: 2rem; } }
.combo-hero .combo-stack { width: 230px; margin: 0 auto; }
.combo-hero h1 { font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 1.9rem); }

/* ---------- 16. Footer ---------- */
.services { padding: 1.5rem 0; background: var(--surface); border-top: 1px solid var(--line-2); margin-top: 2rem; }
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 992px) { .services-grid { grid-template-columns: repeat(4, 1fr); } }
.service { display: flex; gap: .75rem; align-items: center; }
.service .bi { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-size: 1.35rem; flex-shrink: 0; }
.service strong { display: block; font-size: .92rem; }
.service span { font-size: .78rem; color: var(--muted); line-height: 1.35; display: block; }
.site-footer { background: var(--brand-950); color: #a9c4b5; font-size: .88rem; padding-top: 2.75rem; }
.site-footer h4 { color: #fff; font-size: .95rem; font-weight: 600; margin-bottom: .9rem; }
.site-footer a { color: #cfe3d7; }
.site-footer a:hover { color: #fff; }
.brand-footer { margin-bottom: 1rem; }
.brand-footer img { background: #fff; border-radius: 50%; padding: 6px; width: 56px; }
.brand-footer .brand-text strong { color: #fff; }
.brand-footer .brand-text small { color: #8fb09e; }
.footer-about { line-height: 1.7; margin-bottom: 1rem; }
.footer-contact, .footer-links { list-style: none; padding: 0; margin: 0; }
.footer-contact li { display: flex; gap: .55rem; padding: .2rem 0; }
.footer-contact .bi { color: var(--brand-300); }
.footer-links li { padding: .22rem 0; }
.social { display: flex; gap: .5rem; margin-top: 1rem; }
.social a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .07); font-size: 1rem; transition: background .15s; }
.social a:hover { background: var(--brand); }
.footer-delivery { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.footer-delivery div { padding: .65rem .8rem; border-radius: var(--r-sm); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07); }
.footer-delivery span { display: block; font-size: .78rem; }
.footer-delivery strong { color: #fff; font-size: 1.15rem; }
.footer-pay { display: flex; flex-wrap: wrap; gap: .4rem; }
.footer-pay span { padding: .3rem .6rem; border-radius: 99px; background: rgba(255, 255, 255, .06); font-size: .78rem; }
.branches { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .08); }
.branch-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 576px) { .branch-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .branch-grid { grid-template-columns: repeat(4, 1fr); } }
.branch { display: flex; flex-direction: column; gap: .3rem; padding: .9rem 1rem; border-radius: var(--r); background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); font-size: .82rem; }
.branch strong { color: #fff; font-size: .92rem; }
.branch span:last-child { display: flex; flex-wrap: wrap; gap: .25rem .9rem; }
.pay-banner { display: block; width: 100%; margin: 1.75rem 0 0; border-radius: var(--r); background: #fff; padding: .4rem; }
.footer-bottom { margin-top: 1.75rem; padding: 1rem 0; background: rgba(0, 0, 0, .2); font-size: .8rem; color: #8fb09e; }

/* ---------- 17. Toasts ---------- */
.toasts { position: fixed; z-index: 1038; left: 50%; bottom: 1.25rem; transform: translateX(-50%); display: flex; flex-direction: column; gap: .5rem; align-items: center; width: max-content; max-width: calc(100vw - 2rem); pointer-events: none; }
@media (max-width: 991.98px) { .toasts { bottom: calc(76px + env(safe-area-inset-bottom)); } }
.toast-item { pointer-events: auto; display: flex; align-items: center; gap: .6rem; padding: .65rem .8rem .65rem 1rem; border-radius: 99px; background: var(--ink); color: #fff; font-size: .88rem; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .45); }
.toast-item .bi { color: var(--brand-300); font-size: 1.05rem; }
.toast-item.is-error { background: var(--sun-600); }
.toast-item.is-error .bi { color: #fff; }
.toast-item span { max-width: 52vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast-item a { color: #fff; font-weight: 700; padding: .2rem .75rem; border-radius: 99px; background: rgba(255, 255, 255, .14); white-space: nowrap; }
.toast-item a:hover { background: rgba(255, 255, 255, .24); color: #fff; }

/* ---------- 18. Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.min-w-0{min-width:0}

/* Grid children default to min-width:auto, which lets scrolling rails stretch the page */
.d-grid > *, .listing > *, .hero-grid > *, .checkout-grid > *, .account > *, .pd > *, .shelf { min-width: 0; }
.listing, .checkout-grid, .account, .pd, .hero-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .pd { grid-template-columns: 260px minmax(0, 1fr); } }
@media (min-width: 992px) {
  .listing { grid-template-columns: 250px minmax(0, 1fr); }
  .checkout-grid { grid-template-columns: minmax(0, 1fr) 390px; }
  .account { grid-template-columns: 260px minmax(0, 1fr); }
  .hero-grid { grid-template-columns: minmax(0, 2.05fr) minmax(0, 1fr); }
}
@media (min-width: 1200px) { .pd { grid-template-columns: 300px minmax(0, 1fr) 300px; } }
