/* ───────────────────────────────────────────────────────────────
   Yard Toolkit — public store stylesheet. Loaded after app.css, which
   supplies the tokens and the shared components (card, btn, field,
   badge, flash, table). Phone-first: single column, large tap targets.
   ─────────────────────────────────────────────────────────────── */

.store { min-height: 100vh; display: flex; flex-direction: column; overflow-x: clip; }

/* Width of the centred column. Wide pages (the order form) open it up on
   a desktop screen; see the "Wider screens" section at the end. */
.store { --store-width: 46rem; }

.store__header {
    background: var(--color-primary-darker);
    padding: 0.7rem 1rem;
}
.store__header-inner {
    max-width: var(--store-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.store__brand { display: inline-flex; align-items: center; gap: 0.75rem; min-width: 0; }
.store__brand:hover { text-decoration: none; }
.store__logo { width: 3.4rem; height: 3.4rem; object-fit: contain; flex: none; }
.store__wordmark { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.store__name {
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.store__tagline {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}
.store__phone {
    flex: none;
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-pill);
    white-space: nowrap;
}
.store__phone:hover { background: rgba(255, 255, 255, 0.10); text-decoration: none; }
@media (max-width: 480px) {
    .store__logo { width: 2.8rem; height: 2.8rem; }
    .store__name { font-size: 0.98rem; letter-spacing: 0.1em; }
    .store__phone { font-size: 0.8rem; padding: 0.4rem 0.65rem; }
}

.store__main {
    flex: 1;
    width: 100%;
    max-width: var(--store-width);
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}
.store__main .flash-strip { padding: 0 0 1rem; }

.store__footer {
    text-align: center;
    padding: 1.6rem 1rem 1.8rem;
    font-size: 0.8rem;
    line-height: 1.7;
    background: var(--color-primary-darker);
    color: rgba(255, 255, 255, 0.5);
}
.store__footer a { color: rgba(255, 255, 255, 0.8); }
.store__footer-name {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
}

/* ─── Hero ───────────────────────────────────────────────────── */
.store-hero { margin-bottom: 1.5rem; }
.store-hero h1 { font-size: 1.9rem; line-height: 1.12; letter-spacing: -0.028em; }
.store-hero p { color: var(--color-text-muted); margin-top: 0.5rem; }
/* With a banner photo: the heading sits on the photo under a dark wash. */
.store-hero--photo {
    position: relative;
    margin: -1.5rem -1rem 1.5rem;
    padding: 3.2rem 1.4rem 1.6rem;
    background-size: cover;
    background-position: center;
    color: #fff;
}
.store-hero--photo::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.58); }
.store-hero--photo > * { position: relative; }
.store-hero--photo h1 { color: #fff; font-size: 2.3rem; }
.store-hero--photo p { color: rgba(255, 255, 255, 0.85); }
.store-hero--photo .store-facts span {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
}
.store-facts { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.9rem; }
.store-facts span {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-pill);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
}

/* ─── Steps ──────────────────────────────────────────────────── */
.store-step { margin-top: 1rem; }
.store-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    margin-right: 0.5rem;
    border-radius: var(--radius-pill);
    background: var(--color-primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    vertical-align: 0.1em;
}

/* ─── Products ───────────────────────────────────────────────── */
.store-category { margin-top: 1.2rem; }
.store-category:first-of-type { margin-top: 0; }
.store-category h3 { font-size: 1rem; }
.store-category__days { font-size: 0.82rem; color: var(--color-text-muted); margin: 0.1rem 0 0.6rem; }
.store-category__blurb { font-size: 0.92rem; line-height: 1.55; color: var(--color-text); margin: 0 0 0.8rem; max-width: 38rem; }

.store-product {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
}
.store-product + .store-product { margin-top: 0.5rem; }
.store-product.is-chosen { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(43, 130, 79, 0.10); }
.store-product.is-sold-out { background: var(--color-bg-soft); }
.store-product.is-sold-out .store-product__name,
.store-product.is-sold-out .store-product__price { color: var(--color-text-mutest); }
.store-product__image {
    width: 4.5rem;
    height: 4.5rem;
    flex: none;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border-soft);
}
.store-product__body { flex: 1; min-width: 0; }
.store-product__name { font-weight: 500; }
.store-product__desc { font-size: 0.82rem; color: var(--color-text-muted); margin-top: 0.1rem; }
.store-product__price { font-weight: 600; color: var(--color-primary-darker); white-space: nowrap; }
.store-product__qty { width: 4.2rem; flex: none; }
.store-product__qty input {
    width: 100%;
    padding: 0.5rem 0.4rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 1rem;
    background: var(--color-bg);
}
.store-product__qty input:focus { outline: none; border-color: var(--color-primary); }

.store-subtotal {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--color-border-soft);
    font-weight: 600;
}

/* ─── Form rows ──────────────────────────────────────────────── */
.store-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.8rem; }
.store-row--address { grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 560px) {
    .store-row, .store-row--address { grid-template-columns: 1fr; }
    .store-hero h1 { font-size: 1.6rem; }
    .store-hero--photo h1 { font-size: 1.9rem; }
    .store-facts span { border-radius: var(--radius-sm); }

    /* Product name gets the full width; price and quantity sit beneath it. */
    .store-product { flex-wrap: wrap; row-gap: 0.5rem; }
    .store-product__body { flex-basis: 100%; }
    .store-product__image + .store-product__body { flex-basis: calc(100% - 5.4rem); }
    .store-product__price { margin-right: auto; }
}
.store .field input, .store .field select, .store .field textarea { font-size: 1rem; padding: 0.65rem 0.75rem; }
.store-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.store-submit { margin-top: 1.2rem; }
.store-submit .btn { width: 100%; padding: 0.85rem 1rem; font-size: 1rem; }
.store-submit .btn + .btn { margin-top: 0.5rem; }
.store-pay-note { text-align: center; font-size: 0.85rem; color: var(--color-text-muted); margin-top: 0.7rem; }
.store-privacy { text-align: center; font-size: 0.78rem; color: var(--color-text-mutest); margin-top: 0.5rem; }
.store-privacy a { color: var(--color-text-muted); text-decoration: underline; text-underline-offset: 2px; }
.store-privacy a:hover { color: var(--color-primary); }

/* ─── Summary (review + placed order) ────────────────────────── */
.store-summary { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.store-summary td { padding: 0.45rem 0; vertical-align: top; }
.store-summary td:last-child { text-align: right; white-space: nowrap; }
.store-summary tr.is-total td {
    border-top: 1px solid var(--color-border);
    padding-top: 0.7rem;
    font-weight: 600;
    font-size: 1.05rem;
}
.store-details { display: grid; grid-template-columns: 8rem 1fr; gap: 0.5rem 0.9rem; font-size: 0.92rem; }
.store-details dt { color: var(--color-text-muted); font-size: 0.85rem; }
@media (max-width: 560px) {
    .store-details { grid-template-columns: 1fr; gap: 0.1rem; }
    .store-details dd { margin-bottom: 0.6rem; }
}

/* ─── Order progress ─────────────────────────────────────────── */
.store-progress { display: flex; gap: 0.3rem; margin: 0.9rem 0 0.4rem; }
.store-progress__step { flex: 1; height: 0.35rem; border-radius: var(--radius-pill); background: var(--color-border); }
.store-progress__step.is-done { background: var(--color-primary); }
.store-progress__labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--color-text-muted);
}

/* ─── Venmo ──────────────────────────────────────────────────── */
.store-venmo { margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--color-border-soft); text-align: center; }
.store-venmo__btn {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    background: #008cff; /* Venmo blue */
    border-color: #008cff;
    color: #fff;
}
.store-venmo__btn:hover { background: #0074d4; border-color: #0074d4; }
.store-venmo p { margin-top: 0.5rem; }

/* ─── About line ─────────────────────────────────────────────── */
.store-intro {
    font-size: 1rem;
    line-height: 1.55;
    color: var(--color-text-muted);
    margin: 0 0 1.2rem;
    max-width: 44rem;
}

/* ─── Wood type picker ───────────────────────────────────────── */
.store-types { display: grid; gap: 0.75rem; margin-bottom: 0.4rem; }
.store-type {
    position: relative;
    display: block;
    padding: 1.1rem 1.1rem 1.1rem 3rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
    cursor: pointer;
}
.store-type:hover { border-color: #b9c9be; }
.store-type input,
.store-type-alt input { position: absolute; opacity: 0; pointer-events: none; }
/* The radio, drawn. */
.store-type::before {
    content: "";
    position: absolute;
    left: 1.1rem;
    top: 1.3rem;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    border: 2px solid #b5c0b8;
    background: var(--color-bg);
}
.store-type.is-selected { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(43, 130, 79, 0.12); }
.store-type.is-selected::before { border-color: var(--color-primary); background: radial-gradient(circle, var(--color-primary) 0 42%, #fff 46%); }
/* Keyboard focus only — a click already shows the selected ring. */
.store-type:has(input:focus-visible) { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.store-type.is-sold-out { cursor: default; background: var(--color-bg-soft); color: var(--color-text-mutest); }
.store-type__top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.8rem; }
.store-type__name { font-weight: 600; font-size: 1.2rem; line-height: 1.2; letter-spacing: -0.015em; color: var(--color-primary-darker); }
.store-type__from { flex: none; font-weight: 600; white-space: nowrap; color: var(--color-primary-darker); }
.store-type__text { display: block; margin-top: 0.5rem; font-size: 0.92rem; line-height: 1.5; }
.store-type__days { display: block; margin-top: 0.6rem; font-size: 0.82rem; color: var(--color-text-muted); }
.store-type-alt {
    position: relative;
    display: inline-block;
    width: fit-content;
    padding: 0.3rem 0;
    font-size: 0.92rem;
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.store-type-alt.is-selected { font-weight: 600; text-decoration: none; color: var(--color-primary-darker); }
.store-type-alt:has(input:focus-visible) { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* Once a type is picked: its sizes, under a plain "Choose a size". */
.store-category__picked { display: none; }
.store-category[hidden] { display: none; }
.has-type-picker .store-category { margin-top: 1.3rem; padding-top: 1.2rem; border-top: 1px solid var(--color-border-soft); }
.has-type-picker .store-category__head,
.has-type-picker .store-category__blurb { display: none; }
.has-type-picker .store-category__picked { display: block; margin-bottom: 0.7rem; }
.has-type-picker .store-category__picked .store-category__days { margin-bottom: 0; }
.has-type-picker .store-category.is-locked { opacity: 1; }
/* Nothing to total until a type has been picked. */
.has-type-picker:not(.has-type-picked) .store-subtotal { display: none; }

/* The delivery fee for the address just entered. */
.store-delivery-note {
    margin: -0.3rem 0 1.1rem;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
    background: var(--color-success-soft);
    color: var(--color-success);
    font-size: 0.9rem;
    line-height: 1.45;
}
.store-delivery-note.is-warning { background: var(--color-warning-soft); color: var(--color-warning); }
.store-delivery-note.is-muted { background: var(--color-bg-soft); color: var(--color-text-muted); }

/* A row that isn't relevant yet (the total, before the delivery fee is known). */
.store-ticket__row[hidden] { display: none; }

/* Elements that only exist for wider screens. */
.store-hero__strip,
.store-order__aside { display: none; }

/* ───────────────────────────────────────────────────────────────
   Wider screens
   From a tablet up, the banner runs edge to edge with a facts strip
   along its foot. From a desktop up, the order form opens out: products
   side by side, and the order so far kept in view on the right.
   ─────────────────────────────────────────────────────────────── */
@media (min-width: 48rem) {
    .store__header { padding: 0.8rem 1.5rem; }
    .store__main { padding: 0 1.5rem 4rem; }
    .store__main .flash-strip { padding: 1rem 0 0; }

    /* Break out of the centred column to the full width of the window. */
    .store-hero--photo {
        width: 100vw;
        margin: 0 0 2.5rem calc(50% - 50vw);
        padding: 0;
        /* Taller on big screens, and anchored near the foot of the photo:
           the subject (here, the trucks) sits low in a typical banner shot,
           and must clear the facts strip along the bottom. */
        min-height: clamp(21.9rem, 25.1vw, 30rem);
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        background-position: center bottom;
    }
    /* Dark where the words are, clear where the trucks are. */
    .store-hero--photo::before {
        background: linear-gradient(90deg, rgba(12, 22, 12, 0.90) 0%, rgba(12, 22, 12, 0.72) 38%, rgba(12, 22, 12, 0.22) 78%, rgba(12, 22, 12, 0.30) 100%);
    }
    .store-hero__inner,
    .store-hero__facts {
        width: 100%;
        max-width: var(--store-width);
        margin: 0 auto;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    .store-hero__inner { padding-top: 3.5rem; padding-bottom: 2rem; }
    .store-hero--photo .store-facts { display: none; }
    .store-hero--photo h1 { font-size: clamp(2.8rem, 5.2vw, 4.4rem); line-height: 1.02; letter-spacing: -0.03em; word-spacing: 0.06em; }
    .store-hero--photo .store-hero__lede { font-size: 1.2rem; max-width: 30rem; margin-top: 0.9rem; }

    .store-hero__strip {
        display: block;
        background: rgba(12, 22, 12, 0.55);
        border-top: 1px solid rgba(255, 255, 255, 0.16);
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
    }
    .store-hero__facts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 22rem); justify-content: start; }
    .store-hero__facts > div { padding: 1rem 1.5rem 1.1rem 0; }
    .store-hero__facts > div + div { padding-left: 1.5rem; border-left: 1px solid rgba(255, 255, 255, 0.16); }
    .store-hero__facts dt { font-size: 0.8rem; color: rgba(255, 255, 255, 0.62); margin-bottom: 0.2rem; }
    .store-hero__facts dd { color: #fff; font-weight: 500; line-height: 1.45; }
    .store-hero__facts dd span { font-weight: 400; color: rgba(255, 255, 255, 0.78); }
}

@media (min-width: 64rem) {
    .store--wide { --store-width: 72rem; }

    .store-order {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 21.5rem;
        gap: 2rem;
        align-items: start;
    }
    .store-order__main > .store-step:first-child { margin-top: 0; }
    /* The summary carries the button here, so the one under the form goes. */
    .store-order__main .store-submit,
    .store-order__main .store-subtotal { display: none; }
    .store-order__aside { display: block; position: sticky; top: 1.5rem; }

    .store-step { padding: 1.8rem; }
    .store-step .card__head { margin-bottom: 1.3rem; }
    .store-step .card__head h2 { font-size: 1.2rem; }

    /* Products: the wood type on the left, its products side by side. */
    .store-category {
        display: grid;
        grid-template-columns: 10.5rem minmax(0, 1fr);
        column-gap: 1.5rem;
        margin-top: 0;
    }
    .store-category + .store-category {
        margin-top: 1.4rem;
        padding-top: 1.4rem;
        border-top: 1px solid var(--color-border-soft);
    }
    .store-category__days { margin-bottom: 0; line-height: 1.45; }
    .store-category__items { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .store-category__blurb { grid-column: 1 / -1; margin-bottom: 0.25rem; }
    .store-category__items .store-product + .store-product { margin-top: 0; }
    .store-product { flex-wrap: wrap; row-gap: 0.7rem; padding: 1rem; align-content: space-between; }
    .store-product__body { flex-basis: 100%; }
    /* A product photo becomes the top of its card. */
    .store-product__image {
        flex-basis: 100%;
        width: 100%;
        height: 9rem;
        margin: -1rem -1rem 0;
        max-width: none;
        flex-basis: calc(100% + 2rem);
        border: 0;
        border-radius: calc(var(--radius-sm) - 1px) calc(var(--radius-sm) - 1px) 0 0;
    }
    .store-product__image + .store-product__body { flex-basis: 100%; }
    .store-product__price { margin-right: auto; font-size: 1.1rem; }

    .store-row--street { display: grid; grid-template-columns: 2fr 1fr; gap: 0 0.8rem; }

    .store-intro { font-size: 1.08rem; margin: -0.6rem 0 1.6rem; }
    .store-types { grid-template-columns: 1fr 1fr; }
    .store-type-alt { grid-column: 1 / -1; }
    .store-type { padding-top: 1.3rem; padding-bottom: 1.3rem; }
    .has-type-picker .store-category,
    .has-type-picker .store-category + .store-category {
        display: block;
        margin-top: 1.5rem;
        padding-top: 1.4rem;
        border-top: 1px solid var(--color-border-soft);
    }
    .has-type-picker .store-category[hidden] { display: none; }

    /* The order so far, as the ticket a delivery driver would carry. */
    .store-ticket {
        position: relative;
        background: var(--color-bg);
        border-radius: var(--radius) var(--radius) 0 0;
        padding: 1.6rem 1.5rem 1.4rem;
        filter: drop-shadow(0 6px 16px rgba(26, 46, 26, 0.10)) drop-shadow(0 1px 2px rgba(26, 46, 26, 0.08));
    }
    /* Torn-off bottom edge. */
    .store-ticket::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        height: 9px;
        background:
            linear-gradient(135deg, var(--color-bg) 6.4px, transparent 0) 0 0 / 18px 9px repeat-x,
            linear-gradient(225deg, var(--color-bg) 6.4px, transparent 0) 0 0 / 18px 9px repeat-x;
    }
    .store-ticket__title { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 0.9rem; }
    .store-ticket__lines { list-style: none; font-size: 0.92rem; }
    .store-ticket__lines li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; line-height: 1.35; }
    .store-ticket__lines li span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
    .store-ticket__lines .store-ticket__empty { display: block; color: var(--color-text-muted); }
    .store-ticket__rows { margin: 0.9rem 0 1.3rem; border-top: 1px dashed var(--color-border); }
    .store-ticket__row {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.6rem 0;
        border-bottom: 1px dashed var(--color-border);
        font-size: 0.92rem;
    }
    .store-ticket__row dt { color: var(--color-text-muted); }
    .store-ticket__row dd { text-align: right; font-variant-numeric: tabular-nums; }
    .store-ticket__row--strong dt { color: var(--color-text); font-weight: 600; }
    .store-ticket__row--strong dd { font-weight: 600; font-size: 1.15rem; color: var(--color-primary-darker); }
    .store-ticket .btn { width: 100%; padding: 0.85rem 1rem; font-size: 1rem; }
}
