/**
 * ZZZippy Shop — storefront & commerce UI
 *
 * Neutral defaults (inherits site font; slate accent). Override per site:
 *   .zzz-shop-wrap { --zzz-shop-accent: #c45c26; --zzz-shop-accent-hover: #a34a1c; }
 *
 * Catalog listing/detail uses .zzz-shop-catalog for optional serif + warm accent.
 */

/* ---------- Shell & tokens ---------- */
.zzz-shop-wrap {
    box-sizing: border-box;
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(1.25rem, 4vw, 2rem) clamp(1rem, 3vw, 1.5rem) clamp(2rem, 6vw, 3.5rem);
    font-family: var(--zzz-shop-font, inherit);
    font-size: var(--zzz-shop-font-size, 1rem);
    line-height: var(--zzz-shop-line-height, 1.55);
    color: var(--zzz-shop-text, #1f2937);
    --zzz-shop-muted: #6b7280;
    --zzz-shop-border: #e5e7eb;
    --zzz-shop-surface: #ffffff;
    --zzz-shop-surface-muted: #f9fafb;
    --zzz-shop-accent: #334155;
    --zzz-shop-accent-hover: #1e293b;
    --zzz-shop-danger: #b91c1c;
    --zzz-shop-radius: 12px;
    --zzz-shop-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 6px 20px rgba(0, 0, 0, 0.04);
}

.zzz-shop-wrap *,
.zzz-shop-wrap *::before,
.zzz-shop-wrap *::after {
    box-sizing: border-box;
}

.zzz-shop-catalog {
    font-family: Georgia, "Times New Roman", serif;
    color: #2c1810;
    --zzz-shop-accent: #8b4513;
    --zzz-shop-accent-hover: #6b3710;
}

.zzz-shop-page-head {
    margin-bottom: clamp(1.25rem, 3vw, 2rem);
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--zzz-shop-border);
}

.zzz-shop-page-title {
    margin: 0 0 0.35rem;
    font-size: clamp(1.65rem, 4vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.zzz-shop-page-lede {
    margin: 0;
    font-size: 0.95rem;
    color: var(--zzz-shop-muted);
}

.zzz-shop-promo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0 0 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: var(--zzz-shop-radius);
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border: 1px solid #a5d6a7;
    color: #1b5e20;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.35;
}

.zzz-shop-promo__icon {
    flex-shrink: 0;
    font-size: 1.1rem;
    line-height: 1;
}

.zzz-cart-drawer-promo {
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: 6px;
    background: #e8f5e9;
    color: #1b5e20;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

.zzz-shop-panel {
    background: var(--zzz-shop-surface);
    border: 1px solid var(--zzz-shop-border);
    border-radius: var(--zzz-shop-radius);
    box-shadow: var(--zzz-shop-shadow);
}

.zzz-shop-narrow {
    max-width: 560px;
    margin-inline: auto;
}

/* ---------- Buttons ---------- */
.zzz-shop-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin: 0.75rem 1rem 1rem;
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none !important;
    background: var(--zzz-shop-accent, #334155);
    color: var(--zzz-shop-btn-text, #fff) !important;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.zzz-shop-btn:hover {
    background: var(--zzz-shop-accent-hover, #1e293b);
    color: var(--zzz-shop-btn-text, #fff) !important;
}

.zzz-shop-btn:focus-visible {
    outline: 2px solid var(--zzz-shop-accent, #334155);
    outline-offset: 3px;
}

.zzz-shop-btn:disabled,
.zzz-shop-btn.zzz-is-loading {
    opacity: 0.88;
    cursor: wait;
    pointer-events: none;
}

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

/* Busy state — spinner ring (solid primary buttons) */
.zzz-shop-btn.zzz-is-loading:not(.zzz-shop-btn--ghost):not(.zzz-shop-btn--danger-text) {
    padding-right: 2.35rem;
}

.zzz-shop-btn.zzz-is-loading:not(.zzz-shop-btn--ghost):not(.zzz-shop-btn--danger-text)::after {
    content: '';
    position: absolute;
    right: 0.65rem;
    top: 50%;
    width: 1em;
    height: 1em;
    margin-top: -0.5em;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    animation: zzz-shop-spin 0.65s linear infinite;
}

.zzz-shop-btn--ghost.zzz-is-loading {
    padding-right: 2.35rem;
}

.zzz-shop-btn--ghost.zzz-is-loading::after {
    content: '';
    position: absolute;
    right: 0.65rem;
    top: 50%;
    width: 1em;
    height: 1em;
    margin-top: -0.5em;
    border: 2px solid rgba(0, 0, 0, 0.12);
    border-top-color: var(--zzz-shop-accent, #334155);
    border-radius: 50%;
    animation: zzz-shop-spin 0.65s linear infinite;
}

.zzz-shop-btn--lg {
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
}

.zzz-shop-btn--block {
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.zzz-shop-btn--ghost {
    background: transparent;
    color: var(--zzz-shop-accent, #334155) !important;
    border: 1px solid var(--zzz-shop-border, #e5e7eb);
}

.zzz-shop-btn--ghost:hover {
    background: var(--zzz-shop-surface-muted, #f9fafb);
    color: var(--zzz-shop-accent-hover, #1e293b) !important;
}

.zzz-shop-btn--danger-text {
    background: transparent;
    border: none;
    padding: 0.4rem 0.65rem;
    margin: 0 !important;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--zzz-shop-muted, #6b7280) !important;
    border-radius: 8px;
    cursor: pointer;
}

.zzz-shop-btn--danger-text:hover {
    background: #fef2f2;
    color: var(--zzz-shop-danger, #b91c1c) !important;
}

/* ---------- Alerts ---------- */
.zzz-shop-alert {
    padding: 1rem 1.15rem;
    margin-bottom: 1.5rem;
    border-radius: var(--zzz-shop-radius);
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.zzz-shop-actions-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.zzz-shop-actions-row .zzz-shop-btn {
    margin: 0;
}

.zzz-shop-panel.zzz-shop-narrow {
    padding: clamp(1.5rem, 4vw, 2.25rem);
}

.zzz-shop-success-line {
    font-size: 1.125rem;
    margin: 0 0 0.65rem;
}

.zzz-shop-success-note {
    margin: 0 0 1rem;
    color: var(--zzz-shop-muted);
    font-size: 0.95rem;
}

/* ---------- Empty states ---------- */
.zzz-shop-empty {
    padding: clamp(2.5rem, 8vw, 4rem) clamp(1.25rem, 4vw, 2rem);
    text-align: center;
}

.zzz-shop-empty-icon {
    display: block;
    font-size: 2.75rem;
    line-height: 1;
    margin-bottom: 1rem;
    opacity: 0.38;
}

.zzz-shop-empty p {
    margin: 0 0 1.25rem;
    color: var(--zzz-shop-muted);
    font-size: 1.05rem;
}

.zzz-shop-empty .zzz-shop-btn--block {
    max-width: 280px;
    margin-inline: auto;
}

/* ---------- Catalog ---------- */
.zzz-shop-search { margin-bottom: 1rem; }
.zzz-shop-search-label { display: block; margin: 0; }
.zzz-shop-search-input {
    width: 100%;
    max-width: 100%;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--zzz-shop-border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
}

.zzz-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.zzz-shop-results-meta { color: var(--zzz-shop-muted); font-size: 0.9rem; margin-bottom: 1rem; }
.zzz-shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; }
.zzz-shop-card {
    border: 1px solid #e8dcd0;
    border-radius: var(--zzz-shop-radius);
    overflow: hidden;
    background: var(--zzz-shop-surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.zzz-shop-card a { text-decoration: none; color: inherit; }
.zzz-shop-card-img { height: 180px; background: #f0ebe5 center/cover no-repeat; }
.zzz-shop-card h3 { padding: 0.75rem 1rem 0; font-size: 1.05rem; margin: 0; }
.zzz-shop-price { padding: 0.35rem 1rem 0; color: #8b4513; font-weight: bold; margin: 0; }
.zzz-shop-pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-top: 2rem; }

.zzz-shop-product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 768px) {
    .zzz-shop-product-layout { grid-template-columns: 1fr; }
}

.zzz-shop-gallery-main {
    min-height: 320px;
    background: #f5f0ea center/contain no-repeat;
    border-radius: var(--zzz-shop-radius);
    border: 1px solid #e8dcd0;
}

.zzz-shop-thumbs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.zzz-thumb {
    width: 64px;
    height: 64px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    padding: 0;
}

.zzz-thumb:hover,
.zzz-thumb:focus-visible {
    border-color: #8b4513;
    outline: none;
}

.zzz-shop-buybox { min-width: 0; }
.zzz-shop-desc {
    margin: 1rem 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: inherit;
}

.zzz-variant-form fieldset {
    border: 1px solid #e8dcd0;
    margin: 0 0 1rem;
    padding: 1rem;
    border-radius: 10px;
}

.zzz-variant-form label { display: block; margin: 0.35rem 0; }

.zzz-opt-group--multi-qty .zzz-opt-qty-rows {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.zzz-opt-qty-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.zzz-opt-qty-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.92rem;
    line-height: 1.35;
}

.zzz-opt-qty-field {
    flex: 0 0 auto;
    margin: 0;
}

/* Compact − [qty] + control (no native number spinners) */
.zzz-shop-wrap .zzz-qty-stepper,
.zzz-quick-modal-card .zzz-qty-stepper,
.zzz-cart-drawer .zzz-qty-stepper {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    flex-shrink: 0;
    height: 2rem;
    border: 1px solid var(--zzz-shop-border, #e8dcd0);
    border-radius: 6px;
    overflow: hidden;
    background: var(--zzz-shop-surface, #fff);
}

.zzz-shop-wrap .zzz-qty-stepper .zzz-qty-step,
.zzz-quick-modal-card .zzz-qty-stepper .zzz-qty-step,
.zzz-cart-drawer .zzz-qty-stepper .zzz-qty-step {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 1.75rem !important;
    min-width: 1.75rem !important;
    max-width: 1.75rem !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none;
    border-radius: 0;
    background: var(--zzz-shop-surface-muted, #f5f0ea);
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    font-family: inherit;
    box-shadow: none;
}

.zzz-shop-wrap .zzz-qty-stepper .zzz-qty-step:hover,
.zzz-quick-modal-card .zzz-qty-stepper .zzz-qty-step:hover,
.zzz-cart-drawer .zzz-qty-stepper .zzz-qty-step:hover {
    background: #e8dcd0;
}

.zzz-shop-wrap .zzz-qty-stepper input,
.zzz-quick-modal-card .zzz-qty-stepper input,
.zzz-cart-drawer .zzz-qty-stepper input {
    display: block !important;
    width: 2.1rem !important;
    min-width: 2.1rem !important;
    max-width: 2.1rem !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 0.15rem !important;
    border: none !important;
    border-left: 1px solid var(--zzz-shop-border, #e8dcd0) !important;
    border-right: 1px solid var(--zzz-shop-border, #e8dcd0) !important;
    border-radius: 0 !important;
    font-size: 0.9rem !important;
    font-family: inherit;
    text-align: center;
    line-height: 2rem;
    background: #fff;
    box-shadow: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.zzz-msg { min-height: 1.25rem; color: #c45c26; }
.zzz-shop-error { color: var(--zzz-shop-danger); font-weight: 600; }

/* ---------- Cart ---------- */
.zzz-cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: clamp(1.25rem, 3vw, 2rem);
    align-items: start;
}

@media (max-width: 900px) {
    .zzz-cart-layout {
        grid-template-columns: 1fr;
    }
}

.zzz-cart-main-panel {
    padding: 0;
    overflow: hidden;
}

.zzz-cart-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.zzz-cart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.zzz-cart-table thead th {
    text-align: left;
    padding: 0.85rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--zzz-shop-muted);
    background: var(--zzz-shop-surface-muted);
    border-bottom: 1px solid var(--zzz-shop-border);
}

.zzz-cart-table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--zzz-shop-border);
}

.zzz-cart-table tbody tr:last-child td {
    border-bottom: none;
}

.zzz-cart-table .zzz-cart-qty {
    width: 4.5rem;
    padding: 0.45rem 0.5rem;
    border: 1px solid var(--zzz-shop-border);
    border-radius: 8px;
    font: inherit;
}

.zzz-cart-summary-card {
    position: sticky;
    top: 1rem;
    padding: 1.35rem 1.5rem;
}

.zzz-cart-summary-title {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.zzz-cart-totals {
    margin: 0 0 1.25rem;
    padding: 0;
}

.zzz-cart-totals dt {
    margin: 0;
    padding: 0.5rem 0 0;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--zzz-shop-muted);
    border-top: 1px solid var(--zzz-shop-border);
}

.zzz-cart-totals dt:first-child {
    border-top: none;
    padding-top: 0;
}

.zzz-cart-totals dd {
    margin: 0 0 0.35rem;
    padding: 0 0 0.65rem;
    font-size: 1rem;
}

.zzz-cart-totals dd.zzz-cart-grand {
    font-weight: 700;
    font-size: 1.15rem;
    padding-bottom: 0;
}

.zzz-cart-actions-stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.zzz-cart-continue {
    display: block;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--zzz-shop-accent) !important;
    text-decoration: none !important;
}

.zzz-cart-continue:hover {
    text-decoration: underline !important;
}

.zzz-cart-clear {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.15rem 0;
    border: none;
    background: none;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    color: #b42318 !important;
    text-decoration: none;
    cursor: pointer;
    position: relative;
}

.zzz-cart-clear:hover {
    text-decoration: underline !important;
}

.zzz-cart-clear:disabled,
.zzz-cart-clear.zzz-is-loading {
    opacity: 0.85;
    cursor: wait;
    pointer-events: none;
    text-decoration: none !important;
}

.zzz-cart-clear.zzz-is-loading::before {
    content: '';
    display: inline-block;
    width: 0.85em;
    height: 0.85em;
    margin-right: 0.4em;
    vertical-align: -0.1em;
    border: 2px solid rgba(180, 35, 24, 0.25);
    border-top-color: #b42318;
    border-radius: 50%;
    animation: zzz-shop-spin 0.65s linear infinite;
}

/* Cart slideout / full cart page — overlay while clearing or saving */
.zzz-cart-drawer.is-busy .zzz-cart-drawer-panel,
.zzz-shop-page--cart.zzz-is-busy .zzz-cart-layout {
    position: relative;
}

.zzz-cart-drawer.is-busy .zzz-cart-drawer-panel::before,
.zzz-shop-page--cart.zzz-is-busy .zzz-cart-layout::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.78);
    pointer-events: all;
}

.zzz-cart-drawer.is-busy .zzz-cart-drawer-panel::after,
.zzz-shop-page--cart.zzz-is-busy .zzz-cart-layout::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 31;
    width: 2.25rem;
    height: 2.25rem;
    margin: -1.125rem 0 0 -1.125rem;
    border: 3px solid var(--zzz-shop-border, #e8dcd0);
    border-top-color: var(--zzz-shop-accent, #8b4513);
    border-radius: 50%;
    animation: zzz-shop-spin 0.65s linear infinite;
    pointer-events: none;
}

/* ---------- Checkout ---------- */
.zzz-checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    gap: clamp(1.5rem, 4vw, 2.5rem);
    align-items: start;
}

@media (max-width: 960px) {
    .zzz-checkout-layout {
        grid-template-columns: 1fr;
    }
}

.zzz-checkout-main {
    padding: clamp(1.25rem, 3vw, 1.75rem);
}

.zzz-checkout-sidebar .zzz-checkout-summary-card {
    position: sticky;
    top: 1rem;
}

.zzz-checkout-summary-card {
    padding: 1.35rem 1.5rem;
}

.zzz-checkout-summary-title {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.zzz-checkout-lines {
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
    font-size: 0.9375rem;
}

.zzz-checkout-lines li {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--zzz-shop-border);
}

.zzz-checkout-lines li:last-child {
    border-bottom: none;
}

.zzz-checkout-totals {
    margin: 0;
    padding: 0;
}

.zzz-checkout-totals dt {
    margin: 0;
    padding-top: 0.65rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--zzz-shop-muted);
}

.zzz-checkout-totals dt:first-child {
    padding-top: 0;
}

.zzz-checkout-totals dd {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

.zzz-checkout-totals dd.zzz-checkout-grand {
    font-weight: 700;
    font-size: 1.15rem;
    margin-top: 0.35rem;
}

.zzz-checkout-form fieldset {
    border: 1px solid var(--zzz-shop-border);
    border-radius: var(--zzz-shop-radius);
    padding: 1.15rem 1.25rem 1.25rem;
    margin: 0 0 1.25rem;
    background: var(--zzz-shop-surface-muted);
}

.zzz-checkout-form legend {
    padding: 0 0.35rem;
    font-weight: 700;
    font-size: 0.95rem;
}

.zzz-checkout-form label {
    display: block;
    margin: 0.85rem 0 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--zzz-shop-muted);
}

.zzz-checkout-form label:first-of-type {
    margin-top: 0.35rem;
}

.zzz-checkout-form input[type="text"],
.zzz-checkout-form input[type="email"],
.zzz-checkout-form input[type="number"] {
    display: block;
    width: 100%;
    max-width: none;
    margin-top: 0.35rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--zzz-shop-border);
    border-radius: 8px;
    font: inherit;
    background: var(--zzz-shop-surface, #fff);
}

.zzz-checkout-form input:focus-visible {
    outline: 2px solid var(--zzz-shop-accent);
    outline-offset: 1px;
}

.zzz-checkout-form label.zzz-checkout-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-weight: 600;
    cursor: pointer;
}

.zzz-checkout-form label.zzz-checkout-checkbox input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.zzz-checkout-billing-extra[hidden] {
    display: none !important;
}

.zzz-checkout-form .zzz-shop-btn {
    margin-top: 0.5rem;
}

/* ---------- Header cart widget ---------- */
/* Cart widget badge — must match the inline critical CSS in
   elements/cart_widget.php so it looks identical on shop and non-shop pages. */
.zzz-cart-widget {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    font-weight: 600;
    text-decoration: none;
    color: inherit;
    line-height: 1;
}

.zzz-cart-widget .zzz-cart-n {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 1.9em;
    min-width: 1.9em;
    padding: 0 0.45em;
    border-radius: 999px;
    background: var(--zzz-shop-accent, #c45c26);
    color: #fff;
    font-size: 0.85em;
    font-weight: 700;
    line-height: 1;
}

.zzz-cart-widget .zzz-cart-n[data-zzz-cart-count="0"] {
    display: none;
}

#header .nav li.zzz-nav-cart-li {
    display: flex;
    align-items: center;
}

/* ---------- Quick-add modal ---------- */
.zzz-quick-modal { position: fixed; inset: 0; z-index: 9999; }
.zzz-quick-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); cursor: pointer; }
.zzz-quick-modal-card {
    position: relative;
    margin: 5vh auto;
    max-width: 760px;
    width: calc(100% - 2rem);
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    padding: 1.5rem 1.5rem 1.25rem;
    font-family: Georgia, "Times New Roman", serif;
    color: #2c1810;
    --zzz-shop-accent: #8b4513;
    --zzz-shop-accent-hover: #6b3710;
    --zzz-shop-btn-text: #fff;
    --zzz-shop-border: #e8dcd0;
    --zzz-shop-surface-muted: #faf7f3;
}

.zzz-quick-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: transparent;
    border: 0;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    color: #2c1810;
    padding: 0.25rem 0.5rem;
}

.zzz-quick-modal-close:hover {
    color: #8b4513;
}

.zzz-quick-modal-layout { display: grid; grid-template-columns: 240px 1fr; gap: 1.5rem; align-items: start; }
.zzz-quick-modal-img {
    height: 240px;
    background: #f5f0ea center/contain no-repeat;
    border-radius: 8px;
    border: 1px solid #e8dcd0;
}

.zzz-quick-modal-buybox h2 { margin: 0 0 0.5rem; font-size: 1.35rem; }
.zzz-quick-modal-buybox .zzz-shop-price { padding: 0; margin: 0 0 0.75rem; font-size: 1.15rem; }
.zzz-qm-form .zzz-opt-group { border: 1px solid #e8dcd0; border-radius: 8px; padding: 0.75rem 0.9rem; margin: 0 0 0.75rem; }
.zzz-qm-form .zzz-opt-group legend { font-weight: 600; padding: 0 0.35rem; }
.zzz-qm-form .zzz-opt-label { display: block; margin: 0.3rem 0; }
.zzz-qm-qty-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
    margin: 0.5rem 0 1rem;
}
.zzz-qm-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.zzz-qm-actions .zzz-shop-btn { margin: 0; }
.zzz-qm-details { color: #8b4513; text-decoration: underline; font-size: 0.9rem; }
.zzz-qm-msg { margin: 0.6rem 0 0; min-height: 1.25rem; color: #c45c26; }
.zzz-msg--ok { color: #2e7d32; font-weight: 600; }
body.zzz-qm-open { overflow: hidden; }

@media (max-width: 640px) {
    .zzz-quick-modal-card { margin: 2.5vh auto; padding: 1rem; max-height: 95vh; }
    .zzz-quick-modal-layout { grid-template-columns: 1fr; gap: 0.75rem; }
    .zzz-quick-modal-img { height: 180px; }
}

/* ---------- Cart slideout drawer ---------- */
.zzz-cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 10050;
    pointer-events: none;
    visibility: hidden;
}

.zzz-cart-drawer.is-open {
    pointer-events: auto;
    visibility: visible;
}

.zzz-cart-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.zzz-cart-drawer.is-open .zzz-cart-drawer-backdrop {
    opacity: 1;
}

.zzz-cart-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(420px, 100vw);
    max-width: 100%;
    background: var(--zzz-shop-surface, #fff);
    color: var(--zzz-shop-text, #1a1a1a);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.28s ease;
}

.zzz-cart-drawer.is-open .zzz-cart-drawer-panel {
    transform: translateX(0);
}

.zzz-cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--zzz-shop-border, #e5e5e5);
    flex-shrink: 0;
}

.zzz-cart-drawer-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.zzz-cart-drawer-close {
    border: none;
    background: transparent;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    padding: 0.25rem 0.5rem;
}

.zzz-cart-drawer-toast {
    margin: 0;
    padding: 0.65rem 1.25rem;
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.zzz-cart-drawer-toast[hidden] {
    display: none !important;
}

.zzz-cart-drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0.75rem 1.25rem 1rem;
}

.zzz-cart-drawer-empty {
    margin: 2rem 0;
    text-align: center;
    color: var(--zzz-shop-muted, #666);
}

.zzz-cart-drawer-line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.35rem 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--zzz-shop-border, #e5e5e5);
}

.zzz-cart-drawer-line:last-child {
    border-bottom: none;
}

.zzz-cart-drawer-line-name {
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
    grid-column: 1 / -1;
}

.zzz-cart-drawer-line-meta {
    margin: 0;
    font-size: 0.82rem;
    color: var(--zzz-shop-muted, #666);
}

.zzz-cart-drawer-line-price {
    margin: 0;
    font-size: 0.9rem;
    text-align: right;
}

.zzz-cart-drawer-line-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
}

.zzz-cart-drawer-line-actions .zzz-qty-stepper {
    flex-shrink: 0;
}

.zzz-cart-drawer-remove {
    border: none;
    background: none;
    color: #b42318;
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: underline;
    padding: 0;
}

.zzz-cart-drawer-foot {
    flex-shrink: 0;
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid var(--zzz-shop-border, #e5e5e5);
    background: var(--zzz-shop-surface-muted, #f9f9f9) !important;
    color: var(--zzz-shop-text, #1a1a1a) !important;
    text-align: left !important;
}

.zzz-cart-drawer-foot[hidden] {
    display: none !important;
}

.zzz-cart-drawer-totals {
    margin: 0 0 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
}

.zzz-cart-drawer-total-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.zzz-cart-drawer-total-line span:last-child {
    font-weight: 600;
}

.zzz-cart-drawer-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin: 0 0 1rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--zzz-shop-border, #e5e5e5);
    font-size: 1.05rem;
}

.zzz-cart-drawer-total-row[hidden] {
    display: none !important;
}

.zzz-cart-drawer-total-label {
    font-weight: 600;
}

.zzz-cart-drawer-total-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--zzz-shop-accent, #8b4513);
}

.zzz-cart-drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.zzz-cart-drawer-continue {
    margin-top: 0.15rem;
}

body.zzz-cart-drawer-open {
    overflow: hidden;
}

@media (max-width: 480px) {
    .zzz-cart-drawer-panel {
        width: 100vw;
    }
}
