/* DeshiBasket shop pages — shared look: header, footer, category cards, product cards (6 per row on desktop) */
:root {
  --bg: #F4F7F5; --surface: #ffffff; --fg: #14211C; --muted: #5A6A62; --faint: #667A71; --line: #D9E2DC;
  --accent: #00802B; --accent-hover: #006622; --accent-fg: #ffffff; --accent-soft: #E5F4EA;
  --head: #00802B; --head-line: #3D9A5C; --buy: #E30613; --amber: #F5C400;
  --t-red: #ff5c7a; --t-green: #2fbf71; --t-blue: #4f8cff;
  --good: #1f7a5a; --good-soft: #e2f1ea; --danger: #b3392f; --danger-soft: #f8e3e0; --used: #3f51b5; --used-soft: #eef0ff; --heart: #e11d48;
  --display: "Poppins", "Hind Siliguri", system-ui, sans-serif; --body: "Roboto", "Hind Siliguri", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0D1411; --surface: #141E1A; --fg: #E6EEEA; --muted: #9CACA4; --faint: #6E8078; --line: #2A3832;
    --accent: #2EBB5C; --accent-hover: #49CC73; --accent-fg: #03150A; --accent-soft: #14301E; --head: #0E5A28; --head-line: #2F7A48;
    --good: #4fbf93; --good-soft: #1d3329; --danger: #ec7d72; --danger-soft: #3d201d; --used: #9aa8ff; --used-soft: #222746; --heart: #fb7185; color-scheme: dark; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 var(--body); }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1280px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* ---------- Header ---------- */
.top { background: var(--head); color: #fff; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--head); z-index: 31; }
.top-in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding-block: 12px; }
.brand { display: inline-flex; justify-self: start; align-items: center; gap: 9px; background: #fff; border-radius: 999px; padding: 3px 16px 3px 3px; text-decoration: none; box-shadow: 0 1px 4px rgb(0 0 0 / .22); flex: none; transition: box-shadow .15s, transform .15s; }
.brand:hover { box-shadow: 0 3px 10px rgb(0 0 0 / .28); transform: translateY(-1px); }
.brand img { width: 44px; height: 44px; flex: none; }   /* DeshiBasket bag (1 Nov) */
.brand img.word { width: auto; height: 26px; display: block; }
.brand .wm { display: grid; line-height: 1.05; min-width: 0; }
.brand b { font: 800 1.12rem/1.1 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.brand .nw { white-space: nowrap; } .brand .r { color: #E30613; } .brand .a { color: #14211C; } .brand .g { color: #00802B; }
.brand .y { color: #F5C400; text-shadow: 0 1px 0 #A87400, 0 0 1px #A87400; }
.brand small { font: 600 .6rem/1.2 var(--body); letter-spacing: .09em; text-transform: uppercase; color: #00802B; margin-top: 3px; white-space: nowrap; }
@media (max-width: 560px) { .brand { padding-right: 12px; gap: 6px; } .brand img { width: 36px; height: 36px; } .brand img.word { width: auto; height: 21px; } .brand small { display: none; } }
.search { display: flex; background: #fff; border-radius: 10px; overflow: hidden; min-width: 0; }
.search input { flex: 1; min-width: 0; border: 0; padding: 11px 14px; font: inherit; font-size: 15px; color: #14211C; background: #fff; }
.search input:focus-visible { outline: none; }
.search:focus-within { box-shadow: 0 0 0 3px rgb(245 196 0 / .5); }
.search button { border: 0; background: var(--amber); color: #2a1a00; font: 700 .95rem var(--body); padding: 0 18px; cursor: pointer; }
.nav { display: flex; gap: 8px; align-items: center; }
.nav a { color: #fff; text-decoration: none; font: 600 .92rem var(--body); border: 1px solid var(--head-line); border-radius: 999px; padding: 7px 13px; white-space: nowrap; transition: background-color .15s; }
.nav a:hover { background: rgb(255 255 255 / .1); }
.nav .sell { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
/* "Open a shop" next to "Buy · Sign in" (owner, 29 Oct 2026): lets sellers know they can open a shop here */
.nav .open-shop { background: #F5C400; border-color: #F5C400; color: #2a1a00; font-weight: 700; }
.nav .open-shop:hover { background: #ffd633; }
.nav .open-shop .lbl-short, .nav .open-shop .lbl-tiny { display: none; }
.nav .open-shop[hidden] { display: none; }
/* back to the dashboard for shops and staff (owner, 29 Oct 2026) */
.nav .dash-link { background: #fff; border-color: #fff; color: #00802B; font-weight: 700; }
.nav .dash-link:hover { background: #F5C400; border-color: #F5C400; color: #2a1a00; }
.nav .dash-link.admin { background: #14211C; border-color: #14211C; color: #fff; }
.nav .dash-link[hidden] { display: none; }
@media (max-width: 760px) { .nav .dash-link { padding: 6px 9px; } .nav .dash-link .lbl-full { display: none; } .nav .dash-link .lbl-short { display: inline !important; } .nav .dash-link.admin .lbl-full { display: none; } }
@media (max-width: 440px) { .nav .dash-link .lbl-short { display: none !important; } .nav .dash-link { font-size: 1.05rem; } }
@media (max-width: 760px) { .nav .open-shop { padding: 6px 9px; } .nav .open-shop .lbl-full { display: none; } .nav .open-shop .lbl-short { display: inline !important; } }
@media (max-width: 440px) { .nav .open-shop .lbl-short { display: none !important; } .nav .open-shop .lbl-tiny { display: inline !important; } }
.nav .icon-link { position: relative; padding: 7px 10px; display: inline-flex; align-items: center; gap: 6px; }
.nav .icon-link svg { width: 22px; height: 22px; }
.badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--buy); color: #fff; font: 700 .72rem/20px var(--body); text-align: center; border: 2px solid var(--head); }
.rgb { display: flex; height: 3px; } .rgb i { flex: 1; } .rgb i:nth-child(1) { background: #F5C400; } .rgb i:nth-child(2) { background: #F5C400; } .rgb i:nth-child(3) { background: #F5C400; }
@media (max-width: 760px) {
  .top-in { grid-template-columns: auto auto; }
  .search { grid-column: 1 / -1; grid-row: 2; }
  .nav .hide-sm { display: none; }
  .nav .lbl-sm { display: none; }
}
.nav .acct svg { width: 20px; height: 20px; }
@media (max-width: 560px) {
  .nav { gap: 6px; }
  .nav .lbl-acct { display: none; }
  .nav .icon-link { padding: 7px 8px; }
}
@media (max-width: 420px) {
  .brand { flex: none; gap: 6px; padding-right: 10px; }
  .brand img { width: 34px; height: 34px; }
  .brand img.word { width: auto; height: 17px; }
  .nav { gap: 4px; }
  .nav .icon-link { padding: 6px 6px; }
  .nav .open-shop { padding: 6px 8px; }
  #bellLink:not([hidden]) ~ #wishLink { display: none; }
}
@media (max-width: 345px) {
  .brand { gap: 5px; padding-right: 9px; }
  .brand img { width: 32px; height: 32px; }
  .brand img.word { width: auto; height: 15px; }
  .nav .icon-link { padding: 5px 6px; }
  .brand { flex: none; }
  #msgLink:not([hidden]) ~ #wishLink { display: none; }
  #msgLink:not([hidden]):has(~ #bellLink:not([hidden])) { display: none; }
}

/* ---------- Sections ---------- */
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 14px; }
.sec-head h2 { font: 600 1.4rem/1.2 var(--display); margin: 0; }
.sec-head p { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.sec-head a { font-weight: 700; text-decoration: none; white-space: nowrap; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--accent); font-size: .88rem; transition: background-color .15s, color .15s; }
.sec-head a:hover { background: var(--accent); color: var(--accent-fg); }

/* 6 per row on desktop (12 = two rows), fewer on smaller screens */
.grid6 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1150px) { .grid6 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 820px) { .grid6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* ---------- Category card ---------- */
.ccard { --hue: 170; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-decoration: none; display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s, border-color .18s; min-width: 0; }
.ccard .cimg { aspect-ratio: 4 / 3; max-width: 100%; display: grid; place-items: center; overflow: hidden; font-size: 2.6rem;
  background: linear-gradient(135deg, hsl(var(--hue) 70% 92%), hsl(calc(var(--hue) + 40) 75% 84%)); }
.ccard .cimg img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.ccard .cimg span { transition: transform .25s; filter: drop-shadow(0 4px 6px rgb(0 0 0 / .15)); }
.ccard .cname { padding: 10px 8px 12px; text-align: center; font-weight: 700; font-size: .92rem; line-height: 1.25; color: hsl(var(--hue) 70% 24%); overflow-wrap: anywhere; transition: color .18s; }
.ccard:hover { transform: translateY(-4px); box-shadow: 0 12px 26px hsl(var(--hue) 60% 30% / .22); border-color: hsl(var(--hue) 55% 55%); }
.ccard:hover .cimg span { transform: scale(1.18) rotate(-4deg); }
.ccard:hover .cimg img { transform: scale(1.07); }
.ccard:hover .cname { color: hsl(var(--hue) 70% 38%); text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ccard .cimg { background: linear-gradient(135deg, hsl(var(--hue) 35% 22%), hsl(calc(var(--hue) + 40) 40% 28%)); }
  :root:not([data-theme="light"]) .ccard .cname { color: hsl(var(--hue) 65% 75%); }
  :root:not([data-theme="light"]) .ccard:hover .cname { color: hsl(var(--hue) 75% 82%); }
}

/* ---------- Product card ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--fg); display: flex; flex-direction: column; transition: box-shadow .18s, transform .18s, border-color .18s; min-width: 0; position: relative; }
.card:hover { box-shadow: 0 10px 24px rgb(0 0 0 / .12); transform: translateY(-3px); border-color: var(--accent); }
.card .img { aspect-ratio: 1; max-width: 100%; background: var(--bg); position: relative; display: grid; place-items: center; color: var(--faint); font-size: .8rem; overflow: hidden; }
.card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .img img { transform: scale(1.05); }
.card .labels { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.lab { font-size: .68rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; box-shadow: 0 1px 3px rgb(0 0 0 / .18); }
.lab.new { background: var(--t-green); color: #052e16; }
.lab.used { background: #4F46E5; color: #fff; }
.lab.sale { background: #dc2626; color: #fff; }
.lab.feat { background: var(--amber); color: #2a1a00; }
.heart { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .92); color: #6b7280; display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 4px rgb(0 0 0 / .18); transition: transform .15s, color .15s; z-index: 2; }
.heart svg { width: 18px; height: 18px; }
.heart:hover { transform: scale(1.12); color: var(--heart); }
.heart[aria-pressed="true"] { color: var(--heart); }
.heart[aria-pressed="true"] svg { fill: currentColor; }
.card .body { padding: 10px 12px 12px; display: grid; gap: 4px; flex: 1; align-content: start; }
.card .t { font-weight: 600; font-size: .92rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; min-height: 2.6em; transition: color .15s; }
.card:hover .t { color: var(--accent); }
.card .p { font-weight: 800; font-size: 1.2rem; font-variant-numeric: tabular-nums; color: var(--buy); display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.card .p s { font-weight: 500; font-size: .82rem; color: var(--muted); text-decoration-thickness: 1.5px; }
.card .m { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.skel { background: linear-gradient(90deg, var(--line), var(--surface), var(--line)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 14px; aspect-ratio: .72; }
@keyframes sk { to { background-position: -200% 0; } }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: 14px; padding: 28px; text-align: center; color: var(--muted); grid-column: 1 / -1; }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } .card, .ccard, .card .img img, .ccard .cimg span, .ccard .cimg img, .heart { transition: none; } }

/* ---------- Footer & phone sell button ---------- */
footer { background: #006B24; color: #d6e8e2; padding-block: 28px max(28px, env(safe-area-inset-bottom, 0px)); font-size: .9rem; margin-top: 30px; }
footer .wrap { display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; }
footer a { color: #FFE066; text-decoration: none; margin-right: 14px; }
footer b { font: 600 1.2rem var(--display); color: #fff; }
footer .foot-pages { max-width: var(--max, 1280px); margin: 16px auto 0; padding: 14px 16px 0; border-top: 1px solid rgb(255 255 255 / .15); display: flex; flex-wrap: wrap; gap: 6px 4px; font-size: .86rem; }
footer .foot-pages { justify-content: space-between; align-items: center; gap: 10px 16px; padding-bottom: 12px; }
footer .fp-links { display: flex; flex-wrap: wrap; gap: 6px 4px; }
footer .social { display: flex; gap: 8px; flex-wrap: wrap; }
footer .foot-pages .social a, footer .foot-pages .social span { margin: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .12); color: #fff; padding: 0; transition: background-color .15s, transform .15s; }
footer .social svg { width: 18px; height: 18px; }
footer .foot-pages .social a:hover { background: #F5C400; color: #14211C; transform: translateY(-2px); }
footer .social .off { opacity: .35; cursor: default; }
footer .foot-pages .social a { background: #fff; color: #00802B; }
footer .foot-credit a { margin: 0; }
@media (max-width: 640px) { footer .foot-pages { justify-content: center; } footer .social { justify-content: center; width: 100%; } }
footer .foot-pages a { color: #d9ecd9; }
footer .foot-pages a:hover { color: #FFE066; }
.fab { display: none; }
@media (max-width: 760px) {
  .fab { display: inline-flex; position: fixed; z-index: 40; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px));
    background: var(--accent); color: var(--accent-fg); font-weight: 700; text-decoration: none; padding: 13px 20px; border-radius: 999px; box-shadow: 0 6px 18px rgb(0 0 0 / .25); }
}
/* ---------- Ads ---------- */
.adb { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 18px; align-items: center; border-radius: 16px; padding: 18px 22px; color: #fff; text-decoration: none; overflow: hidden; min-height: 84px; transition: transform .18s, box-shadow .18s; }
.adb:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgb(0 0 0 / .15); }
.adb.green { background: linear-gradient(135deg, #006622, #00802B 60%, #2EBB5C); } .adb.red { background: linear-gradient(135deg, #B8000C, #E30613 60%, #FF4D55); }
.adb.yellow { background: linear-gradient(135deg, #F5C400, #FFD21F); color: #1F2A10; } .adb.dark { background: linear-gradient(135deg, #0B1A10, #1C2A23); }
.adb.has-img { grid-template-columns: 160px minmax(0, 1fr) auto; }
.adb img { width: 160px; height: 96px; object-fit: cover; border-radius: 10px; }
.adb-t { display: grid; gap: 3px; min-width: 0; } .adb-t b { font: 700 1.3rem/1.2 var(--display); overflow-wrap: anywhere; } .adb-t span { opacity: .92; font-size: .95rem; }
.adb-cta { background: #fff; color: #14211C; font-weight: 700; padding: 10px 18px; border-radius: 10px; white-space: nowrap; }
.adb.yellow .adb-cta { background: #14211C; color: #fff; }
.adb:hover .adb-cta { background: #E30613; color: #fff; }
.adb-tag { position: absolute; top: 6px; right: 10px; font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.adb.cat_side { grid-template-columns: 1fr; text-align: left; padding: 16px; border-radius: 14px; gap: 10px; }
.adb.cat_side.has-img { grid-template-columns: 1fr; } .adb.cat_side img { width: 100%; height: 110px; }
.adb.cat_side .adb-t b { font-size: 1.05rem; } .adb.cat_side .adb-cta { justify-self: start; padding: 8px 14px; }
@media (max-width: 640px) { .adb, .adb.has-img { grid-template-columns: 1fr; padding: 16px; } .adb img { width: 100%; height: 120px; } .adb-cta { justify-self: start; } .adb-t b { font-size: 1.1rem; } }
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: .9rem; z-index: 70; max-width: calc(100vw - 32px); }

/* page numbers under the products */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 22px; }
.pager a, .pager span.gap { min-width: 42px; height: 42px; display: inline-grid; place-items: center; padding: 0 12px; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--fg); font: 600 .95rem var(--body); text-decoration: none; }
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.pager a.step { color: var(--accent); border-color: var(--accent); font-weight: 700; }
.pager a.step:hover { background: var(--accent); color: var(--accent-fg); }
.pager a[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.pager span.gap { border: 0; background: none; min-width: 20px; padding: 0; }
.pager-info { text-align: center; color: var(--muted); font-size: .88rem; margin-top: 8px; }
@media (max-width: 560px) { .pager .num:not([aria-current="page"]):not(.edge) { display: none; } }

/* ---------- stars (reviews & ratings) ---------- */
.stars { --r: 0; display: inline-block; letter-spacing: 1px; line-height: 1; font-size: 1em; white-space: nowrap; color: transparent !important;
  background: linear-gradient(90deg, #F5C400 calc(var(--r) / 5 * 100%), #cfd6d1 0); -webkit-background-clip: text; background-clip: text; }
.rt { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.rt b { color: var(--fg); font-weight: 700; }
.card .rt { font-size: .76rem; }
.star-in { display: inline-flex; gap: 2px; }
.star-in button { border: 0; background: none; padding: 2px; font-size: 1.7rem; line-height: 1; color: #cfd6d1; cursor: pointer; transition: transform .12s, color .12s; }
.star-in button.on { color: #F5C400; }
.star-in button:hover { transform: scale(1.15); }
.star-in button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 4px; }

/* copyright line at the very bottom of the footer (owner, 29 Oct 2026) */
.foot-credit { max-width: 1280px; margin: 0 auto; padding: 12px 16px 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: .82rem; border-top: 1px solid rgb(255 255 255 / .15); }
.foot-credit a { color: #F5C400; font-weight: 700; text-decoration: none; }
.foot-credit a:hover { text-decoration: underline; }
@media (max-width: 640px) { .foot-credit { justify-content: center; text-align: center; padding-bottom: 84px; } }

/* audit 29 Oct 2026: bigger tap targets for footer links on phones */
@media (max-width: 640px) { footer .wrap a, footer .fp-links a { display: inline-block; padding: 6px 2px; } }
