/* ============================================
   AFETO BROWNIE — Tema claro, leve e delicado
   Paleta tirada da logo: marrom #694104 + creme #FFF7EC
   ============================================ */

:root {
    --creme: #FFF7EC;
    --creme-2: #FBEBDD;
    --blush: #F4D9C6;
    --rosa: #E8B4A6;
    --caramelo: #C98F4A;
    --marrom: #694104;
    --marrom-esc: #4E2D08;
    --texto: #4A2E10;
    --texto-suave: #8A6B4B;
    --linha: #EBD7C2;
    --branco: #FFFDF9;
    --erro: #B4412F;

    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --raio: 18px;
    --sombra: 0 6px 24px rgba(105, 65, 4, .08);
    --sombra-forte: 0 14px 40px rgba(105, 65, 4, .16);
    --topbar-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 8px); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.55;
    color: var(--texto);
    background: var(--creme);
    -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
.hidden { display: none !important; }

:focus-visible { outline: 2px solid var(--caramelo); outline-offset: 2px; border-radius: 6px; }

.container { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* ---------- Tipografia ---------- */
h1, h2, h3 { font-family: var(--font-display); color: var(--marrom); font-weight: 600; line-height: 1.1; }
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--caramelo); }
.eyebrow { font-size: .75rem; letter-spacing: .32em; text-transform: uppercase; color: var(--texto-suave); font-weight: 500; }

/* ---------- Botões ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    padding: .8rem 1.5rem; border-radius: 999px; font-weight: 500; letter-spacing: .02em;
    transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--marrom); color: var(--creme); box-shadow: 0 6px 18px rgba(105, 65, 4, .22); }
.btn-primary:hover { background: var(--marrom-esc); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0) scale(.98); }
.btn-block { width: 100%; }
.btn-link { font-size: .85rem; color: var(--texto-suave); text-decoration: underline; text-underline-offset: 3px; padding: .5rem; }
.btn-link:hover { color: var(--marrom); }

.btn-ghost, .btn-cart {
    display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1rem; border-radius: 999px;
    border: 1px solid var(--linha); background: var(--branco); color: var(--marrom); font-size: .9rem; font-weight: 500;
    transition: background .2s, border-color .2s;
}
.btn-ghost:hover, .btn-cart:hover { background: var(--blush); border-color: var(--rosa); }
.btn-ghost svg, .btn-cart svg, .icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.btn-cart { background: var(--marrom); border-color: var(--marrom); color: var(--creme); position: relative; }
.btn-cart:hover { background: var(--marrom-esc); border-color: var(--marrom-esc); }
.cart-count {
    min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--rosa); color: var(--marrom-esc);
    font-size: .75rem; font-weight: 600; display: grid; place-items: center;
}
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--marrom); transition: background .2s; }
.icon-btn:hover { background: var(--blush); }

/* ---------- Topo ---------- */
.topbar {
    position: sticky; top: 0; z-index: 50; height: var(--topbar-h);
    background: rgba(255, 247, 236, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s;
}
.topbar.scrolled { border-color: var(--linha); box-shadow: 0 4px 18px rgba(105, 65, 4, .05); }
.topbar-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; }
.brand-logo { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 2px 8px rgba(105, 65, 4, .25); }
.brand-name { font-family: var(--font-display); font-size: 1.55rem; font-weight: 600; color: var(--marrom); letter-spacing: .02em; }
.brand-name em { font-weight: 500; color: var(--caramelo); }
.topbar-actions { display: flex; align-items: center; gap: .6rem; }

/* ---------- Hero ---------- */
.hero {
    background:
        radial-gradient(900px 420px at 85% 10%, rgba(232, 180, 166, .35), transparent 70%),
        radial-gradient(700px 380px at 0% 100%, rgba(244, 217, 198, .7), transparent 70%),
        var(--creme);
    padding: clamp(32px, 6vw, 80px) 0 clamp(40px, 6vw, 88px);
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.7rem, 7vw, 5rem); margin: .8rem 0 1rem; font-weight: 500; }
.hero-sub { max-width: 34ch; color: var(--texto-suave); font-size: 1.08rem; font-weight: 300; }
.hero-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.4rem; margin-top: 1.8rem; }
.hero-note { font-size: .85rem; color: var(--texto-suave); }
.hero-art img {
    width: min(420px, 100%); aspect-ratio: 1; object-fit: cover; margin-inline: auto; border-radius: 50%;
    box-shadow: var(--sombra-forte);
}

/* ---------- Seções ---------- */
.menu { padding: clamp(36px, 6vw, 72px) 0; }
.section-head { text-align: center; margin-bottom: 1.8rem; }
.section-head h2 { font-size: clamp(2rem, 5vw, 3rem); margin-top: .5rem; font-weight: 500; }
.heart-divider { display: flex; align-items: center; justify-content: center; gap: .8rem; margin-top: 1rem; }
.heart-divider span { width: 56px; height: 1px; background: var(--rosa); }
.heart-divider svg { width: 16px; height: 16px; fill: var(--rosa); }

/* ---------- Categorias ---------- */
.chips { display: flex; gap: .6rem; overflow-x: auto; padding: .3rem 2px 1rem; margin-bottom: .6rem; justify-content: center; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: 0 0 auto; padding: .55rem 1.2rem; border-radius: 999px; border: 1px solid var(--linha);
    background: var(--branco); color: var(--texto-suave); font-size: .92rem; font-weight: 500; transition: all .2s;
}
.chip:hover { border-color: var(--rosa); color: var(--marrom); }
.chip.active { background: var(--marrom); border-color: var(--marrom); color: var(--creme); }

/* ---------- Grade de produtos ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.4rem; }
.card {
    background: var(--branco); border: 1px solid var(--linha); border-radius: var(--raio); overflow: hidden;
    display: flex; flex-direction: column; box-shadow: var(--sombra); transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sombra-forte); }
.card-img { position: relative; aspect-ratio: 1 / 1; background: var(--creme-2); overflow: hidden; }
.card-img svg, .card-img img { width: 100%; height: 100%; object-fit: cover; }
.badge {
    position: absolute; top: 12px; left: 12px; padding: .25rem .75rem; border-radius: 999px;
    background: var(--branco); color: var(--marrom); font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(105, 65, 4, .15);
}
.card-body { padding: 1.1rem 1.2rem 1.25rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card-body h3 { font-size: 1.45rem; }
.card-body p { color: var(--texto-suave); font-size: .9rem; font-weight: 300; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-top: .6rem; min-height: 42px; }
.price { font-family: var(--font-display); font-size: 1.55rem; font-weight: 600; color: var(--marrom); }
.btn-add { padding: .55rem 1.15rem; background: var(--blush); color: var(--marrom-esc); font-size: .9rem; }
.btn-add:hover { background: var(--rosa); }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--rosa); border-radius: 999px; background: var(--creme); }
.stepper button { width: 36px; height: 36px; font-size: 1.2rem; color: var(--marrom); border-radius: 50%; line-height: 1; }
.stepper button:hover { background: var(--blush); }
.stepper span { min-width: 26px; text-align: center; font-weight: 600; color: var(--marrom); }
.stepper.small button { width: 30px; height: 30px; font-size: 1.05rem; }

/* ---------- Como pedir ---------- */
.how { padding: clamp(36px, 6vw, 72px) 0; background: var(--creme-2); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 1rem; }
.steps li { text-align: center; padding: 1.4rem 1rem; }
.step-n {
    width: 48px; height: 48px; margin: 0 auto .8rem; border-radius: 50%; display: grid; place-items: center;
    background: var(--branco); border: 1px solid var(--rosa); font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--marrom);
}
.steps h3 { font-size: 1.5rem; margin-bottom: .3rem; }
.steps p { color: var(--texto-suave); font-weight: 300; max-width: 26ch; margin-inline: auto; }

/* ---------- Rodapé ---------- */
.footer { background: var(--marrom); color: var(--creme); padding: 2.6rem 0 2rem; text-align: center; }
.footer-logo { width: 72px; height: 72px; margin: 0 auto .8rem; border-radius: 50%; border: 2px solid rgba(255, 247, 236, .35); }
.footer-name { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: .06em; }
.footer-sub { font-weight: 300; opacity: .8; font-size: .95rem; }
.footer-links { margin-top: 1rem; display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; font-size: .92rem; }
.footer-links a { text-decoration: underline; text-underline-offset: 3px; }
.footer-links i { font-style: normal; opacity: .5; }
.footer-copy { margin-top: 1.4rem; font-size: .78rem; opacity: .6; }

/* ---------- Gaveta do carrinho ---------- */
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(78, 45, 8, .4); opacity: 0; transition: opacity .3s; backdrop-filter: blur(2px); }
.overlay.visible { opacity: 1; }

.drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(440px, 100%);
    background: var(--creme); display: flex; flex-direction: column;
    transform: translateX(105%); transition: transform .35s cubic-bezier(.22, .8, .3, 1); box-shadow: -10px 0 40px rgba(78, 45, 8, .18);
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: 1px solid var(--linha); }
.drawer-head h2 { font-size: 1.7rem; font-weight: 500; }
.drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.2rem 1.4rem; overscroll-behavior: contain; }
.drawer-foot { border-top: 1px solid var(--linha); padding: 1rem 1.2rem 1.1rem; background: var(--branco); display: flex; flex-direction: column; gap: .6rem; align-items: stretch; text-align: center; }

.empty { text-align: center; padding: 3rem 1rem; }
.empty-icon { font-size: 2.4rem; margin-bottom: .5rem; }
.empty-title { font-family: var(--font-display); font-size: 1.5rem; color: var(--marrom); }
.empty-sub { color: var(--texto-suave); font-weight: 300; }

.cart-list { display: flex; flex-direction: column; gap: .9rem; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: .9rem; align-items: center; padding-bottom: .9rem; border-bottom: 1px dashed var(--linha); }
.cart-thumb { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--creme-2); }
.cart-thumb svg, .cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--marrom); line-height: 1.2; }
.cart-unit { font-size: .8rem; color: var(--texto-suave); margin-bottom: .3rem; }
.cart-line { font-weight: 600; color: var(--marrom); white-space: nowrap; align-self: start; }

/* ---------- Formulário ---------- */
.checkout { margin-top: 1.4rem; display: flex; flex-direction: column; gap: .95rem; }
.field { border: 0; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.field label, .field legend { font-size: .82rem; font-weight: 500; color: var(--marrom); letter-spacing: .03em; padding: 0; }
.opt { font-weight: 300; color: var(--texto-suave); }
.field input[type="text"], .field input[type="tel"], .field select, .field textarea {
    width: 100%; padding: .7rem .9rem; border: 1px solid var(--linha); border-radius: 12px; background: var(--branco);
    transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 64px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--caramelo); box-shadow: 0 0 0 3px rgba(201, 143, 74, .2); }
.field ::placeholder { color: #B79C82; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span {
    display: block; text-align: center; padding: .65rem; border: 1px solid var(--linha); border-radius: 12px; background: var(--branco);
    color: var(--texto-suave); font-weight: 500; transition: all .2s;
}
.seg input:checked + span { background: var(--blush); border-color: var(--rosa); color: var(--marrom-esc); }
.seg input:focus-visible + span { outline: 2px solid var(--caramelo); outline-offset: 2px; }

.totals { display: flex; flex-direction: column; gap: .3rem; text-align: left; }
.totals .row { display: flex; justify-content: space-between; color: var(--texto-suave); font-size: .95rem; }
.totals .row.total { color: var(--marrom); font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; padding-top: .3rem; border-top: 1px solid var(--linha); margin-top: .2rem; }
.form-error { color: var(--erro); font-size: .88rem; background: #FBE9E4; border-radius: 10px; padding: .55rem .8rem; text-align: left; }

/* ---------- Modais ---------- */
.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 1rem; opacity: 0; transition: opacity .25s; }
.modal.visible { opacity: 1; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(78, 45, 8, .45); backdrop-filter: blur(3px); }
.modal-box {
    position: relative; width: min(520px, 100%); max-height: 88vh; display: flex; flex-direction: column;
    background: var(--creme); border-radius: 24px; box-shadow: var(--sombra-forte); overflow: hidden;
    transform: translateY(16px) scale(.98); transition: transform .25s ease;
}
.modal.visible .modal-box { transform: none; }
.modal-small { width: min(400px, 100%); }
.modal-body { padding: 1rem 1.2rem 1.4rem; overflow-y: auto; display: flex; flex-direction: column; gap: .9rem; }

.order { background: var(--branco); border: 1px solid var(--linha); border-radius: 14px; padding: .9rem 1rem; }
.order-head { display: flex; justify-content: space-between; color: var(--marrom); margin-bottom: .5rem; }
.order-head span { color: var(--texto-suave); font-size: .85rem; }
.order ul { display: flex; flex-direction: column; gap: .2rem; font-size: .92rem; }
.order li { display: flex; justify-content: space-between; gap: 1rem; }
.order-foot { display: flex; justify-content: space-between; margin-top: .6rem; padding-top: .5rem; border-top: 1px dashed var(--linha); font-size: .88rem; color: var(--texto-suave); }
.order-foot strong { color: var(--marrom); font-size: 1.05rem; }

.ok { padding: 2rem 1.5rem 1.6rem; text-align: center; display: flex; flex-direction: column; gap: .7rem; align-items: center; }
.ok-check { width: 68px; height: 68px; border-radius: 50%; background: var(--blush); display: grid; place-items: center; animation: pop .5s cubic-bezier(.3, 1.6, .5, 1); }
.ok-check svg { width: 34px; height: 34px; fill: none; stroke: var(--marrom); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ok h2 { font-size: 1.8rem; font-weight: 500; }
.ok-num { color: var(--texto-suave); }
.ok-num strong { color: var(--marrom); }
.ok-text { color: var(--texto-suave); font-weight: 300; margin-bottom: .6rem; }

/* ---------- Toast ---------- */
.toasts { position: fixed; left: 50%; top: calc(var(--topbar-h) + 10px); transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: .5rem; align-items: center; pointer-events: none; width: calc(100% - 32px); }
.toast { background: var(--marrom-esc); color: var(--creme); padding: .65rem 1.2rem; border-radius: 999px; font-size: .9rem; box-shadow: var(--sombra-forte); animation: subir .3s ease; transition: opacity .35s, transform .35s; }
.toast.out { opacity: 0; transform: translateY(8px); }

@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes subir { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Responsivo ---------- */
@media (max-width: 760px) {
    :root { --topbar-h: 62px; }
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-sub { margin-inline: auto; }
    .hero-cta { justify-content: center; }
    .hero-art { order: -1; }
    .hero-art img { width: min(260px, 70%); }
    .steps { grid-template-columns: 1fr; gap: .4rem; }
    .brand-name { font-size: 1.3rem; }
    .btn-ghost span, .cart-label { display: none; }
    .btn-ghost, .btn-cart { padding: .55rem .75rem; }
    .btn-cart .cart-count { margin-left: -.1rem; }
    .chips { justify-content: flex-start; }
    .grid { grid-template-columns: repeat(2, 1fr); gap: .9rem; }
    .card-body { padding: .8rem .85rem 1rem; }
    .card-body h3 { font-size: 1.2rem; }
    .card-body p { font-size: .8rem; }
    .card-foot { flex-direction: column; align-items: stretch; gap: .5rem; }
    .price { font-size: 1.35rem; }
    .btn-add { width: 100%; }
    .stepper { justify-content: space-between; }
    .modal { align-items: end; padding: 0; }
    .modal-box { border-radius: 24px 24px 0 0; width: 100%; max-height: 90vh; }
}
@media (max-width: 380px) { .grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Loja fechada / estados ---------- */
.closed-bar { background: var(--marrom-esc); color: var(--creme); text-align: center; padding: .6rem 1rem; font-size: .92rem; }
.form-error.closed { background: var(--blush); color: var(--marrom-esc); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.loading { position: relative; color: transparent; pointer-events: none; }
.btn.loading::after { content: ''; position: absolute; width: 20px; height: 20px; border: 2px solid var(--creme); border-top-color: transparent; border-radius: 50%; animation: giro .7s linear infinite; }
.grid-empty { grid-column: 1 / -1; }
.order-date { font-size: .8rem; color: var(--texto-suave); margin-bottom: .4rem; }
.order-head { align-items: center; }
.status { padding: .15rem .7rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--blush); color: var(--marrom-esc); }
.status-preparando { background: #F7E3B5; }
.status-pronto { background: #D9EBC9; }
.status-entregue { background: #DDE8D2; color: #3F5A2C; }
.status-cancelado { background: #F4D2CB; color: var(--erro); }
@keyframes giro { to { transform: rotate(360deg); } }
