:root {
    --color-primary: #8b3a2a;
    --color-primary-dark: #6e2e22;
    --color-text: #1c1410;
    --color-text-muted: #6b574c;
    --color-background: #f6f1ea;
    --color-background-alt: #efe2d2;
    --color-surface: #fffdf9;
    --color-line: #e6d9cc;
    --color-ok: #2f6b4f;
    --color-header: #1c1410;
    --color-header-text: #f6f1ea;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body.storefront {
    margin: 0;
    min-height: 100%;
    font-family: Inter, "Segoe UI", system-ui, sans-serif;
    background: var(--color-background);
    color: var(--color-text);
    line-height: 1.45;
}

.sf-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--color-header);
    color: var(--color-header-text);
    padding: 0.7rem 1.15rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

.sf-header a {
    color: inherit;
    text-decoration: none;
}

.sf-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 0.65rem;
}

.sf-brand img {
    display: block;
    height: 2.35rem;
    width: auto;
    max-width: 11rem;
    object-fit: contain;
}

.sf-brand-name {
    font-weight: 700;
    letter-spacing: 0.02em;
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sf-nav {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.92rem;
    font-weight: 650;
}

.sf-intro {
    color: var(--color-text-muted);
    margin: 0 0 1rem;
}

.sf-choices {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sf-choice {
    display: block;
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: 1rem;
    padding: 1.1rem 1.15rem;
    text-decoration: none;
    color: inherit;
}

a.sf-choice:hover {
    border-color: var(--color-primary);
}

.sf-choice strong {
    display: block;
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
}

.sf-choice > span {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.sf-agg {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.sf-bag {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(246, 241, 234, 0.35);
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-header-text);
}

.sf-bag-icon {
    width: 22px;
    height: 22px;
    display: block;
    flex-shrink: 0;
    fill: currentColor;
}

.sf-bag-count {
    font-size: 0.85rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.sf-bag.is-filled {
    background: var(--color-primary);
    border-color: transparent;
}

.sf-main {
    max-width: 44rem;
    margin: 0 auto;
    padding: 1.15rem 1.15rem 5rem;
}

.sf-kicker {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin: 0 0 0.2rem;
}

.banner {
    background: var(--color-background-alt);
    border: 1px solid var(--color-line);
    border-radius: 0.85rem;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    color: var(--color-text-muted);
}

.banner.error {
    background: #f8e6e2;
    color: var(--color-primary);
    border-color: #ead0c8;
}

.banner.warn {
    background: #f4ead8;
    color: #5c4328;
}

.banner.ok {
    background: #e4f0e8;
    color: var(--color-ok);
}

.item {
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: 0.95rem;
    padding: 0.95rem 1rem;
    margin-bottom: 0.7rem;
    display: flex;
    justify-content: space-between;
    gap: 0.85rem;
    align-items: center;
}

.item strong {
    display: block;
    font-size: 1.02rem;
}

h1 {
    font-size: 1.7rem;
    margin: 0 0 0.85rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 0.82rem;
    margin: 1.5rem 0 0.65rem;
    color: var(--color-text-muted);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.price {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.price strong,
.sf-total {
    color: var(--color-text);
    font-size: 1.05rem;
}

button,
.btn {
    appearance: none;
    border: 0;
    background: var(--color-primary);
    color: #fff;
    font: inherit;
    font-weight: 650;
    padding: 0.7rem 1rem;
    border-radius: 0.7rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

button.ghost,
.btn.ghost {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

label {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

input,
textarea,
select {
    width: 100%;
    font: inherit;
    padding: 0.7rem 0.75rem;
    border: 1px solid var(--color-line);
    border-radius: 0.65rem;
    background: #fff;
    color: var(--color-text);
}

input[type="radio"] {
    width: auto;
    padding: 0;
}

.row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.sf-footer {
    max-width: 44rem;
    margin: 0 auto;
    padding: 0 1.15rem 2rem;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.sf-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-top: 0.35rem;
}

.sf-soon {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.15rem;
}

.sf-soon-card {
    width: 100%;
    max-width: 28rem;
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: 1.1rem;
    padding: 2rem 1.4rem;
    text-align: center;
}

.sf-soon-logo {
    height: 2.75rem;
    width: auto;
    max-width: 14rem;
    object-fit: contain;
    margin: 0 auto 1rem;
    display: block;
}

.sf-soon-card h1 {
    margin-bottom: 0.65rem;
}

.sf-soon-card p {
    color: var(--color-text-muted);
    margin: 0;
}

.sf-preview {
    background: #c9a227;
    color: #1c1410;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.4rem 0.75rem;
}

@media (max-width: 520px) {
    .item {
        align-items: flex-start;
        flex-direction: column;
    }

    .item form,
    .item .stack {
        width: 100%;
    }

    .item button {
        width: 100%;
    }
}
