/* ===== Reset / base ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: 'Roboto', Arial, sans-serif;
    color: #2f3137;
    background: #f4f3f8;
    font-size: 14px;
    line-height: 1.4;
}
img { max-width: 100%; display: block; }
a { color: #003567; text-decoration: none; }
a:hover { color: #1371b9; }

.container { max-width: 1380px; margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.header-top {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 12px 0;
}
.header-top .container {
    display: flex;
    align-items: center;
    gap: 24px;
}
.logo {
    display: inline-block;
    flex-shrink: 0;
    line-height: 0;
}
.logo img { display: block; height: 48px; width: auto; }
.search {
    flex: 1;
    position: relative;
}
.search input {
    width: 100%;
    height: 42px;
    padding: 0 44px 0 16px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
}
.search button {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #999;
    font-size: 18px;
}
.header-actions { display: flex; gap: 24px; align-items: center; }
.header-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    font-size: 13px;
}
.cart-link {
    background: #2f3137;
    color: #fff;
    padding: 8px 14px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.cart-link:hover { color: #FFF200; }
.cart-badge {
    background: #D20303;
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* ===== Nav ===== */
.nav {
    background: #282B33;
}
.nav .container {
    display: flex;
    gap: 4px;
    overflow-x: auto;
}
.nav a {
    color: #fff;
    padding: 14px 16px;
    font-size: 13px;
    white-space: nowrap;
    font-weight: 500;
    text-transform: uppercase;
}
.nav a:hover, .nav a.active { background: #555; color: #FFF200; }

/* ===== Breadcrumbs ===== */
.breadcrumbs {
    padding: 14px 0;
    font-size: 12px;
    color: #666;
}
.breadcrumbs a { color: #666; }
.breadcrumbs strong { color: #D20303; }
.breadcrumbs span { margin: 0 8px; color: #999; }

/* ===== Page title + banner ===== */
.page-title {
    font-size: 28px;
    font-weight: 700;
    margin: 8px 0 16px;
    color: #2f3137;
}
.category-banner {
    margin-bottom: 24px;
    border-radius: 6px;
    overflow: hidden;
}
.category-banner img { width: 100%; }

/* ===== Toolbar ===== */
.toolbar {
    background: #fff;
    border-radius: 6px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 13px;
}

/* ===== Layout produtos ===== */
.products-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
}
.products-layout--no-sidebar { grid-template-columns: 1fr; }

/* Filtros */
.filters {
    background: #fff;
    padding: 16px;
    border-radius: 6px;
    height: fit-content;
}
.filters h2 { font-size: 16px; margin: 0 0 12px; color: #D20303; }
.filter-group { border-top: 1px solid #eee; padding: 12px 0; }
.filter-group h3 { font-size: 13px; margin: 0 0 8px; color: #D20303; }
.filter-group label { display: block; font-size: 13px; padding: 4px 0; cursor: pointer; }

/* Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.product-card {
    background: #fff;
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: box-shadow .2s;
}
.product-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #FFF200;
    color: #2f3137;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    z-index: 2;
}
.product-card .photo {
    aspect-ratio: 1/1.3;
    overflow: hidden;
    margin-bottom: 12px;
}
.product-card .photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}
.product-card .name {
    font-size: 13px;
    line-height: 1.35;
    margin: 0 0 8px;
    min-height: 56px;
    color: #2f3137;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card .name a { color: inherit; }
.product-card .price {
    font-size: 18px;
    font-weight: 700;
    color: #2f3137;
    margin-bottom: 4px;
}
.product-card .installments { font-size: 11px; color: #666; margin-bottom: 12px; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    border-radius: 4px;
    border: 0;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-transform: uppercase;
    font-size: 13px;
    transition: opacity .2s;
}
.btn:hover { opacity: .9; }
.btn-primary { background: #28C76F; color: #fff; width: 100%; }
.btn-warning { background: #FFD60A; color: #5a4500; width: 100%; }
.btn-dark    { background: #2f3137; color: #fff; }
.btn-block   { width: 100%; }

/* ===== Footer ===== */
footer.site {
    background: #282B33;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 40px;
}
.newsletter {
    background: #1d1f24;
    padding: 30px 0;
    color: #fff;
}
.newsletter h3 { color: #FFF200; margin: 0 0 4px; }
.newsletter form {
    display: grid;
    grid-template-columns: repeat(3, 1fr) auto;
    gap: 12px;
    margin-top: 16px;
}
.newsletter input {
    height: 44px;
    border-radius: 4px;
    border: 0;
    padding: 0 14px;
    font-size: 14px;
}
.newsletter .btn { background: #FFF200; color: #2f3137; border-radius: 4px; }

footer.site .footer-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}
footer.site h4 { color: #FFF200; margin: 0 0 12px; font-size: 14px; }
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site ul li { padding: 4px 0; font-size: 13px; }
footer.site ul li a { color: #fff; }
footer.site .copyright { border-top: 1px solid #444; padding-top: 16px; font-size: 12px; opacity: .7; text-align: center; }

/* ===== Páginas internas ===== */
.page-card {
    background: #fff;
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 16px;
}
.page-card h2 { margin: 0 0 16px; font-size: 20px; color: #2f3137; }

/* ===== Carrinho ===== */
.cart-grid { display: grid; grid-template-columns: 1fr 360px; gap: 20px; }
.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto auto;
    gap: 16px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
}
.cart-item img { max-height: 90px; object-fit: contain; }
.cart-item .qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}
.cart-item .qty button { background: #f5f5f5; border: 0; width: 32px; height: 32px; cursor: pointer; font-size: 16px; }
.cart-item .qty span { width: 36px; text-align: center; font-weight: 600; }
.cart-item .remove { color: #D20303; cursor: pointer; background: none; border: 0; font-size: 13px; }

.summary {
    background: #fff;
    border-radius: 6px;
    padding: 20px;
    height: fit-content;
}
.summary h3 { margin: 0 0 16px; font-size: 18px; }
.summary .row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.summary .total { border-top: 2px solid #eee; margin-top: 10px; padding-top: 14px; font-size: 18px; font-weight: 700; color: #28C76F; }

/* ===== Forms ===== */
.form-row { display: grid; gap: 14px; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row.cep    { grid-template-columns: 160px 1fr 120px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: #444; }
.field input, .field select, .field textarea {
    width: 100%;
    height: 42px;
    border: 1px solid #ccd0d5;
    border-radius: 4px;
    padding: 0 12px;
    font-size: 14px;
    font-family: inherit;
}
.field input:focus, .field select:focus { outline: none; border-color: #1371b9; }

.shipping-options { display: grid; gap: 8px; margin-top: 8px; }
.shipping-options label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    background: #fff;
}
.shipping-options label:hover { border-color: #1371b9; }
.shipping-options input[type=radio] { margin-right: 10px; }
.shipping-options label.selected { border-color: #28C76F; background: #f3fbf6; }
.shipping-options .price { font-weight: 700; color: #28C76F; }

.alert { padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fdecea; color: #b3261e; border: 1px solid #f5c2c0; }
.alert-success { background: #e7f7ee; color: #117a3a; border: 1px solid #b8e6c9; }

/* ===== PIX ===== */
.pix-wrap {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    align-items: start;
}
.pix-qr {
    background: #fff;
    border-radius: 6px;
    padding: 16px;
    text-align: center;
}
.pix-qr img { width: 100%; max-width: 280px; margin: 0 auto; }
.pix-code {
    background: #f6f6f6;
    border: 1px dashed #bbb;
    padding: 12px;
    word-break: break-all;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    margin: 12px 0;
    border-radius: 4px;
}
.copy-btn {
    background: #003567; color: #fff; border: 0;
    padding: 12px 18px; border-radius: 4px; cursor: pointer; font-weight: 600;
}
.timer { color: #D20303; font-weight: 700; }
.status-pill {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}
.status-pending { background: #fff3cd; color: #856404; }
.status-paid    { background: #d4edda; color: #155724; }

/* ===== Mini-cart popup ===== */
.mc[hidden] { display: none; }
.mc {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; justify-content: flex-end;
}
.mc-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.mc-panel {
    position: relative; width: 420px; max-width: 90vw; height: auto; max-height: 90vh;
    background: #fff; border-radius: 8px;
    margin: 70px 20px 0 0;
    display: flex; flex-direction: column;
    box-shadow: 0 12px 40px rgba(0,0,0,.2);
    animation: mcDown .15s ease-out;
}
@keyframes mcDown { from { transform: translateY(-10px); opacity: 0; } }
.mc-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #eee; }
.mc-head strong { font-size: 18px; }
.mc-close { background: none; border: 0; font-size: 28px; cursor: pointer; color: #999; line-height: 1; }
.mc-body { padding: 12px 20px; overflow-y: auto; flex: 1; min-height: 80px; }
.mc-empty { text-align: center; color: #999; padding: 30px 0; }
.mc-item { display: grid; grid-template-columns: 60px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f1f1f1; }
.mc-item:last-child { border-bottom: 0; }
.mc-item img { width: 60px; height: 60px; object-fit: contain; }
.mc-name { margin: 0 0 8px; font-size: 13px; line-height: 1.3; }
.mc-controls { display: flex; align-items: center; gap: 12px; }
.mc-controls .qty { display: inline-flex; border: 1px solid #ddd; border-radius: 4px; }
.mc-controls .qty button { background: #f5f5f5; border: 0; width: 26px; height: 26px; cursor: pointer; }
.mc-controls .qty span { min-width: 28px; text-align: center; line-height: 26px; font-weight: 600; }
.mc-remove { background: none; border: 0; cursor: pointer; color: #888; font-size: 16px; }
.mc-price { margin-left: auto; color: #2f3137; }
.mc-foot { padding: 16px 20px; border-top: 1px solid #eee; }
.mc-total { display: flex; justify-content: space-between; margin-bottom: 12px; }
.mc-total strong { color: #28C76F; font-size: 18px; }
.cart-link { background: none; border: 0; color: #333; font-weight: 600; padding: 8px 14px; cursor: pointer; }

/* ===== Stepper checkout ===== */
.stepper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 16px;
    overflow-x: auto;
}
.stepper .step, .stepper a.step {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 14px; border-radius: 4px;
    color: #999; text-decoration: none;
    font-size: 13px; line-height: 1.2;
}
.stepper .step.active { background: #2f3137; color: #fff; }
.stepper .step.done   { color: #28C76F; }
.stepper .step-icon   { font-size: 18px; }
.stepper .step-arrow  { color: #ccc; font-size: 20px; }

/* ===== Produto ===== */
.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 30px;
    margin-bottom: 24px;
    background: #fff;
    border-radius: 6px;
    padding: 24px;
}
.product-detail-photo { position: relative; text-align: center; }
.product-detail-photo .badge { top: 0; left: 0; }
.product-detail-photo img { max-height: 380px; margin: 20px auto; object-fit: contain; }
.share-icons { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.share-icons button, .share-icons a {
    width: 38px; height: 38px; border: 0; border-radius: 50%;
    background: #003567; color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.product-detail-info h1 { font-size: 24px; line-height: 1.3; margin: 0 0 14px; color: #2f3137; }
.presale-pill {
    background: #FFF200; color: #5a4500;
    padding: 8px 12px; border-radius: 3px; font-size: 13px; font-weight: 600;
    display: inline-block; margin-bottom: 16px;
}
.product-desc { color: #555; font-size: 13px; margin-bottom: 18px; }
.product-detail-price { font-size: 28px; font-weight: 700; color: #2f3137; margin-bottom: 16px; }
.product-detail-price small { font-size: 14px; font-weight: 400; color: #666; display: block; }
.unavailable { color: #D20303; font-weight: 700; margin-bottom: 12px; }

.btn-lg { padding: 16px 24px; font-size: 14px; }

.freight-box { margin-top: 16px; border: 1px solid #eee; border-radius: 4px; }
.freight-box summary { padding: 14px; cursor: pointer; font-weight: 600; list-style: none; }
.freight-box summary::-webkit-details-marker { display: none; }
.freight-box[open] summary { border-bottom: 1px solid #eee; }

.product-meta ul { list-style: none; padding: 0; margin: 0; }
.product-meta li { padding: 8px 0; border-bottom: 1px solid #f1f1f1; font-size: 14px; }
.product-meta li:last-child { border-bottom: 0; }
.product-meta strong { display: inline-block; min-width: 180px; color: #2f3137; }

/* ===== Pagamento accordion ===== */
.payment-accordion { display: grid; gap: 10px; }
.pay-method { border: 1px solid #ddd; border-radius: 4px; background: #fff; }
.pay-method[open] { border-color: #1371b9; }
.pay-method.disabled { opacity: .55; pointer-events: none; }
.pay-method summary {
    padding: 16px 18px; cursor: pointer; list-style: none;
    display: flex; align-items: center; gap: 12px; font-weight: 600;
}
.pay-method summary::-webkit-details-marker { display: none; }
.pay-method summary::after { content: '▾'; margin-left: auto; color: #999; transition: transform .15s; }
.pay-method[open] summary::after { transform: rotate(180deg); }
.pay-icon { font-size: 18px; }
.pay-tag { font-size: 11px; padding: 3px 8px; border-radius: 3px; background: #d4edda; color: #155724; margin-left: 8px; }
.pay-tag.muted { background: #eee; color: #888; }
.pay-body { padding: 0 18px 18px; color: #555; font-size: 14px; }

/* ===== Summary item (com imagem) ===== */
.summary-item {
    display: grid; grid-template-columns: 46px 1fr auto; gap: 10px;
    align-items: center; padding: 8px 0; border-bottom: 1px solid #f1f1f1;
}
.summary-item:last-child { border-bottom: 0; }
.summary-item img { object-fit: contain; }
.summary hr { border: 0; border-top: 1px solid #eee; margin: 12px 0; }

/* ===== Responsivo ===== */
@media (max-width: 980px) {
    .products-layout { grid-template-columns: 1fr; }
    .filters { display: none; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-card .price { font-size: 16px; }
    .cart-grid { grid-template-columns: 1fr; }
    .pix-wrap { grid-template-columns: 1fr; }
    .form-row.cols-2, .form-row.cols-3, .form-row.cep { grid-template-columns: 1fr; }
    .newsletter form { grid-template-columns: 1fr; }
    footer.site .footer-cols { grid-template-columns: 1fr 1fr; }
    .header-top .container { flex-wrap: wrap; }
    .search { order: 3; flex: 1 1 100%; }
    .nav .container { padding: 0 10px; }
    .cart-item { grid-template-columns: 60px 1fr auto; gap: 8px; }
    .cart-item .qty, .cart-item .price-col { grid-column: 2; justify-self: start; }
    .product-detail { grid-template-columns: 1fr; padding: 16px; }
    .product-detail-photo img { max-height: 280px; }
    .product-detail-info h1 { font-size: 20px; }
    .mc-panel { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; margin: 0; border-radius: 0; }
    .stepper { gap: 6px; padding: 8px; }
    .stepper .step { padding: 6px 10px; font-size: 12px; }
    .product-meta strong { display: block; min-width: 0; }
}
