
:root {
    --black: #0d0d0d;
    --gold: #d4af37;
    --ink: #202124;
    --muted: #626970;
    --line: #e3e5e7;
    --soft: #f6f7f8;
    font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    width: 100%;
    min-width: 0;
}

body {
    margin: 0;
    background: white;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.45;
    display: block !important;
    width: 100%;
    min-width: 0;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a, input { outline-offset: 3px; }

.wrap {
    width: min(1220px, calc(100% - 42px));
    margin: auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}

/* BARRA SUPERIOR */

.utility {
    background: #080808;
    color: #c8c8c8;
    font-size: 12px;
    border-bottom: 1px solid #272727;
}

.utility .wrap {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

/* CABEÇALHO */

.site-header {
    background: var(--black);
    color: white;
}

.header-main {
    min-height: 92px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: block;
    flex: none;
}

.brand-crop {
    display: block;
    width: 205px;
    height: 79px;
    overflow: hidden;
    position: relative;
}

.brand-crop img {
    position: absolute;
    width: 205px;
    height: auto;
    left: 0;
    top: -27px;
    max-width: none;
}

/*
 * FORMULÁRIO DE BUSCA
 *
 * CORREÇÃO PRINCIPAL:
 * A classe .search também é adicionada pelo WordPress ao body.
 * Por isso todas as regras abaixo ficam restritas a form.search.
 */

form.search {
    display: flex;
    flex: 1;
    max-width: 680px;
    min-width: 0;
    height: 48px;
    background: white;
    border-radius: 4px;
    overflow: hidden;
}

form.search input {
    flex: 1;
    width: 100%;
    min-width: 0;
    padding: 0 17px;
    border: 0;
    color: var(--ink);
    background: white;
}

form.search button {
    border: 0;
    background: var(--gold);
    padding: 0 25px;
    font-weight: 800;
    color: #111;
    cursor: pointer;
}

form.search button:hover {
    background: #e7c760;
}

/* AÇÕES DO CABEÇALHO */

.header-actions {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-left: auto;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.header-actions a:hover {
    color: var(--gold);
}

.cart-count {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: var(--gold);
    color: #111;
    margin-left: 5px;
}

.menu-toggle { display: none; }

/* NAVEGAÇÃO */

.main-nav {
    border-top: 1px solid #303030;
}

.nav-inner {
    display: flex;
    align-items: center;
    gap: 30px;
    min-height: 47px;
    overflow-x: auto;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
}

.nav-inner a:hover { color: var(--gold); }
.all-link { color: var(--gold); }
.nav-inner .menu { display: contents; list-style: none; }

/* INTRODUÇÃO */

.store-intro {
    background: linear-gradient(90deg,#f8f8f8,#fff);
    border-bottom: 1px solid var(--line);
}

.intro-grid {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 58px;
    align-items: center;
    padding: 30px 0;
}

.intro-kicker,
.section-kicker {
    display: block;
    font-size: 11px;
    letter-spacing: .12em;
    font-weight: 900;
    color: #8d6c12;
}

.intro-grid h1 {
    font-size: clamp(28px,3.4vw,46px);
    line-height: 1.08;
    letter-spacing: -.04em;
    margin: 10px 0;
}

.intro-grid p {
    color: #596068;
    margin: 0;
    max-width: 510px;
}

.intro-aside {
    background: white;
    border: 1px solid var(--line);
    border-top: 3px solid var(--gold);
    border-radius: 4px;
    padding: 17px 20px;
}

.intro-aside > strong {
    display: block;
    margin-bottom: 13px;
}

.intro-links {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 7px;
}

.intro-links a {
    font-size: 13px;
    font-weight: 700;
    background: #f6f6f6;
    padding: 8px 9px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 3px;
}

.intro-links a:hover { background: #f6edcf; }
.intro-links span { color: #98731a; }

/* BENEFÍCIOS */

.service-row {
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.service-row .wrap {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 0;
    font-size: 13px;
    color: #525960;
}

.service-row span:before {
    content: "✓";
    color: #98731a;
    font-weight: 900;
    margin-right: 8px;
}

/* SEÇÕES */

.section {
    padding-top: 43px;
    padding-bottom: 53px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    margin-bottom: 20px;
}

.section-heading h2 {
    font-size: clamp(26px,2.8vw,35px);
    line-height: 1.15;
    letter-spacing: -.035em;
    margin: 5px 0 0;
}

.section-heading > a {
    font-size: 14px;
    font-weight: 800;
    color: #6f5410;
    white-space: nowrap;
}

.section-heading > a:hover {
    text-decoration: underline;
}

/* CATEGORIAS */

.category-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 12px;
}

.category-card {
    border: 1px solid var(--line);
    border-radius: 5px;
    min-height: 101px;
    padding: 16px;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color .15s,transform .15s;
}

.category-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
}

.category-card strong { font-size: 18px; }
.category-card span { font-size: 13px; color: #666; }
.category-card b {
    float: right;
    color: #9e7719;
    font-size: 18px;
    line-height: 1;
}

/* VITRINE */

.shelf { background: var(--soft); }

.product-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 14px;
}

.product-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.product-photo {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    background: white;
}

.product-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sku {
    font-size: 12px;
    color: #747b82;
    font-weight: 800;
}

.product-info h3 {
    font-size: 16px;
    line-height: 1.35;
    margin: 7px 0 16px;
    min-height: 42px;
}

.price {
    font-size: 23px;
    font-weight: 900;
    margin-top: auto;
}

.price del {
    font-size: 14px;
    font-weight: 400;
    color: #777;
}

.price ins { text-decoration: none; }

.product-button {
    border-top: 1px solid var(--line);
    padding-top: 11px;
    margin-top: 14px;
    font-size: 13px;
    color: #765a13;
    font-weight: 800;
    display: flex;
    justify-content: space-between;
}

.catalog-pending {
    border: 1px dashed #c8cdd0;
    border-radius: 5px;
    background: white;
    padding: 31px;
    text-align: center;
    color: #4d555c;
}

.catalog-pending p { margin: 5px 0 0; }

/* FAIXA DE AJUDA */

.help-band {
    background: #171717;
    color: white;
    padding: 43px 0;
}

.help-band .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.help-band h2 {
    font-size: 30px;
    margin: 5px 0 7px;
    letter-spacing: -.03em;
}

.help-band p {
    max-width: 720px;
    color: #c4c4c4;
    margin: 0;
}

.help-band a {
    background: var(--gold);
    color: #111;
    padding: 14px 18px;
    font-weight: 800;
    white-space: nowrap;
    border-radius: 4px;
}

/* RODAPÉ */

.site-footer {
    background: #0b0b0b;
    color: #d2d2d2;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 48px;
    padding: 47px 0;
}

.footer-brand {
    font-size: 24px;
    color: #fff;
    letter-spacing: .04em;
}

.footer-brand span { color: var(--gold); }

.footer-grid p {
    font-size: 14px;
    color: #aaa;
    max-width: 360px;
}

.footer-grid h3 {
    font-size: 15px;
    color: white;
    margin: 0 0 13px;
}

.footer-grid a {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.footer-grid a:hover { color: var(--gold); }

.footer-bottom {
    border-top: 1px solid #343434;
    padding: 17px 0;
    color: #9b9b9b;
    font-size: 12px;
}

/* CONTEÚDO */

.generic-content,
.shop-content {
    padding-top: 40px;
    padding-bottom: 65px;
    min-height: 45vh;
}

.generic-content article {
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
}

/* WOOCOMMERCE */

.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 18px;
}

.woocommerce ul.products:before,
.woocommerce ul.products:after {
    display: none;
}

.woocommerce ul.products li.product {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 12px !important;
    border: 1px solid var(--line);
}

.woocommerce ul.products li.product img {
    aspect-ratio: 1;
    object-fit: contain;
}

.woocommerce ul.products li.product .button,
.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    background: var(--gold);
    color: #111;
    border-radius: 4px;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price,
.woocommerce ul.products li.product .price {
    color: #111;
    font-weight: 800;
}

.woocommerce .woocommerce-breadcrumb {
    font-size: 13px;
    color: #666;
}

/* RESPONSIVIDADE — TABLET */

@media(max-width:900px) {
    .header-main { gap: 14px; }
    .brand-crop { width: 170px; height: 72px; }
    .brand-crop img { width: 170px; top: -22px; }
    .header-actions { gap: 10px; }
    .intro-grid { gap: 20px; }
    .intro-links { grid-template-columns: repeat(2,1fr); }
    .category-grid,
    .product-grid,
    .woocommerce ul.products {
        grid-template-columns: repeat(2,1fr);
    }
    .nav-inner { gap: 19px; }
}

/* RESPONSIVIDADE — CELULAR */

@media(max-width:640px) {
    .wrap { width: calc(100% - 30px); }

    .utility .wrap span:last-child {
        display: none;
    }

    .header-main {
        display: grid;
        grid-template-columns: 1fr auto auto;
        gap: 8px;
        padding: 8px 0;
    }

    .brand-crop { width: 145px; height: 63px; }
    .brand-crop img { width: 145px; top: -19px; }

    form.search {
        grid-row: 2;
        grid-column: 1/-1;
        max-width: none;
        height: 46px;
        margin-bottom: 9px;
    }

    form.search input { font-size: 14px; }
    form.search button { padding: 0 17px; }

    .header-actions { margin: 0; }
    .account-link { display: none; }
    .cart-link { font-size: 0; }
    .cart-count { font-size: 12px; }

    .menu-toggle {
        display: block;
        border: 1px solid #777;
        background: transparent;
        color: white;
        border-radius: 4px;
        font-size: 12px;
        padding: 7px 8px;
    }

    .main-nav { display: none; }
    .main-nav.is-open { display: block; }

    .nav-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 7px 0;
    }

    .nav-inner a { padding: 8px 0; }

    .intro-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 27px 0;
    }

    .intro-grid h1 { font-size: 33px; }
    .intro-aside { padding: 15px; }

    .service-row .wrap {
        flex-direction: column;
        gap: 5px;
        font-size: 12px;
    }

    .section {
        padding-top: 32px;
        padding-bottom: 38px;
    }

    .section-heading { align-items: start; }
    .section-heading > a { font-size: 12px; }

    .category-grid,
    .product-grid,
    .woocommerce ul.products {
        gap: 9px;
    }

    .category-card {
        padding: 12px;
        min-height: 94px;
    }

    .category-card strong { font-size: 16px; }
    .help-band .wrap {
        flex-direction: column;
        align-items: start;
    }

    .help-band h2 { font-size: 27px; }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 19px;
        padding: 38px 0;
    }

    .woocommerce div.product div.images,
    .woocommerce div.product div.summary {
        width: 100%;
        float: none;
    }
}

/* PROTEÇÃO ESTRUTURAL DO TEMA */

body.wp-theme-turbo-pecas-theme,
body.wp-theme-turbo-pecas-v021 {
    display: block !important;
    width: 100% !important;
    min-width: 0;
    max-width: 100% !important;
}

body.wp-theme-turbo-pecas-theme > .utility,
body.wp-theme-turbo-pecas-theme > .site-header,
body.wp-theme-turbo-pecas-theme > main,
body.wp-theme-turbo-pecas-theme > .site-footer,
body.wp-theme-turbo-pecas-v021 > .utility,
body.wp-theme-turbo-pecas-v021 > .site-header,
body.wp-theme-turbo-pecas-v021 > main,
body.wp-theme-turbo-pecas-v021 > .site-footer {
    display: block;
    width: 100%;
    max-width: 100%;
    clear: both;
}

body.wp-theme-turbo-pecas-theme > main.wrap,
body.wp-theme-turbo-pecas-v021 > main.wrap {
    width: min(1220px,calc(100% - 42px));
    max-width: 1220px;
    margin-left: auto;
    margin-right: auto;
}

/* PROTEÇÃO DAS PÁGINAS DE PESQUISA */

body.search,
body.search-results {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    overflow-x: clip;
    background: white;
}

body.search > .utility,
body.search > .site-header,
body.search > .site-footer,
body.search-results > .utility,
body.search-results > .site-header,
body.search-results > .site-footer {
    width: 100%;
    max-width: 100%;
}

body.search > main.wrap,
body.search-results > main.wrap {
    width: min(1220px,calc(100% - 42px));
    max-width: 1220px;
    margin-left: auto;
    margin-right: auto;
}

.woocommerce ul.products,
.woocommerce ul.products li.product {
    min-width: 0;
}

@media(max-width:640px) {
    body.wp-theme-turbo-pecas-theme > main.wrap,
    body.wp-theme-turbo-pecas-v021 > main.wrap,
    body.search > main.wrap,
    body.search-results > main.wrap {
        width: calc(100% - 30px);
    }
}
