/* Category and product pages. Builds on site.css tokens. */

.sw { display: inline-block; flex: none; width: 22px; height: 22px; border-radius: 999px; border: 1px solid #D6CFC3; }
.sw-white { background: #FFFFFF; }
.sw-yellow { background: #F2C230; }
.sw-blue { background: #1F5FBF; }
.sw-red { background: #D4342E; }
.sw-green { background: #2F8D55; }
.sw-orange { background: #F07F1E; }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 14px; }
.crumbs li { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.crumbs li + li::before { content: "/"; color: #A5A1AD; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current="page"] { color: var(--ink); overflow-wrap: anywhere; }
.crumbs-top { padding-top: 20px; }
@media (min-width: 768px) { .crumbs-top { padding-top: 28px; } }

.h-page { font-size: clamp(44px, 5.2vw, 72px); line-height: .95; font-weight: 800; font-stretch: 116%; letter-spacing: -.035em; }
.h-product { font-size: clamp(34px, 3.6vw, 52px); line-height: 1.02; font-weight: 800; font-stretch: 114%; letter-spacing: -.03em; }
.h-guide { font-size: clamp(26px, 2.5vw, 36px); line-height: 1.04; font-weight: 750; font-stretch: 110%; letter-spacing: -.025em; }

/* Category hero */
.cat-hero { display: grid; gap: 24px; padding-top: 20px; padding-bottom: 28px; }
@media (min-width: 1000px) { .cat-hero { grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; padding-top: 32px; padding-bottom: 40px; } }
.cat-hero-copy { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 768px) { .cat-hero-copy { gap: 20px; } }
.cat-intro { font-size: 16px; line-height: 1.65; color: var(--ink-2); max-width: 640px; }
@media (min-width: 768px) { .cat-intro { font-size: 18px; } }

.subtabs { display: flex; flex-wrap: wrap; gap: 8px; }
.subtabs button { height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-size: 15px; }
.subtabs button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); font-weight: 600; }

.cat-banner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--white); border: 1px solid var(--line); }
@media (min-width: 1000px) { .cat-banner { border-radius: 32px; } }
.cat-banner .ph { height: 110px; }
@media (min-width: 640px) { .cat-banner .ph { height: 180px; } }
@media (min-width: 1000px) { .cat-banner .ph { height: 300px; } }
.cat-banner img { object-fit: contain; padding: 8px; }

/* Catalogue body */
.catalogue { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding-bottom: var(--section-gap); }
@media (min-width: 1000px) { .catalogue { grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: start; padding-top: 24px; } }
.cat-filterbar { display: flex; }
@media (min-width: 1000px) { .cat-filterbar { display: none; } }
.filters-toggle { width: 100%; }
.filters-toggle[aria-expanded="true"] { box-shadow: inset 0 0 0 1.5px var(--ink); }

.filters { display: none; flex-direction: column; padding: 4px 16px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line); }
.filters.is-open { display: flex; }
@media (min-width: 1000px) {
  .filters, .filters.is-open { display: flex; padding: 0; border: 0; border-radius: 0; background: transparent; }
}
.filters-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 0 14px; }
.filters-title { font-size: 18px; font-weight: 700; }
.linkbtn { height: 44px; border: 0; background: transparent; color: var(--accent-ink); font-size: 14px; font-weight: 600; padding: 0 4px; }
.linkbtn:hover { text-decoration: underline; text-underline-offset: 3px; }
.facet { padding: 16px 0; border-top: 1px solid var(--line); }
.facet summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15.5px; font-weight: 700; list-style: none; cursor: pointer; }
.facet summary::-webkit-details-marker { display: none; }
.facet .pm { width: 30px; height: 30px; }
.facet-options { padding-top: 8px; }
.facet-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; font-size: 15px; color: var(--ink-2); cursor: pointer; }
.facet-label { display: flex; align-items: center; gap: 12px; min-width: 0; }
.facet-label input { width: 20px; height: 20px; flex: none; margin: 0; accent-color: var(--violet); }
.facet-count { font-size: 13px; color: var(--muted); }

.cat-results { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
@media (min-width: 768px) { .cat-results { gap: 22px; } }
.cat-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.cat-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.cat-count { font-size: 16px; font-weight: 700; }
.fchips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 4px 0 14px; border-radius: 999px; background: var(--chip); font-size: 14px; }
.fchip button { width: 30px; height: 30px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); display: grid; place-items: center; }
.fchip button:hover { color: var(--ink); }
.fchip .i { width: 15px; height: 15px; }
.cat-sort { display: flex; align-items: center; gap: 10px; }
.cat-sort label { font-size: 14px; color: var(--muted); white-space: nowrap; }
.cat-sort select { height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-size: 16px; }
@media (min-width: 768px) { .cat-sort select { font-size: 15px; } }
.cat-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 28px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line); }
.cat-empty p { font-size: 16px; color: var(--ink-2); }

/* Guides */
.guides { display: grid; gap: 12px; }
@media (min-width: 900px) { .guides { grid-template-columns: 1fr 1fr; gap: 16px; } }
.guide { display: flex; flex-direction: column; gap: 14px; padding: 24px 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
@media (min-width: 768px) { .guide { gap: 16px; padding: 40px; border-radius: 28px; } }
.guide p { font-size: 15.5px; line-height: 1.7; color: var(--ink-2); }
@media (min-width: 768px) { .guide p { font-size: 16px; } }
.convention { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 480px) { .convention { grid-template-columns: 1fr 1fr; } }
.convention li { display: flex; align-items: center; gap: 10px; font-size: 15px; }

/* Product */
.product { display: grid; gap: 24px; padding-top: 18px; padding-bottom: var(--section-gap); }
@media (min-width: 1000px) { .product { grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: start; padding-top: 24px; } }
.gallery { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.gallery-main { height: 320px; border-radius: var(--radius-lg); border: 1px solid var(--line); }
@media (min-width: 768px) { .gallery-main { height: 460px; } }
@media (min-width: 1000px) { .gallery-main { height: 560px; border-radius: 32px; } }
.gallery-main img { width: min(80%, 400px); height: auto; max-height: 92%; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 768px) { .gallery-thumbs { gap: 12px; } }
.gallery-thumb { padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--white); }
.gallery-thumb[aria-current="true"] { border: 2px solid var(--violet); }
.gallery-thumb .ph { height: 76px; }
@media (min-width: 768px) { .gallery-thumb .ph { height: 110px; } }

.pinfo { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
@media (min-width: 768px) { .pinfo { gap: 24px; } }
.chip-strong { height: 32px; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.pinfo-lede { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
@media (min-width: 768px) { .pinfo-lede { font-size: 17.5px; } }
.std-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.picker { display: flex; flex-direction: column; gap: 12px; }
.picker-label { font-size: 15px; font-weight: 700; }
.picker-label span { font-weight: 500; color: var(--ink-2); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 48px; height: 48px; border-radius: 999px; border: 3px solid transparent; padding: 3px; background: transparent; }
.swatch .sw { display: block; width: 100%; height: 100%; }
.swatch[aria-checked="true"] { border-color: var(--violet); background: var(--white); }

.buy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.stepper { display: flex; align-items: center; height: 58px; padding: 0 6px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); }
.stepper button { width: 46px; height: 46px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); display: grid; place-items: center; }
.stepper button .i { width: 20px; height: 20px; }
.stepper input { width: 64px; height: 46px; border: 0; background: transparent; color: var(--ink); text-align: center; font-size: 17px; font-weight: 700; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy-add { flex: 1 1 200px; height: 58px; font-size: 17px; }
.buy-wa { width: 58px; height: 58px; flex: none; border-radius: 999px; background: var(--green); color: var(--white); display: grid; place-items: center; }
.buy-wa .i { width: 24px; height: 24px; }
@media (max-width: 479px) { .buy-add { order: 3; flex-basis: 100%; } }

.sheetlink { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border-radius: 20px; background: var(--tint); color: var(--plum); text-decoration: none; }
.sheetlink:hover { box-shadow: inset 0 0 0 1.5px var(--violet-deep); }
.sheetlink-in { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sheetlink .i { color: var(--violet-deep); width: 22px; height: 22px; }
.sheetlink-in > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sheetlink-title { font-size: 16px; font-weight: 700; }
.sheetlink-sub { font-size: 14px; color: #4D1889; }

.assure { display: flex; flex-direction: column; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.assure li { display: flex; align-items: center; gap: 14px; padding: 16px 20px; font-size: 15px; }
.assure li + li { border-top: 1px solid var(--line); }
.assure .i { color: var(--accent-ink); width: 20px; height: 20px; }

.pdetail { display: grid; gap: 32px; }
@media (min-width: 1000px) { .pdetail { grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; } }
.pdetail-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
@media (min-width: 768px) { .pdetail-col { gap: 20px; } }
.spec { border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.spec table { width: 100%; border-collapse: collapse; }
.spec tr + tr { border-top: 1px solid var(--line); }
.spec th { width: 38%; padding: 13px 16px; text-align: left; vertical-align: top; font-size: 14.5px; font-weight: 600; color: var(--muted); }
.spec td { padding: 13px 16px; font-size: 15.5px; overflow-wrap: anywhere; }
@media (min-width: 768px) { .spec th, .spec td { padding: 15px 24px; } .spec th { font-size: 15px; } }
.apps { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line); }
@media (min-width: 768px) { .apps { padding: 28px; } }
.apps li { display: flex; gap: 12px; font-size: 16px; line-height: 1.5; }
.apps .i { color: var(--green); width: 20px; height: 20px; margin-top: 2px; stroke-width: 2.2; }
.care { font-size: 16px; line-height: 1.7; color: var(--ink-2); }
