:root {
    --brand: #c2410c;
    --brand-dark: #9a3412;
    --bg: #fffaf5;
    --card: #ffffff;
    --ink: #1c1917;
    --muted: #78716c;
    --line: #f0e4d8;
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.45;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 250, 245, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.brand {
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.brand small {
    display: block;
    font-weight: 500;
    font-size: 11px;
    color: var(--muted);
}

.cart-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.cart-link span[data-cart-count] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #fff;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 800;
}

.wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px;
}

.hero h1 {
    font-size: 24px;
    margin: 8px 0 4px;
    letter-spacing: -0.02em;
}

.hero p {
    margin: 0;
    color: var(--muted);
}

.notice {
    margin: 16px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff1e6;
    border: 1px solid #fed7aa;
    color: #7c2d12;
    font-size: 14px;
}

.search {
    display: flex;
    gap: 8px;
    margin: 16px 0 8px;
}

.search input {
    flex: 1;
    min-width: 0;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font: inherit;
}

.search button {
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-weight: 700;
}

.chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 0 -16px;
    padding: 4px 16px 10px;
    scrollbar-width: none;
}

.chips::-webkit-scrollbar {
    display: none;
}

.chip {
    flex: 0 0 auto;
    padding: 9px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    font-size: 14px;
    color: var(--muted);
    white-space: nowrap;
}

.chip.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    font-weight: 600;
}

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

@media (min-width: 560px) {
    .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background: #f5ede4;
    color: var(--muted);
    font-size: 13px;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
}

.name {
    display: -webkit-box;
    overflow: hidden;
    min-height: 2.6em;
    font-size: 14px;
    font-weight: 600;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.price {
    font-weight: 800;
    color: var(--brand-dark);
}

.add {
    margin-top: auto;
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--brand);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
}

.closed {
    display: block;
    padding: 10px 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.empty {
    padding: 32px 0;
    color: var(--muted);
    text-align: center;
}

.detail .media {
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius);
    background: #f5ede4;
}

.detail .media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail h1 {
    margin: 16px 0 4px;
    font-size: 22px;
}

.detail .price {
    font-size: 22px;
}

.desc {
    color: var(--muted);
    white-space: pre-line;
}

.variants {
    margin: 16px 0;
    padding: 0;
    border: 0;
}

.variants legend {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
}

.variant {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin-bottom: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.variant input {
    accent-color: var(--brand);
}

.variant span:last-child {
    margin-left: auto;
    font-weight: 700;
}

.qty {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
}

.qty button {
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-size: 20px;
    cursor: pointer;
}

.qty input {
    width: 64px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font: inherit;
    text-align: center;
}

.btn-primary {
    display: block;
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 14px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary[disabled] {
    opacity: 0.5;
}

.back {
    display: inline-block;
    padding: 8px 0;
    color: var(--muted);
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 50;
    padding: 12px 18px;
    border-radius: 999px;
    background: #1c1917;
    color: #fff;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 20px);
    transition: 0.2s;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.site-footer {
    padding: 24px 16px 40px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.cart-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.cart-item {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.cart-info {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.cart-name {
    font-weight: 600;
}

.cart-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.stepper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stepper button {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font-size: 18px;
    cursor: pointer;
}

.stepper span {
    min-width: 24px;
    font-weight: 700;
    text-align: center;
}

.cart-sub {
    margin-left: auto;
    color: var(--brand-dark);
    font-weight: 800;
}

.cart-remove {
    padding: 8px;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}

.cart-summary {
    position: sticky;
    bottom: 0;
    margin: 16px -16px -16px;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 250, 245, 0.97);
    backdrop-filter: blur(8px);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 18px;
}

.cart-total strong {
    color: var(--brand-dark);
    font-size: 22px;
}

.cart-summary .btn-primary {
    margin-top: 10px;
    text-align: center;
    line-height: 52px;
}

.error {
    color: #b91c1c;
}

/* Checkout */
.checkout h1 {
    margin: 8px 0 16px;
}

.checkout .card {
    margin-bottom: 14px;
    padding: 16px;
}

.checkout .card h2,
.summary-card h2 {
    margin: 0 0 12px;
    font-size: 17px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 12px;
}

.field label {
    font-size: 14px;
    font-weight: 600;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font: inherit;
}

.field textarea {
    min-height: 80px;
    resize: vertical;
}

.radio-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.radio input {
    margin-top: 4px;
    accent-color: var(--brand);
}

.radio span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

.city-results {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 8px 0 12px;
}

.city-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.city-option small {
    color: var(--muted);
}

.shipping-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shipping-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.shipping-option input {
    accent-color: var(--brand);
}

.shipping-option .so-name {
    flex: 1;
    font-weight: 600;
}

.shipping-option .so-name small {
    display: block;
    color: var(--muted);
    font-weight: 400;
}

.shipping-option .so-price {
    color: var(--brand-dark);
    font-weight: 800;
}

.summary-card {
    margin: 0 0 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.summary-card .cart-list {
    margin: 0 0 12px;
}

.summary-card .cart-item {
    padding: 8px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
}

.checkout .btn-primary {
    margin-bottom: 32px;
}

/* Halaman pesanan */
.success {
    gap: 8px;
    padding: 18px;
}

.success h1 {
    margin: 4px 0;
    font-size: 22px;
}

.eyebrow {
    margin: 0;
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pay-box {
    margin: 16px 0;
    padding: 14px;
    border: 1px dashed var(--line);
    border-radius: 14px;
    background: #fffaf5;
}

.pay-box h2 {
    margin: 0 0 6px;
    font-size: 17px;
}

.qris {
    max-width: 220px;
    margin: 12px auto;
    border-radius: 12px;
}

.btn-outline {
    display: block;
    width: 100%;
    min-height: 48px;
    margin-top: 10px;
    border: 1px solid var(--brand);
    border-radius: 12px;
    background: #fff;
    color: var(--brand-dark);
    font: inherit;
    font-weight: 700;
    text-align: center;
    line-height: 48px;
}
