/* ChaiBD category / search page, app style (public/js/chai-shop.js). Uses each website design's colours; light/dark. */
@keyframes sp-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes sp-shine { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes sp-pop { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes sp-sheet { from { transform: translateY(100%); } }
@keyframes sp-fade { from { opacity: 0; } }
@keyframes sp-bump { 0% { transform: scale(1); } 35% { transform: scale(1.25) rotate(-8deg); } 100% { transform: scale(1); } }

.sp svg, .sp-sheet svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
html.sp-page .crumb { display: none; }
html.sp-page body > section:first-of-type { padding-top: 6px !important; }
.sp { position: relative; }

/* ---------------------------------------------------------------- the sticky bar */
.sp-top { position: sticky; top: var(--sp-top, 0px); z-index: 30; margin: 0 -16px; padding: 8px 16px 6px; background: color-mix(in srgb, var(--bg, var(--card)) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.sp-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.sp-title h1 { margin: 0; font-size: 20px; line-height: 1.2; } .sp-count { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }
.sp-cats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; scroll-snap-type: x proximity; }
.sp-cats::-webkit-scrollbar, .sp-subs::-webkit-scrollbar, .sp-pills::-webkit-scrollbar { display: none; }
.sp-cats button { flex: none; display: grid; justify-items: center; gap: 4px; width: 66px; padding: 0; border: 0; background: none; color: var(--ink-soft); font: inherit; cursor: pointer; scroll-snap-align: start; }
.sp-cats span { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; overflow: hidden; color: var(--red); background: color-mix(in srgb, var(--red) 8%, var(--card)); border: 1.5px solid transparent; transition: transform .3s cubic-bezier(.34,1.56,.64,1), border-color .2s, box-shadow .2s; }
.sp-cats span img { width: 100%; height: 100%; object-fit: cover; } .sp-cats span b { font-size: 18px; } .sp-cats span svg { width: 22px; height: 22px; }
.sp-cats small { font-size: 11.5px; line-height: 1.2; text-align: center; max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-cats button.on span { border-color: var(--red); box-shadow: 0 8px 18px -10px var(--red); transform: translateY(-2px); }
.sp-cats button.on small { color: var(--red); font-weight: 700; }
.sp-cats .sp-hot span { color: #fff; background: linear-gradient(145deg, #ff8a3d, var(--red)); }
.sp-subs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 6px; }
.sp-subs[hidden] { display: none; }
.sp-subs button { flex: none; padding: 6px 13px; border-radius: 99px; border: 1px solid var(--card-b); background: var(--card); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; animation: sp-in .3s both; }
.sp-subs button.on { color: #fff; background: var(--red); border-color: var(--red); }
.sp-sorts { display: flex; align-items: center; gap: 2px; border-top: 1px solid color-mix(in srgb, var(--card-b) 70%, transparent); padding-top: 4px; }
.sp-sorts button { position: relative; display: inline-flex; align-items: center; gap: 3px; padding: 8px 9px; border: 0; background: none; color: var(--ink-soft); font: inherit; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.sp-sorts [data-sort].on { color: var(--red); font-weight: 700; }
.sp-sorts [data-sort].on::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: 2px; height: 2.5px; border-radius: 3px; background: var(--red); animation: sp-in .25s; }
.sp-price i { display: inline-grid; } .sp-price i svg { width: 14px; height: 14px; } .sp-price.up i svg path { opacity: 1; } .sp-price.up i { color: var(--red); transform: none; } .sp-price.down i { transform: scaleY(-1); }
.sp-gap { flex: 1; }
.sp-view { width: 34px; height: 34px; padding: 0 !important; justify-content: center; } .sp-view svg { width: 19px; height: 19px; }
.sp-fbtn { gap: 5px !important; border-radius: 10px; } .sp-fbtn svg { width: 17px; height: 17px; }
.sp-fbtn em { font-style: normal; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background: var(--red); }
.sp-fbtn em[hidden] { display: none; }
.sp-pills { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px 0 2px; }
.sp-pills[hidden] { display: none; }
.sp-pills button { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px 5px 11px; border-radius: 99px; border: 0; color: var(--red); background: color-mix(in srgb, var(--red) 10%, var(--card)); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; animation: sp-in .25s both; }
.sp-pills button svg { width: 13px; height: 13px; stroke-width: 2.4; } .sp-pills .sp-clear { color: var(--ink-soft); background: none; text-decoration: underline; }

/* ---------------------------------------------------------------- the products */
.sp-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 10px; }
.sp-side:empty { display: none; }
.sp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sp-card { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 16px; overflow: hidden; background: var(--card); border: 1px solid color-mix(in srgb, var(--card-b) 70%, transparent); color: inherit; text-decoration: none;
  animation: sp-in .45s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 35ms); transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s; contain: layout paint; }
.sp-card:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -22px rgba(0,0,0,.45); }
.sp-card:active { transform: scale(.98); }
.sp-img { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: color-mix(in srgb, var(--ink) 5%, var(--card)); }
.sp-img img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity .4s, transform .6s cubic-bezier(.2,.8,.2,1); }
.sp-img img.in { opacity: 1; transform: none; } .sp-card:hover .sp-img img.in { transform: scale(1.05); }
.sp-img > i { position: absolute; inset: 0; display: grid; place-items: center; color: color-mix(in srgb, var(--ink) 30%, transparent); } .sp-img > i svg { width: 34px; height: 34px; }
.sp-off { position: absolute; left: 8px; top: 8px; padding: 2px 7px; border-radius: 8px; font: 800 11.5px Poppins, sans-serif; font-style: normal; color: #fff; background: linear-gradient(135deg, #ff6a3d, var(--red)); }
.sp-soldout { position: absolute; inset: auto 0 0 0; padding: 5px; font-style: normal; font-size: 12px; font-weight: 700; text-align: center; color: #fff; background: rgba(0,0,0,.55); }
.sp-card.out .sp-img img { filter: grayscale(.6); }
.sp-heart { position: absolute; right: 7px; top: 7px; width: 30px; height: 30px; border-radius: 50%; border: 0; display: grid; place-items: center; color: var(--ink-soft); background: color-mix(in srgb, var(--card) 85%, transparent); cursor: pointer; }
.sp-heart svg { width: 17px; height: 17px; } .sp-heart.on { color: #e11d48; } .sp-heart.on svg { fill: currentColor; } .sp-heart.pop { animation: sp-pop .4s; }
.sp-info { position: relative; display: grid; gap: 4px; padding: 8px 10px 10px; align-content: start; }
.sp-name { font-size: 13.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.sp-tags { display: flex; gap: 4px; flex-wrap: wrap; min-height: 0; } .sp-tags:empty { display: none; }
.sp-tags i { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px; }
.sp-tags .free { color: #15803d; background: color-mix(in srgb, #22c55e 14%, transparent); } .sp-tags .hot { color: var(--red); background: color-mix(in srgb, var(--red) 10%, transparent); }
.sp-price { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; padding-right: 34px; }
.sp-price strong { font: 800 17px Poppins, sans-serif; color: var(--red); } .sp-price s { font-size: 11.5px; color: var(--ink-soft); }
.sp-meta { display: flex; gap: 8px; font-size: 11.5px; color: var(--ink-soft); } .sp-meta i { font-style: normal; display: inline-flex; align-items: center; gap: 2px; }
.sp-meta .r svg { width: 12px; height: 12px; fill: #f59e0b; stroke: none; }
.sp-add { position: absolute; right: 8px; bottom: 8px; width: 32px; height: 32px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; background: var(--red); box-shadow: 0 8px 16px -8px var(--red); cursor: pointer; transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
.sp-add svg { width: 17px; height: 17px; stroke-width: 2.2; } .sp-add:active { transform: scale(.88); } .sp-add.done { animation: sp-pop .45s; background: #16a34a; }
.sp-fly { position: fixed; z-index: 3000; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; pointer-events: none; background: var(--card); box-shadow: 0 10px 24px -8px rgba(0,0,0,.4); display: grid; place-items: center; }
.sp-fly img { width: 100%; height: 100%; object-fit: cover; } .sp-fly svg { width: 26px; height: 26px; color: var(--red); }
.sp-bump { animation: sp-bump .5s cubic-bezier(.34,1.56,.64,1); }
/* list view */
.sp.list .sp-grid:not(.sp-sugg) { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.sp.list .sp-grid:not(.sp-sugg) .sp-card { flex-direction: row; }
.sp.list .sp-grid:not(.sp-sugg) .sp-img { width: 118px; flex: none; }
.sp.list .sp-grid:not(.sp-sugg) .sp-info { flex: 1; padding: 10px 12px; }
.sp.list .sp-grid:not(.sp-sugg) .sp-name { -webkit-line-clamp: 2; }
/* loading */
.sp-skel { pointer-events: none; animation: none; }
.sp-skel .sp-img, .sp-skel b { background: linear-gradient(90deg, color-mix(in srgb, var(--ink) 6%, var(--card)) 25%, color-mix(in srgb, var(--ink) 12%, var(--card)) 50%, color-mix(in srgb, var(--ink) 6%, var(--card)) 75%); background-size: 200% 100%; animation: sp-shine 1.2s linear infinite; }
.sp-skel b { display: block; height: 12px; border-radius: 6px; } .sp-skel b:nth-child(2) { width: 70%; } .sp-skel b:nth-child(3) { width: 45%; height: 16px; }
.sp-more { padding: 10px 0 18px; } .sp-skel-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sp-end { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; font-size: 12.5px; color: var(--ink-soft); } .sp-end i { flex: 1; height: 1px; background: var(--card-b); }
.sp-retry { display: block; margin: 0 auto; padding: 9px 18px; border-radius: 99px; border: 1px solid var(--card-b); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
/* nothing found */
.sp-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 6px; padding: 24px 0 0; text-align: center; animation: sp-in .4s; }
.sp-empty-i { width: 74px; height: 74px; border-radius: 24px; display: grid; place-items: center; color: var(--red); background: color-mix(in srgb, var(--red) 9%, var(--card)); } .sp-empty-i svg { width: 34px; height: 34px; }
.sp-empty h3 { margin: 6px 0 0; font-size: 18px; } .sp-empty p { margin: 0; font-size: 13.5px; color: var(--ink-soft); }
.sp-go { margin-top: 6px; padding: 10px 20px; border: 0; border-radius: 99px; color: #fff; background: var(--red); font: inherit; font-weight: 700; cursor: pointer; }
.sp-empty h4 { justify-self: stretch; text-align: left; margin: 22px 0 4px; font-size: 15px; } .sp-sugg { justify-self: stretch; text-align: left; }
/* back to the top */
.sp-uptop { position: fixed; right: 16px; bottom: 150px; z-index: 40; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--card-b); display: grid; place-items: center; color: var(--ink); background: var(--card); box-shadow: 0 10px 22px -12px rgba(0,0,0,.45); cursor: pointer; opacity: 0; transform: translateY(16px) scale(.8); pointer-events: none; transition: opacity .25s, transform .3s cubic-bezier(.34,1.56,.64,1); }
.sp-uptop.show { opacity: 1; transform: none; pointer-events: auto; } .sp-uptop svg { width: 20px; height: 20px; }

/* ---------------------------------------------------------------- filters */
.sp-fg { padding: 14px 0; border-bottom: 1px solid color-mix(in srgb, var(--card-b) 70%, transparent); }
.sp-fg h4 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 10px; font-size: 14.5px; } .sp-fg h4 small { font-size: 12.5px; font-weight: 600; color: var(--red); }
.sp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-chips button { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 10px; border: 1.5px solid transparent; background: color-mix(in srgb, var(--ink) 5%, var(--card)); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.sp-chips button em { font-style: normal; font-size: 11px; color: var(--ink-soft); }
.sp-chips button.on { color: var(--red); border-color: var(--red); background: color-mix(in srgb, var(--red) 8%, var(--card)); }
.sp-range { position: relative; height: 30px; margin: 0 8px 10px; }
.sp-range i { position: absolute; left: 0; right: 0; top: 13px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--ink) 12%, transparent) var(--a), var(--red) var(--a), var(--red) var(--b), color-mix(in srgb, var(--ink) 12%, transparent) var(--b)); }
.sp-range input { position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.sp-range input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--red); box-shadow: 0 4px 10px rgba(0,0,0,.2); cursor: grab; }
.sp-range input::-moz-range-thumb { pointer-events: auto; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--red); cursor: grab; }
.sp-range input::-webkit-slider-runnable-track { background: none; } .sp-range input::-moz-range-track { background: none; }
.sp-sw { display: grid; gap: 4px; border-bottom: 0; }
.sp-sw label { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; font-size: 14px; cursor: pointer; }
.sp-sw input { position: absolute; opacity: 0; pointer-events: none; }
.sp-sw label i { width: 42px; height: 24px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 18%, transparent); position: relative; transition: background .2s; flex: none; }
.sp-sw label i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
.sp-sw input:checked + i { background: var(--red); } .sp-sw input:checked + i::after { transform: translateX(18px); }
/* the sheet (phones and tablets) */
.sp-sheet { position: fixed; inset: 0; z-index: 1500; display: flex; align-items: flex-end; justify-content: center; background: rgba(10,8,8,.5); animation: sp-fade .25s; }
.sp-sheet.out { opacity: 0; transition: opacity .25s; }
.sp-sheet-box { display: flex; flex-direction: column; width: min(560px, 100%); max-height: 86vh; border-radius: 24px 24px 0 0; background: var(--card); animation: sp-sheet .38s cubic-bezier(.2,1,.3,1); }
.sp-grip { align-self: center; width: 42px; height: 5px; margin-top: 8px; border-radius: 5px; background: color-mix(in srgb, var(--ink) 18%, transparent); }
.sp-sheet-h { display: flex; justify-content: space-between; align-items: center; padding: 8px 18px 4px; } .sp-sheet-h b { font-size: 17px; }
.sp-x { width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); cursor: pointer; } .sp-x svg { width: 18px; height: 18px; }
.sp-sheet-in { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 0 18px; }
.sp-sheet-f { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--card-b); }
.sp-reset { padding: 13px 20px; border-radius: 14px; border: 1px solid var(--card-b); background: none; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.sp-apply { padding: 13px; border-radius: 14px; border: 0; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--red) 80%, #ff7a45), var(--red)); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; box-shadow: 0 10px 20px -12px var(--red); }
html.sp-lock { overflow: hidden; }

/* ---------------------------------------------------------------- tablets and computers */
@media (min-width: 600px) { .sp-grid, .sp-skel-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } .sp-title h1 { font-size: 24px; } .sp-cats button { width: 76px; } .sp-cats span { width: 54px; height: 54px; } }
@media (min-width: 860px) { .sp-grid, .sp-skel-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } .sp.list .sp-grid:not(.sp-sugg) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) {
  .sp-top { margin: 0; padding: 10px 0 6px; border-radius: 0; }
  .sp-body { grid-template-columns: 260px minmax(0, 1fr); gap: 22px; }
  .sp-side { position: sticky; top: calc(var(--sp-top, 0px) + var(--sp-bar, 150px)); align-self: start; }
  .sp-side-in { max-height: calc(100vh - var(--sp-top, 0px) - var(--sp-bar, 150px) - 20px); overflow: auto; padding: 4px 16px 10px; border-radius: 18px; background: var(--card); border: 1px solid var(--card-b); scrollbar-width: thin; }
  .sp-side-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 0 4px; } .sp-side-h b { display: flex; align-items: center; gap: 6px; font-size: 16px; } .sp-side-h svg { width: 18px; height: 18px; color: var(--red); }
  .sp-side-h button { border: 0; background: none; color: var(--red); font: inherit; font-size: 13px; cursor: pointer; }
  .sp-fbtn { display: none !important; }
  .sp-grid, .sp-skel-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .sp-uptop { bottom: 110px; right: 28px; }
}
@media (min-width: 1500px) { .sp-grid, .sp-skel-row { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
/* phones: no search bar row under the logo here (the page has its own bar) only when it would double up — keep the site search */
@media (max-width: 720px) { .sp-uptop { right: 12px; bottom: 140px; } }
@media (prefers-reduced-motion: reduce) { .sp-card, .sp-subs button, .sp-pills button, .sp-empty { animation: none !important; } }
/* the page's own category chips replace the site's moving category bar here */
html.sp-page nav.catnav { display: none !important; }
/* scrolled down: only the sort row (and sub-categories) stay in the bar */
.sp-sent { display: block; height: 1px; }
.sp-cats { overflow-x: auto; overflow-y: hidden; }
.sp.stuck .sp-top { box-shadow: 0 10px 20px -18px rgba(0,0,0,.45); }
.sp.stuck .sp-sorts { border-top: 0; }
.sp-sorts { overflow-x: auto; scrollbar-width: none; } .sp-sorts::-webkit-scrollbar { display: none; }
.sp-sorts button { flex: none; } .sp-price i { display: inline-flex; align-items: center; }
@media (max-width: 380px) { .sp-sorts button { padding: 8px 7px; font-size: 13px; } }
/* the filter button stays in view at the end of the sort row on narrow phones */
.sp-fbtn { position: sticky; right: 0; background: linear-gradient(90deg, transparent, var(--card) 18%) !important; padding-left: 14px !important; }
.sp-top .sp-fbtn { background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--bg, var(--card)) 96%, transparent) 18%) !important; }
/* category icons: a soft tile per category, each in its own tint */
.sp-cats button:nth-child(3n) span { color: #2563eb; background: color-mix(in srgb, #2563eb 9%, var(--card)); }
.sp-cats button:nth-child(3n+1):not(:first-child) span { color: #16a34a; background: color-mix(in srgb, #16a34a 9%, var(--card)); }
.sp-cats button:nth-child(3n+2):not(.sp-hot) span { color: #9333ea; background: color-mix(in srgb, #9333ea 9%, var(--card)); }
.sp-cats button.on span { color: #fff !important; background: var(--red) !important; }
.sp-cats span svg { width: 24px; height: 24px; transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.sp-cats button:hover span svg, .sp-cats button.on span svg { transform: scale(1.12) rotate(-6deg); }

/* ---- the category row: "সব" fixed at the front, the rest gliding behind it ---- */
@keyframes sp-hop { 0% { transform: translateY(0); } 35% { transform: translateY(-7px) scale(1.06); } 65% { transform: translateY(1px); } 100% { transform: none; } }
.sp-cats { display: flex; align-items: flex-start; gap: 0; overflow: visible; padding: 2px 0 6px; position: relative; }
.sp-all { position: relative; z-index: 2; padding-right: 8px !important; margin-right: 2px; background: none; }
.sp-all::after { content: ""; position: absolute; right: -2px; top: 8px; bottom: 22px; width: 1px; background: color-mix(in srgb, var(--card-b) 90%, transparent); }
.sp-all span { color: var(--red) !important; background: color-mix(in srgb, var(--red) 10%, var(--card)) !important; }
.sp-all.on span { color: #fff !important; background: var(--red) !important; box-shadow: 0 8px 18px -10px var(--red); }
.sp-catrow { flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; cursor: grab; -webkit-mask: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent); mask: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent); }
.sp-catrow::-webkit-scrollbar { display: none; }
.sp-catset { display: flex; gap: 6px; padding: 2px 10px 0; width: max-content; }
.sp-catset button.hop span { animation: sp-hop .6s cubic-bezier(.34,1.56,.64,1); }
.sp-catset button.hop small { color: var(--red); }
.sp-cnav { display: none; }
@media (min-width: 1100px) {
  .sp-cnav { display: grid; place-items: center; flex: none; align-self: center; width: 32px; height: 32px; margin-top: -18px; border-radius: 50%; border: 1px solid var(--card-b); background: var(--card); color: var(--ink); cursor: pointer; box-shadow: 0 6px 14px -10px rgba(0,0,0,.4); transition: transform .2s, color .2s; }
  .sp-cnav:hover { color: var(--red); transform: scale(1.08); } .sp-cnav svg { width: 17px; height: 17px; stroke-width: 2.3; }
}
/* every category (the "সব" panel) */
.sp-allp .sp-sheet-box { width: min(720px, 100%); }
.sp-allp-all { display: flex; align-items: center; gap: 10px; width: 100%; margin: 6px 0 12px; padding: 12px 14px; border-radius: 16px; border: 1.5px solid var(--card-b); background: var(--card); color: var(--ink); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.sp-allp-all span { flex: 1; text-align: left; } .sp-allp-all svg { width: 20px; height: 20px; color: var(--red); } .sp-allp-all.on { border-color: var(--red); color: var(--red); }
.sp-allp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-bottom: 18px; }
.sp-allp-g, .sp-allp-grid > .sp-allp-c { animation: sp-in .4s both; animation-delay: calc(var(--i) * 45ms); }
.sp-allp-g { display: grid; gap: 6px; align-content: start; }
.sp-allp-c { display: grid; justify-items: center; gap: 6px; width: 100%; padding: 12px 6px; border-radius: 16px; border: 1.5px solid transparent; background: color-mix(in srgb, var(--ink) 4%, var(--card)); color: var(--ink); font: inherit; cursor: pointer; transition: transform .25s cubic-bezier(.34,1.56,.64,1), border-color .2s; }
.sp-allp-c:active { transform: scale(.95); }
.sp-allp-c span { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; overflow: hidden; color: var(--red); background: var(--card); }
.sp-allp-c span img { width: 100%; height: 100%; object-fit: cover; } .sp-allp-c span svg { width: 24px; height: 24px; }
.sp-allp-c.sp-hot span { color: #fff; background: linear-gradient(145deg, #ff8a3d, var(--red)); }
.sp-allp-c b { font-size: 12.5px; font-weight: 600; text-align: center; line-height: 1.25; }
.sp-allp-c.on { border-color: var(--red); } .sp-allp-c.on b { color: var(--red); }
.sp-allp-subs { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.sp-allp-subs button { padding: 4px 9px; border-radius: 99px; border: 1px solid var(--card-b); background: var(--card); color: var(--ink-soft); font: inherit; font-size: 11.5px; cursor: pointer; }
.sp-allp-subs button.on { color: #fff; background: var(--red); border-color: var(--red); }
@media (min-width: 600px) { .sp-allp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .sp-allp { align-items: center; } .sp-allp .sp-sheet-box { border-radius: 24px; max-height: 80vh; } .sp-allp-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.sp-cats .sp-cnav { display: none; }
@media (min-width: 1100px) { .sp-cats .sp-cnav { display: grid; width: 32px; height: 32px; padding: 0; gap: 0; color: var(--ink); } }
.sp-allp-grid { align-items: start; }
/* folding is instant in layout terms: no height animation that the page could react to */
.sp-title, .sp-cats { transition: opacity .2s; }

/* ---- the head (title + categories) scrolls with the page; only the sort row stays ---- */
.sp-head { padding: 8px 0 2px; }
.sp-sent { display: block; height: 0; }
.sp-title, .sp-cats { max-height: none; opacity: 1 !important; transition: none; }
.sp-top { padding-top: 4px; transition: box-shadow .25s; }
.sp.stuck .sp-top { box-shadow: 0 10px 18px -16px rgba(0,0,0,.4); }
.sp-sorts { border-top: 0; }
.sp-head .sp-cats { padding-bottom: 4px; }
@media (min-width: 1100px) { .sp-head { padding-top: 10px; } }
