.intro { padding: 2.5rem 0 1.5rem; }
.intro h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; margin: 0 0 0.5rem; }

.cart-count { display: inline-block; min-width: 1.4rem; padding: 0 0.4rem; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 0.8rem; text-align: center; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.25rem; padding-bottom: 4rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.card-img { aspect-ratio: 3 / 4; background: var(--line); }
.card-img img, .img-placeholder { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-placeholder { display: grid; place-items: center; color: var(--muted); }
.card-body { padding: 1rem; display: grid; gap: 0.75rem; }
.card-body h2 { margin: 0; font-size: 1.1rem; }
.card-body p { margin: 0; }
.price { font-size: 1.25rem; font-weight: 600; }
.card-msg { min-height: 1.2em; font-size: 0.85rem; color: var(--muted); }
.row { display: flex; gap: 0.75rem; align-items: center; justify-content: space-between; }

.seg { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg-btn { flex: 1; padding: 0.45rem 0.6rem; background: transparent; border: 0; cursor: pointer; font: inherit; color: var(--ink); }
.seg-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.stepper button { width: 2rem; height: 2rem; border: 0; background: transparent; font-size: 1.1rem; cursor: pointer; color: var(--ink); }
.stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.stepper span { min-width: 1.5rem; text-align: center; }

.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); z-index: 40; }
.cart-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--surface); z-index: 50; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem; border-bottom: 1px solid var(--line); }
.cart-head h2 { margin: 0; font-size: 1.1rem; }
.cart-lines { list-style: none; margin: 0; padding: 1rem; display: grid; gap: 1rem; overflow: auto; flex: 1; align-content: start; }
.cart-empty { padding: 1rem; margin: 0; }
.cart-line { display: grid; grid-template-columns: 56px 1fr auto; gap: 0.75rem; align-items: center; }
.cart-thumb { width: 56px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--line); }
.cart-line-name { margin: 0; font-weight: 600; }
.cart-foot { padding: 1rem; border-top: 1px solid var(--line); display: grid; gap: 0.5rem; }
.cart-total { display: flex; justify-content: space-between; font-size: 1.1rem; }

.track-link { display: block; text-align: right; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 3px; margin-bottom: 0.75rem; }

.card-body { padding: 0.65rem; gap: 0.5rem; }
.card-body h2 { font-size: 0.95rem; }
.price { font-size: 1.05rem; }
.seg-btn { padding: 0.3rem 0.2rem; font-size: 0.78rem; }
.row { flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.card .row .btn { flex: 1 1 100%; padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.stepper button { width: 1.8rem; height: 1.8rem; }

.track-top { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; color: var(--ink); border-bottom: 1px solid currentColor; padding-bottom: 2px; }

.grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.grid .card { flex: 0 0 calc((100% - 0.75rem) / 2); min-width: 0; }
.grid > p { flex: 1 1 100%; text-align: center; }
@media (min-width: 720px) {
  .grid { gap: 1rem; }
  .grid .card { flex-basis: calc((100% - 3rem) / 4); }
}
@media (min-width: 1000px) {
  .grid .card { flex-basis: calc((100% - 4rem) / 5); }
}

.cart-line { grid-template-columns: 80px 1fr auto; }
.cart-thumb { width: 80px; height: 106px; }

.price-row { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.card-body > .btn { width: 100%; padding: 0.4rem 0.8rem; font-size: 0.85rem; }

.shop-tools { display: flex; gap: 0.5rem; align-items: stretch; max-width: 520px; margin: 0 auto 1rem; }
.cat-wrap { position: relative; flex: 1; min-width: 0; }
.cat { width: 100%; height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0 0.95rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; cursor: pointer; }
.cat-label { font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat .icon { width: 16px; height: 16px; color: var(--muted); }
.cat-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px; max-width: 80vw; max-height: 60vh; overflow: auto; padding: 0.3rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); z-index: 20; }
.cat-item { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; width: 100%; padding: 0.55rem 0.8rem; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 0.9rem; text-align: left; cursor: pointer; }
.cat-item:hover, .cat-item:focus-visible { background: var(--bg); }
.cat-item[aria-selected="true"] { font-weight: 600; }
.cat-item .icon { width: 16px; height: 16px; }

.search { display: flex; flex: none; }
.search-btn { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.search-field { display: none; align-items: center; gap: 0.5rem; width: 100%; height: 42px; padding: 0 0.5rem 0 0.9rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.search-field:focus-within { border-color: var(--ink); }
.search-field .icon { width: 16px; height: 16px; color: var(--muted); flex: none; }
.search-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; -webkit-appearance: none; appearance: none; }
.search-x { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; flex: none; }

.shop-tools.searching .search { flex: 1; min-width: 0; }
.shop-tools.searching .search-btn { display: none; }
.shop-tools.searching .search-field { display: flex; }
.shop-tools.searching .cat-wrap { flex: none; width: 52px; }
.shop-tools.searching .cat { padding: 0; justify-content: center; }
.shop-tools.searching .cat-label { display: none; }

.shop-tools.no-cats { justify-content: flex-end; }
.shop-tools.no-cats .search-btn { width: 36px; height: 36px; border-color: transparent; background: transparent; color: var(--muted); }
.shop-tools.no-cats .search-btn:hover { color: var(--ink); }
.shop-tools.no-cats.searching .search { flex: 1; }

.card-btn { font: inherit; color: inherit; text-align: left; padding: 0; cursor: pointer; appearance: none; -webkit-appearance: none; }
.card-btn:hover { border-color: var(--ink); }
.card-btn .card-body { gap: 0.15rem; }
.card-btn h2 { margin: 0; font-size: 0.9rem; line-height: 1.25; }
.card-btn .price { margin: 0; font-size: 0.9rem; font-weight: 500; color: var(--muted); }

.cover-dialog { padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); width: min(420px, 92vw); max-height: 86vh; overflow: auto; }
.cover-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.cd-body { padding: 1rem; display: grid; gap: 0.9rem; }
.cd-img { width: 100%; max-height: 38vh; object-fit: contain; border-radius: 10px; background: var(--line); }
.cd-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.cd-head h2 { margin: 0; font-size: 1.15rem; }
.cd-price { margin: 0; font-size: 1.15rem; font-weight: 600; }
.opt-label { margin: 0 0 0.3rem; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.cd-buy { display: flex; align-items: center; gap: 0.75rem; }
.cd-buy .btn { flex: 1; }
.cd-desc { margin: 0; font-size: 0.9rem; }
.cd-details { margin: 0; padding-left: 1.1rem; font-size: 0.88rem; color: var(--muted); }

.cover-dialog { width: min(420px, 86vw); max-height: 78vh; scrollbar-width: none; -ms-overflow-style: none; }
.cover-dialog::-webkit-scrollbar { display: none; }
.cd-body:focus { outline: none; }
.cd-body { gap: 0.75rem; }
.cd-img { display: block; width: auto; max-width: 100%; max-height: 32vh; margin: 0 auto; object-fit: contain; border-radius: 10px; background: none; }
.cd-body .card-msg { min-height: 0; margin: 0; }
.cd-body .card-msg:empty { display: none; }
.cd-body .seg { display: inline-flex; }
.cd-body .seg-btn { flex: none; padding: 0.6rem 1.15rem; font-size: 0.9rem; }
.cd-desc { white-space: pre-line; }

.cd-body .seg { display: flex; width: fit-content; margin: 0 auto; }
.cd-body .seg-btn { padding: 0.4rem 1.1rem; font-size: 0.88rem; }
.cd-body .opt-label { text-align: center; }

.cd-body .seg { width: 56%; min-width: 220px; max-width: 100%; }
.cd-body .seg-btn { flex: 1; }