/* =====================================================
   Loja Virtual — folha de estilo principal
   ===================================================== */
:root {
    /* Paleta padrão (tema "azul"). Os temas abaixo sobrescrevem estas 4 cores. */
    --primary: #0b3d91;
    --primary-dark: #082c69;
    --accent: #f39c12;
    --accent-dark: #d68910;

    /* Aliases retrocompatíveis — todo o CSS usa --blue/--orange. */
    --blue: var(--primary);
    --blue-dark: var(--primary-dark);
    --orange: var(--accent);
    --orange-dark: var(--accent-dark);

    --green: #1e8e3e;
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 6px 20px rgba(16, 24, 40, .05);
    --shadow-lg: 0 12px 34px rgba(16, 24, 40, .12);
}
/* Tema 2 — Verde & Âmbar (materiais de construção) */
:root[data-theme="verde"] {
    --primary: #1b5e20;
    --primary-dark: #123f16;
    --accent: #f9a825;
    --accent-dark: #c77f10;
}
/* Tema 3 — Grafite & Vermelho (ferramentas / industrial) */
:root[data-theme="grafite"] {
    --primary: #2b3440;
    --primary-dark: #1b222b;
    --accent: #e53935;
    --accent-dark: #b71c1c;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* Announcement bar */
.announce-bar { background: linear-gradient(90deg, var(--orange) 0%, var(--orange-dark) 100%); color: #fff; font-size: .84rem; font-weight: 600; text-align: center; padding: 7px 0; letter-spacing: .01em; }

/* Topbar / Header */
.topbar { background: var(--blue-dark); color: #cfe0ff; font-size: .82rem; padding: 6px 0; }
.topbar-inner { display: flex; gap: 20px; flex-wrap: wrap; }
.topbar a { color: #cfe0ff; }
.topbar a:hover { color: #fff; }
.topbar-cnpj { margin-left: auto; }
.site-header { background: var(--blue); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 20px; padding: 12px 16px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 1.35rem; color: #fff; flex-shrink: 0; }
.logo:hover { text-decoration: none; }
.logo-mark { background: var(--orange); border-radius: 8px; padding: 2px 8px; }
.logo-text strong { font-weight: 800; }
.logo-img { height: 46px; width: auto; max-width: 220px; display: block; }

/* Busca */
.header-search { flex: 1; max-width: 520px; display: flex; background: #fff; border-radius: 999px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.header-search input { flex: 1; border: 0; padding: 11px 18px; font-size: .95rem; outline: none; background: transparent; }
.header-search button { border: 0; background: var(--orange); color: #fff; padding: 0 20px; font-size: 1.05rem; cursor: pointer; transition: background .15s; }
.header-search button:hover { background: var(--orange-dark); }

.cart-link { flex-shrink: 0; background: var(--orange); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; position: relative; white-space: nowrap; }
.cart-link:hover { background: var(--orange-dark); text-decoration: none; }
.cart-badge { background: #fff; color: var(--orange-dark); border-radius: 999px; padding: 0 7px; font-size: .8rem; margin-left: 4px; }

/* Barra de navegação (linha inferior do header) */
.main-nav { background: var(--blue-dark); }
.main-nav-inner { display: flex; gap: 4px; flex-wrap: wrap; padding: 0 16px; }
.main-nav a { color: #dbe7ff; font-weight: 500; font-size: .92rem; padding: 11px 14px; border-bottom: 3px solid transparent; }
.main-nav a:hover { color: #fff; text-decoration: none; border-bottom-color: var(--orange); }

/* Hero */
.hero { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%); color: #fff; padding: 54px 0; background-size: cover; background-position: center; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero-eyebrow { display: inline-block; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); padding: 5px 14px; border-radius: 999px; font-size: .82rem; font-weight: 600; margin-bottom: 16px; }
.hero h1 { font-size: 2.4rem; line-height: 1.15; margin-bottom: 14px; letter-spacing: -.01em; }
.hero p { color: #dbe7ff; max-width: 560px; margin-bottom: 24px; font-size: 1.06rem; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn { font-size: 1.02rem; }
.btn-ghost { background: transparent; border: 2px solid rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.14); color: #fff; }
.hero-badges { display: flex; gap: 20px; margin-top: 28px; flex-wrap: wrap; font-size: .9rem; color: #dbe7ff; }
.hero-highlight { position: relative; }
.hero-highlight a { display: block; background: #fff; border-radius: 16px; padding: 22px; box-shadow: 0 18px 40px rgba(0,0,0,.28); }
.hero-highlight a:hover { text-decoration: none; }
.hero-highlight img { width: 100%; aspect-ratio: 1/1; object-fit: contain; }
.hero-highlight-tag { position: absolute; top: -12px; right: -8px; background: var(--orange); color: #fff; font-weight: 800; font-size: .9rem; padding: 8px 16px; border-radius: 999px; box-shadow: var(--shadow); }

/* Section heads */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head .section-sub { margin-bottom: 0; }
.section-link { font-weight: 700; white-space: nowrap; }

/* Benefits strip */
.benefits { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 40px 0; }
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; }
.benefit { text-align: center; padding: 0 8px; }
.benefit-ico { font-size: 2rem; display: block; margin-bottom: 10px; }
.benefit h3 { color: var(--blue-dark); font-size: 1.05rem; margin-bottom: 6px; }
.benefit p { color: var(--muted); font-size: .9rem; }
.about-box h2 { color: var(--blue-dark); margin-bottom: 12px; }

/* Buttons */
.btn { display: inline-block; background: var(--orange); color: #fff; font-weight: 700; padding: 12px 26px; border-radius: var(--radius); border: 0; cursor: pointer; font-size: 1rem; text-align: center; }
.btn:hover { background: var(--orange-dark); text-decoration: none; }
.btn-blue { background: var(--blue); }
.btn-blue:hover { background: var(--blue-dark); }
.btn-outline { background: transparent; border: 2px solid var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .88rem; }
.btn-block { display: block; width: 100%; }

/* Sections */
.section { padding: 44px 0; }
.section-title { font-size: 1.6rem; margin-bottom: 6px; color: var(--blue-dark); }
.section-sub { color: var(--muted); margin-bottom: 26px; }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(16,24,40,.12); }
.card-img { position: relative; aspect-ratio: 1/1; background: #fff; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--border); }
.card-img img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.card-badge { position: absolute; top: 10px; left: 10px; background: var(--green); color: #fff; font-weight: 800; font-size: .78rem; padding: 3px 9px; border-radius: 999px; z-index: 1; }
.card-body { padding: 15px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-size: .98rem; font-weight: 600; line-height: 1.35; color: var(--text); min-height: 2.6em; }
.card-title:hover { color: var(--blue); text-decoration: none; }
.card-compare { font-size: .85rem; color: var(--muted); text-decoration: line-through; margin-top: auto; }
.card-price { font-size: 1.35rem; font-weight: 800; color: var(--blue-dark); }
.card-pix { font-size: .8rem; color: var(--green); font-weight: 600; margin-bottom: 4px; }
.stock-note { font-size: .8rem; color: var(--muted); }

/* Trust bar */
.trustbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: -28px; position: relative; }
.trust-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: flex; gap: 12px; align-items: center; font-size: .9rem; }
.trust-item .ico { font-size: 1.6rem; }
.trust-item strong { display: block; }
.trust-item span { color: var(--muted); font-size: .82rem; }

/* Product page */
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.product-gallery { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.product-gallery > img { width: 100%; aspect-ratio: 1/1; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.thumb { width: 68px; height: 68px; padding: 4px; background: #fff; border: 2px solid var(--border); border-radius: 8px; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb-active { border-color: var(--orange); }
.product-info h1 { font-size: 1.6rem; line-height: 1.3; margin-bottom: 6px; color: var(--blue-dark); }
.product-sku { color: var(--muted); font-size: .85rem; margin-bottom: 14px; }
.product-price { font-size: 2.1rem; font-weight: 800; color: var(--blue-dark); }
.product-pix { color: var(--green); font-weight: 600; margin-bottom: 18px; }
.product-stock { font-size: .9rem; margin-bottom: 14px; }
.in-stock { color: var(--green); font-weight: 700; }
.out-stock { color: #c0392b; font-weight: 700; }
.qty-row { display: flex; gap: 12px; align-items: center; margin: 16px 0 20px; }
.qty-row input { width: 74px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 1rem; text-align: center; }
.product-shipping { background: #eef4ff; border: 1px solid #d4e2ff; border-radius: var(--radius); padding: 14px 16px; font-size: .9rem; margin-top: 18px; }
.product-desc { margin-top: 40px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.product-desc h2 { color: var(--blue-dark); margin-bottom: 14px; font-size: 1.25rem; }
.product-desc p { white-space: pre-line; }

/* Breadcrumb */
.breadcrumb { font-size: .85rem; color: var(--muted); margin: 18px 0; }
.breadcrumb a { color: var(--muted); }

/* Tables (cart) */
.table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--border); font-size: .93rem; vertical-align: middle; }
.table th { background: #f0f3f9; color: var(--blue-dark); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.table tr:last-child td { border-bottom: 0; }
.cart-prod { display: flex; gap: 12px; align-items: center; }
.cart-prod img { width: 58px; height: 58px; object-fit: contain; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.cart-qty { width: 64px; padding: 7px; text-align: center; border: 1px solid var(--border); border-radius: 8px; }

/* Summary box / forms */
.box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.box h2, .box h3 { color: var(--blue-dark); margin-bottom: 14px; }
.summary-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: .95rem; }
.summary-total { border-top: 2px solid var(--border); margin-top: 8px; padding-top: 12px; font-size: 1.2rem; font-weight: 800; color: var(--blue-dark); }
.checkout-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 26px; align-items: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
label { font-size: .86rem; font-weight: 600; display: block; margin-bottom: 4px; color: var(--text); }
input[type=text], input[type=email], input[type=tel], input[type=number], select, textarea {
    width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: .95rem; font-family: inherit; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(11, 61, 145, .35); border-color: var(--blue); }

/* Alerts */
.alert { padding: 13px 16px; border-radius: var(--radius); margin-bottom: 18px; font-size: .93rem; }
.alert-error { background: #fdecea; border: 1px solid #f5c6c2; color: #a12622; }
.alert-success { background: #e8f5ec; border: 1px solid #bfe3ca; color: #1e6b38; }
.alert-info { background: #eef4ff; border: 1px solid #d4e2ff; color: #1d4f9c; }

/* PIX payment page */
.pix-wrap { max-width: 620px; margin: 0 auto; text-align: center; }
.pix-qr { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: inline-block; margin: 18px 0; }
.pix-qr img { width: 260px; height: 260px; }
.pix-code { display: flex; gap: 8px; margin: 14px 0; }
.pix-code input { flex: 1; font-size: .8rem; color: var(--muted); }
.status-pill { display: inline-block; padding: 6px 16px; border-radius: 999px; font-weight: 700; font-size: .9rem; }
.st-pending { background: #fff4dd; color: #92600a; }
.st-paid { background: #e8f5ec; color: #1e6b38; }
.st-canceled, .st-expired { background: #fdecea; color: #a12622; }
.st-shipped { background: #eef4ff; color: #1d4f9c; }
.st-delivered { background: #e8f5ec; color: #1e6b38; }

/* Static pages */
.page-content { max-width: 860px; }
.page-content h1 { color: var(--blue-dark); margin-bottom: 8px; }
.page-content h2 { color: var(--blue-dark); margin: 26px 0 10px; font-size: 1.25rem; }
.page-content p, .page-content li { margin-bottom: 10px; }
.page-content ul, .page-content ol { padding-left: 24px; }

/* Footer */
.site-footer { background: var(--blue-dark); color: #cfe0ff; margin-top: 56px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; padding: 44px 16px; }
.footer-col h3 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.footer-col p, .footer-col li { font-size: .87rem; margin-bottom: 8px; }
.footer-col ul { list-style: none; }
.footer-col a { color: #cfe0ff; }
.footer-col a:hover { color: #fff; }
.footer-pay { margin-top: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding: 16px 0; font-size: .8rem; text-align: center; }
.footer-bottom p { margin: 2px 0; }

/* Responsive */
@media (max-width: 860px) {
    .product-layout, .checkout-layout { grid-template-columns: 1fr; }
    .header-inner { flex-wrap: wrap; gap: 10px 14px; }
    .header-search { order: 3; flex-basis: 100%; max-width: none; }
    .main-nav-inner { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .main-nav a { white-space: nowrap; }
    .hero-grid { grid-template-columns: 1fr; gap: 26px; }
    .hero-highlight { order: -1; max-width: 320px; margin: 0 auto; }
    .hero h1 { font-size: 1.7rem; }
    .section-head { flex-direction: column; align-items: flex-start; }
    .form-grid { grid-template-columns: 1fr; }
    .topbar-cnpj { margin-left: 0; }
    .table th:nth-child(3), .table td:nth-child(3) { display: none; }
}
@media (max-width: 520px) {
    .cart-word { display: none; }
    .topbar-inner { gap: 12px; font-size: .78rem; }
    .topbar-cnpj { display: none; }
    .announce-bar { font-size: .74rem; }
    .logo-img { height: 38px; }
    .logo { font-size: 1.15rem; }
}

/* =====================================================
   Polimento profissional
   ===================================================== */
.site-header { box-shadow: 0 2px 12px rgba(8, 44, 105, .18); }
.btn { transition: background .15s ease, transform .1s ease, box-shadow .15s ease; box-shadow: 0 2px 8px rgba(243, 156, 18, .28); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(243, 156, 18, .34); }
.btn:active { transform: translateY(0); }
.btn-blue { box-shadow: 0 2px 8px rgba(11, 61, 145, .26); }
.btn-outline, .btn-ghost { box-shadow: none; }

.card { transition: transform .18s ease, box-shadow .18s ease; }
.card-img img { transition: transform .3s ease; }
.card:hover .card-img img { transform: scale(1.05); }
.card:hover { box-shadow: var(--shadow-lg); }

.hero-eyebrow { backdrop-filter: blur(2px); }
.hero-highlight a { transition: transform .2s ease, box-shadow .2s ease; }
.hero-highlight a:hover { transform: translateY(-4px); box-shadow: 0 26px 50px rgba(0,0,0,.34); }

.trust-item, .benefit, .box { transition: box-shadow .18s ease; }
.trust-item:hover { box-shadow: var(--shadow-lg); }

.section-title { position: relative; padding-bottom: 10px; }
.section-title::after { content: ''; position: absolute; left: 0; bottom: 0; width: 52px; height: 3px; border-radius: 3px; background: var(--orange); }
.section-head .section-title::after { bottom: -2px; }

/* Selos de confiança no rodapé */
.footer-trust { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; padding: 22px 16px; border-top: 1px solid rgba(255,255,255,.14); color: #cfe0ff; font-size: .85rem; }
.footer-trust span { display: flex; align-items: center; gap: 7px; }

/* Foco acessível uniforme */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid rgba(243, 156, 18, .5); outline-offset: 1px;
}
