/* HalalShopBD — base: design tokens, reset, typography, layout, buttons, forms.
   Mobile-first, compact. Design rules are documented in docs/DESIGN-SYSTEM.md */
:root {
  --p-900: #1e0a45; --p-800: #2e1065; --p-700: #4c1d95; --p-600: #6d28d9; --p-500: #7c3aed;
  --p-400: #a078ff; --p-200: #ddd1ff; --p-100: #efe9ff; --p-50: #f8f5ff;
  --cta-1: #ff9a2e; --cta-2: #ff5e3a;
  --ok: #0f9d58; --err: #e11d48; --wa: #1fa855; --star: #f5a623;
  --ink: #1a1233; --body: #4a4366; --muted: #7b7494; --line: #ebe5f8; --bg: #fff; --soft: #f7f4fe;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 55%, #4c1d95 100%);
  /* button gradients are 200% wide; hover slides them for a smooth colour shift */
  --grad-btn: linear-gradient(110deg, #8b5cf6 0%, #6d28d9 50%, #a855f7 100%);
  --grad-cta: linear-gradient(110deg, #ff9a2e 0%, #ff5e3a 50%, #ff9a2e 100%);
  --grad-dark: radial-gradient(800px 420px at 90% -20%, rgba(160, 120, 255, .45), transparent 60%), radial-gradient(600px 360px at 0% 120%, rgba(236, 72, 153, .22), transparent 60%), linear-gradient(135deg, #1e0a45, #4c1d95);
  --r-sm: 10px; --r: 14px; --r-lg: 18px; --r-pill: 999px;
  --sh-sm: 0 1px 3px rgba(46, 16, 101, .06), 0 2px 8px rgba(46, 16, 101, .04);
  --sh: 0 8px 24px rgba(46, 16, 101, .09);
  --sh-lg: 0 18px 44px rgba(46, 16, 101, .15);
  --font: 'Hind Siliguri', 'Noto Sans Bengali', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --header-h: 60px;
  /* spacing rhythm (2026-11-14 compact pass): section padding, heading gap, page-hero padding.
     Phones <560px / 560-899px / 900px+ — values set in the media queries at the end of this file */
  --sec-y: 14px; --sec-head-gap: 8px; --hero-pt: 12px; --hero-pb: 14px;
  /* semantic theme tokens: components use these, so both themes work automatically */
  --surface: #fff; --input-bg: #fff; --ph: #a39cb8;
  --header-bg: #fff; --bar-bg: rgba(255, 255, 255, .96); /* header is solid: content never shows through while scrolling */
  --toast-bg: #1a1233; --footer-bg: #1e0a45;
  --ok-bg: #ecfbf2; --ok-tx: #0b7a44; --ok-bd: #b6e8cb;
  --warn-bg: #fff7ec; --warn-bg2: #fff1de; --warn-bd: #ffc58a; --warn-tx: #8a4b00; --orange-tx: #c2410c;
  --err-bg: #fff1f3;
  color-scheme: light;
}
/* ---------- Dark theme: set by <html data-theme="dark"> (inline script in each page's <head>, no flash) ---------- */
:root[data-theme="dark"] {
  --p-700: #d8ccff; --p-600: #b9a3ff; --p-500: #a78bfa; --p-400: #a78bfa;
  --p-200: #3f3172; --p-100: #2a1f50; --p-50: #1e1739;
  --ink: #f3effc; --body: #cdc6e1; --muted: #9e96b9; --line: #2e2650; --bg: #0e0a1c; --soft: #130e26;
  --surface: #1a1431; --input-bg: #120d25; --ph: #7f779e;
  --header-bg: #0e0a1c; --bar-bg: rgba(22, 16, 42, .96);
  --toast-bg: #2c2353; --footer-bg: #09061a;
  --ok: #34c77b; --ok-bg: rgba(52, 199, 123, .14); --ok-tx: #74e5a9; --ok-bd: rgba(52, 199, 123, .32);
  --warn-bg: rgba(255, 154, 46, .1); --warn-bg2: rgba(255, 154, 46, .18); --warn-bd: rgba(255, 154, 46, .4); --warn-tx: #ffc58a; --orange-tx: #ffa86f;
  --err: #ff5c7c; --err-bg: rgba(255, 92, 124, .14);
  --sh-sm: 0 1px 3px rgba(0, 0, 0, .35), 0 2px 8px rgba(0, 0, 0, .25);
  --sh: 0 8px 24px rgba(0, 0, 0, .4);
  --sh-lg: 0 18px 44px rgba(0, 0, 0, .55);
  color-scheme: dark;
}
/* smooth colour change while switching themes (class added by core.js for ~0.45s) */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .4s ease, color .4s ease, border-color .4s ease, box-shadow .4s ease, fill .4s ease !important;
}

*, *::before, *::after { box-sizing: border-box; }
/* --sticky-h = full height of the sticky header (row 1 + search row on mobile/tablet); set exactly by core.js, CSS values are the fallback */
:root { --sticky-h: 104px; }
@media (min-width: 560px) { :root { --sticky-h: 113px; } }
@media (min-width: 1000px) { :root { --sticky-h: 61px; } }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--sticky-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.65; color: var(--body); background: var(--bg); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, h3, h4, p, figure, blockquote, fieldset { margin: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 700; line-height: 1.35; text-wrap: balance; }
h1 { font-size: clamp(1.45rem, 3.4vw, 2.2rem); }
h2 { font-size: clamp(1.2rem, 2.3vw, 1.6rem); }
h3 { font-size: 1.02rem; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--p-400); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* icons */
.ic { width: 1.15em; height: 1.15em; flex: none; }
.ic-wrap { display: inline-flex; font-style: normal; }
.stars { color: var(--star); letter-spacing: 1px; font-size: .92em; white-space: nowrap; }
.stars i { color: #d9d3ea; font-style: normal; }

/* layout */
.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 16px; }
.narrow { max-width: 800px; }
.section { padding-block: var(--sec-y); }
/* two sections with the same background in a row: no double gap (the previous section's bottom padding is the gap) */
.section:not(.section--soft) + .section:not(.section--soft), .section--soft + .section--soft { padding-top: 0; }
.section--soft { background: var(--soft); }
.center { text-align: center; }
.mt-32 { margin-top: 16px; }
.grid { display: grid; gap: 12px; }
.sec-head { max-width: 640px; margin: 0 auto var(--sec-head-gap); text-align: center; }
.sec-head p { margin-top: 4px; font-size: .95rem; color: var(--muted); }
.sec-head--row { max-width: none; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 6px 12px; text-align: left; }
.eyebrow { display: inline-block; margin-bottom: 2px; font-size: .8rem; font-weight: 600; color: var(--p-600); }
.eyebrow-pill { padding: 3px 12px; border-radius: var(--r-pill); background: var(--p-100); }
.grad-text { background: linear-gradient(120deg, #8b5cf6, #d946ef); -webkit-background-clip: text; background-clip: text; color: transparent; }
.link-arrow { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: .92rem; color: var(--p-600); white-space: nowrap; }
.link-arrow .ic { transition: transform .25s var(--ease); }
.link-arrow:hover .ic { transform: translateX(4px); }

/* ---------- buttons (animated) ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 8px 18px; border-radius: 12px; border: 1.5px solid transparent;
  font-weight: 600; font-size: .95rem; line-height: 1.3; text-align: center;
  background-size: 200% 100%; background-position: 0% 0;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none;
  transition: transform .25s var(--ease), box-shadow .3s var(--ease), background-position .5s var(--ease), background-color .2s, color .2s, border-color .2s;
}
.btn .ic { transition: transform .3s var(--ease); }
.btn:active { transform: scale(.96); transition-duration: .08s; }
.btn[disabled], .btn.loading { pointer-events: none; }
.btn[disabled]:not(.loading) { opacity: .7; }
.btn-primary { background-image: var(--grad-btn); color: #fff; box-shadow: 0 4px 14px rgba(109, 40, 217, .28); }
.btn-cta { background-image: var(--grad-cta); color: #fff; box-shadow: 0 4px 14px rgba(255, 94, 58, .32); }
.btn-cta::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .38) 50%, transparent 70%); transform: translateX(-120%); }
.btn-outline { border-color: var(--p-200); color: var(--p-600); background-color: var(--surface); }
.btn-white { background-color: #fff; color: #4c1d95; box-shadow: 0 4px 14px rgba(0, 0, 0, .1); }
.btn-wa { background-color: var(--wa); color: #fff; box-shadow: 0 4px 14px rgba(31, 168, 85, .3); }

/* ---- idle loop animations: 3 variants by button type (subtle, no flashing; off under reduced motion) ----
   1. SWEEP — .btn-cta (buy / order / checkout): a soft light band crosses the button every ~5s
   2. FLOW  — .btn-primary (search, login, register, form submits): gradient drifts slowly + soft glow breathes
   3. RING  — .btn-outline / .btn-white / .btn-wa (আরও দেখুন, অফার দেখুন, WhatsApp): a faint ring ripples out + arrow nudges */
.btn-cta::after { animation: btn-sweep 5s ease-in-out infinite; }
@keyframes btn-sweep { 0% { transform: translateX(-120%); } 24%, 100% { transform: translateX(120%); } }
.btn-primary { animation: btn-flow 6s ease-in-out infinite; }
@keyframes btn-flow { 0%, 100% { background-position: 0% 0; box-shadow: 0 4px 14px rgba(109, 40, 217, .26); } 50% { background-position: 100% 0; box-shadow: 0 6px 20px rgba(109, 40, 217, .4); } }
.btn-outline { --ring: rgba(124, 58, 237, .28); --bsh: 0 0 0 transparent; }
.btn-white { --ring: rgba(255, 255, 255, .6); --bsh: 0 4px 14px rgba(0, 0, 0, .1); }
.btn-wa { --ring: rgba(31, 168, 85, .38); --bsh: 0 4px 14px rgba(31, 168, 85, .3); }
.btn-outline, .btn-white, .btn-wa { animation: btn-ring 3.6s ease-out infinite; }
@keyframes btn-ring { 0% { box-shadow: var(--bsh), 0 0 0 0 var(--ring); } 55%, 100% { box-shadow: var(--bsh), 0 0 0 7px transparent; } }
.btn-outline > .ic-wrap:last-child, .btn-white > .ic-wrap:last-child { animation: btn-nudge 3.6s ease-in-out infinite; }
@keyframes btn-nudge { 0%, 60%, 100% { transform: none; } 70% { transform: translateX(3px); } 80% { transform: none; } 88% { transform: translateX(2px); } }
/* stagger the buy-button sweeps across a product grid so they don't fire in unison */
.pcard:nth-child(4n+2) .btn-cta::after { animation-delay: -1.2s; }
.pcard:nth-child(4n+3) .btn-cta::after { animation-delay: -2.4s; }
.pcard:nth-child(4n+4) .btn-cta::after { animation-delay: -3.6s; }
.btn.loading, .btn[disabled] { animation: none; }
.btn.loading::after { animation: none; opacity: 0; }

@media (hover: hover) {
  .btn:hover { transform: translateY(-2px) scale(1.02); background-position: 100% 0; }
  .btn:hover .ic { transform: translateX(2px) rotate(-6deg); }
  .btn-primary:hover, .btn-outline:hover, .btn-white:hover, .btn-wa:hover { animation: none; }
  .btn-primary:hover { box-shadow: 0 10px 24px rgba(109, 40, 217, .38); }
  .btn-cta:hover { box-shadow: 0 10px 26px rgba(255, 94, 58, .42); }  .btn-outline:hover { border-color: var(--p-500); background-color: var(--p-50); box-shadow: 0 6px 16px rgba(109, 40, 217, .12); }
  .btn-white:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, .16); }
  .btn-wa:hover { background-color: #18964a; box-shadow: 0 10px 24px rgba(31, 168, 85, .4); }
}
.btn:hover:active { transform: scale(.96); }
/* touch / click ripple (added by core.js) */
.ripple { position: absolute; z-index: -1; border-radius: 50%; background: rgba(255, 255, 255, .45); transform: scale(0); animation: ripple .6s var(--ease) forwards; pointer-events: none; }
.btn-outline .ripple, .btn-white .ripple { background: rgba(124, 58, 237, .18); }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
/* loading state */
.btn.loading { opacity: .92; }
.btn.loading::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent); animation: shimmer 1.1s linear infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: .88rem; border-radius: 10px; }
.btn-lg { min-height: 50px; padding: 10px 24px; font-size: 1.02rem; border-radius: 14px; }
.btn-block { width: 100%; }
/* gentle attention pulse for the main purchase CTA only */
.btn-pulse { animation: cta-pulse 2.6s ease-in-out infinite; }
@keyframes cta-pulse { 0%, 100% { box-shadow: 0 4px 14px rgba(255, 94, 58, .32); } 50% { box-shadow: 0 4px 14px rgba(255, 94, 58, .32), 0 0 0 7px rgba(255, 94, 58, .14); } }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--ink); transition: background .2s, transform .15s; }
.icon-btn:hover { background: var(--p-100); }
.icon-btn:active { transform: scale(.92); }
.spinner { width: 17px; height: 17px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* small pieces */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: var(--r-pill); background: var(--p-100); color: var(--p-700); font-size: .76rem; font-weight: 600; white-space: nowrap; }
.chip-light { background: rgba(255, 255, 255, .16); color: #fff; }
.chip-hot { background: var(--grad-cta); background-size: 200% 100%; color: #fff; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--sh-sm); }
.ibox { display: inline-grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, var(--g1, #8b5cf6), var(--g2, #6d28d9)); box-shadow: 0 6px 14px rgba(109, 40, 217, .22); }
.ibox .ic { width: 20px; height: 20px; }
.ibox-sm { width: 34px; height: 34px; border-radius: 10px; box-shadow: none; }
.ibox-sm .ic { width: 16px; height: 16px; }
.avatar { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 700; }
.avatar-xl { width: 76px; height: 76px; font-size: 2rem; box-shadow: var(--sh); }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.price-now { font-size: 1.15rem; font-weight: 700; color: var(--p-600); line-height: 1.2; }
.price-old, del { color: var(--muted); font-size: .85rem; }
.empty { text-align: center; padding: 22px 16px; border: 1.5px dashed var(--p-200); border-radius: var(--r-lg); background: var(--p-50); }
.empty p { margin-bottom: 12px; }

/* forms */
.field { margin-bottom: 12px; }
.field label { display: block; margin-bottom: 4px; font-weight: 600; font-size: .9rem; color: var(--ink); }
.input { width: 100%; min-height: 46px; padding: 8px 13px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--input-bg); font-size: .98rem; transition: border-color .2s, box-shadow .2s; }
textarea.input { min-height: 110px; resize: vertical; }
.input::placeholder { color: var(--ph); }
.input:focus { outline: none; border-color: var(--p-500); box-shadow: 0 0 0 4px rgba(124, 58, 237, .14); }
.field.invalid .input { border-color: var(--err); box-shadow: 0 0 0 4px rgba(225, 29, 72, .1); }
.field-err { display: block; margin-top: 4px; color: var(--err); font-size: .82rem; font-weight: 500; }
.field-err:empty { display: none; }
.field-hint { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--muted); font-size: .82rem; }

/* scroll reveal — only hides content when JS is running */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@media (min-width: 560px) { .g-2, .g-3, .g-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 560px) { :root { --sec-y: 16px; --sec-head-gap: 10px; --hero-pt: 14px; --hero-pb: 16px; } }
@media (min-width: 640px) { .container { padding-inline: 24px; } }
/* phones: tighter page gutter and section rhythm (desktop unchanged) */
@media (max-width: 559px) {
  .container { padding-inline: 10px; }
  .grid { gap: 8px; }
  .mt-32 { margin-top: 12px; }
}
@media (min-width: 900px) {
  body { font-size: 16px; }
  :root { --sec-y: 20px; --sec-head-gap: 12px; --hero-pt: 18px; --hero-pb: 20px; }
  .g-3, .g-4 { grid-template-columns: repeat(3, 1fr); }
  .grid { gap: 16px; }
}
@media (min-width: 1160px) { .g-4 { grid-template-columns: repeat(4, 1fr); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
