/* ===== Store shell ===== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: saturate(1.2) blur(8px);
    backdrop-filter: saturate(1.2) blur(8px);
    border-block-end: 1px solid var(--hair);
}
.brand-sm {
    font-family: var(--font-display);
    font-size: 18px;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
}
.brand-sm span { font-family: var(--font-text); font-size: 11px; color: var(--ink-3); letter-spacing: 0; margin-inline-start: 6px; }
.cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--hair);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}
.cart-btn:hover { background: rgba(77, 53, 51, 0.04); }
.cart-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.cart-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.badge {
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--wa);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}
.badge[hidden] { display: none; }

.page-narrow { max-width: 720px; }

/* Hero */
.hero { display: flex; flex-direction: column; gap: 14px; }
.hero h1 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 30px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.hero p { margin: 0; color: var(--ink-2); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 4px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid var(--ink);
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 120ms ease, background 120ms ease;
}
.btn:hover { opacity: 0.9; }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--hair); }
.btn-ghost:hover { background: rgba(77, 53, 51, 0.04); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* Category tiles */
.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 104px;
    padding: 16px;
    border: 1px solid var(--hair);
    border-radius: 16px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    text-align: start;
}
a.cat:hover { background: var(--raised); }
.cat-name { font-size: 15px; font-weight: 600; line-height: 1.4; }
.cat-sub { font-size: 12px; line-height: 1.5; color: var(--ink-2); }
.cat-count { margin-block-start: auto; font-size: 12px; font-weight: 600; color: var(--teal); }
.cat.is-soon { background: var(--raised); border-style: dashed; }
.cat.is-soon .cat-count { color: var(--ink-3); font-weight: 400; }

/* Product grid */
.grid { display: grid; gap: 34px; }
.product { display: grid; gap: 12px; }
.product .media { border-radius: 20px; }
.product-link { display: block; }
.product .title { font-size: 18px; }
.card-actions { display: flex; flex-direction: column; gap: 8px; }

/* Steps */
.steps { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.steps li::before {
    counter-increment: step;
    content: counter(step);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--raised);
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 600;
    line-height: 26px;
    text-align: center;
}
.steps b { display: block; font-size: 14px; font-weight: 600; }
.steps span { color: var(--ink-2); font-size: 13px; }

/* Notice */
.notice {
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--hair);
    border-radius: 14px;
    background: var(--raised);
    color: var(--ink-2);
    font-size: 12px;
    line-height: 1.7;
}

/* Product detail */
.back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ink-2);
    font-size: 13px;
    text-decoration: none;
}
.back:hover { color: var(--ink); }
.gallery { display: grid; gap: 8px; }
.shots { display: flex; gap: 8px; overflow-x: auto; padding-block-end: 2px; }
.shot {
    flex: none;
    width: 72px;
    height: 54px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    background: var(--raised);
    cursor: pointer;
}
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shot.is-on { border-color: var(--teal); }
.shot:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.detail-head { display: grid; gap: 10px; }
.detail-head h1 { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.35; }
.detail-head .place { margin: 0; font-size: 13px; color: var(--ink-2); }
.blurb { margin: 0; color: var(--ink-2); }

/* Order form */
.form-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--hair);
    border-radius: 18px;
    background: #fff;
}
.form-card h2 { margin: 0; font-size: 17px; font-weight: 600; }
.field { display: grid; gap: 6px; }
.field > label, .field-label { color: var(--ink-2); font-size: 12px; }
.field input, .field select, .field textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--hair);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
}
.field textarea { min-height: 72px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.field input[type="date"] { direction: ltr; text-align: right; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg { display: flex; gap: 8px; }
.seg button {
    flex: 1;
    min-height: 44px;
    border: 1px solid var(--hair);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }
.seg button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Price calculator */
.calc { display: grid; gap: 8px; padding: 14px 16px; border-radius: 14px; background: var(--raised); }
.calc-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-2); }
.calc-row b { color: var(--ink); font-size: 15px; font-weight: 600; }
.calc-total { padding-block-start: 8px; border-block-start: 1px solid var(--hair); }
.calc-total b { font-size: 18px; }
.hint { margin: 0; color: var(--ink-3); font-size: 12px; line-height: 1.6; }
.hint.is-error { color: #a8322a; }

/* Cart */
.cart-lines { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.line {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 12px;
    align-items: start;
    padding: 14px;
    border: 1px solid var(--hair);
    border-radius: 14px;
}
.line-thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--raised); display: grid; place-items: center; }
.line-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.line-thumb .arch { width: 22px; height: 28px; margin: 0; border-start-start-radius: 11px; border-start-end-radius: 11px; }
.line-body { display: grid; gap: 4px; min-width: 0; }
.line-title { font-size: 14px; font-weight: 600; line-height: 1.4; }
.line-meta { font-size: 12px; line-height: 1.6; color: var(--ink-2); }
.line-price { font-size: 14px; font-weight: 600; white-space: nowrap; }
.line-remove {
    justify-self: start;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink-3);
    font-family: inherit;
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.line-remove:hover { color: var(--ink); }
.summary { display: grid; gap: 6px; padding: 16px; border-radius: 14px; background: var(--raised); }
.summary-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-2); }
.summary-row b { color: var(--ink); font-size: 16px; }

/* Sticky checkout bar */
.sticky {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.97);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-block-start: 1px solid var(--hair);
}
.sticky[hidden] { display: none; }
.sticky-info { display: grid; gap: 1px; font-size: 12px; color: var(--ink-2); }
.sticky-info b { font-size: 15px; color: var(--ink); }
.sticky .btn { min-height: 44px; padding: 0 18px; }
body.has-sticky .page { padding-block-end: 96px; }

/* Toast */
.toast {
    position: fixed;
    inset-inline: 16px;
    inset-block-end: calc(80px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 14px;
    background: var(--ink);
    color: #fff;
    font-size: 13px;
    box-shadow: 0 10px 30px rgba(77, 53, 51, 0.22);
}
.toast[hidden] { display: none; }
.toast a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

@media (min-width: 768px) {
    .grid { grid-template-columns: 1fr 1fr; gap: 34px; }
    .cats { grid-template-columns: repeat(4, 1fr); }
    .hero h1 { font-size: 38px; }
    .sticky { inset-inline: auto; inset-block-end: 24px; inset-inline-end: 24px; border: 1px solid var(--hair); border-radius: 16px; box-shadow: 0 10px 30px rgba(77, 53, 51, 0.12); }
    .detail { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
}

/* anchors under the sticky bar */
.section[id] { scroll-margin-top: 64px; }
.tagline-sm { margin: 0; color: var(--ink-2); font-size: 13px; }

/* images must never blow the grid out */
img { max-width: 100%; }
.media img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.grid { grid-template-columns: minmax(0, 1fr); }
.product { min-width: 0; }
.line-body { min-width: 0; }
@media (min-width: 768px) {
    .grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* product link must not look like a link */
a.product-link { display: block; color: inherit; text-decoration: none; }
a.product-link .blank-name, a.product-link .blank-place { color: inherit; }

/* ===== availability ===== */
.avail-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--hair);
    border-radius: 10px;
    background: #fff;
    color: var(--ink-2);
    font-size: 12px;
    line-height: 1.6;
}
.avail-strip.is-bad { background: #fdf3f2; border-color: rgba(168, 50, 42, 0.25); color: #a8322a; }
.avail-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); flex: none; }
.avail-strip.is-bad .avail-dot { background: #a8322a; }
.avail-loading { padding: 24px 0; text-align: center; color: var(--ink-2); font-size: 13px; }
.link-btn { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

.cal { padding: 10px; border: 1px solid var(--hair); border-radius: 14px; background: #fff; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-block-end: 6px; }
.cal-month { font-size: 14px; font-weight: 600; }
.cal-nav {
    width: 34px;
    height: 34px;
    border: 1px solid var(--hair);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}
.cal-nav:hover { background: var(--raised); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { padding-block: 4px; color: var(--ink-3); font-size: 11px; text-align: center; }
.cal-day {
    min-height: 38px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}
.cal-day:hover:not(:disabled) { background: var(--raised); }
.cal-day:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.cal-day.is-past { color: var(--ink-3); background: transparent; cursor: default; }
.cal-day.is-booked { color: var(--ink-3); text-decoration: line-through; background: rgba(77, 53, 51, 0.07); cursor: not-allowed; }
.cal-day.is-in-range { background: rgba(115, 168, 154, 0.18); }
.cal-day.is-start, .cal-day.is-end { background: var(--teal); color: #fff; font-weight: 600; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 8px; color: var(--ink-2); font-size: 11px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sw-free, .sw-booked, .sw-picked { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw-free { background: #fff; border: 1px solid var(--hair); }
.sw-booked { background: rgba(77, 53, 51, 0.22); }
.sw-picked { background: var(--teal); }
.picked { color: var(--ink-2); font-size: 13px; line-height: 1.7; }
.picked b { color: var(--ink); }

.line.is-bad { border-color: rgba(168, 50, 42, 0.35); background: #fdf3f2; }
.line-bad { color: #a8322a; font-size: 12px; line-height: 1.6; }
.wa.is-off { opacity: 0.5; }
.warn {
    padding: 12px 14px;
    border: 1px solid rgba(168, 50, 42, 0.25);
    border-radius: 12px;
    background: #fdf3f2;
    color: #a8322a;
    font-size: 12px;
    line-height: 1.7;
}

/* hidden must win over component display rules */
[hidden] { display: none !important; }
.cal-day { display: grid; place-items: center; text-align: center; }

/* ===== car spec table ===== */
.kv {
    display: grid;
    gap: 6px;
    margin: 0 0 14px;
    padding: 14px 16px;
    border: 1px solid var(--hair);
    border-radius: 14px;
    background: #fff;
}
.kv-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; line-height: 1.6; }
.kv dt { margin: 0; color: var(--ink-2); }
.kv dd { margin: 0; color: var(--ink); font-weight: 600; }

/* car photos are portrait: show the whole frame */
.product.is-car .media img { object-fit: contain; background: var(--raised); }
.is-car-page .media img { object-fit: contain; background: var(--raised); }

.amount.is-label { font-size: 15px; font-weight: 600; line-height: 1.6; }

/* car photos are 3:4 portrait — match the frame instead of letterboxing */
.product.is-car .media img { aspect-ratio: 3 / 4; object-fit: cover; }
.is-car-page .media img { aspect-ratio: 3 / 4; object-fit: cover; max-height: 78vh; }
