:root {
    --bg: #f7f4ee;
    --surface: #ffffff;
    --surface-soft: #fbfaf7;
    --text: #8f9999;
    --muted: #77736b;
    --border: #e5e0d6;
    --accent: #b6c1c1;
    --accent-dark: #9f7b46;
    --accent-soft: #f2e8d8;
    --success: #397154;
    --danger: #9b4848;
    --radius: 18px;
    --shadow: 0 10px 30px rgba(30, 28, 24, .06);
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; }

.shop-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.shop-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(247,244,238,.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.shop-header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.shop-brand { text-decoration: none; display: flex; flex-direction: column; gap: 3px; }
.shop-brand-name { font-size: 19px; font-weight: 780; letter-spacing: -.035em; }
.shop-brand-tagline { color: var(--muted); font-size: 11px; }
.shop-header-actions { display: flex; align-items: center; gap: 16px; }
.shop-nav-link, .shop-cart-link { text-decoration: none; font-size: 14px; font-weight: 650; }
.shop-cart-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 13px;
    background: var(--text);
    color: #fff;
    border-radius: 999px;
}
.shop-cart-count {
    min-width: 21px;
    height: 21px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    font-size: 11px;
}

.shop-hero { padding: 68px 0 38px; }
.shop-hero-inner {
    background: #ede5d9;
    border: 1px solid #e1d6c5;
    border-radius: 28px;
    padding: 54px;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.shop-eyebrow {
    margin: 0 0 12px;
    color: var(--accent-dark);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .13em;
}
.shop-hero h1 { margin: 0; max-width: 720px; font-size: clamp(38px, 6vw, 68px); line-height: .98; letter-spacing: -.06em; }
.shop-hero p { max-width: 620px; margin: 20px 0 0; color: #686159; font-size: 16px; line-height: 1.7; }

.shop-toolbar { padding: 8px 0 24px; }
.shop-toolbar-row { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.shop-search { flex: 1; max-width: 420px; }
.shop-series-filter {
    width: min(280px, 100%);
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.shop-filter-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.shop-input, .shop-select, .shop-textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    outline: 0;
}
.shop-input, .shop-select { min-height: 48px; padding: 0 14px; }
.shop-textarea { min-height: 112px; padding: 13px 14px; resize: vertical; }
.shop-input:focus, .shop-select:focus, .shop-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.shop-products { padding: 10px 0 70px; }
.shop-section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.shop-section-head h2 { margin: 0; font-size: 28px; letter-spacing: -.045em; }
.shop-result-count { color: var(--muted); font-size: 13px; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.product-card {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}
.product-card[hidden] { display: none !important; }
.product-image-box { aspect-ratio: 1 / 1; background: #f0ede7; overflow: hidden; }
.product-image-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-image-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #aaa59c; font-size: 12px; }
.product-card-body { padding: 17px; display: flex; flex-direction: column; flex: 1; }
.product-category { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 750; }
.product-name { margin: 7px 0 4px; font-size: 16px; line-height: 1.35; letter-spacing: -.025em; }
.product-price { font-size: 15px; font-weight: 750; }
.product-stock { margin-top: 8px; color: var(--muted); font-size: 12px; }
.product-stock.low { color: #9a6e2f; }
.product-card-actions { margin-top: auto; padding-top: 16px; }
.shop-button {
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: #000;
    padding: 0 17px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    gap: 8px;
}
.shop-button:hover { background: #93a0a0; }
.shop-button.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.shop-button.full { width: 100%; }
.shop-button:disabled { opacity: .45; cursor: not-allowed; }

.shop-empty {
    padding: 50px 24px;
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--muted);
}

.shop-page { padding: 52px 0 80px; }
.shop-page-heading { margin-bottom: 28px; }
.shop-page-heading h1 { margin: 0; font-size: 38px; letter-spacing: -.055em; }
.shop-page-heading p { margin: 8px 0 0; color: var(--muted); line-height: 1.6; }

.cart-layout, .checkout-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(300px,.75fr); gap: 22px; align-items: start; }
.shop-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.shop-card-header { padding: 19px 20px; border-bottom: 1px solid var(--border); }
.shop-card-header h2, .shop-card-header h3 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.shop-card-body { padding: 20px; }
.cart-item { display: grid; grid-template-columns: 82px minmax(0,1fr) auto; gap: 15px; padding: 16px 0; border-bottom: 1px solid var(--border); align-items: center; }
.cart-item:first-child { padding-top: 0; }
.cart-item:last-child { border-bottom: 0; padding-bottom: 0; }
.cart-thumb { width: 82px; height: 82px; border-radius: 12px; object-fit: cover; background: #efede8; }
.cart-item-name { margin: 0 0 5px; font-weight: 750; }
.cart-item-price { color: var(--muted); font-size: 13px; }
.cart-qty-row { margin-top: 9px; display: flex; align-items: center; gap: 8px; }
.qty-button { width: 34px; height: 34px; border: 1px solid var(--border); background: var(--surface); border-radius: 9px; cursor: pointer; }
.qty-value { min-width: 30px; text-align: center; font-size: 13px; font-weight: 700; }
.cart-remove { border: 0; background: none; color: var(--danger); padding: 0; cursor: pointer; font-size: 12px; }
.cart-line-total { font-weight: 780; text-align: right; white-space: nowrap; }
.summary-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; color: var(--muted); font-size: 14px; }
.summary-row.total { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--text); font-size: 18px; font-weight: 800; }
.sticky-card { position: sticky; top: 100px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field.full { grid-column: 1 / -1; }
.form-label { font-size: 12px; font-weight: 750; }
.form-help { color: var(--muted); font-size: 11px; line-height: 1.5; }
.required { color: var(--danger); }
.checkout-section + .checkout-section { margin-top: 22px; }
.payment-panel { background: var(--surface-soft); border: 1px solid var(--border); border-radius: 15px; padding: 18px; text-align: center; }
.payment-qr { width: min(260px,100%); aspect-ratio: 1/1; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 8px; }
.qr-placeholder { width: min(260px,100%); aspect-ratio: 1/1; margin: 0 auto; border: 1px dashed var(--border); border-radius: 14px; display: grid; place-items: center; padding: 24px; color: var(--muted); background: #fff; }
.payment-panel p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.upload-box { margin-top: 16px; padding: 16px; border: 1px dashed var(--border); border-radius: 12px; background: #fff; text-align: left; }
.upload-box input { width: 100%; }

.alert { margin-bottom: 18px; padding: 14px 16px; border-radius: 12px; font-size: 13px; line-height: 1.5; }
.alert.error { background: #fbefef; color: #8e4141; border: 1px solid #efd3d3; }
.alert.success { background: #eef7f1; color: #346c4e; border: 1px solid #d6eadc; }

.confirmation-card { max-width: 680px; margin: 20px auto 0; text-align: center; padding: 38px; }
.confirmation-icon { width: 58px; height: 58px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: #edf6f0; color: var(--success); font-size: 26px; font-weight: 800; }
.confirmation-card h1 { margin: 0; font-size: 34px; letter-spacing: -.05em; }
.order-number { margin: 14px auto; display: inline-flex; padding: 8px 12px; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 999px; font-size: 13px; font-weight: 800; }
.confirmation-details { margin: 24px 0; text-align: left; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 12px 0; }

/* Added-to-cart toast */
.cart-toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1000;
    width: min(360px, calc(100vw - 32px));
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #d6eadc;
    border-radius: 14px;
    background: #f7fcf8;
    color: var(--text);
    box-shadow: 0 16px 42px rgba(30, 30, 26, .16);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.cart-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.cart-toast.is-warning {
    border-color: #eadcc9;
    background: #fffaf2;
}

.cart-toast-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e7f5eb;
    color: var(--success);
    font-weight: 900;
}

.cart-toast.is-warning .cart-toast-icon {
    background: #f7ead8;
    color: #9a6e2f;
}

.cart-toast-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-toast-copy strong {
    font-size: 13px;
}

.cart-toast-copy span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.shop-footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); font-size: 12px; }
.shop-footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 1000px) {
    .product-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
    .sticky-card { position: static; }
}
@media (max-width: 760px) {
    .shop-shell { width: min(100% - 28px, 1180px); }
    .shop-header-inner { min-height: 68px; }
    .shop-brand-tagline, .shop-nav-link { display: none; }
    .shop-hero { padding-top: 30px; }
    .shop-hero-inner { padding: 34px 24px; min-height: 230px; border-radius: 22px; }
    .shop-toolbar-row { flex-direction: column; align-items: stretch; }
    .shop-search { max-width: none; }
    .shop-series-filter { width: 100%; }
    .cart-toast {
        right: 14px;
        bottom: 14px;
        width: calc(100vw - 28px);
    }
    .product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
    .product-card-body { padding: 14px; }
    .shop-page { padding-top: 34px; }
    .shop-page-heading h1 { font-size: 32px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-field.full { grid-column: auto; }
}
@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr; }
    .shop-hero h1 { font-size: 42px; }
    .cart-item { grid-template-columns: 64px minmax(0,1fr); }
    .cart-thumb { width: 64px; height: 64px; }
    .cart-line-total { grid-column: 2; text-align: left; }
    .confirmation-card { padding: 28px 20px; }
}


/* =========================
   J&T SHIPPING
========================= */

.shipping-readonly {
    min-height: 44px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
}

.shipping-readonly strong {
    font-size: 13px;
}

.shipping-readonly span,
.shipping-weight-note {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.shipping-weight-note {
    padding: 8px 0 10px;
}

.shipping-quote-error {
    margin-top: 12px;
    margin-bottom: 0;
}

.shop-button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

/* =========================
   SHOP BRAND + LOGO
   Preserves the current logo + title header setup.
========================= */

.shop-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    text-decoration: none;
}

.shop-logo {
    display: block;
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
}

.shop-brand-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.shop-brand-name {
    font-size: 19px;
    font-weight: 780;
    letter-spacing: -0.035em;
}

.shop-brand-tagline {
    color: var(--muted);
    font-size: 11px;
}

@media (max-width: 760px) {
    .shop-logo {
        width: 48px;
        height: 48px;
    }

    .shop-brand-name {
        font-size: 16px;
    }

    .shop-brand-tagline {
        display: none;
    }
}


/* =========================
   ROBUST HEADER LOGO SIZING
   Kept at the end so it wins over older/general image rules.
========================= */

.shop-header .shop-brand {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    flex-shrink: 0;
    text-decoration: none;
}

.shop-header .shop-brand .shop-logo {
    display: block !important;
    width: 64px !important;
    max-width: 64px !important;
    height: 64px !important;
    max-height: 64px !important;
    object-fit: contain !important;
    flex: 0 0 64px !important;
}

.shop-header .shop-brand .shop-brand-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

@media (max-width: 760px) {
    .shop-header .shop-brand .shop-logo {
        width: 48px !important;
        max-width: 48px !important;
        height: 48px !important;
        max-height: 48px !important;
        flex-basis: 48px !important;
    }
}

/* Make add-to-cart feedback unmistakable */
.cart-toast {
    visibility: visible;
}

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

.cart-toast.is-visible {
    display: flex;
}


/* =========================
   FREE SHIPPING RIBBON
========================= */

.shop-announcement-bar {
    width: 100%;
    background: #b6c1c1;
    color: #000;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.shop-announcement-inner {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 7px;
    padding-bottom: 7px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.35;
}

@media (max-width: 760px) {
    .shop-announcement-inner {
        min-height: 32px;
        padding-top: 6px;
        padding-bottom: 6px;
        font-size: 11px;
    }
}


/* =========================
   CART VISIBILITY
========================= */

/* Empty cart stays understated. */
.shop-cart-link {
    transition:
        background .18s ease,
        color .18s ease,
        box-shadow .18s ease,
        transform .18s ease;
}

/* A non-empty cart gets a warmer, more noticeable treatment. */
.shop-cart-link.has-items {
    background: #b6c1c1;
    color: #242421;
    box-shadow: 0 7px 20px rgba(36, 36, 33, .14);
}

.shop-cart-link.has-items:hover {
    background: #93a0a0;
    color: #fff;
}

.shop-cart-link.has-items .shop-cart-count {
    background: #242421;
    color: #fff;
    font-weight: 800;
}

/* Replays each time an item is successfully added. */
.shop-cart-link.cart-bump {
    animation: shopCartBump .46s ease;
}

@keyframes shopCartBump {
    0% {
        transform: scale(1);
    }

    35% {
        transform: scale(1.12);
    }

    68% {
        transform: scale(.97);
    }

    100% {
        transform: scale(1);
    }
}

/* Persistent per-product indication that survives the toast. */
.product-card-actions.has-cart-item {
    position: relative;
}

.product-cart-status {
    margin-top: 9px;
    padding: 7px 10px;
    border: 1px solid #d8e7d9;
    border-radius: 9px;
    background: #f2f8f2;
    color: #47704c;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.3;
    text-align: center;
}

/* Slightly stronger success toast. */
.cart-toast:not(.is-warning) {
    border-color: #bcd8c2;
    background: #eef8f0;
}

.cart-toast.is-visible:not(.is-warning) {
    box-shadow:
        0 18px 48px rgba(30, 30, 26, .19),
        0 0 0 3px rgba(217, 173, 101, .10);
}

@media (prefers-reduced-motion: reduce) {
    .shop-cart-link.cart-bump {
        animation: none;
    }
}

/* =========================
   PRODUCT CARD QUANTITY
========================= */

.product-quantity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.product-quantity-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.product-quantity-stepper {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.product-qty-button {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: var(--surface-soft);
    color: var(--text);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.product-qty-button:hover:not(:disabled) {
    background: var(--accent-soft);
}

.product-qty-button:disabled {
    color: #b9b5ad;
    cursor: not-allowed;
}

.product-qty-value {
    min-width: 38px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-size: 13px;
    font-weight: 800;
}

.product-quantity.is-disabled {
    opacity: .6;
}

@media (max-width: 480px) {
    .product-quantity {
        margin-bottom: 12px;
    }

    .product-qty-button {
        width: 40px;
        height: 40px;
    }

    .product-qty-value {
        height: 40px;
        min-width: 42px;
    }
}

/* Fix payment proof upload box */
.upload-box {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 16px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: #fff;
    text-align: left;
}

.upload-box .form-label {
    display: block;
}

.upload-box .form-help {
    display: block;
    margin: 8px 0 12px;
}

.upload-box input[type="file"] {
    display: block;
    width: 100%;
    max-width: 100%;
}

/* =========================
   PRODUCT SIZE VARIANTS
========================= */

.product-variant-picker {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-variant-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.product-variant-select {
    width: 100%;
    min-height: 40px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    outline: 0;
}

.product-variant-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.product-variant-single {
    margin-top: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}



/* =========================
   EVENT PICKUP CHECKOUT
========================= */

.fulfilment-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.fulfilment-choice {
    min-height: 82px;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition:
        border-color .16s ease,
        box-shadow .16s ease,
        background .16s ease;
}

.fulfilment-choice:hover {
    border-color: #b8b5ad;
}

.fulfilment-choice:has(input:checked) {
    border-color: var(--accent);
    background: #f7f9f9;
    box-shadow: 0 0 0 2px rgba(182, 193, 193, .22);
}

.fulfilment-choice.is-disabled {
    opacity: .58;
    cursor: not-allowed;
    background: var(--surface-soft);
}

.fulfilment-choice input {
    margin-top: 3px;
}

.fulfilment-choice-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1.4;
}

.fulfilment-choice-copy strong {
    color: var(--text);
    font-size: 13px;
}

.fulfilment-choice-copy span {
    color: var(--muted);
    font-size: 11px;
}

.fulfilment-fields[hidden] {
    display: none !important;
}

.fulfilment-fields > .form-grid {
    margin: 0;
}

.pickup-event-card {
    min-height: 76px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 14px 15px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-soft);
}

.pickup-event-card strong {
    color: var(--text);
    font-size: 13px;
}

.pickup-event-card span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

@media (max-width: 650px) {
    .fulfilment-choice-grid {
        grid-template-columns: 1fr;
    }
}
