/* ============================================================
   Nirapod Choice BD — Design tokens
   Palette: trust/safety teal-emerald + warm amber accent
   ============================================================ */
:root{
  --ink:        #14261F;
  --ink-soft:   #3E5A50;
  --paper:      #FAFAF6;
  --paper-dim:  #F1F0E9;
  --line:       #DDE3DA;

  --teal-900:   #0B3D3A;
  --teal-700:   #0F5C4F;
  --emerald:    #17A97B;
  --emerald-dim:#E4F4EC;
  --amber:      #F0A63A;
  --amber-dark: #C97F1B;
  --red:        #C24E3E;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-card: 0 2px 10px rgba(11,61,58,0.08), 0 1px 2px rgba(11,61,58,0.06);
  --shadow-pop:  0 14px 40px rgba(11,61,58,0.22);

  --font-display: 'Tiro Bangla', 'Noto Serif Bengali', serif;
  --font-body:    'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
  --font-num:     'Poppins', sans-serif;
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }
body{
  font-family:var(--font-body);
  background:var(--paper);
  color:var(--ink);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  padding-bottom:64px;
}
img{ max-width:100%; display:block; }
button{ font-family:inherit; cursor:pointer; }
a{ color:inherit; text-decoration:none; }

.container{ max-width:1080px; margin:0 auto; padding:0 18px; }

/* ---------- seal / signature motif ---------- */
.seal{
  --n: 12;
  width:56px; height:56px;
  background:var(--emerald);
  clip-path: polygon(
    50% 0%, 61% 10%, 73% 4%, 79% 16%, 92% 15%, 93% 28%,
    100% 35%, 92% 45%, 100% 55%, 92% 65%, 100% 75%,
    88% 79%, 87% 92%, 74% 89%, 68% 100%, 55% 91%,
    45% 100%, 33% 90%, 22% 96%, 15% 85%, 3% 84%,
    8% 71%, 0% 60%, 8% 50%, 0% 39%, 8% 29%,
    5% 17%, 18% 15%, 24% 4%, 37% 10%
  );
  display:flex; align-items:center; justify-content:center;
  flex:none;
}
.seal svg{ width:24px; height:24px; }
.seal.sm{ width:34px; height:34px; }
.seal.sm svg{ width:15px; height:15px; }

/* ---------- header ---------- */
header.site{
  position:sticky; top:0; z-index:40;
  background:var(--teal-900);
  color:var(--paper);
  box-shadow:var(--shadow-card);
}
header.site .row{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 18px;
}
.brand{ display:flex; align-items:center; gap:10px; }
.brand .seal{ background:var(--amber); }
.brand-name{ font-family:var(--font-display); font-size:1.15rem; line-height:1.1; }
.brand-name small{ display:block; font-family:var(--font-body); font-size:.66rem; color:var(--amber); font-weight:600; letter-spacing:.02em; }

.cart-btn{
  position:relative;
  background:var(--emerald); color:var(--teal-900);
  border:none; border-radius:999px;
  width:44px; height:44px;
  display:flex; align-items:center; justify-content:center;
}
.cart-btn svg{ width:20px; height:20px; }
.cart-count{
  position:absolute; top:-4px; right:-4px;
  background:var(--amber); color:var(--teal-900);
  font-family:var(--font-num); font-weight:700; font-size:.68rem;
  min-width:19px; height:19px; border-radius:999px;
  display:flex; align-items:center; justify-content:center;
  border:2px solid var(--teal-900);
}

/* ---------- hero ---------- */
.hero{
  background:
    radial-gradient(140% 100% at 100% 0%, rgba(23,169,123,0.35), transparent 55%),
    var(--teal-900);
  color:var(--paper);
  padding:38px 0 46px;
}
.hero h1{
  font-family:var(--font-display);
  font-size:clamp(1.7rem, 5vw, 2.5rem);
  line-height:1.25;
  max-width:15ch;
}
.hero p{ margin-top:10px; color:#CFE3DC; max-width:44ch; font-size:.98rem; }

.trust-row{
  display:flex; flex-wrap:wrap; gap:10px;
  margin-top:20px;
}
.trust-chip{
  display:flex; align-items:center; gap:6px;
  background:rgba(250,250,246,0.08);
  border:1px solid rgba(250,250,246,0.18);
  color:var(--paper);
  padding:7px 12px; border-radius:999px;
  font-size:.8rem;
}
.trust-chip svg{ width:14px; height:14px; color:var(--emerald); flex:none; }

/* ---------- product grid ---------- */
.section{ padding:38px 0; }
.section-head{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom:18px; }
.section-head h2{ font-family:var(--font-display); font-size:1.5rem; color:var(--teal-900); }
.section-head span{ font-size:.82rem; color:var(--ink-soft); }

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(220px,1fr));
  gap:18px;
}

.card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  overflow:hidden;
  box-shadow:var(--shadow-card);
  display:flex; flex-direction:column;
  transition:transform .18s ease, box-shadow .18s ease;
}
.card:hover{ transform:translateY(-3px); box-shadow:var(--shadow-pop); }

.card-media{ position:relative; aspect-ratio:1/1; background:var(--paper-dim); }
.card-media img{ width:100%; height:100%; object-fit:cover; }
.badge-discount{
  position:absolute; top:10px; left:10px;
  background:var(--red); color:#fff;
  font-family:var(--font-num); font-weight:600; font-size:.72rem;
  padding:4px 9px; border-radius:999px;
}
.badge-stockout{
  position:absolute; inset:0;
  background:rgba(20,38,31,0.55);
  color:#fff; font-weight:700; font-size:1rem;
  display:flex; align-items:center; justify-content:center;
  letter-spacing:.03em;
}

.card-body{ padding:14px 14px 16px; display:flex; flex-direction:column; gap:8px; flex:1; }
.card-title{ font-size:.95rem; font-weight:600; min-height:2.6em; }
.verified{ display:flex; align-items:center; gap:5px; font-size:.72rem; color:var(--emerald); font-weight:600; }
.verified svg{ width:13px; height:13px; }

.price-row{ display:flex; align-items:baseline; gap:8px; margin-top:auto; }
.price-now{ font-family:var(--font-num); font-weight:700; font-size:1.15rem; color:var(--teal-900); }
.price-was{ font-family:var(--font-num); font-size:.82rem; color:#9AA69F; text-decoration:line-through; }

.stock-line{ font-size:.75rem; color:var(--ink-soft); }
.stock-line.low{ color:var(--amber-dark); font-weight:600; }
.stock-line.out{ color:var(--red); font-weight:600; }

.btn{
  border:none; border-radius:var(--radius-sm);
  padding:10px 14px; font-weight:600; font-size:.86rem;
  display:flex; align-items:center; justify-content:center; gap:6px;
}
.btn-primary{ background:var(--emerald); color:#fff; }
.btn-primary:disabled{ background:var(--line); color:#9AA69F; cursor:not-allowed; }
.btn-outline{ background:transparent; border:1.4px solid var(--teal-900); color:var(--teal-900); }
.btn-amber{ background:var(--amber); color:var(--teal-900); }
.btn-block{ width:100%; }

/* ---------- product modal ---------- */
.overlay{
  position:fixed; inset:0; background:rgba(11,61,58,0.45);
  display:none; align-items:flex-end; justify-content:center;
  z-index:60; backdrop-filter:blur(2px);
}
.overlay.open{ display:flex; }
.sheet{
  background:#fff; width:100%; max-width:520px;
  border-radius:20px 20px 0 0;
  max-height:88vh; overflow-y:auto;
  animation:slideup .22s ease;
}
@keyframes slideup{ from{ transform:translateY(24px); opacity:0;} to{ transform:translateY(0); opacity:1;} }
@media (min-width:640px){
  .overlay{ align-items:center; }
  .sheet{ border-radius:20px; }
}
.sheet-head{ display:flex; justify-content:flex-end; padding:10px 10px 0; }
.sheet-close{ background:var(--paper-dim); border:none; width:32px; height:32px; border-radius:999px; display:flex; align-items:center; justify-content:center; }
.sheet-body{ padding:6px 22px 26px; }

.pd-img{ border-radius:var(--radius-md); overflow:hidden; aspect-ratio:1/1; background:var(--paper-dim); margin-bottom:10px; }
.pd-img img{ width:100%; height:100%; object-fit:cover; }

.pd-thumbs{ display:flex; gap:8px; margin-bottom:16px; }
.pd-thumb{
  width:56px; height:56px; border-radius:10px; overflow:hidden;
  border:2px solid transparent; padding:0; background:var(--paper-dim); flex:none;
}
.pd-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.pd-thumb.active{ border-color:var(--emerald); }
.pd-title{ font-family:var(--font-display); font-size:1.2rem; color:var(--teal-900); margin-bottom:6px; }
.pd-price{ display:flex; align-items:baseline; gap:10px; margin:10px 0; }
.pd-price .price-now{ font-size:1.4rem; }

.spec-list{ list-style:none; margin:14px 0; border-top:1px solid var(--line); }
.spec-list li{ display:flex; gap:8px; padding:9px 0; border-bottom:1px solid var(--line); font-size:.88rem; }
.spec-list li svg{ width:15px; height:15px; color:var(--emerald); flex:none; margin-top:2px; }

.qty-row{ display:flex; align-items:center; gap:12px; margin:16px 0; }
.qty-ctrl{ display:flex; align-items:center; border:1.4px solid var(--line); border-radius:999px; overflow:hidden; }
.qty-ctrl button{ background:var(--paper-dim); border:none; width:36px; height:36px; font-size:1.1rem; color:var(--teal-900); }
.qty-ctrl span{ width:38px; text-align:center; font-family:var(--font-num); font-weight:600; }

/* ---------- cart drawer ---------- */
.cart-overlay{
  position:fixed; inset:0; background:rgba(11,61,58,0.45);
  display:none; justify-content:flex-end;
  z-index:70;
}
.cart-overlay.open{ display:flex; }
.cart-drawer{
  background:var(--paper); width:100%; max-width:400px; height:100%;
  display:flex; flex-direction:column;
  animation:slidein .22s ease;
}
@keyframes slidein{ from{ transform:translateX(24px); opacity:0;} to{ transform:translateX(0); opacity:1;} }
.cart-head{ display:flex; align-items:center; justify-content:space-between; padding:16px 18px; background:var(--teal-900); color:#fff; }
.cart-head h3{ font-family:var(--font-display); font-size:1.1rem; }
.cart-items{ flex:1; overflow-y:auto; padding:12px 18px; }
.cart-empty{ text-align:center; color:var(--ink-soft); padding:40px 10px; font-size:.9rem; }

.cart-item{ display:flex; gap:10px; padding:12px 0; border-bottom:1px solid var(--line); }
.cart-item img{ width:58px; height:58px; border-radius:10px; object-fit:cover; background:var(--paper-dim); flex:none; }
.cart-item-info{ flex:1; min-width:0; }
.cart-item-info .name{ font-size:.85rem; font-weight:600; }
.cart-item-info .unit{ font-size:.76rem; color:var(--ink-soft); }
.cart-item-actions{ display:flex; align-items:center; justify-content:space-between; margin-top:6px; }
.remove-link{ font-size:.75rem; color:var(--red); }

.cart-summary{ padding:14px 18px 20px; border-top:1px solid var(--line); background:#fff; }
.summary-line{ display:flex; justify-content:space-between; font-size:.85rem; padding:4px 0; color:var(--ink-soft); }
.summary-line.total{ font-weight:700; color:var(--teal-900); font-size:1.05rem; padding-top:8px; border-top:1px dashed var(--line); margin-top:6px; }

.delivery-choice{ display:flex; gap:8px; margin:10px 0; }
.delivery-choice label{
  flex:1; border:1.4px solid var(--line); border-radius:var(--radius-sm);
  padding:8px; font-size:.78rem; text-align:center; cursor:pointer;
}
.delivery-choice input{ display:none; }
.delivery-choice input:checked + span{ font-weight:700; }
.delivery-choice label:has(input:checked){ border-color:var(--emerald); background:var(--emerald-dim); }

/* ---------- checkout form ---------- */
.field{ margin-bottom:12px; }
.field label{ display:block; font-size:.8rem; font-weight:600; margin-bottom:5px; color:var(--teal-900); }
.field input, .field textarea{
  width:100%; border:1.4px solid var(--line); border-radius:var(--radius-sm);
  padding:10px 12px; font-family:inherit; font-size:.9rem; background:#fff;
}
.field textarea{ resize:vertical; min-height:64px; }
.field input:focus, .field textarea:focus{ outline:2px solid var(--emerald); outline-offset:1px; }

.order-recap{ background:var(--paper-dim); border-radius:var(--radius-sm); padding:10px 12px; font-size:.82rem; margin-bottom:14px; }
.order-recap div{ display:flex; justify-content:space-between; padding:2px 0; }

.toast{
  position:fixed; left:50%; bottom:24px; transform:translate(-50%, 12px);
  background:var(--teal-900); color:#fff; padding:11px 18px; border-radius:999px;
  font-size:.85rem; opacity:0; pointer-events:none; transition:all .25s ease;
  z-index:90; display:flex; align-items:center; gap:8px;
  box-shadow:var(--shadow-pop);
}
.toast.show{ opacity:1; transform:translate(-50%, 0); }
.toast svg{ width:16px; height:16px; color:var(--emerald); }

/* ---------- footer ---------- */
footer{ background:var(--teal-900); color:#CFE3DC; padding:30px 0; margin-top:20px; }
footer .brand-name{ color:#fff; }
footer .foot-links{ display:flex; flex-wrap:wrap; gap:16px; margin-top:14px; font-size:.85rem; }
footer .foot-links a{ display:flex; align-items:center; gap:6px; }
.whatsapp-fab{
  position:fixed; left:16px; bottom:16px; z-index:50;
  background:#25D366; color:#fff; width:52px; height:52px; border-radius:999px;
  display:flex; align-items:center; justify-content:center;
  box-shadow:var(--shadow-pop);
}
.whatsapp-fab svg{ width:26px; height:26px; }

@media (max-width:480px){
  .grid{ grid-template-columns:repeat(2,1fr); gap:12px; }
  .card-body{ padding:10px 10px 12px; gap:6px; }
  .card-title{ font-size:.82rem; min-height:2.4em; }
}
