:root {
    --laranja: #FF6B35;
    --laranja-escuro: #E5502A;
    --navy: #1A2B4C;
    --navy-claro: #2C4267;
    --cinza-bg: #F5F6F8;
    --cinza-borda: #E4E7EB;
    --texto: #222;
    --texto-suave: #6B7280;
    --verde: #1DB954;
    --vermelho: #E53935;
    --branco: #fff;
    --radius: 10px;
    --sombra: 0 2px 10px rgba(0,0,0,.06);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
    background: var(--cinza-bg);
    color: var(--texto);
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ===== Header ===== */
.topbar {
    background: var(--navy);
    color: #cfd8e8;
    font-size: 13px;
    text-align: center;
    padding: 6px 10px;
}
header.site-header {
    background: var(--branco);
    box-shadow: var(--sombra);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    padding: 12px 16px;
    max-width: 1200px;
    margin: 0 auto;
}
@media (max-width: 640px) {
    .header-inner { gap: 10px 14px; padding: 10px 12px; }
    .logo { font-size: 21px; order: 1; }
    .cart-link { order: 2; margin-left: auto; font-size: 13px; }
    .search-box { order: 3; flex-basis: 100%; max-width: none; }
    .search-box input { padding: 9px 14px; font-size: 13px; }
    .topbar { font-size: 11px; padding: 5px 8px; line-height: 1.4; }
}
.logo {
    font-size: 26px;
    font-weight: 800;
    color: var(--laranja);
    white-space: nowrap;
}
.logo span { color: var(--navy); }
.search-box {
    flex: 1;
    display: flex;
    max-width: 560px;
}
.search-box input {
    flex: 1;
    border: 2px solid var(--laranja);
    border-right: none;
    border-radius: 24px 0 0 24px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
}
.search-box button {
    background: var(--laranja);
    border: none;
    color: #fff;
    padding: 0 20px;
    border-radius: 0 24px 24px 0;
    cursor: pointer;
    font-weight: 600;
}
.cart-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    white-space: nowrap;
}
.cart-badge {
    background: var(--vermelho);
    color: #fff;
    font-size: 11px;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -8px;
    right: -10px;
    padding: 0 3px;
}
nav.categorias {
    background: var(--branco);
    border-top: 1px solid var(--cinza-borda);
}
nav.categorias .container {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 10px 16px;
}
nav.categorias a {
    font-size: 14px;
    font-weight: 600;
    color: var(--texto-suave);
    white-space: nowrap;
    padding: 4px 0;
}
nav.categorias a:hover, nav.categorias a.ativo {
    color: var(--laranja);
    border-bottom: 2px solid var(--laranja);
}

/* ===== Carrossel ===== */
.carrossel {
    position: relative;
    max-width: 1200px;
    margin: 20px auto 0;
    overflow: hidden;
    border-radius: var(--radius);
}
.carrossel-track {
    display: flex;
    transition: transform .5s ease;
}
.carrossel-slide {
    position: relative;
    flex: 0 0 100%;
    height: clamp(220px, 32vw, 380px);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.carrossel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10,15,30,.72) 0%, rgba(10,15,30,.45) 45%, rgba(10,15,30,.05) 75%);
}
.carrossel-content {
    position: relative;
    z-index: 1;
    color: #fff;
    max-width: 480px;
    padding: 0 5%;
}
.carrossel-content h1 { font-size: clamp(20px, 3.2vw, 32px); margin: 0 0 10px; }
.carrossel-content p { color: #dfe6f2; margin: 0 0 18px; font-size: clamp(13px, 1.6vw, 15px); }
@media (max-width: 640px) {
    .carrossel-slide { height: 260px; }
    .carrossel-content { max-width: 88%; padding: 0 20px; }
    .carrossel-content .btn { padding: 9px 18px; font-size: 13px; }
}
.carrossel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}
.carrossel-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: none;
    background: var(--cinza-borda);
    cursor: pointer;
    padding: 0;
}
.carrossel-dot.ativo { background: var(--laranja); width: 22px; border-radius: 5px; }

/* ===== Trust badges ===== */
.trust-strip {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    padding: 16px;
    font-size: 13px;
    color: var(--texto-suave);
    font-weight: 600;
}
.trust-strip span { color: var(--verde); }

/* ===== Grid de produtos ===== */
.section-title {
    font-size: 20px;
    font-weight: 800;
    margin: 30px auto 14px;
    max-width: 1200px;
    padding: 0 16px;
}
.grid-produtos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 30px;
}
@media (max-width: 480px) {
    .grid-produtos { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 10px 24px; }
    .section-title { padding: 0 10px; font-size: 18px; margin: 20px auto 10px; }
    .card-produto .nome { font-size: 12.5px; height: 32px; }
    .preco-atual { font-size: 16px; }
}
.card-produto {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--sombra);
    overflow: hidden;
    transition: transform .15s;
    display: flex;
    flex-direction: column;
}
.card-produto:hover { transform: translateY(-3px); }
.card-produto .img-wrap {
    position: relative;
    aspect-ratio: 1/1;
    background: #f0f0f0;
    overflow: hidden;
}
.card-produto .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.badge-desconto {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--vermelho);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}
.card-produto .info { padding: 10px 12px 14px; flex: 1; display: flex; flex-direction: column; }
.card-produto .nome {
    font-size: 13.5px;
    line-height: 1.3;
    height: 34px;
    overflow: hidden;
    margin-bottom: 6px;
}
.estrelas { color: #FFB800; font-size: 12px; }
.num-avaliacoes { color: var(--texto-suave); font-size: 12px; }
.preco-atual { font-size: 18px; font-weight: 800; color: var(--laranja-escuro); }
.preco-original { font-size: 13px; color: var(--texto-suave); text-decoration: line-through; margin-left: 6px; }
.btn-add {
    margin-top: 8px;
    background: var(--laranja);
    color: #fff;
    border: none;
    padding: 8px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
}
.btn-add:hover { background: var(--laranja-escuro); }

/* ===== Botão genérico ===== */
.btn {
    background: var(--laranja);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 24px;
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    display: inline-block;
}
.btn:hover { background: var(--laranja-escuro); }
.btn-outline {
    background: transparent;
    border: 2px solid var(--navy);
    color: var(--navy);
}

/* ===== Página de produto ===== */
.produto-page {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
@media (max-width: 800px) { .produto-page { grid-template-columns: 1fr; gap: 20px; margin: 12px auto; } }
@media (max-width: 480px) {
    .produto-info h1 { font-size: 19px; }
    .produto-preco .atual { font-size: 26px; }
    .galeria-thumbs img { width: 52px; height: 52px; }
    .reviews-section { margin: 24px auto; }
}
.galeria-principal { border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--sombra); }
.galeria-principal img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.galeria-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.galeria-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
.galeria-thumbs img.ativo { border-color: var(--laranja); }
.produto-info h1 { font-size: 24px; margin: 0 0 8px; }
.produto-preco { display: flex; align-items: baseline; gap: 10px; margin: 14px 0; }
.produto-preco .atual { font-size: 32px; font-weight: 800; color: var(--laranja-escuro); }
.aviso-pix {
    background: #FFF4EC;
    border: 1px solid var(--laranja);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13.5px;
    margin: 16px 0;
    color: var(--navy);
}
.produto-caixa-confianca {
    background: #fff;
    border: 1px solid var(--cinza-borda);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin: 18px 0;
    box-shadow: var(--sombra);
}
.linha-confianca {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    padding: 7px 0;
    border-bottom: 1px solid #f0f1f3;
    color: var(--texto);
}
.linha-confianca:last-child { border-bottom: none; }
.linha-confianca span:first-child { font-size: 16px; }
.selecao-qtd { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.selecao-qtd button {
    width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--cinza-borda);
    background: #fff; font-size: 16px; cursor: pointer;
}
.selecao-qtd input { width: 50px; text-align: center; border: 1px solid var(--cinza-borda); border-radius: 6px; height: 32px; }

/* ===== Reviews ===== */
.reviews-section { max-width: 1200px; margin: 40px auto; padding: 0 16px; }
.review-card {
    background: #fff; border-radius: var(--radius); box-shadow: var(--sombra);
    padding: 16px; margin-bottom: 12px;
}
.review-card .autor { font-weight: 700; font-size: 14px; }
.review-card .data { color: var(--texto-suave); font-size: 12px; margin-left: 8px; }
.review-card .comentario { margin-top: 8px; font-size: 14px; line-height: 1.5; }

/* ===== Carrinho / checkout ===== */
.cart-page, .checkout-page { max-width: 900px; margin: 30px auto; padding: 0 16px; }
.checkout-page {
    background-image: url('/assets/img/checkout-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: var(--radius);
    padding: 20px 16px;
}
.cart-item {
    display: flex; align-items: center; gap: 14px;
    background: #fff; border-radius: var(--radius); box-shadow: var(--sombra);
    padding: 12px; margin-bottom: 10px;
}
.cart-item img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.cart-item .nome { flex: 1; font-size: 14px; min-width: 120px; }
.cart-resumo {
    background: #fff; border-radius: var(--radius); box-shadow: var(--sombra); padding: 20px; margin-top: 16px;
}
.cart-resumo .linha { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px; }
.cart-resumo .total { font-size: 20px; font-weight: 800; color: var(--laranja-escuro); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

@media (max-width: 560px) {
    .cart-item { flex-wrap: wrap; }
    .cart-item .nome { flex-basis: 100%; order: 1; }
    .cart-item img { order: 0; }
    .selecao-qtd { order: 2; }
    .cart-page, .checkout-page { margin: 14px auto; padding: 0 12px; }
    .checkout-page { padding: 14px 10px; }
}
.form-grid label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 4px; }
.form-grid input, .form-grid select {
    width: 100%; padding: 10px; border-radius: 8px; border: 1px solid var(--cinza-borda); font-size: 14px;
}
.full { grid-column: 1 / -1; }

footer.site-footer {
    background: var(--navy);
    color: #cfd8e8;
    margin-top: 50px;
    padding: 30px 16px;
    font-size: 13px;
    text-align: center;
}
footer.site-footer a { color: #fff; }

/* ===== Balão de suporte ===== */
#suporte-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--laranja);
    color: #fff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    z-index: 999;
}
#suporte-btn:hover { background: var(--laranja-escuro); }
#suporte-painel {
    display: none;
    position: fixed;
    bottom: 86px;
    right: 20px;
    width: 320px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
    z-index: 999;
    overflow: hidden;
}
#suporte-painel.aberto { display: block; }
#suporte-header {
    background: var(--navy);
    color: #fff;
    padding: 14px 16px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#suporte-fechar { cursor: pointer; opacity: .8; }
#suporte-corpo { padding: 16px; }
#suporte-corpo input, #suporte-corpo textarea {
    width: 100%;
    padding: 9px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid var(--cinza-borda);
    font-size: 13.5px;
    font-family: inherit;
    resize: vertical;
}
@media (max-width: 480px) {
    #suporte-btn { bottom: 14px; right: 14px; width: 50px; height: 50px; font-size: 20px; }
    #suporte-painel { right: 14px; bottom: 74px; }
}

/* ===== Modal do Pix ===== */
#pix-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,15,30,.72);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
#pix-modal-overlay.aberto { display: flex; }
#pix-modal {
    background: #fff;
    border-radius: var(--radius);
    max-width: 380px;
    width: 100%;
    padding: 24px 22px;
    text-align: center;
    max-height: 92vh;
    overflow-y: auto;
}
#pix-modal h2 { font-size: 18px; margin: 4px 0 14px; }
#pix-timer {
    background: #FFF4EC;
    border: 1px solid var(--laranja);
    color: var(--navy);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    margin-bottom: 14px;
}
#pix-timer.urgente { background: #FDE8E8; border-color: var(--vermelho); animation: pulsar 1s infinite; }
#pix-timer.expirado { background: #eee; border-color: #999; color: #666; animation: none; }
@keyframes pulsar { 0%,100% { opacity: 1; } 50% { opacity: .6; } }
#qrcode-canvas { display: flex; justify-content: center; margin: 0 auto 16px; }
#qrcode-canvas img { border-radius: 8px; }
#pix-copia-cola {
    width: 100%; height: 76px; padding: 10px; border-radius: 8px;
    border: 1px solid var(--cinza-borda); font-size: 11px; margin-bottom: 12px; resize: none;
}
#pix-status { margin-top: 14px; font-weight: 700; font-size: 13.5px; color: var(--navy); }
.checkout-trust-img {
    width: 100%;
    max-width: 420px;
    display: block;
    margin: 0 auto 20px;
    border-radius: var(--radius);
}

.aviso-estoque {
    background: #FDE8E8;
    color: #B71C1C;
    border: 1px solid #F3B4B4;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    margin: 10px 0;
    display: inline-block;
}

/* ===== Barra fixa mobile: adicionar ao carrinho ===== */
.cta-fixa-mobile {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--cinza-borda);
    box-shadow: 0 -4px 16px rgba(0,0,0,.1);
    padding: 10px 14px;
    z-index: 500;
    align-items: center;
    gap: 12px;
}
.cta-fixa-mobile .preco { font-weight: 800; color: var(--laranja-escuro); font-size: 16px; white-space: nowrap; }
.cta-fixa-mobile .btn { flex: 1; padding: 11px; font-size: 14px; }
@media (max-width: 640px) {
    .cta-fixa-mobile.visivel { display: flex; }
    body.tem-cta-fixa .produto-page { padding-bottom: 70px; }
}

/* ===== Exit-intent ===== */
#exit-intent-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,15,30,.72);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
#exit-intent-card {
    position: relative;
    background: #fff;
    border-radius: var(--radius);
    max-width: 360px;
    width: 100%;
    padding: 28px 24px 24px;
    text-align: center;
}
#exit-intent-card h3 { margin: 10px 0 8px; font-size: 18px; }
#exit-intent-card p { font-size: 13.5px; color: var(--texto-suave); margin: 0 0 18px; }
#exit-intent-fechar {
    position: absolute; top: 10px; right: 10px;
    background: none; border: none; font-size: 16px; cursor: pointer; color: var(--texto-suave);
}

.pix-selos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--cinza-borda);
    font-size: 11px;
    color: var(--texto-suave);
}
