.shop-section {
    padding-bottom: 4rem;
}

.shop-maintenance {
    margin: 2rem auto;
    max-width: 540px;
    padding: 2rem;
    background: #f7f5ef;
    border-radius: 8px;
    text-align: center;
}
.shop-maintenance h2 { margin-top: 0; }

.shop-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    margin-top: 1.5rem;
}
@media (max-width: 900px) {
    .shop-grid { grid-template-columns: 1fr; }
}

.shop-intro {
    background: #f7f5ef;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}
.shop-intro p { margin: 0.25rem 0; }
.shop-delivery-note { color: #74837c; font-size: 0.9em; }

.shop-category-name {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #74837c;
    font-size: 0.95rem;
    margin: 1.5rem 0 0.75rem;
    border-bottom: 1px solid #e8e3d6;
    padding-bottom: 0.4rem;
}

.shop-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.shop-card {
    border: 1px solid #e8e3d6;
    border-radius: 8px;
    padding: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.shop-card-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}
.shop-card-body {
    padding: 0.85rem 0.9rem 0.9rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.shop-card-name {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    color: #53605b;
}
.shop-card-desc {
    margin: 0 0 0.5rem;
    color: #888;
    font-size: 0.85rem;
    flex: 1;
}
.shop-card-price {
    margin: 0.4rem 0 0.7rem;
    color: #53605b;
    font-size: 0.95rem;
}
.shop-card-approx {
    display: block;
    color: #aa9c66;
    font-size: 0.78rem;
    font-style: italic;
}
.shop-badge {
    display: inline-block;
    background: #fff4d6;
    color: #aa9c66;
    font-size: 0.7rem;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    margin-left: 0.25rem;
    vertical-align: middle;
}

.shop-qty {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.3rem 0 0.4rem;
}
.shop-qty-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #c9c0ad;
    background: #fafaf6;
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
}
.shop-qty-btn:hover { background: #f0ebd9; }
.shop-qty-input {
    width: 56px;
    height: 36px;
    text-align: center;
    border: 1px solid #c9c0ad;
    border-radius: 6px;
    font-size: 1rem;
    -moz-appearance: textfield;
}
.shop-qty-input::-webkit-outer-spin-button,
.shop-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.shop-line-total {
    margin: 0;
    text-align: right;
    font-weight: 600;
    color: #74837c;
    font-size: 0.95rem;
}

/* Sticky summary on desktop; a normal block below the products on mobile. */
.shop-summary {
    position: sticky;
    top: 1.5rem;
    align-self: start;
}
@media (max-width: 900px) {
    /* This must NOT be sticky, and must not carry a z-index or negative margins.
     *
     * .shop-summary holds the whole order form — name, WhatsApp number, email,
     * fulfilment, delivery address, contact time, submit — so it is ~930px tall,
     * taller than any phone viewport. A sticky element with `bottom: 0` that is
     * taller than the viewport gets shifted UP so its bottom edge can still
     * reach the bottom of the screen. That dragged the summary up over the
     * product list, and because it had z-index: 50 over an opaque
     * .shop-summary-inner, it painted the products out entirely: on a phone the
     * page went straight from the header to "Your order", with no products at
     * all and no way to add any.
     *
     * A sticky bottom bar is only viable for a compact bar (subtotal + a jump
     * link). It cannot be the form itself. The negative margins went with it —
     * they were there to bleed the bar to the screen edges and otherwise just
     * make the panel 32px wider than its container.
     */
    .shop-summary {
        position: static;
        margin-top: 1.5rem;
    }
}
.shop-summary-inner {
    background: #fff;
    border: 1px solid #e8e3d6;
    border-radius: 8px;
    padding: 1.25rem;
}
.shop-summary h3 {
    margin: 0 0 0.75rem;
    color: #74837c;
    font-size: 1.1rem;
}
.shop-summary-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.75rem;
    font-size: 0.92rem;
}
.shop-summary-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.2rem 0;
    border-bottom: 1px dashed #f0ebd9;
}
.shop-summary-list li:last-child { border-bottom: none; }
.shop-summary-empty {
    color: #999;
    font-style: italic;
    justify-content: center !important;
}
.shop-summary-subtotal {
    margin: 0.5rem 0 1rem;
    text-align: right;
    font-size: 1.05rem;
}
#shop-approx-note {
    display: block;
    color: #aa9c66;
    font-size: 0.8rem;
    font-style: italic;
}
/* shop.js shows this note only when the order contains a per_kg_typical or
 * variable-weight item, via `approxNote.hidden = !anyApprox`. But an ID
 * selector outranks the browser's `[hidden] { display: none }`, so the
 * `display: block` above was winning and the note showed on EVERY order —
 * telling customers the total was approximate even when every line was a fixed
 * unit price. Restore the attribute's meaning at matching specificity. */
#shop-approx-note[hidden] {
    display: none;
}

/* Keep the prices out of the chat button's corner.
 *
 * .chat-widget is position: fixed at bottom/right: 1.5rem with a 56px FAB and
 * z-index: 1000, so it permanently owns the bottom-right ~80x80px of the
 * viewport and paints over whatever scrolls beneath it. On a 375px screen that
 * column is x 295-351, and the right-aligned line total's text ended at x 328 —
 * so the chat button sat squarely on the price.
 *
 * Left-aligning moves the figures to x~47, clear of the button at every scroll
 * position, and matches the rest of the card, which is left-aligned throughout.
 * Only the prices are treated: the submit buttons are full-width and also pass
 * under the widget, but the footer follows them, so they can always be scrolled
 * clear. Desktop keeps the right-aligned prices — there the button overlaps the
 * summary column's whitespace, not the figures.
 *
 * This block must stay AFTER .shop-line-total and .shop-summary-subtotal. A
 * media query adds no specificity, so an earlier position loses the cascade to
 * those base rules on source order alone — which is exactly what happened on
 * the first attempt at this fix. */
@media (max-width: 900px) {
    .shop-line-total,
    .shop-summary-subtotal {
        text-align: left;
    }
}

.shop-form h4 {
    margin: 0.5rem 0 0.5rem;
    color: #74837c;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.shop-field {
    display: block;
    margin: 0.6rem 0;
}
.shop-field > span {
    display: block;
    font-size: 0.85rem;
    color: #74837c;
    margin-bottom: 0.2rem;
}
.shop-field input,
.shop-field textarea,
.shop-field select {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid #c9c0ad;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    box-sizing: border-box;
}

.shop-fieldset {
    border: none;
    padding: 0;
    margin: 0.6rem 0;
}
.shop-fieldset legend {
    font-size: 0.85rem;
    color: #74837c;
    padding: 0;
    margin-bottom: 0.4rem;
}
.shop-radio {
    display: inline-block;
    margin-right: 1rem;
    cursor: pointer;
}

.shop-help {
    font-size: 0.78rem;
    color: #999;
    margin: 0.25rem 0 0;
}

.shop-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.shop-submit-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0 0.5rem;
}
.shop-btn {
    width: 100%;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}
.shop-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.shop-btn--wa {
    background: #25D366;
    color: #fff;
}
.shop-btn--wa:not(:disabled):hover { background: #1ebf5a; }
.shop-btn--email {
    background: #74837c;
    color: #fff;
}
.shop-btn--email:not(:disabled):hover { background: #62716a; }

.shop-form-error {
    margin-top: 0.5rem;
    background: #fdecea;
    color: #a13a2d;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.shop-card.is-selected {
    border-color: #74837c;
    box-shadow: 0 0 0 1px #74837c inset;
}

/* WhatsApp hand-off lightbox. Its layout AND typography are set inline in
   shop.js — a browser holding a cached older copy of this file must still get a
   usable dialog, which is exactly how the deployed version first broke. Only
   enhancements that cannot be inlined (shadow, hover) live here. */
.shop-lightbox-panel {
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}
.shop-lightbox-open:hover,
.shop-lightbox-done:not(:disabled):hover { background: #1ebf5a; }
.shop-lightbox-cancel:not(:disabled):hover { background: #dfe3e1; }
.shop-lightbox-close:hover { color: #53605b; }
.shop-lightbox-open[aria-disabled="true"] {
    pointer-events: none;
}
