/* Page stylesheet ported from the design (build/pages/shop). */

.shop-top { padding: calc(var(--nav-top) + clamp(20px, 3vw, 36px)) 0 0; }
.shop-top--fixed { padding-top: clamp(20px, 3vw, 36px); }
.shop-top--fixed .sh-cats { margin-top: 0; }
.shop-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.shop-head h1 { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); line-height: 1.1; }
.shop-head p { color: var(--fg-2); font-size: .9375rem; }
/* category circles */
.sh-cats { display: flex; gap: clamp(10px, 1.5vw, 22px); margin-top: clamp(18px, 2.5vw, 28px); overflow-x: auto; scrollbar-width: none; padding: 4px 4px 8px; margin-inline: -4px; scroll-snap-type: x proximity; }
.sh-cats::-webkit-scrollbar { display: none; }
.sh-cat { flex: 0 0 auto; width: clamp(84px, 8vw, 108px); display: grid; justify-items: center; gap: 10px; color: var(--fg); scroll-snap-align: start; }
.sh-cat[hidden] { display: none; }
.sh-cat-ring { width: clamp(68px, 6.4vw, 88px); aspect-ratio: 1; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; box-shadow: 0 0 0 0 var(--fg); transition: box-shadow .3s ease, border-color .3s ease, transform .4s var(--ease-out); }
.sh-cat-ring img { width: 72%; height: 72%; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(26,27,29,.18)); transition: transform .5s var(--ease-out); }
.sh-cat:hover .sh-cat-ring { border-color: var(--fg); }
.sh-cat:hover .sh-cat-ring img { transform: scale(1.06); }
.sh-cat[aria-selected="true"] .sh-cat-ring { border-color: var(--fg); box-shadow: 0 0 0 2px var(--fg); }
.sh-cat-label { font-size: .75rem; font-weight: 500; letter-spacing: .02em; text-align: center; line-height: 1.3; }
/* pills row */
.sh-bar { position: sticky; top: var(--nav-h); z-index: 30; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); padding: 10px 0; }
.sh-bar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sh-pills { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sh-pill { position: relative; }
.sh-pill-btn, .sh-all-btn { min-height: 40px; padding: 0 14px 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); display: inline-flex; align-items: center; gap: 8px; font-size: .8125rem; font-weight: 500; color: var(--fg); transition: border-color .3s ease, background-color .3s ease, color .3s ease; white-space: nowrap; }
.sh-pill-btn svg, .sh-all-btn svg { width: 14px; height: 14px; transition: transform .3s ease; }
.sh-pill-btn:hover, .sh-all-btn:hover { border-color: var(--fg); }
.sh-pill-btn[aria-expanded="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.sh-pill-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.sh-pill.is-active .sh-pill-btn { border-color: var(--fg); }
.sh-pill-n { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--bone); font-size: .6875rem; display: inline-grid; place-items: center; }
.sh-pill-n[hidden] { display: none; }
.sh-dd { position: absolute; left: 0; top: calc(100% + 8px); z-index: 40; min-width: 260px; background: var(--bg); color: var(--fg); border: 1px solid var(--line); box-shadow: 0 24px 48px rgba(26,27,29,.14); transform-origin: top left; }
.sh-dd[hidden] { display: none; }
.sh-dd-body { padding: 8px 6px; max-height: 60vh; overflow: auto; }
.sh-dd-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px 10px; border-top: 1px solid var(--line); }
.sh-check { position: relative; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 6px; cursor: pointer; font-size: .875rem; }
.sh-check:hover { background: rgba(26,27,29,.04); }
.sh-check input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.sh-box { width: 18px; height: 18px; border: 1px solid var(--line-strong); border-radius: 4px; display: grid; place-items: center; flex: 0 0 auto; transition: background-color .2s ease, border-color .2s ease; }
.sh-radio .sh-box { border-radius: 50%; }
.sh-box::after { content: ""; width: 10px; height: 6px; border-left: 2px solid var(--bg); border-bottom: 2px solid var(--bg); transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.sh-radio .sh-box::after { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--bg); transform: none; }
.sh-check:has(input:checked) .sh-box { background: var(--fg); border-color: var(--fg); }
.sh-check:has(input:checked) .sh-box::after { opacity: 1; }
.sh-check:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: -2px; }
.sh-check .sw { width: 16px; height: 16px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); flex: 0 0 auto; }
.sh-check-label { flex: 1; }
.sh-check em { font-style: normal; font-size: .6875rem; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: rgba(26,27,29,.06); display: inline-grid; place-items: center; color: var(--fg-2); }
.sh-check.is-empty { opacity: .45; }
.sh-right { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.sh-right .sh-dd { left: auto; right: 0; transform-origin: top right; }
.sh-count { font-size: .8125rem; color: var(--fg-2); white-space: nowrap; }
/* chips of active filters */
.sh-active { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.sh-active:empty { display: none; }
.sh-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 10px 0 12px; border-radius: 999px; background: var(--fg); color: var(--bg); font-size: .75rem; font-weight: 500; }
.sh-chip svg { width: 12px; height: 12px; }
.sh-clear-all { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); margin-left: 4px; }
.sh-clear-all:hover { color: var(--fg); }
/* drawer */
.sh-drawer-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(26,27,29,.4); opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.sh-drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.sh-drawer { position: fixed; top: 0; left: 0; bottom: 0; z-index: 91; width: min(380px, 92vw); background: var(--bg); color: var(--fg); transform: translateX(-102%); transition: transform .5s var(--ease-out); display: grid; grid-template-rows: auto 1fr auto; box-shadow: 24px 0 48px rgba(26,27,29,.12); }
.sh-drawer.is-open { transform: none; }
.sh-drawer { grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.sh-drawer > * { min-width: 0; }
.sh-drawer-body { overflow-x: hidden; }
@media (max-width: 767px) { .sh-drawer-foot { padding: 12px 14px; gap: 8px; } .sh-drawer-foot .btn { min-width: 0; padding: 0 14px; font-size: .75rem; letter-spacing: .1em; } }
.sh-drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.sh-drawer-head h2 { font-size: 1rem; font-weight: 500; }
.sh-drawer-body { overflow: auto; padding: 8px 14px 24px; }
.sh-drawer-foot { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }
.sh-drawer-foot .btn { flex: 1; }
.sh-group { padding: 14px 0 6px; border-bottom: 1px solid var(--line); }
.sh-group summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 6px; font-weight: 500; font-size: .9375rem; }
.sh-group summary::-webkit-details-marker { display: none; }
.sh-group summary svg { width: 14px; height: 14px; transition: transform .3s ease; }
.sh-group[open] summary svg { transform: rotate(180deg); }
.sh-group-body { padding: 6px 0 8px; }
.sh-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px 8px; padding: 6px 6px 22px; }
.sh-swatch { position: relative; aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; cursor: pointer; }
.sh-swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.sh-swatch .sw { width: 24px; height: 24px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.sh-swatch:has(input:checked) { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); }
.sh-swatch-label { position: absolute; left: 0; right: 0; bottom: -18px; font-size: .625rem; text-align: center; color: var(--fg-2); }
/* grid */
.sh-grid-wrap { padding: clamp(20px, 3vw, 32px) 0 var(--section-sm); }
.delivery { display: grid; gap: 28px; padding: var(--section-sm) 0 0; border-top: 1px solid var(--line); margin-top: var(--section-sm); }
@media (min-width: 768px) { .delivery { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.delivery h3 { font-family: var(--font-display); font-weight: 300; font-size: 1.5rem; }
.delivery p { color: var(--fg-2); font-size: .9375rem; margin-top: 8px; max-width: 26ch; }
@media (max-width: 767px) {
  .shop-head p { display: none; }
  .sh-bar { position: static; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .sh-bar .wrap { flex-wrap: wrap; }
  .sh-pills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); width: calc(100% + var(--gutter) * 2); }
  .sh-pills::-webkit-scrollbar { display: none; }
  /* dropdowns become a bottom sheet on phones */
  .sh-dd, .sh-right .sh-dd { position: fixed; left: 10px; right: 10px; top: auto; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 96; min-width: 0; border-radius: 16px; transform-origin: bottom center; box-shadow: 0 -10px 40px rgba(26,27,29,.28); }
  .sh-dd-body { max-height: 50vh; }
  .sh-dd::before { content: attr(data-dd-title); display: block; padding: 16px 18px 4px; font-size: .9375rem; font-weight: 600; }
  .sh-right { width: 100%; justify-content: space-between; }
}
