/* Online shop ("Prenota la spesa") + shop backoffice
   Extends the site palette: orchard green, soft green-grey paper, cherry accent. */

:root {
    --shop-green: #1B3B2D;
    --shop-green-hover: #2D5A27;
    --shop-green-tint: #E7EEE8;
    --shop-cherry: #A3172B;
    --shop-cherry-hover: #861226;
    --shop-cherry-tint: #FBEBEC;
    --shop-paper: #F4F6F3;
    --shop-surface: #FFFFFF;
    --shop-line: #E3DDD1;
    --shop-line-strong: #CBC3B4;
    --shop-ink: #1E2A24;
    --shop-muted: #59645D;
    --shop-amber: #8A5A00;
    --shop-radius: 14px;
    --shop-radius-sm: 10px;
    --shop-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --shop-focus: 0 0 0 3px rgba(27, 59, 45, 0.28);
}

.shop-body {
    background: var(--shop-paper);
    color: var(--shop-ink);
}

/* Component display rules must never beat the hidden attribute. */
.shop [hidden],
.shop-admin [hidden] {
    display: none !important;
}

.shop-body ::selection {
    background: rgba(163, 23, 43, 0.18);
    color: var(--shop-ink);
}

.shop,
.shop-admin {
    caret-color: var(--shop-green);
    accent-color: var(--shop-green);
}

.shop :focus-visible,
.shop-admin :focus-visible {
    outline: 2px solid var(--shop-green);
    outline-offset: 2px;
}

.shop-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ---------------------------------------------------------------- */
/* Intro                                                            */
/* ---------------------------------------------------------------- */

.shop-intro {
    padding: 200px 0 2rem;
}

.shop-title {
    font-size: clamp(2.1rem, 4vw, 3rem);
    line-height: 1.1;
    font-weight: 700;
    color: var(--shop-green);
    letter-spacing: -0.02em;
    text-wrap: balance;
    margin-bottom: 0.75rem;
}

.shop-lede {
    max-width: 62ch;
    font-size: 1.08rem;
    color: var(--shop-muted);
    margin-bottom: 1.25rem;
}

.shop-ways {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--shop-green);
}

.shop-ways li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.shop-ways i {
    width: 1.1rem;
    text-align: center;
    color: var(--shop-cherry);
}

.shop-note {
    margin-top: 1.25rem;
    max-width: 62ch;
    padding: 0.75rem 1rem;
    background: var(--shop-green-tint);
    border-radius: var(--shop-radius-sm);
    color: var(--shop-green);
    font-weight: 500;
}

.shop-preview-banner {
    max-width: 1200px;
    margin: 0 auto 1.5rem;
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.6rem;
    align-items: center;
    background: #FFF4D6;
    color: #5C3D00;
    border-radius: var(--shop-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ---------------------------------------------------------------- */
/* Layout                                                           */
/* ---------------------------------------------------------------- */

.shop-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 2.5rem;
    align-items: start;
    padding-bottom: 5rem;
}

.shop-layout.is-closed {
    grid-template-columns: minmax(0, 1fr);
}

.shop-layout.is-closed .cart {
    display: none;
}

.shop-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 0;
    color: var(--shop-muted);
}

.shop-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--shop-line-strong);
    border-top-color: var(--shop-green);
    animation: shop-spin 0.8s linear infinite;
}

@keyframes shop-spin {
    to { transform: rotate(360deg); }
}

.btn-retry {
    font: inherit;
    font-weight: 600;
    color: var(--shop-green);
    background: none;
    border: 1px solid var(--shop-green);
    border-radius: 999px;
    padding: 0.45rem 1rem;
    cursor: pointer;
}

.shop-empty {
    background: var(--shop-surface);
    border-radius: var(--shop-radius);
    padding: 3rem 2rem;
    text-align: center;
    max-width: 640px;
    margin: 1rem auto 0;
    box-shadow: 0 6px 24px rgba(27, 59, 45, 0.06);
}

.shop-empty i {
    font-size: 2rem;
    color: var(--shop-green);
    margin-bottom: 1rem;
}

.shop-empty h2 {
    font-size: 1.5rem;
    color: var(--shop-green);
    margin-bottom: 0.5rem;
}

.shop-empty p {
    color: var(--shop-muted);
    max-width: 48ch;
    margin: 0 auto 1.5rem;
}

/* ---------------------------------------------------------------- */
/* Categories                                                       */
/* ---------------------------------------------------------------- */

.shop-cats {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0.25rem 0 1.25rem;
    margin-bottom: 0.5rem;
}

.shop-cats::-webkit-scrollbar {
    display: none;
}

.cat-chip {
    flex: none;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--shop-line-strong);
    background: var(--shop-surface);
    color: var(--shop-green);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s var(--shop-ease), color 0.2s var(--shop-ease), border-color 0.2s var(--shop-ease);
}

.cat-chip:hover {
    border-color: var(--shop-green);
}

.cat-chip.is-active {
    background: var(--shop-green);
    border-color: var(--shop-green);
    color: #fff;
}

.cat-section {
    scroll-margin-top: 150px;
    margin-bottom: 3rem;
}

.cat-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--shop-green);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

/* ---------------------------------------------------------------- */
/* Products                                                         */
/* ---------------------------------------------------------------- */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
}

.product {
    background: var(--shop-surface);
    border-radius: var(--shop-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 2px rgba(27, 59, 45, 0.06), 0 6px 20px rgba(27, 59, 45, 0.05);
}

.product-media {
    aspect-ratio: 4 / 3;
    background: var(--shop-green-tint);
    overflow: hidden;
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-media-empty {
    display: grid;
    place-items: center;
    height: 100%;
    color: rgba(27, 59, 45, 0.35);
    font-size: 2rem;
}

.product-info {
    padding: 1rem 1.1rem 0.4rem;
    flex: 1;
}

.product-name {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--shop-ink);
    line-height: 1.3;
    margin-bottom: 0.3rem;
}

.product-desc {
    font-size: 0.88rem;
    color: var(--shop-muted);
    line-height: 1.5;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-options {
    list-style: none;
    padding: 0 1.1rem 0.4rem;
}

.opt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0;
    border-top: 1px solid var(--shop-line);
}

.opt-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.opt-label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--shop-ink);
}

.opt-tag {
    display: inline-block;
    margin-left: 0.25rem;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    background: var(--shop-green-tint);
    color: var(--shop-green);
    font-size: 0.7rem;
    font-weight: 600;
    vertical-align: 1px;
}

.opt-tag-box {
    background: var(--shop-cherry-tint);
    color: var(--shop-cherry);
}

.opt-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--shop-green);
    font-variant-numeric: tabular-nums;
}

.opt-unit {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--shop-muted);
    margin-left: 1px;
}

.opt-contents {
    font-size: 0.8rem;
    color: var(--shop-muted);
    line-height: 1.4;
    margin-top: 0.15rem;
}

.opt-stock {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--shop-amber);
}

.opt-stock:empty {
    display: none;
}

.opt.is-soldout .opt-price,
.opt.is-soldout .opt-label {
    color: var(--shop-muted);
}

.opt-ctrl {
    flex: none;
}

.soldout {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--shop-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: var(--shop-paper);
}

.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 40px;
    padding: 0 1rem;
    border-radius: 999px;
    border: 1.5px solid var(--shop-green);
    background: var(--shop-surface);
    color: var(--shop-green);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s var(--shop-ease), color 0.2s var(--shop-ease);
}

.btn-add:hover {
    background: var(--shop-green);
    color: #fff;
}

.btn-add i {
    font-size: 0.75rem;
}

.stepper {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--shop-green);
    color: #fff;
    min-height: 40px;
    animation: shop-pop 0.35s var(--shop-ease);
}

@keyframes shop-pop {
    from { transform: scale(0.92); }
    to { transform: scale(1); }
}

.stepper button {
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    color: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.15s ease;
}

.stepper button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.14);
}

.stepper button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.stepper button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -4px;
}

.stepper output {
    min-width: 3.4rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- */
/* Cart                                                             */
/* ---------------------------------------------------------------- */

.cart {
    position: sticky;
    top: 84px;
    background: var(--shop-surface);
    border-radius: var(--shop-radius);
    box-shadow: 0 1px 2px rgba(27, 59, 45, 0.06), 0 10px 30px rgba(27, 59, 45, 0.08);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 110px);
}

.cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem 0.6rem;
}

.cart-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--shop-green);
}

.cart-close {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--shop-paper);
    color: var(--shop-ink);
    cursor: pointer;
}

.cart-body {
    overflow-y: auto;
    padding: 0 1.25rem;
    scrollbar-width: thin;
    scrollbar-color: var(--shop-line-strong) transparent;
}

.cart-empty {
    text-align: center;
    padding: 2rem 0.5rem 2.25rem;
    color: var(--shop-muted);
    font-size: 0.92rem;
}

.cart-empty i {
    font-size: 1.6rem;
    color: var(--shop-line-strong);
    margin-bottom: 0.6rem;
}

.cart-lines {
    list-style: none;
}

.cart-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "text text"
        "step total";
    align-items: center;
    gap: 0.45rem 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--shop-line);
}

.cart-line-text {
    grid-area: text;
    display: flex;
    flex-direction: column;
}

.cart-line-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.cart-line-opt {
    font-size: 0.8rem;
    color: var(--shop-muted);
}

.cart-line .stepper {
    grid-area: step;
    justify-self: start;
    min-height: 34px;
    background: var(--shop-green-tint);
    color: var(--shop-green);
    animation: none;
}

.cart-line .stepper button {
    width: 34px;
    height: 34px;
}

.cart-line .stepper button:hover:not(:disabled) {
    background: rgba(27, 59, 45, 0.1);
}

.cart-line .stepper button:focus-visible {
    outline-color: var(--shop-green);
}

.cart-line-total {
    grid-area: total;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.approx {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--shop-muted);
}

.cart-foot {
    padding: 1rem 1.25rem 1.25rem;
}

.cart-foot:empty {
    padding: 0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
}

.cart-total strong {
    font-size: 1.3rem;
    color: var(--shop-green);
    font-variant-numeric: tabular-nums;
}

.cart-note {
    font-size: 0.8rem;
    color: var(--shop-muted);
    line-height: 1.45;
    margin-bottom: 1rem;
}

.btn-book {
    width: 100%;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    border: none;
    border-radius: 999px;
    background: var(--shop-cherry);
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(163, 23, 43, 0.22);
    transition: background-color 0.2s var(--shop-ease), transform 0.2s var(--shop-ease), box-shadow 0.2s var(--shop-ease);
}

.btn-book:hover:not(:disabled) {
    background: var(--shop-cherry-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(163, 23, 43, 0.26);
}

.btn-book:disabled {
    background: #C9C2B6;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-book:focus-visible {
    outline: 3px solid var(--shop-cherry);
    outline-offset: 3px;
}

.btn-book.is-loading .btn-book-label::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 0.6rem;
    vertical-align: -2px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    animation: shop-spin 0.8s linear infinite;
}

/* Mobile cart bar */
.cart-bar {
    display: none;
}

.cart-scrim {
    position: fixed;
    inset: 0;
    background: rgba(17, 30, 23, 0.45);
    z-index: 1090;
    animation: shop-fade 0.25s ease;
}

@keyframes shop-fade {
    from { opacity: 0; }
}

/* ---------------------------------------------------------------- */
/* Checkout                                                         */
/* ---------------------------------------------------------------- */

.checkout {
    padding-top: 200px;
    padding-bottom: 5rem;
}

.link-back,
.link-edit {
    font: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--shop-green);
    background: none;
    border: none;
    padding: 0.4rem 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.link-back {
    text-decoration: none;
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.checkout-title {
    font-size: clamp(1.8rem, 3.4vw, 2.4rem);
    color: var(--shop-green);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.75rem;
}

.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 2.5rem;
    align-items: start;
}

.co-block {
    border: none;
    padding: 0;
    margin: 0 0 2.5rem;
    min-width: 0;
}

.co-legend {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--shop-ink);
    margin-bottom: 1rem;
    padding: 0;
}

.co-empty {
    color: var(--shop-muted);
}

.choice-list {
    display: grid;
    gap: 0.75rem;
}

.choice {
    position: relative;
    display: block;
    cursor: pointer;
}

.choice input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.choice-body {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.1rem;
    background: var(--shop-surface);
    border: 1.5px solid var(--shop-line);
    border-radius: var(--shop-radius);
    transition: border-color 0.2s var(--shop-ease), background-color 0.2s var(--shop-ease);
}

.choice:hover .choice-body {
    border-color: var(--shop-line-strong);
}

.choice input:checked + .choice-body {
    border-color: var(--shop-green);
    background: #F3F7F4;
    box-shadow: inset 0 0 0 1px var(--shop-green);
}

.choice input:focus-visible + .choice-body {
    box-shadow: var(--shop-focus);
}

.choice.is-disabled {
    cursor: not-allowed;
}

.choice.is-disabled .choice-body {
    opacity: 0.6;
}

.choice-icon {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--shop-green-tint);
    color: var(--shop-green);
}

.choice input:checked + .choice-body .choice-icon {
    background: var(--shop-green);
    color: #fff;
}

.choice-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.choice-text strong {
    font-weight: 600;
}

.choice-text small {
    font-size: 0.85rem;
    color: var(--shop-muted);
}

.delivery-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 1rem;
    margin-top: 1.25rem;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip-row + .chip-row {
    margin-top: 1rem;
}

.chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1.5px solid var(--shop-line-strong);
    background: var(--shop-surface);
    color: var(--shop-ink);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: capitalize;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip-slot {
    flex-direction: row;
    gap: 0.45rem;
    text-transform: none;
    font-variant-numeric: tabular-nums;
}

.chip:hover:not(:disabled) {
    border-color: var(--shop-green);
}

.chip[aria-checked="true"] {
    background: var(--shop-green);
    border-color: var(--shop-green);
    color: #fff;
}

.chip:disabled {
    color: #8E968F;
    background: transparent;
    border-style: dashed;
    cursor: not-allowed;
}

.chip small {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: none;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1rem;
}

.field-wide {
    grid-column: 1 / -1;
}

.field label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.optional {
    font-weight: 400;
    color: var(--shop-muted);
}

.field input,
.field select,
.field textarea,
.shop-admin input[type="text"],
.shop-admin input[type="number"],
.shop-admin input[type="email"],
.shop-admin input[type="date"],
.shop-admin select,
.shop-admin textarea {
    width: 100%;
    min-height: 48px;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--shop-line-strong);
    border-radius: var(--shop-radius-sm);
    background: var(--shop-surface);
    color: var(--shop-ink);
    font: inherit;
    font-size: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea,
.shop-admin textarea {
    min-height: 0;
    resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder,
.shop-admin input::placeholder,
.shop-admin textarea::placeholder {
    color: #7A837D;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.shop-admin input:focus,
.shop-admin select:focus,
.shop-admin textarea:focus {
    outline: none;
    border-color: var(--shop-green);
    box-shadow: var(--shop-focus);
}

.field [aria-invalid="true"] {
    border-color: var(--shop-cherry);
}

.field-error {
    color: var(--shop-cherry);
    font-size: 0.82rem;
    font-weight: 500;
    margin-top: 0.35rem;
}

.field-error:empty {
    display: none;
}

.check {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.5;
    cursor: pointer;
}

.check input {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.check a {
    color: var(--shop-green);
    text-underline-offset: 3px;
}

.hp-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.checkout-summary {
    position: sticky;
    top: 84px;
    background: var(--shop-surface);
    border-radius: var(--shop-radius);
    padding: 1.4rem;
    box-shadow: 0 1px 2px rgba(27, 59, 45, 0.06), 0 10px 30px rgba(27, 59, 45, 0.08);
}

.summary-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--shop-green);
    margin-bottom: 0.75rem;
}

.summary-lines {
    list-style: none;
    margin-bottom: 0.25rem;
}

.summary-lines li {
    display: grid;
    grid-template-columns: 4.2rem minmax(0, 1fr) auto;
    gap: 0.6rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--shop-line);
    font-size: 0.9rem;
    align-items: baseline;
}

.summary-qty {
    font-weight: 600;
    color: var(--shop-green);
    font-variant-numeric: tabular-nums;
}

.summary-name small {
    display: block;
    font-size: 0.78rem;
    color: var(--shop-muted);
}

.summary-price {
    font-variant-numeric: tabular-nums;
}

.summary-totals {
    margin: 1rem 0 0.5rem;
}

.summary-totals div {
    display: flex;
    justify-content: space-between;
    padding: 0.2rem 0;
    font-size: 0.92rem;
}

.summary-totals dd {
    font-variant-numeric: tabular-nums;
}

.summary-grand {
    margin-top: 0.4rem;
    padding-top: 0.6rem !important;
    border-top: 1px solid var(--shop-line);
    font-weight: 700;
    font-size: 1.05rem !important;
}

.summary-grand dd {
    font-size: 1.3rem;
    color: var(--shop-green);
}

.muted {
    color: var(--shop-muted);
    font-weight: 400;
}

.summary-hint {
    font-size: 0.8rem;
    color: var(--shop-muted);
    line-height: 1.45;
    margin-bottom: 0.6rem;
}

.summary-warn,
.form-alert {
    font-size: 0.86rem;
    line-height: 1.45;
    padding: 0.75rem 0.9rem;
    border-radius: var(--shop-radius-sm);
    margin-bottom: 0.9rem;
}

.summary-warn {
    background: #FFF4D6;
    color: #5C3D00;
}

.form-alert {
    background: var(--shop-cherry-tint);
    color: #6E0F1D;
}

.form-alert ul {
    margin: 0.4rem 0 0.4rem 1.1rem;
}

.checkout-summary .btn-book {
    margin-top: 0.5rem;
}

.summary-pay {
    font-size: 0.8rem;
    color: var(--shop-muted);
    margin-top: 0.85rem;
    line-height: 1.45;
    display: flex;
    gap: 0.5rem;
}

.summary-pay i {
    margin-top: 3px;
    color: var(--shop-green);
}

/* ---------------------------------------------------------------- */
/* Confirmation                                                     */
/* ---------------------------------------------------------------- */

.done {
    padding-top: 200px;
    padding-bottom: 5rem;
    outline: none;
}

.done-card {
    max-width: 640px;
    margin: 0 auto;
    background: var(--shop-surface);
    border-radius: var(--shop-radius);
    padding: 2.5rem 2rem;
    box-shadow: 0 1px 2px rgba(27, 59, 45, 0.06), 0 10px 30px rgba(27, 59, 45, 0.08);
}

.done-mark {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--shop-green);
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
    animation: shop-pop 0.5s var(--shop-ease);
}

.done-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--shop-green);
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-wrap: balance;
    margin-bottom: 0.5rem;
}

.done-code {
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}

.done-code strong {
    letter-spacing: 0.08em;
    color: var(--shop-cherry);
}

.done-card > p {
    color: var(--shop-muted);
    max-width: 60ch;
}

.done-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1.1rem 0;
    border-top: 1px solid var(--shop-line);
    border-bottom: 1px solid var(--shop-line);
}

.done-facts dt {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--shop-muted);
    margin-bottom: 0.2rem;
}

.done-facts dd {
    font-weight: 600;
}

.done-facts dd::first-letter {
    text-transform: uppercase;
}

.done-facts small {
    display: block;
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--shop-muted);
}

.done-card .summary-lines {
    margin-bottom: 1.25rem;
}

.done-help {
    margin-bottom: 1.5rem;
}

.done-help a {
    color: var(--shop-green);
    font-weight: 600;
}

/* ---------------------------------------------------------------- */
/* Responsive                                                       */
/* ---------------------------------------------------------------- */

@media (max-width: 1023px) {
    .shop-layout,
    .checkout-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .shop-layout {
        padding-bottom: 7rem;
    }

    .checkout-summary {
        position: static;
    }

    .cart {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        z-index: 1100;
        max-height: 86vh;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
        visibility: hidden;
        transition: transform 0.4s var(--shop-ease), visibility 0s linear 0.4s;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .cart.is-open {
        transform: translateY(0);
        visibility: visible;
        transition: transform 0.4s var(--shop-ease), visibility 0s;
    }

    .cart-close {
        display: grid;
        place-items: center;
    }

    .cart-bar {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1080;
        padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
        background: linear-gradient(to top, var(--shop-paper) 60%, rgba(244, 246, 243, 0));
        animation: shop-rise 0.35s var(--shop-ease);
    }

    .cart-bar[hidden] {
        display: none;
    }

    @keyframes shop-rise {
        from { transform: translateY(100%); }
    }

    .cart-bar-btn {
        width: 100%;
        min-height: 56px;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0 1.1rem 0 0.6rem;
        border: none;
        border-radius: 999px;
        background: var(--shop-green);
        color: #fff;
        font: inherit;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 8px 24px rgba(27, 59, 45, 0.3);
    }

    .cart-bar-count {
        display: grid;
        place-items: center;
        min-width: 38px;
        height: 38px;
        padding: 0 0.5rem;
        border-radius: 999px;
        background: var(--shop-cherry);
        font-weight: 700;
    }

    .cart-bar-label {
        flex: 1;
        text-align: left;
    }

    .cart-bar-total {
        font-variant-numeric: tabular-nums;
    }

    body.sheet-open {
        overflow: hidden;
    }

    /* Keep the site's cookie button clear of the cart bar. */
    body:has(#cartBar:not([hidden])) #cookie-settings-button {
        bottom: calc(96px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 768px) {
    .shop-wrap {
        padding: 0 1rem;
    }

    .shop-intro {
        padding-top: 150px;
    }

    .done {
        padding-top: 150px;
    }

    .shop-ways {
        flex-direction: column;
        gap: 0.4rem;
    }

    .shop-preview-banner {
        margin: 0 1rem 1.25rem;
    }

    .product-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.9rem;
    }

    .product {
        display: grid;
        grid-template-columns: 96px minmax(0, 1fr);
        align-items: start;
    }

    .product-media {
        aspect-ratio: 1;
        margin: 0.9rem 0 0 0.9rem;
        border-radius: var(--shop-radius-sm);
    }

    .product-info {
        padding: 0.9rem 0.9rem 0.5rem;
    }

    .product-desc {
        -webkit-line-clamp: 2;
    }

    .product-options {
        grid-column: 1 / -1;
        padding: 0 0.9rem 0.2rem;
    }

    .checkout {
        padding-top: 150px;
    }

    .delivery-fields,
    .field-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .done-card {
        padding: 2rem 1.25rem;
    }

    .done-facts {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .shop *,
    .shop *::before,
    .shop-admin * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
