:root {
    --ink: #18352a;
    --muted: #60736b;
    --line: #d9e5dd;
    --paper: #fbfdf9;
    --panel: #ffffff;
    --green: #08753d;
    --green-dark: #05552d;
    --red: #c52034;
    --gold: #efb900;
    --orange: #e96300;
    --shadow: 0 18px 45px rgba(17, 52, 37, 0.12);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        linear-gradient(135deg, rgba(8, 117, 61, 0.08), rgba(239, 185, 0, 0.12)),
        var(--paper);
    color: var(--ink);
}

body.drawer-open {
    overflow: hidden;
}

a {
    color: var(--green);
    font-weight: 800;
}

.site-header {
    align-items: center;
    background: var(--green);
    color: #fff;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 24px clamp(16px, 4vw, 48px);
}

.header-actions {
    display: flex;
    gap: 10px;
}

.site-header h1,
.checkout-panel h1 {
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.05;
    margin: 0;
}

.eyebrow {
    color: inherit;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.admin-link,
.primary-button,
.icon-button,
.status-form button {
    background: var(--red);
    border: 0;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 1rem;
    font-weight: 900;
    justify-content: center;
    padding: 12px 18px;
    text-decoration: none;
}

.logout-link {
    background: var(--ink);
}

.primary-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

main {
    padding: clamp(16px, 4vw, 48px) clamp(16px, 4vw, 48px) 120px;
}

.alert {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 8px;
    color: #9f1239;
    margin: 0 auto 24px;
    max-width: 1120px;
    padding: 14px 18px;
}

.alert p {
    margin: 4px 0;
}

.order-form {
    display: grid;
    gap: 28px;
}

.products-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.bundle-panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 252, 239, 0.96)),
        #fff8df;
    border: 2px solid rgba(8, 117, 61, 0.35);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    padding: clamp(18px, 4vw, 28px);
}

.special-ribbon {
    background: var(--red);
    color: #fff;
    font-size: clamp(1.7rem, 4vw, 3.3rem);
    font-weight: 1000;
    line-height: 1;
    margin: calc(clamp(18px, 4vw, 28px) * -1) calc(clamp(18px, 4vw, 28px) * -1) 22px;
    padding: 18px clamp(18px, 4vw, 32px);
    text-align: center;
    text-transform: uppercase;
}

.bundle-header {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

.bundle-header .eyebrow {
    color: var(--green-dark);
}

.bundle-header h2 {
    color: var(--green-dark);
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    margin: 0;
    text-transform: uppercase;
}

.regular-price {
    background: var(--gold);
    border-radius: 8px;
    color: var(--ink);
    display: grid;
    min-width: 150px;
    padding: 12px 16px;
    text-align: center;
    text-transform: uppercase;
}

.regular-price span,
.regular-price small {
    font-size: 0.75rem;
    font-weight: 1000;
}

.regular-price strong {
    font-size: 1.9rem;
    line-height: 1;
}

.bundle-grid {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 22px;
}

.bundle-card {
    background: rgba(255, 255, 255, 0.68);
    border-right: 1px dashed rgba(8, 117, 61, 0.45);
    display: grid;
    gap: 4px;
    min-height: 178px;
    padding: 20px 16px;
    position: relative;
    text-align: center;
}

.bundle-card:last-child {
    border-right: 0;
}

.bundle-card span,
.bundle-card small {
    color: var(--green-dark);
    font-weight: 1000;
    text-transform: uppercase;
}

.bundle-card strong {
    color: var(--red);
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1;
}

.bundle-card b {
    background: var(--red);
    border-radius: 4px;
    color: #fff;
    display: inline-flex;
    font-size: 0.85rem;
    font-weight: 1000;
    justify-self: center;
    padding: 5px 12px;
    text-transform: uppercase;
}

.bundle-card em {
    background: var(--green);
    border-radius: 4px;
    color: #fff36f;
    font-style: normal;
    font-weight: 1000;
    justify-self: center;
    margin-top: 8px;
    padding: 5px 12px;
    text-transform: uppercase;
}

.bundle-card.best-deal {
    border: 2px solid var(--gold);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(239, 185, 0, 0.2);
    margin: -10px 0;
    z-index: 1;
}

.bundle-card.best-value b {
    background: var(--green);
}

.quick-bundle-button {
    margin: 0;
}

.five-flavor-band {
    align-items: center;
    border: 2px solid rgba(8, 117, 61, 0.35);
    border-radius: 8px;
    display: grid;
    gap: 18px;
    grid-template-columns: auto 1fr auto;
    margin-top: 26px;
    padding: 16px;
}

.bundle-badge {
    background: var(--green);
    border-radius: 999px;
    color: #fff;
    display: grid;
    height: 132px;
    place-content: center;
    text-align: center;
    text-transform: uppercase;
    width: 132px;
}

.bundle-badge span,
.bundle-badge strong {
    color: #fff36f;
    font-size: 1.15rem;
    font-weight: 1000;
    line-height: 1;
}

.bundle-badge em {
    color: #fff;
    font-size: 1.6rem;
    font-style: normal;
    font-weight: 1000;
    line-height: 1.1;
    margin-top: 5px;
}

.five-flavor-band h3 {
    color: var(--green-dark);
    font-size: clamp(1.2rem, 2.8vw, 2rem);
    margin: 0;
    text-transform: uppercase;
}

.five-flavor-band p {
    color: var(--muted);
    font-weight: 800;
    margin: 4px 0 0;
}

.product-card,
.checkout-panel,
.order-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.product-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.product-card img {
    aspect-ratio: 4 / 5;
    display: block;
    height: auto;
    object-fit: cover;
    width: 100%;
}

.product-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 14px;
    justify-content: space-between;
    padding: 16px;
}

.product-body h2,
.checkout-panel h2,
.order-card h2,
.order-card h3 {
    line-height: 1.15;
    margin: 0;
}

.product-body h2 {
    font-size: 1.08rem;
    text-transform: uppercase;
}

.product-body p,
.hint,
.lead,
.order-card p {
    color: var(--muted);
    margin: 8px 0 0;
}

.product-meta,
.receipt-row,
.order-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.product-meta span {
    background: #e9f5ec;
    border-radius: 999px;
    color: var(--green-dark);
    font-weight: 900;
    padding: 6px 10px;
}

.product-meta strong {
    color: var(--orange);
    font-size: 1.2rem;
}

.price-display,
.currency-symbol,
.price-value {
    white-space: nowrap;
}

.currency-symbol {
    margin-right: 1px;
}

.qty-control,
.fields-grid label,
.status-form label {
    color: var(--ink);
    display: grid;
    font-weight: 800;
    gap: 8px;
}

input,
select {
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    font: inherit;
    padding: 12px;
    width: 100%;
}

.qty-control input {
    max-width: 120px;
}

.checkout-panel {
    margin: 0 auto;
    max-width: 1120px;
    padding: clamp(18px, 4vw, 32px);
}

.drawer-backdrop {
    background: rgba(13, 31, 23, 0.5);
    inset: 0;
    position: fixed;
    z-index: 20;
}

.payment-drawer {
    bottom: 0;
    margin: 0;
    max-height: min(86vh, 860px);
    max-width: none;
    overflow-y: auto;
    position: fixed;
    right: 0;
    top: 0;
    transform: translateX(105%);
    transition: transform 180ms ease;
    width: min(720px, 100vw);
    z-index: 30;
}

.payment-drawer.is-open {
    transform: translateX(0);
}

.drawer-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.drawer-header .eyebrow {
    color: var(--green);
}

.icon-button {
    align-items: center;
    aspect-ratio: 1 / 1;
    background: var(--green);
    flex: 0 0 44px;
    font-size: 1.25rem;
    margin: 0;
    padding: 0;
    width: 44px;
}

.cart-summary {
    background: #f6fbf7;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-top: 18px;
    padding: 16px;
}

.cart-summary h3 {
    margin: 0 0 8px;
}

.cart-bar {
    align-items: center;
    background: var(--ink);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    bottom: 18px;
    box-shadow: 0 18px 45px rgba(17, 52, 37, 0.28);
    color: #fff;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    left: 50%;
    padding: 12px 14px 12px 18px;
    position: fixed;
    transform: translateX(-50%);
    width: min(760px, calc(100vw - 32px));
    z-index: 15;
}

.cart-bar strong {
    display: block;
    font-size: 1rem;
}

.cart-bar span {
    color: #dcebe2;
    display: block;
    font-weight: 800;
    margin-top: 2px;
}

.cart-button {
    margin: 0;
    min-width: 190px;
    width: auto;
}

.panel-section + .panel-section {
    border-top: 1px solid var(--line);
    margin-top: 24px;
    padding-top: 24px;
}

.fields-grid,
.payment-grid,
.order-columns {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 16px;
}

.payment-option {
    align-items: flex-start;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    padding: 14px;
}

.payment-option:has(input:checked) {
    border-color: var(--green);
    box-shadow: inset 0 0 0 1px var(--green);
}

.payment-choice {
    align-items: flex-start;
    cursor: pointer;
    display: flex;
    gap: 12px;
}

.payment-choice input {
    margin-top: 4px;
    width: auto;
}

.payment-choice span {
    display: grid;
    gap: 3px;
}

.payment-choice em {
    color: var(--red);
    font-style: normal;
    font-weight: 900;
}

.payment-choice small {
    color: var(--muted);
}

.qr-link {
    align-items: center;
    background: #f6fbf7;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--green-dark);
    cursor: pointer;
    display: grid;
    font: inherit;
    gap: 8px;
    justify-items: center;
    padding: 12px;
    text-align: center;
    text-decoration: none;
}

.qr-link img {
    aspect-ratio: 1 / 1;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: block;
    max-width: 132px;
    padding: 8px;
    width: 100%;
}

.qr-link span {
    font-size: 0.9rem;
    font-weight: 900;
}

.cash-icon {
    align-items: center;
    background: var(--green);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 2rem;
    height: 72px;
    justify-content: center;
    width: 72px;
}

.upload-box {
    align-items: center;
    border: 2px dashed var(--line);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    margin-top: 16px;
    padding: 18px;
}

.primary-button {
    margin-top: 24px;
    width: 100%;
}

.confirmation {
    display: grid;
    min-height: 100vh;
    place-items: center;
}

.login-panel {
    max-width: 440px;
    width: min(440px, calc(100vw - 32px));
}

.login-panel .alert {
    margin: 18px 0 0;
}

.login-form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.login-form label {
    color: var(--ink);
    display: grid;
    font-weight: 800;
    gap: 8px;
}

.receipt-block {
    border-top: 1px solid var(--line);
    margin-top: 24px;
    padding-top: 20px;
}

.receipt-row {
    padding: 8px 0;
}

.receipt-total {
    border-top: 1px solid var(--line);
    color: var(--green-dark);
    font-size: 1.15rem;
    font-weight: 900;
    margin-top: 8px;
}

.discount-row {
    color: var(--green-dark);
    font-weight: 900;
}

.selected-payment {
    align-items: center;
    background: #f6fbf7;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 18px;
    grid-template-columns: 150px 1fr;
    margin-top: 18px;
    padding: 16px;
}

.selected-payment[hidden] {
    display: none;
}

.selected-payment h3 {
    margin: 0 0 8px;
}

.selected-payment p {
    margin: 6px 0 0;
}

.selected-payment-qr img {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: block;
    padding: 10px;
    width: 100%;
}

.selected-payment .secondary-button {
    margin-top: 14px;
    width: auto;
}

.payment-page {
    max-width: 760px;
}

.qr-detail {
    align-items: center;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(160px, 220px) 1fr;
    margin-top: 24px;
}

.qr-detail img {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    width: 100%;
}

.payment-details {
    display: grid;
    gap: 12px;
    margin: 0;
}

.payment-details div {
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
}

.payment-details dt {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.payment-details dd {
    font-size: 1.2rem;
    font-weight: 900;
    margin: 4px 0 0;
}

.secondary-button {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--green-dark);
    display: inline-flex;
    font-weight: 900;
    justify-content: center;
    margin-top: 12px;
    padding: 12px 18px;
    text-decoration: none;
    width: 100%;
}

.admin-main {
    margin: 0 auto;
    max-width: 1180px;
}

.price-panel {
    margin-bottom: 24px;
}

.price-form {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 18px;
}

.price-form label {
    color: var(--ink);
    display: grid;
    font-weight: 800;
    gap: 8px;
}

.price-form .primary-button {
    align-self: end;
    margin: 0;
}

.orders-list {
    display: grid;
    gap: 18px;
}

.order-card {
    padding: 20px;
}

.status-pill {
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 900;
    padding: 8px 10px;
    text-transform: capitalize;
    white-space: nowrap;
}

.status-pending_review {
    background: #fff7ed;
    color: #9a3412;
}

.status-paid {
    background: #dcfce7;
    color: #166534;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.status-form {
    align-items: end;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 12px;
    margin-top: 18px;
    padding-top: 18px;
}

.status-form label {
    max-width: 240px;
}

.status-form button {
    background: var(--green);
    min-height: 48px;
}

.empty-state {
    text-align: center;
}

@media (max-width: 640px) {
    .site-header,
    .order-heading,
    .status-form,
    .qr-detail {
        align-items: stretch;
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .admin-link {
        width: 100%;
    }

    .header-actions {
        flex-direction: column;
        width: 100%;
    }

    .cart-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .cart-button {
        min-width: 0;
        width: 100%;
    }

    .payment-drawer {
        max-height: 92vh;
        top: auto;
        transform: translateY(105%);
        width: 100vw;
    }

    .payment-drawer.is-open {
        transform: translateY(0);
    }

    .selected-payment {
        grid-template-columns: 1fr;
    }

    .selected-payment-qr img {
        max-width: 220px;
    }

    .bundle-header,
    .five-flavor-band {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .regular-price,
    .bundle-badge {
        justify-self: stretch;
        width: auto;
    }

    .bundle-badge {
        border-radius: 8px;
        height: auto;
        min-height: 100px;
    }

    .bundle-grid {
        gap: 12px;
        grid-template-columns: 1fr;
    }

    .bundle-card,
    .bundle-card:last-child {
        border: 1px solid var(--line);
        border-radius: 8px;
    }

    .bundle-card.best-deal {
        margin: 0;
    }
}
