:root {
    --red: #da291c;
    --yellow: #ffc72c;
    --black: #151515;
    --cream: #fff8dc;
    --paper: #fffdf7;
    --line: #eadfbe;
    --muted: #766f61;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f7efd2;
    color: var(--black);
    font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

.store-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--red);
    color: #fff;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 22px;
    box-shadow: 0 8px 28px rgba(21, 21, 21, .15);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 900;
    font-size: 19px;
}

.brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
}

.account-box {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: end;
    gap: 8px;
    font-weight: 800;
}

.account-box form {
    display: inline;
}

.coin-balance,
.reward-shortcut {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: inherit;
    text-decoration: none;
    font-weight: 900;
}

.coin-icon,
.coin-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: radial-gradient(circle at 35% 28%, #fff6a8 0%, var(--yellow) 42%, #d69500 100%);
    color: var(--black);
    border: 2px solid #8c6500;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18);
    font-weight: 900;
}

.coin-icon {
    width: 25px;
    height: 25px;
    font-size: 13px;
}

.coin-large {
    width: 62px;
    height: 62px;
    font-size: 28px;
    flex: 0 0 auto;
}

.account-box button,
.product-row button,
.cart-floating,
.checkout-btn {
    border: 0;
    border-radius: 8px;
    background: var(--black);
    color: #fff;
    font-weight: 900;
    min-height: 40px;
    padding: 0 14px;
    cursor: pointer;
}

.account-box button.yellow,
.checkout-btn,
.product-row button {
    background: var(--yellow);
    color: var(--black);
}

.store-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 22px;
}

.hero {
    min-height: 260px;
    background: linear-gradient(135deg, #da291c 0%, #9c1710 100%);
    color: #fff;
    border-radius: 8px;
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 18px;
    border-bottom: 8px solid var(--yellow);
}

.eyebrow {
    color: var(--yellow);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(38px, 8vw, 74px);
    line-height: .95;
    letter-spacing: 0;
    margin-bottom: 12px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 0;
    max-width: 560px;
}

.cart-floating {
    background: #fff;
    color: var(--black);
    min-width: 150px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.reward-shortcut {
    min-height: 40px;
    background: var(--black);
    color: #fff;
    border-radius: 8px;
    padding: 0 14px;
}

.cart-floating strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--yellow);
}

.notice {
    margin: 16px 0;
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 800;
}

.notice.ok {
    background: #e8f8df;
    border: 1px solid #9fd27d;
}

.notice.error {
    background: #ffe1dc;
    border: 1px solid #ef8a7e;
}

.category-tabs {
    position: sticky;
    top: 68px;
    z-index: 12;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0;
    background: #f7efd2;
}

.rewards-section {
    margin: 18px 0 10px;
}

.rewards-title {
    align-items: center;
}

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

.reward-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-left: 6px solid var(--black);
    border-radius: 8px;
    padding: 14px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
}

.reward-card.available {
    border-left-color: var(--red);
    background: #fffbea;
}

.reward-card h3 {
    margin-bottom: 5px;
    font-size: 18px;
}

.reward-card p {
    color: var(--muted);
    margin-bottom: 0;
}

.reward-card strong,
.reward-card > span {
    grid-column: 1 / -1;
}

.reward-card > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.category-tabs a {
    flex: 0 0 auto;
    text-decoration: none;
    background: #fff;
    color: var(--black);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 900;
}

.category-section {
    padding-top: 18px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 14px;
    border-bottom: 3px solid var(--yellow);
    margin-bottom: 12px;
}

.section-title h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.section-title p {
    color: var(--muted);
    margin-bottom: 10px;
}

.product-list {
    display: grid;
    gap: 10px;
}

.product-row {
    background: var(--paper);
    border: 1px solid var(--line);
    border-left: 6px solid var(--red);
    border-radius: 8px;
    padding: 14px;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}

.product-image {
    width: 112px;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--black);
    font-size: 36px;
    font-weight: 900;
}

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

.product-row h3 {
    margin-bottom: 5px;
    font-size: 20px;
}

.product-row p {
    color: var(--muted);
    margin-bottom: 8px;
}

.product-row strong {
    font-size: 18px;
}

.empty {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    font-weight: 800;
}

.drawer,
.modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: none;
    background: rgba(0, 0, 0, .46);
}

.drawer.open,
.modal.open {
    display: block;
}

.drawer-panel {
    margin-left: auto;
    width: min(460px, 100%);
    height: 100%;
    background: var(--paper);
    padding: 18px;
    overflow-y: auto;
    box-shadow: -18px 0 40px rgba(0, 0, 0, .18);
}

.drawer-head,
.cart-total,
.cart-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.drawer-head {
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
}

.drawer-head button,
.cart-line button,
.modal-close {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 8px;
    min-height: 34px;
    padding: 0 10px;
    cursor: pointer;
    font-weight: 800;
}

.cart-items {
    display: grid;
    gap: 10px;
    margin: 16px 0;
}

.cart-line {
    align-items: start;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
}

.cart-line span,
.muted {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.cart-line div:last-child {
    display: grid;
    gap: 8px;
    justify-items: end;
}

.cart-total {
    border-top: 2px solid var(--black);
    border-bottom: 2px solid var(--black);
    padding: 14px 0;
    margin: 14px 0;
    font-size: 20px;
    font-weight: 900;
}

.checkout-form,
.auth-form {
    display: grid;
    gap: 12px;
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--black);
    padding: 10px 12px;
}

input[type="checkbox"] {
    width: 18px;
    min-height: 18px;
    accent-color: var(--red);
}

.checkout-btn {
    width: 100%;
    min-height: 48px;
    margin-top: 4px;
}

.modal-panel {
    position: relative;
    width: min(520px, calc(100% - 28px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: var(--paper);
    border-radius: 8px;
    margin: 20px auto;
    padding: 20px;
    border-top: 8px solid var(--red);
}

.modal-close {
    position: absolute;
    right: 12px;
    top: 12px;
}

.modal-panel h2 {
    padding-right: 38px;
    margin-bottom: 8px;
}

.modal-product-image {
    display: none;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 14px;
    background: #fff;
    border: 1px solid var(--line);
}

#modal_preco {
    display: inline-flex;
    background: var(--black);
    color: var(--yellow);
    border-radius: 999px;
    padding: 8px 12px;
    margin-bottom: 14px;
}

.upsell-list {
    display: grid;
    gap: 8px;
    margin: 12px 0;
}

.upsell-list label {
    grid-template-columns: auto 1fr auto;
    display: grid;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    color: var(--black);
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.auth-tabs button {
    min-height: 42px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 8px;
    font-weight: 900;
}

.auth-tabs button.active {
    background: var(--yellow);
    border-color: var(--yellow);
}

.store-footer {
    background: var(--black);
    color: #fff;
    text-align: center;
    padding: 18px;
    border-top: 4px solid var(--yellow);
    margin-top: 28px;
}

@media (max-width: 720px) {
    .store-header,
    .hero,
    .product-row,
    .section-title {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .reward-grid {
        grid-template-columns: 1fr;
    }

    .product-image {
        width: 100%;
        max-height: 210px;
    }

    .store-header {
        position: static;
    }

    .category-tabs {
        top: 0;
    }

    .store-shell {
        padding: 14px;
    }

    .hero {
        padding: 22px;
    }

    .product-row button {
        width: 100%;
    }
}
