/* ==========================================================================
   Listing pages: /products/, /categories/, /categories/<slug>/, /search/
   Ported from the prototype's SHOP view. Tokens only, so dark mode works.
   ========================================================================== */

.shop-top { padding-top: 22px; padding-bottom: clamp(48px, 7vw, 88px); }
.crumbs .sep { color: var(--muted); }
.crumbs [aria-current] { color: var(--ink); font-weight: 700; }

/* ---------- head: big title + tools ---------- */
.shop-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-top: 10px; flex-wrap: wrap; }
.sh-title { min-width: 0; max-width: 60ch; }
.shop-head h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.4rem); font-weight: 800; color: var(--ink); }
.shop-head h1 .sq { quotes: "“" "”"; color: var(--brand); }
.sh-title p { color: var(--ink-2); margin-top: 8px; font-size: .95rem; }
.shop-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tools-form { display: contents; }
.shop-tools .btn svg { width: 18px; }

/* ---------- category chips ---------- */
.shop-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; }
.shop-bar .lchips { margin-top: 0; flex: 1; min-width: 0; }
.lchips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 6px; margin: 16px -2px 0; scroll-behavior: smooth; }
.lchips::-webkit-scrollbar { display: none; }
.shop-bar .lchips { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); padding-right: 40px; }
.lchip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 7px; border-radius: 99px; background: var(--surface); color: var(--ink-2); font-weight: 700; font-size: .86rem; white-space: nowrap; box-shadow: var(--shadow); transition: background .25s, color .25s, box-shadow .25s, transform .35s var(--spring); }
.lchip:not(:has(img, i)) { padding-left: 16px; }
.lchip img, .lchip i { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; transition: transform .4s var(--spring); flex-shrink: 0; }
.lchip i { display: grid; place-items: center; background: var(--surface-2); color: var(--brand); font-style: normal; }
.lchip i svg { width: 15px; }
.lchip:hover { color: var(--ink); transform: translateY(-2px); }
.lchip:hover img, .lchip:hover i { transform: scale(1.12) rotate(-8deg); }
.lchip.on { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-brand); }
.lchip.on i { background: color-mix(in srgb, var(--on-brand) 22%, transparent); color: var(--on-brand); }
.lchip.on img { box-shadow: 0 0 0 2px var(--on-brand); }

/* ---------- filters disclosure ---------- */
.lfilter { position: relative; }
.lf-btn { list-style: none; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 13px; background: var(--surface); color: var(--ink); font-weight: 700; font-size: .86rem; box-shadow: var(--shadow); cursor: pointer; user-select: none; transition: box-shadow .2s; }
.lf-btn::-webkit-details-marker { display: none; }
.lf-btn svg { width: 16px; color: var(--brand); }
.lfilter[open] .lf-btn { box-shadow: 0 0 0 2px var(--brand), var(--shadow); }
.lf-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hot); }
.lf-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 31; width: min(340px, calc(100vw - 32px)); padding: 6px 18px 18px; background: var(--surface); color: var(--ink); border-radius: 18px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); transform-origin: top right; animation: lfIn .35s var(--spring); }
@keyframes lfIn { from { opacity: 0; transform: scale(.94) translateY(-6px); } }
.lf-panel fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.lf-panel .lbl { margin: 14px 0 8px; font-size: .82rem; }
.lf-range { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .8rem; }
.lf-range input { flex: 1; min-width: 0; height: 44px; border-radius: 12px; border: 0; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--bg); color: var(--ink); padding: 0 12px; font: inherit; font-size: .9rem; }
.lf-range input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--brand); }
.lf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lf-chips label { cursor: pointer; }
.lf-chips input { position: absolute; opacity: 0; pointer-events: none; }
.lf-chips span { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); font-weight: 700; font-size: .8rem; transition: background .2s, color .2s; }
.lf-chips input:checked + span { background: var(--brand); color: var(--on-brand); }
.lf-chips input:focus-visible + span { outline: 2.5px solid var(--brand); outline-offset: 2px; }
.lf-chips .marker { position: static; width: 13px; height: 13px; }
.lf-toggle { margin-top: 14px; box-shadow: none; background: var(--surface-2); width: 100%; justify-content: space-between; flex-direction: row-reverse; }
.lf-actions { display: flex; gap: 8px; margin-top: 16px; }
.lf-actions .btn { flex: 1; }

/* ---------- veg mix banner ---------- */
.mix-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border-radius: 22px; background: linear-gradient(120deg, var(--brand), var(--brand-bright) 60%, var(--brand-pale)); color: var(--white); margin-top: 18px; position: relative; overflow: hidden; flex-wrap: wrap; isolation: isolate; }
.mix-banner .mb-txt { position: relative; z-index: 1; min-width: 0; flex: 1 1 320px; }
.mix-banner b { font-family: var(--f-display); font-size: 1.3rem; letter-spacing: -.03em; display: block; }
.mix-banner .mb-txt > span { display: block; font-size: .9rem; opacity: .92; margin-top: 2px; }
.mix-banner .mb-presets { display: flex !important; flex-wrap: wrap; gap: 6px; margin-top: 10px; opacity: 1 !important; }
.mix-banner .mb-presets a { font-size: .76rem; font-weight: 800; padding: 5px 11px; border-radius: 99px; background: rgba(255,255,255,.18); backdrop-filter: blur(6px); transition: background .2s; }
.mix-banner .mb-presets a:hover { background: rgba(255,255,255,.32); }
.mix-banner span.e { position: absolute; font-size: 2.4rem; opacity: .35; animation: lFloaty 5s ease-in-out infinite; pointer-events: none; z-index: 0; }
.mix-banner .btn { position: relative; z-index: 1; }
.mix-banner .btn svg { width: 18px; }
@keyframes lFloaty { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-8px) rotate(5deg); } }

/* ---------- category hero ---------- */
.cat-hero { position: relative; margin-top: 12px; border-radius: 26px; overflow: hidden; min-height: clamp(200px, 19vw, 270px); display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: clamp(18px, 2.6vw, 34px); color: var(--white); background: linear-gradient(120deg, var(--navy-1), var(--brand)); isolation: isolate; box-shadow: var(--shadow); }
.cat-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: heroZoom 1.4s var(--ease) both; }
.cat-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(4,23,58,.88) 0%, rgba(4,23,58,.55) 45%, rgba(4,23,58,.05) 80%), linear-gradient(0deg, rgba(4,23,58,.55), transparent 55%); }
@keyframes heroZoom { from { transform: scale(1.08); } }
.ch-txt { display: flex; flex-direction: column; gap: 10px; max-width: 58ch; min-width: 0; }
.ch-txt .sticker svg { width: 14px; }
.cat-hero h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.4rem); font-weight: 800; color: var(--white); text-shadow: 0 2px 18px rgba(0,0,0,.25); }
.cat-hero p { font-size: .95rem; opacity: .9; }
.ch-facts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ch-facts span { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 800; padding: 7px 12px; border-radius: 99px; background: rgba(255,255,255,.16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); white-space: nowrap; }
.ch-facts svg { width: 14px; }

/* ---------- count, grid, empty ---------- */
.shop-count { color: var(--muted); font-size: .86rem; margin: 18px 0 12px; }
.shop-count b { color: var(--ink); }
[data-listing] .pgrid { transition: opacity .25s; }
[data-listing].is-loading .pgrid { opacity: .5; pointer-events: none; }
.lempty { background: var(--surface); border-radius: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 20px; }
.lempty b { color: var(--ink); font-family: var(--f-display); font-size: 1.25rem; letter-spacing: -.02em; }
.lempty p { max-width: 44ch; }
.lempty .btn { margin-top: 12px; }
.le-ico { width: 64px; height: 64px; border-radius: 20px; background: var(--mint); color: var(--mint-ink); display: grid; place-items: center; margin-bottom: 8px; }
.le-ico svg { width: 28px; }
.le-try { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.le-try a { font-size: .8rem; font-weight: 700; padding: 7px 13px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); transition: background .2s, color .2s; }
.le-try a:hover { background: var(--mint); color: var(--mint-ink); }
mark.hl { background: color-mix(in srgb, var(--sun) 70%, transparent); color: inherit; border-radius: 4px; padding: 0 2px; }

/* ---------- pagination ---------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 30px; flex-wrap: wrap; }
.pager .pg, .pager .pg-arrow { min-width: 44px; height: 44px; padding: 0 10px; border-radius: 13px; display: inline-grid; place-items: center; font-weight: 800; font-size: .9rem; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); transition: transform .3s var(--spring), background .2s, color .2s; }
.pager a:hover { transform: translateY(-2px); color: var(--brand); }
.pager .pg.on { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-brand); }
.pager span.pg-arrow { opacity: .4; box-shadow: none; }
.pager svg { width: 18px; }
.pg-gap { color: var(--muted); padding: 0 4px; }

/* ---------- search box ---------- */
.lsearch { display: flex; align-items: center; gap: 10px; margin-top: 18px; max-width: 720px; height: 58px; padding: 0 7px 0 18px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); transition: box-shadow .2s; }
.lsearch:focus-within { box-shadow: 0 0 0 2px var(--brand), var(--shadow); }
.lsearch > svg { width: 20px; color: var(--muted); }
.lsearch input { flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 1rem; height: 100%; outline: none; }
.lsearch input::placeholder { color: var(--muted); }
.lsearch .btn { height: 44px; border-radius: 13px; }
.lsugg .sec-head { margin-bottom: 16px; }
.lsearch + .lempty { margin-top: 18px; }

/* ---------- category photo cards (same as home "Shop by category") ---------- */
.cats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.cats-page { margin-top: 22px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cat { position: relative; border: 0; padding: 18px; border-radius: 22px; background: var(--navy-2); overflow: hidden; text-align: left; aspect-ratio: 4 / 5; max-height: 340px; width: 100%; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; color: var(--white); isolation: isolate; transition: transform .45s var(--ease), box-shadow .45s; box-shadow: var(--shadow); }
.cat::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(4,26,64,0) 35%, rgba(4,26,64,.55) 65%, rgba(4,26,64,.92) 100%); }
.cat:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.cat b { display: block; font-family: var(--f-display); font-size: 1.15rem; letter-spacing: -.03em; line-height: 1.1; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.cat small { display: block; font-size: .76rem; font-weight: 700; opacity: .85; margin-top: 4px; }
.cat img { position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; z-index: -2; transition: transform 1s var(--ease); }
.cat:hover img { transform: scale(1.08); }
.cat .cat-ph { position: absolute; inset: 0; z-index: -2; display: grid; place-items: center; color: var(--brand-pale); }
.cat .cat-ph svg { width: 56px; opacity: .5; }
.cat .go { width: 36px; height: 36px; border-radius: 12px; background: var(--white); color: var(--brand-deep); display: grid; place-items: center; flex-shrink: 0; transform: translateX(-6px); opacity: 0; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.cat:hover .go { opacity: 1; transform: none; }
.cat .go svg { width: 16px; }

/* ---------- category-page footer notes ---------- */
.lnote { display: flex; align-items: center; gap: 12px; margin: 34px 0 10px; padding: 14px 16px; border-radius: 18px; background: var(--mint); color: var(--ink); }
.lnote i { width: 40px; height: 40px; border-radius: 12px; background: var(--surface); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.lnote i svg { width: 20px; }
.lnote b { display: block; font-size: .9rem; }
.lnote span { font-size: .8rem; color: var(--ink-2); }

/* ---------- responsive ---------- */
@media (max-width: 1200px) { .cats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 960px) {
  .shop-bar { flex-direction: column; align-items: stretch; }
  .shop-bar .shop-tools { justify-content: flex-start; }
}
@media (max-width: 767px) {
  .shop-top { padding-top: 14px; }
  .shop-head { align-items: stretch; }
  .shop-tools { width: 100%; gap: 8px; }
  .shop-tools .toggle, .lf-btn { height: 42px; padding: 0 12px; }
  .shop-tools .dd-btn > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .shop-tools .dd { flex: 1; min-width: 0; }
  .shop-tools .dd-btn { height: 42px; }
  .shop-tools > .btn { flex: 1; height: 44px; padding-inline: 12px; }
  .lfilter { position: static; }
  .lf-panel { left: 16px; right: 16px; width: auto; }
  .shop-bar .shop-tools, .shop-head .shop-tools { position: relative; }
  .lchips { margin-inline: -16px; padding-inline: 16px; }
  .lchip { height: 40px; font-size: .82rem; }
  .lchip img, .lchip i { width: 28px; height: 28px; }
  .cat-hero { min-height: 210px; border-radius: 22px; flex-direction: column; align-items: flex-start; justify-content: flex-end; }
  .cat-hero::before { background: linear-gradient(0deg, rgba(4,23,58,.9) 0%, rgba(4,23,58,.45) 60%, rgba(4,23,58,.1) 100%); }
  .cat-hero p { font-size: .86rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .ch-facts { position: absolute; top: 14px; right: 14px; }
  .ch-facts span:nth-child(2) { display: none; }
  .shop-tools .dd-btn small { display: none; }
  .mix-banner { padding: 14px 16px; gap: 12px; flex-wrap: nowrap; align-items: flex-end; }
  .mix-banner .mb-txt { flex: 1 1 auto; }
  .mix-banner b { font-size: 1.12rem; }
  .mix-banner .mb-txt > span:not(.mb-presets) { font-size: .8rem; }
  .mix-banner span.e { font-size: 1.8rem; opacity: .22; }
  .mix-banner span.e:nth-of-type(n+2) { display: none; }
  .mix-banner .btn { height: 42px; padding-inline: 14px; font-size: .84rem; flex-shrink: 0; }
  .mix-banner .btn .mb-long { display: none; }
  .mix-banner .mb-presets a:nth-child(n+4) { display: none; }
  .cats, .cats-page { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat { aspect-ratio: 1; padding: 14px; }
  .cat .go { opacity: 1; transform: none; width: 30px; height: 30px; }
  .lsearch { height: 52px; }
  .lsearch .btn { padding-inline: 14px; }
  .pager .pg, .pager .pg-arrow { min-width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .cat-hero img, .mix-banner span.e, .lf-panel { animation: none; }
}
