/* ============================================================
   CAIXA FECHADA - CSS ÚNICO ORGANIZADO
   ------------------------------------------------------------
   Como ler este arquivo:
   - Cada bloco tem DESKTOP primeiro.
   - Logo abaixo fica o MOBILE do mesmo bloco.
   - Assim você encontra tudo do mesmo componente no mesmo lugar.
   ============================================================ */

/* ============================================================
   01. VARIÁVEIS, RESET E BASE GERAL - DESKTOP
   ============================================================ */
:root {
    --cf-orange: #ff6a00;        /* Laranja principal da marca Caixa Fechada. */
    --cf-orange-dark: #d94f00;   /* Laranja mais escuro usado em hover. */
    --cf-black: #121212;         /* Preto fosco do cabeçalho e áreas fortes. */
    --cf-gray: #f4f4f4;          /* Cinza claro de fundo geral. */
    --cf-border: #e4e4e4;        /* Cor padrão de bordas suaves. */
    --cf-text: #222222;          /* Cor principal dos textos. */
    --cf-muted: #707070;         /* Cor de textos secundários. */
    --cf-white: #ffffff;         /* Branco puro. */
    --cf-radius: 18px;           /* Arredondamento padrão dos cards. */
    --cf-shadow: 0 12px 30px rgba(0,0,0,.08); /* Sombra padrão do tema. */
}

* {
    box-sizing: border-box; /* Impede padding/borda de estourar largura. */
}

body {
    margin: 0;
    background: var(--cf-gray);
    color: var(--cf-text);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 01. BASE GERAL - MOBILE */
@media (max-width: 900px) {
    body {
        background: var(--cf-gray);
    }
}

/* ============================================================
   02. CABEÇALHO, LOGO E MENU - DESKTOP
   ============================================================ */
.cf-header {
    background: var(--cf-black);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

.cf-header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 20px;
    display: grid;
    grid-template-columns: 240px 520px auto; /* Logo | busca | menu. */
    gap: 18px;
    align-items: center;
}

.cf-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: var(--cf-orange);
    letter-spacing: .5px;
}

.cf-logo-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--cf-white);
    background: linear-gradient(135deg, var(--cf-orange), #ff9a2f);
}

.cf-logo-text {
    font-size: 18px;
    line-height: 1;
}

.cf-nav ul {
    list-style: none;
    display: flex;
    gap: 18px;
    margin: 0;
    padding: 0;
}

.cf-nav a {
    color: var(--cf-white);
    font-weight: 700;
    font-size: 14px;
}

.cf-nav a:hover {
    color: var(--cf-orange);
}

/* 02. CABEÇALHO, LOGO E MENU - MOBILE */
@media (max-width: 900px) {
    .cf-header-inner {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px;
    }

    .cf-logo {
        justify-content: center;
    }

    .cf-nav {
        display: none;
    }
}

/* ============================================================
   03. BUSCA INTELIGENTE - DESKTOP
   ============================================================ */
.cf-search-form {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto; /* Campo flexível + botão. */
    align-items: center;
    width: 100%;
    max-width: 520px;
    justify-self: center;
    background: var(--cf-white);
    border: 2px solid var(--cf-orange);
    border-radius: 16px;
    overflow: visible;
}

.cf-search-input {
    width: 100%;
    height: 40px;
    padding: 0 16px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 16px;
    color: var(--cf-text);
}

.cf-search-button {
    height: 40px;
    padding: 0 22px;
    border: 0;
    border-radius: 0 13px 13px 0;
    background: var(--cf-orange);
    color: var(--cf-white);
    font-weight: 800;
    cursor: pointer;
}

.cf-search-button:hover {
    background: var(--cf-orange-dark);
}

.cf-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--cf-white);
    border: 1px solid var(--cf-border);
    border-radius: 16px;
    box-shadow: var(--cf-shadow);
    overflow: hidden;
    display: none;
    z-index: 80;
}

.cf-search-results.is-open {
    display: block;
}

.cf-search-item {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--cf-border);
}

.cf-search-item:hover {
    background: #fff3ea;
}

.cf-search-item img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    background: #fafafa;
    border-radius: 10px;
}

.cf-search-item strong {
    display: block;
    font-size: 14px;
    color: var(--cf-text);
}

.cf-search-item small {
    display: block;
    margin-top: 3px;
    color: var(--cf-muted);
    font-size: 12px;
}

/* 03. BUSCA INTELIGENTE - MOBILE */
@media (max-width: 900px) {
    .cf-search-form {
        width: 100%;
        max-width: 100%;
        justify-self: stretch;
        grid-template-columns: 1fr 88px;
    }

    .cf-search-input,
    .cf-search-button {
        height: 40px;
        min-height: 40px;
    }

    .cf-search-button {
        padding: 0 10px;
        font-size: 13px;
        border-radius: 0 13px 13px 0;
    }
}

/* ============================================================
   04. ESTRUTURA GERAL DE PÁGINAS - DESKTOP
   ============================================================ */
.cf-main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px 20px 50px;
}

.cf-section {
    margin-top: 30px;
}

.cf-section-heading {
    margin-bottom: 18px;
}

.cf-section-heading span,
.cf-kicker,
.cf-archive-head span {
    display: inline-block;
    color: var(--cf-orange);
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
}

.cf-section-heading h2,
.cf-archive-head h1 {
    margin: 5px 0 0;
    color: var(--cf-black);
    font-size: 28px;
}

/* 04. ESTRUTURA GERAL DE PÁGINAS - MOBILE */
@media (max-width: 900px) {
    .cf-main {
        padding: 16px 12px 40px;
    }

    .cf-section-heading h2,
    .cf-archive-head h1 {
        font-size: 23px;
    }
}

/* ============================================================
   05. HOME SEM BANNER - DESKTOP
   ============================================================ */
.cf-hero-clean {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 24px;
    align-items: stretch;
    padding: 30px;
    border-radius: 26px;
    background: linear-gradient(135deg, #ffffff, #f8f8f8);
    border: 1px solid var(--cf-border);
    box-shadow: var(--cf-shadow);
}

.cf-hero-copy h1 {
    margin: 8px 0 12px;
    font-size: 44px;
    line-height: 1.02;
    color: var(--cf-black);
}

.cf-hero-copy p {
    margin: 0;
    color: var(--cf-muted);
    font-size: 18px;
}

.cf-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.cf-hero-stats div {
    background: var(--cf-black);
    color: var(--cf-white);
    border-radius: 18px;
    padding: 18px;
}

.cf-hero-stats strong {
    display: block;
    color: var(--cf-orange);
    font-size: 20px;
}

.cf-hero-stats span {
    display: block;
    margin-top: 6px;
    color: #d6d6d6;
    font-size: 13px;
}

/* 05. HOME SEM BANNER - MOBILE */
@media (max-width: 900px) {
    .cf-hero-clean {
        grid-template-columns: 1fr;
        padding: 20px;
        border-radius: 22px;
    }

    .cf-hero-copy h1 {
        font-size: 31px;
    }

    .cf-hero-copy p {
        font-size: 15px;
    }

    .cf-hero-stats {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   06. CATEGORIAS / CONTAINERS - DESKTOP
   ============================================================ */
.cf-category-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 2px 14px;
    -webkit-overflow-scrolling: touch;
}

.cf-category-scroll::-webkit-scrollbar {
    height: 8px;
}

.cf-category-scroll::-webkit-scrollbar-thumb {
    background: var(--cf-orange);
    border-radius: 999px;
}

.cf-container-card {
    flex: 0 0 260px;
    min-height: 108px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 18px 22px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--cf-orange), #ff8b26);
    color: var(--cf-white);
    box-shadow: var(--cf-shadow);
    border: 2px solid rgba(0,0,0,.12);
    scroll-snap-align: start;
}

.cf-container-lines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0, rgba(255,255,255,.08) 10px, transparent 10px, transparent 28px);
    pointer-events: none;
}

.cf-container-name {
    position: relative;
    z-index: 1;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
}

.cf-container-card small {
    position: relative;
    z-index: 1;
    margin-top: 6px;
    opacity: .9;
}

.cf-container-card:hover {
    transform: translateY(-2px);
    transition: .2s ease;
}

/* 06. CATEGORIAS / CONTAINERS - MOBILE */
@media (max-width: 900px) {
    .cf-category-scroll {
        gap: 12px;
        padding: 4px 2px 12px;
    }

    .cf-container-card {
        flex: 0 0 calc(50% - 8px);
        min-height: 88px;
        padding: 14px;
        border-radius: 14px;
    }

    .cf-container-name {
        font-size: 13px;
        line-height: 1.1;
    }

    .cf-container-card small {
        font-size: 11px;
    }
}

@media (max-width: 420px) {
    .cf-container-card {
        flex-basis: calc(50% - 7px);
    }
}

/* ============================================================
   07. CARD DE PRODUTO - DESKTOP
   ============================================================ */
.cf-products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.cf-product-card {
    background: var(--cf-white);
    border: 3px solid var(--cf-orange);
    border-radius: var(--cf-radius);
    overflow: hidden;
    box-shadow: var(--cf-shadow);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cf-product-image {
    width: 100%;
    height: 220px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #ffffff;
    flex-shrink: 0;
}

.cf-product-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block;
}

.cf-product-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.cf-product-title {
    margin: 0;
    font-size: 15px;
    line-height: 1.25;
    min-height: 38px;
}

.cf-product-title a:hover {
    color: var(--cf-orange);
}

.cf-minimum-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 12px;
    background: #fff0e6;
    color: var(--cf-black);
    font-size: 13px;
    font-weight: 800;
}

.cf-stars {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--cf-muted);
}

.cf-stars span,
.cf-single-stars span {
    color: var(--cf-orange);
    letter-spacing: 1px;
}

.cf-stars strong {
    color: var(--cf-black);
    text-transform: uppercase;
    font-size: 11px;
}

.cf-product-price {
    margin-top: auto;
    font-size: 20px;
    font-weight: 900;
    color: var(--cf-orange);
}

.cf-product-price del {
    color: #999;
    font-size: 13px;
    margin-right: 6px;
}

.cf-whatsapp-button,
.cf-single-whatsapp,
.cf-load-more {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 13px;
    background: var(--cf-orange);
    color: var(--cf-white);
    font-weight: 900;
    cursor: pointer;
    text-align: center;
}

.cf-whatsapp-button:hover,
.cf-single-whatsapp:hover,
.cf-load-more:hover {
    background: var(--cf-orange-dark);
}

/* 07. CARD DE PRODUTO - MOBILE */
@media (max-width: 900px) {
    .cf-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .cf-product-card {
        border-width: 2px;
        border-radius: 16px;
    }

    .cf-product-image {
        height: 155px;
        padding: 10px;
    }

    .cf-product-body {
        padding: 11px;
        gap: 8px;
    }

    .cf-product-title {
        font-size: 13px;
        min-height: 34px;
    }

    .cf-minimum-badge {
        min-height: 30px;
        padding: 6px 8px;
        font-size: 11px;
        line-height: 1.2;
    }

    .cf-stars {
        display: block;
        line-height: 1.2;
    }

    .cf-stars span {
        display: block;
        font-size: 12px;
    }

    .cf-stars strong {
        font-size: 10px;
    }

    .cf-product-price {
        font-size: 17px;
    }

    .cf-whatsapp-button {
        min-height: 40px;
        font-size: 12px;
        border-radius: 11px;
        padding: 8px;
    }
}

@media (max-width: 420px) {
    .cf-products-grid {
        gap: 10px;
    }

    .cf-product-image {
        height: 140px;
    }
}

/* ============================================================
   08. PÁGINA DE CATEGORIA / LOJA - DESKTOP
   ============================================================ */
.cf-archive-head {
    padding: 24px;
    border-radius: 22px;
    background: var(--cf-white);
    border: 1px solid var(--cf-border);
    box-shadow: var(--cf-shadow);
}

.cf-archive-description {
    margin-top: 10px;
    color: var(--cf-muted);
}

.cf-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.cf-load-more {
    max-width: 280px;
}

.cf-empty {
    padding: 30px;
    background: var(--cf-white);
    border-radius: 18px;
}

/* 08. PÁGINA DE CATEGORIA / LOJA - MOBILE */
@media (max-width: 900px) {
    .cf-archive-head {
        padding: 18px;
        border-radius: 18px;
    }
}

/* ============================================================
   09. PÁGINA DO PRODUTO - DESKTOP
   ============================================================ */
.cf-single-product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    background: var(--cf-white);
    border-radius: 26px;
    padding: 28px;
    box-shadow: var(--cf-shadow);
}

.cf-single-gallery {
    display: grid;
    place-items: center;
    min-height: 460px;
    border: 1px solid var(--cf-border);
    border-radius: 20px;
    background: #fff;
    overflow: hidden;
}

.cf-single-gallery img {
    max-width: 100%;
    max-height: 440px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.cf-single-summary h1 {
    margin: 8px 0 14px;
    color: var(--cf-black);
    font-size: 34px;
    line-height: 1.1;
}

.cf-product-label {
    color: var(--cf-orange);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 12px;
}

.cf-single-minimum {
    display: inline-flex;
    margin: 8px 0 12px;
    padding: 10px 14px;
    border-radius: 14px;
    background: #fff0e6;
    font-weight: 900;
}

.cf-single-stars {
    margin: 10px 0;
    font-weight: 800;
}

.cf-single-price {
    margin: 18px 0;
    font-size: 32px;
    font-weight: 900;
    color: var(--cf-orange);
}

.cf-single-benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 18px;
}

.cf-single-benefits span {
    padding: 12px;
    border-radius: 14px;
    background: #f7f7f7;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.cf-product-description {
    margin-top: 28px;
    padding: 28px;
    background: var(--cf-white);
    border-radius: 22px;
    box-shadow: var(--cf-shadow);
}

.cf-product-description h2 {
    margin-top: 0;
}

/* 09. PÁGINA DO PRODUTO - MOBILE */
@media (max-width: 900px) {
    .cf-single-product {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 18px;
    }

    .cf-single-gallery {
        min-height: 300px;
    }

    .cf-single-gallery img {
        max-height: 290px;
    }

    .cf-single-summary h1 {
        font-size: 25px;
    }

    .cf-single-price {
        font-size: 27px;
    }

    .cf-single-benefits {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   10. RODAPÉ - DESKTOP
   ============================================================ */
.cf-footer {
    background: var(--cf-black);
    color: var(--cf-white);
    padding: 28px 20px;
}

.cf-footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.cf-footer strong {
    color: var(--cf-orange);
}

/* 10. RODAPÉ - MOBILE */
@media (max-width: 900px) {
    .cf-footer-inner {
        flex-direction: column;
        text-align: center;
    }
}
