/* ===========================================================================
   Arquivo: /assets/css/app.css
   Projeto Catálogo Virtual
   Autor: Nei Alexandre Martins
   Versão: 3.4.4  
   ========================================================================== */


/* =============================================================================
   01. VARIÁVEIS GLOBAIS (DESIGN TOKENS)
   ========================================================================== */

:root {

    /* -------------------------------------------------------------------------
       Cores Principais
       ------------------------------------------------------------------------- */

    --primary-color: #25D366;
    --primary-hover: #20ba5a;

    /* -------------------------------------------------------------------------
       Identidade Institucional MegaBox Virtual
       ------------------------------------------------------------------------- */

    --brand-color: #03122e;
    --brand-color-soft: #0a1c3d;
    --brand-color-hover: #10264d;

    --brand-text: #ffffff;
    --brand-text-soft: rgba(255, 255, 255, .78);

    --whatsapp-color: #25D366;
    --whatsapp-hover: #20ba5a;

    --dark-color: #1c1e21;
    --light-color: #f0f2f5;

    --white: #ffffff;
    --black: #000000;

    --border-color: rgba(0, 0, 0, .12);
    --border-light: rgba(0, 0, 0, .06);

    --background-soft: #fafafa;
    --background-hover: #f2f2f2;

    --card-bg: #ffffff;
    --text-muted: #606770;

    /* -------------------------------------------------------------------------
       Tokens Semânticos
       ------------------------------------------------------------------------- */

    --danger: #e41e3f;
    --danger-bg: #fde8eb;
    --danger-badge: #e53935;

    --success-text: #2e7d32;

    --warning-bg: rgba(212, 138, 38, .20);
    --warning-hover: #ebb867;

    /* -------------------------------------------------------------------------
       Bordas
       ------------------------------------------------------------------------- */

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;

    /* -------------------------------------------------------------------------
       Sombras
       ------------------------------------------------------------------------- */

    --shadow-soft: 0 4px 12px rgba(0, 0, 0, .05);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, .12);

    /* -------------------------------------------------------------------------
       Transições
       ------------------------------------------------------------------------- */

    --transition-fast:
        all .30s cubic-bezier(.25, .8, .25, 1);

    /* -------------------------------------------------------------------------
       Tipografia
       ------------------------------------------------------------------------- */

    --font-main:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
}


/* =============================================================================
   02. RESET & BASE
   ========================================================================== */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
    padding-bottom: 70px;
}


/* =============================================================================
   03. LAYOUT
   ========================================================================== */

.container {
    width: 100%;
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

.content-area {
    margin: 10px 0;
}

.catalog-products {
    width: 100%;
}


/* =============================================================================
   04. CABEÇALHO — IDENTIDADE MEGABOX VIRTUAL
   ========================================================================== */

.main-header {
    position: relative;
    width: 100%;
    background: var(--brand-color);
    color: var(--brand-text);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 4px 18px rgba(3, 18, 46, .18);
    z-index: 100;
}


/* -----------------------------------------------------------------------------
   Container principal
   ----------------------------------------------------------------------------- */

.main-header-container {
    min-height: 92px;
    padding-top: 12px;
    padding-bottom: 12px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;
}


/* -----------------------------------------------------------------------------
   Identidade da marca
   ----------------------------------------------------------------------------- */

.main-header-brand {
    display: flex;
    align-items: center;
    gap: 14px;

    min-width: 0;
    flex-shrink: 0;
}


/* -----------------------------------------------------------------------------
   Logo
   ----------------------------------------------------------------------------- */

.main-header-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: var(--radius-md);
    text-decoration: none;
}

.main-header-logo {
    display: block;

    width: 64px;
    height: 64px;

    object-fit: contain;

    border-radius: var(--radius-md);

    background: var(--brand-color);

    box-shadow:
        0 3px 12px rgba(0, 0, 0, .18);

    transition: var(--transition-fast);
}

.main-header-logo-link:hover .main-header-logo {
    transform: translateY(-1px);
}


/* -----------------------------------------------------------------------------
   Nome e descrição
   ----------------------------------------------------------------------------- */

.main-header-brand-content {
    display: flex;
    flex-direction: column;

    min-width: 0;
}

.main-header-brand-name {
    display: inline-block;

    width: fit-content;

    color: var(--brand-text);

    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.3px;

    text-decoration: none;

    transition: var(--transition-fast);
}

.main-header-brand-name:hover {
    color: var(--primary-color);
}

.main-header-description {
    margin-top: 5px;

    max-width: 430px;

    color: var(--brand-text-soft);

    font-size: .82rem;
    font-weight: 400;
    line-height: 1.35;
}


/* -----------------------------------------------------------------------------
   Área reservada para integração da busca
   ----------------------------------------------------------------------------- */

.main-header-search-slot {
    display: none;

    flex: 1 1 auto;

    min-width: 0;
    max-width: 520px;
}

.main-header-search-slot:empty {
    display: none;
}


/* -----------------------------------------------------------------------------
   Área de ações
   ----------------------------------------------------------------------------- */

.main-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    flex-shrink: 0;
}


/* -----------------------------------------------------------------------------
   WhatsApp
   ----------------------------------------------------------------------------- */

.main-header-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    min-height: 46px;

    padding: 8px 15px;

    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: var(--radius-md);

    background: var(--whatsapp-color);
    color: var(--white);

    font-family: var(--font-main);
    line-height: 1.2;

    text-decoration: none;

    box-shadow:
        0 5px 16px rgba(37, 211, 102, .20);

    transition: var(--transition-fast);
}

.main-header-whatsapp:hover {
    background: var(--whatsapp-hover);

    transform: translateY(-1px);

    box-shadow:
        0 7px 20px rgba(37, 211, 102, .26);
}

.main-header-whatsapp:active {
    transform: translateY(0);
}


/* -----------------------------------------------------------------------------
   Ícone WhatsApp
   ----------------------------------------------------------------------------- */

.main-header-whatsapp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 26px;
    height: 26px;

    flex-shrink: 0;

    color: var(--white);
}

.main-header-whatsapp-icon svg {
    display: block;

    width: 24px;
    height: 24px;
}


/* -----------------------------------------------------------------------------
   Texto do WhatsApp
   ----------------------------------------------------------------------------- */

.main-header-whatsapp-text {
    display: flex;
    flex-direction: column;

    align-items: flex-start;

    white-space: nowrap;
}

.main-header-whatsapp-text strong {
    color: var(--white);

    font-size: .82rem;
    font-weight: 800;
}

.main-header-whatsapp-text small {
    margin-top: 2px;

    color: rgba(255, 255, 255, .90);

    font-size: .72rem;
    font-weight: 500;
}


/* =============================================================================
   RESPONSIVIDADE DO CABEÇALHO
   ========================================================================== */

@media (max-width: 991px) {

    .main-header-container {
        min-height: 84px;
        gap: 18px;
    }

    .main-header-logo {
        width: 58px;
        height: 58px;
    }

    .main-header-brand-name {
        font-size: 1.20rem;
    }

    .main-header-description {
        max-width: 330px;
        font-size: .78rem;
    }

    .main-header-whatsapp {
        min-height: 44px;
        padding: 8px 12px;
    }

    .main-header-whatsapp-text small {
        font-size: .68rem;
    }
}

@media (max-width: 599px) {

    .main-header-container {
        min-height: 74px;

        padding-top: 10px;
        padding-bottom: 10px;

        gap: 10px;
    }

    .main-header-brand {
        gap: 10px;
        flex: 1 1 auto;
    }

    .main-header-logo {
        width: 48px;
        height: 48px;

        border-radius: var(--radius-sm);
    }

    .main-header-brand-content {
        flex: 1 1 auto;
    }

    .main-header-brand-name {
        font-size: 1rem;
    }

    .main-header-description {
        margin-top: 3px;

        max-width: 230px;

        font-size: .68rem;
        line-height: 1.25;
    }

    .main-header-actions {
        flex-shrink: 0;
    }

    .main-header-whatsapp {
        width: 44px;
        height: 44px;
        min-height: 44px;

        padding: 0;

        border-radius: 50%;
    }

    .main-header-whatsapp-icon {
        width: 24px;
        height: 24px;
    }

    .main-header-whatsapp-text {
        display: none;
    }
}

@media (max-width: 380px) {

    .main-header-container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .main-header-logo {
        width: 44px;
        height: 44px;
    }

    .main-header-brand-name {
        font-size: .94rem;
    }

    .main-header-description {
        max-width: 185px;
        font-size: .64rem;
    }

    .main-header-whatsapp {
        width: 42px;
        height: 42px;
        min-height: 42px;
    }
}


/* =============================================================================
   05. CATÁLOGO & GRID
   ========================================================================== */

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 600px) {

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (min-width: 992px) {

    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
}


/* =============================================================================
   06. CONTROLES DO CATÁLOGO
   ========================================================================== */

.catalog-controls {
    width: 100%;
    margin-bottom: 25px;

    display: flex;
    flex-direction: column;

    gap: 12px;
}

@media (min-width: 600px) {

    .catalog-controls {
        gap: 16px;
    }
}


/* -----------------------------------------------------------------------------
   Campo de busca
   ----------------------------------------------------------------------------- */

.catalog-search {
    width: 100%;
}

.catalog-search-input {
    display: block;

    width: 100%;
    min-height: 46px;

    padding: 10px 15px;

    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);

    background: var(--white);
    color: var(--dark-color);

    font-family: var(--font-main);
    font-size: 1rem;
    line-height: 1.4;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, .03);

    transition: var(--transition-fast);
}

.catalog-search-input::placeholder {
    color: #8a8f98;
}

.catalog-search-input:hover {
    border-color: rgba(0, 0, 0, .20);
}

.catalog-search-input:focus {
    outline: none;

    border-color: var(--primary-color);

    box-shadow:
        0 0 0 3px rgba(37, 211, 102, .12);
}


/* -----------------------------------------------------------------------------
   Categorias
   ----------------------------------------------------------------------------- */

.catalog-categories {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 6px;

    flex-wrap: wrap;
}

@media (min-width: 600px) {

    .catalog-categories {
        gap: 8px;
    }
}


/* -----------------------------------------------------------------------------
   Botões de categoria
   ----------------------------------------------------------------------------- */

.btn-categoria {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 36px;

    padding: 7px 13px;

    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);

    background: var(--white);
    color: var(--dark-color);

    font-family: var(--font-main);
    font-size: .80rem;
    font-weight: 600;
    line-height: 1.2;

    cursor: pointer;

    transition: var(--transition-fast);

    box-shadow:
        0 2px 6px rgba(0, 0, 0, .03);
}

.btn-categoria:hover {
    background: var(--background-hover);

    border-color: rgba(0, 0, 0, .20);

    transform: translateY(-1px);
}

.btn-categoria:focus {
    outline: none;

    border-color: var(--primary-color);

    box-shadow:
        0 0 0 3px rgba(37, 211, 102, .12);
}

.btn-categoria.active {
    background: var(--dark-color);
    color: var(--white);

    border-color: var(--dark-color);

    box-shadow:
        0 4px 10px rgba(0, 0, 0, .12);
}

.btn-categoria.active:hover {
    background: var(--black);
    color: var(--white);

    border-color: var(--black);
}

@media (min-width: 600px) {

    .btn-categoria {
        min-height: 38px;

        padding: 7px 16px;

        font-size: .85rem;
    }
}


/* -----------------------------------------------------------------------------
   Botão carregar mais
   ----------------------------------------------------------------------------- */

#btn-carregar-mais {
    display: none;

    width: 100%;
    max-width: 320px;
    min-height: 44px;

    margin: 30px auto;

    padding: 10px 25px;

    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);

    background: var(--white);
    color: var(--dark-color);

    font-family: var(--font-main);
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.2;

    cursor: pointer;

    box-shadow:
        0 3px 10px rgba(0, 0, 0, .05);

    transition: var(--transition-fast);
}

#btn-carregar-mais:hover {
    background: var(--dark-color);
    color: var(--white);

    border-color: var(--dark-color);

    transform: translateY(-2px);

    box-shadow: var(--shadow-hover);
}

#btn-carregar-mais:focus {
    outline: none;

    border-color: var(--primary-color);

    box-shadow:
        0 0 0 3px rgba(37, 211, 102, .12);
}

#btn-carregar-mais:active {
    transform: translateY(0);
}

@media (min-width: 600px) {

    #btn-carregar-mais {
        width: auto;
        min-width: 220px;
    }
}


/* =============================================================================
   07. CLASSES AUXILIARES
   ========================================================================== */

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.w-100 {
    width: 100%;
}


/* =============================================================================
   08. CARD DO PRODUTO — EXPERIÊNCIA PREMIUM
   ========================================================================== */

.product-card {
    position: relative;

    display: flex;
    flex-direction: column;

    min-width: 0;

    background: var(--card-bg);

    border: 1px solid rgba(3, 18, 46, .09);
    border-radius: var(--radius-lg);

    overflow: hidden;

    box-shadow:
        0 4px 14px rgba(3, 18, 46, .06);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease,
        background-color .25s ease;
}

.product-card:hover {
    transform: translateY(-4px);

    border-color: rgba(3, 18, 46, .16);

    box-shadow:
        0 12px 30px rgba(3, 18, 46, .12);
}


/* -----------------------------------------------------------------------------
   Produto em destaque
   ----------------------------------------------------------------------------- */

.product-featured {
    border-color: rgba(37, 211, 102, .55);
}

.product-featured:hover {
    border-color: var(--primary-color);
}


/* -----------------------------------------------------------------------------
   Badge Destaque
   ----------------------------------------------------------------------------- */

.badge-featured {
    position: absolute;

    top: 12px;
    left: 12px;

    z-index: 4;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 28px;

    padding: 5px 10px;

    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--radius-xl);

    background: var(--brand-color);
    color: var(--white);

    font-size: .70rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .25px;

    text-transform: uppercase;

    box-shadow:
        0 4px 12px rgba(3, 18, 46, .22);
}


/* -----------------------------------------------------------------------------
   Badge de desconto
   ----------------------------------------------------------------------------- */

.badge-discount {
    position: absolute;

    top: 12px;
    right: 12px;

    z-index: 4;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 48px;
    min-height: 32px;

    padding: 6px 10px;

    border: 2px solid rgba(255, 255, 255, .92);
    border-radius: var(--radius-xl);

    background: var(--danger-badge);
    color: var(--white);

    font-size: .78rem;
    font-weight: 800;
    line-height: 1;

    box-shadow:
        0 5px 14px rgba(229, 57, 53, .25);
}


/* =============================================================================
   09. IMAGEM DO PRODUTO — PADRONIZAÇÃO PREMIUM
   Padrão oficial: 1:1 / imagem completa / sem cortes
   ========================================================================== */

.product-image-wrapper {
    position: relative;

    width: 100%;
    aspect-ratio: 1 / 1;

    overflow: hidden;

    background:
        linear-gradient(
            180deg,
            #f8f9fb 0%,
            #f1f3f5 100%
        );
}


.product-image-wrapper > a {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;
}


.product-image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
    object-position: center;

    transition:
        transform .40s cubic-bezier(.25, .8, .25, 1),
        filter .30s ease;
}


.product-card:hover .product-image {
    transform: scale(1.015);
}




/* =============================================================================
   10. INFORMAÇÕES DO PRODUTO — HIERARQUIA VISUAL
   ========================================================================== */

.product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;

    min-width: 0;

    padding: 10px 12px 12px;
}


/* -----------------------------------------------------------------------------
   Categoria
   ----------------------------------------------------------------------------- */

.product-category {
    display: block;

    margin-bottom: 4px;

    color: var(--text-muted);

    font-size: .68rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .85px;

    text-transform: uppercase;
}

.product-category .product-title-link {
    color: var(--text-muted);
}

.product-category .product-title-link:hover {
    color: var(--brand-color);
}


/* -----------------------------------------------------------------------------
   Título
   ----------------------------------------------------------------------------- */

.product-title {
    margin-bottom: 5px;

    color: var(--dark-color);

    font-size: .95rem;
    font-weight: 800;
    line-height: 1.24;

    overflow-wrap: break-word;
    word-break: break-word;
}

.product-title-link {
    color: inherit;

    text-decoration: none;

    transition:
        color .20s ease;
}

.product-title-link:hover {
    color: var(--brand-color);
}


/* -----------------------------------------------------------------------------
   Descrição
   ----------------------------------------------------------------------------- */

.product-description {
    margin-bottom: 7px;

    color: var(--text-muted);

    font-size: .80rem;
    line-height: 1.35;

    display: -webkit-box;

    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
}


/* =============================================================================
   11. PREÇOS — HIERARQUIA COMERCIAL
   ========================================================================== */

.product-price-block {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;

    gap: 4px 6px;

    margin-top: auto;
    margin-bottom: 7px;
}


/* -----------------------------------------------------------------------------
   Preço atual
   ----------------------------------------------------------------------------- */

.price-current {
    color: var(--dark-color);

    font-size: 1.06rem;
    font-weight: 800;
    line-height: 1.2;
}

.price-current.highlight {
    color: var(--brand-color);

    font-size: 1.10rem;
}


/* -----------------------------------------------------------------------------
   Preço anterior
   ----------------------------------------------------------------------------- */

.price-old {
    color: #858b94;

    font-size: .78rem;
    font-weight: 500;

    text-decoration: line-through;
}


/* -----------------------------------------------------------------------------
   Economia
   ----------------------------------------------------------------------------- */

.price-economy {
    flex-basis: 100%;

    margin-top: 1px;

    color: var(--success-text);

    font-size: .74rem;
    font-weight: 700;
    line-height: 1.25;
}


/* =============================================================================
   12. VARIAÇÕES E INPUTS
   ========================================================================== */

.product-variants {
    display: flex;
    flex-direction: column;

    gap: 6px;

    margin-bottom: 7px;
}

.product-variants-row {
    display: flex;

    gap: 10px;
}


/* -----------------------------------------------------------------------------
   Variações dentro dos cards

   O formulário permanece oculto até o app.js aplicar .variants-open.
   ----------------------------------------------------------------------------- */

.product-card .product-variants {
    display: none;
}

.product-card.variants-open .product-variants {
    display: flex;
}


/* -----------------------------------------------------------------------------
   Campo de variação / observação
   ----------------------------------------------------------------------------- */

.variant-input {
    display: block;

    width: 100%;

    min-height: 40px;

    padding: 9px 11px;

    border: 1px solid rgba(3, 18, 46, .14);
    border-radius: var(--radius-md);

    background: var(--white);
    color: var(--dark-color);

    font-family: var(--font-main);
    font-size: .88rem;
    line-height: 1.4;

    transition:
        border-color .20s ease,
        box-shadow .20s ease,
        background-color .20s ease;
}

textarea.variant-input {
    min-height: 82px;

    resize: vertical;
}

.variant-input::placeholder {
    color: #8a8f98;
}

.variant-input:hover:not(:disabled) {
    border-color: rgba(3, 18, 46, .25);
}

.variant-input:focus {
    outline: none;

    border-color: var(--primary-color);

    box-shadow:
        0 0 0 3px rgba(37, 211, 102, .12);
}

.variant-input:disabled {
    background: var(--background-soft);
    color: var(--text-muted);

    cursor: not-allowed;
}


/* =============================================================================
   13. BOTÕES DE AÇÃO
   ========================================================================== */

/* -----------------------------------------------------------------------------
   Selecionar produto
   ----------------------------------------------------------------------------- */

.btn-toggle-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 38px;

    padding: 7px 12px;

    border: 1px solid var(--brand-color);
    border-radius: var(--radius-md);

    background: var(--brand-color);
    color: var(--white);

    font-family: var(--font-main);
    font-size: .86rem;
    font-weight: 700;
    line-height: 1.2;

    text-align: center;

    cursor: pointer;

    box-shadow:
        0 4px 12px rgba(3, 18, 46, .12);

    transition:
        background-color .20s ease,
        border-color .20s ease,
        color .20s ease,
        transform .20s ease,
        box-shadow .20s ease;
}

.btn-toggle-cart:hover {
    background: var(--brand-color-hover);

    border-color: var(--brand-color-hover);

    transform: translateY(-1px);

    box-shadow:
        0 6px 16px rgba(3, 18, 46, .18);
}

.btn-toggle-cart:active {
    transform: translateY(0);
}


/* -----------------------------------------------------------------------------
   Produto selecionado
   ----------------------------------------------------------------------------- */

.btn-toggle-cart.selected {
    background: var(--danger);
    color: var(--white);

    border-color: var(--danger);

    box-shadow:
        0 4px 12px rgba(228, 30, 63, .16);
}

.btn-toggle-cart.selected:hover {
    background: #c91836;

    border-color: #c91836;

    box-shadow:
        0 6px 16px rgba(228, 30, 63, .20);
}


/* -----------------------------------------------------------------------------
   Botão / link para revisão do carrinho
   ----------------------------------------------------------------------------- */

.btn-view-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 40px;

    padding: 8px 16px;

    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);

    background: var(--white);
    color: var(--dark-color);

    font-family: var(--font-main);
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.2;

    text-align: center;
    text-decoration: none;

    cursor: pointer;

    transition: var(--transition-fast);
}

.btn-view-cart:hover {
    background: var(--background-hover);

    border-color: rgba(0, 0, 0, .25);
}

.btn-view-cart:active {
    background: var(--light-color);
}


/* -----------------------------------------------------------------------------
   Enviar pedido
   ----------------------------------------------------------------------------- */

.btn-submit-cart {
    width: 100%;

    padding: 10px 16px;

    border: none;
    border-radius: var(--radius-md);

    background: var(--primary-color);
    color: var(--white);

    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 700;

    cursor: pointer;

    transition: var(--transition-fast);

    box-shadow:
        0 4px 10px rgba(37, 211, 102, .20);
}

.btn-submit-cart:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn-submit-cart:disabled {
    opacity: .50;

    cursor: not-allowed;

    box-shadow: none;
}


/* -----------------------------------------------------------------------------
   Limpar carrinho
   ----------------------------------------------------------------------------- */

.btn-clear-cart {
    width: 100%;

    padding: 8px 14px;

    border: none;
    border-radius: var(--radius-md);

    background: var(--warning-bg);
    color: var(--dark-color);

    font-family: var(--font-main);
    font-size: .90rem;
    font-weight: 700;

    cursor: pointer;

    transition: var(--transition-fast);

    box-shadow:
        0 4px 10px var(--warning-bg);
}

.btn-clear-cart:hover {
    background: var(--warning-hover);

    box-shadow:
        0 4px 12px rgba(212, 138, 38, .35);
}

@media (min-width: 600px) {

    .btn-view-cart,
    .btn-submit-cart,
    .btn-clear-cart {
        width: auto;
    }
}


/* =============================================================================
   14. SELEÇÃO DO PRODUTO
   ========================================================================== */

.card-selected {
    border: 2px solid var(--primary-color);

    background:
        rgba(37, 211, 102, .025);

    box-shadow:
        0 5px 18px rgba(37, 211, 102, .10);
}


/* =============================================================================
   15. CARRINHO FLUTUANTE
   Desktop amplo >= 1440px: painel lateral direito
   Desktop / tablet / mobile < 1440px: barra fixa inferior
   ========================================================================== */


/* =============================================================================
   15.1 ESTRUTURA BASE
   ========================================================================== */

.cart-bar {
    position: fixed;
    z-index: 1000;

    background: var(--white);

    transition:
        opacity .25s ease,
        transform .25s ease,
        box-shadow .25s ease;
}


.cart-bar-container {
    display: flex;
}


.cart-bar-info {
    display: flex;
    flex-direction: column;

    min-width: 0;
}


#cart-count,
.cart-count {
    color: var(--text-muted);

    line-height: 1.25;
}


#cart-total,
.cart-total {
    color: var(--brand-color);

    font-weight: 800;
    line-height: 1.2;
}


/*
 * IMPORTANTE:
 *
 * Não reservamos espaço lateral no catálogo.
 * O grid mantém exatamente sua largura normal.
 */

.content-area {
    padding-right: initial;
}


/* =============================================================================
   15.2 DESKTOP AMPLO — PAINEL LATERAL
   >= 1440px
   ========================================================================== */

@media (min-width: 1440px) {

    .cart-bar {
        top: 118px;
        right: 20px;
        bottom: auto;
        left: auto;

        width: 300px;

        padding: 0;

        border:
            1px solid var(--border-light);

        border-radius: var(--radius-lg);

        background: var(--white);

        box-shadow:
            0 14px 38px rgba(3, 18, 46, .16);
    }


    .cart-bar-container {
        width: 100%;

        padding: 16px;

        flex-direction: column;
        align-items: stretch;

        gap: 10px;
    }


    .cart-bar-info {
        padding-bottom: 11px;

        border-bottom:
            1px solid var(--border-light);
    }


    #cart-count,
    .cart-count {
        margin-bottom: 3px;

        font-size: .80rem;
    }


    #cart-total,
    .cart-total {
        font-size: 1.34rem;
    }


    /* -------------------------------------------------------------------------
       Botão Ver Carrinho
       ---------------------------------------------------------------------- */

    .cart-bar .btn-view-cart {
        width: 100%;
        min-height: 44px;

        padding:
            9px 14px;

        background: var(--primary-color);
        color: var(--white);

        border-color: var(--primary-color);

        white-space: nowrap;

        box-shadow:
            0 5px 14px rgba(37, 211, 102, .18);
    }


    .cart-bar .btn-view-cart:hover {
        background: var(--primary-hover);
        color: var(--white);

        border-color: var(--primary-hover);
    }


    /* -------------------------------------------------------------------------
       Botão Limpar Carrinho
       ---------------------------------------------------------------------- */

    .cart-bar .btn-clear-cart {
        width: 100%;
        min-height: 40px;

        padding:
            8px 12px;

        background: var(--background-soft);
        color: var(--text-muted);

        border:
            1px solid var(--border-color);

        box-shadow: none;
    }


    .cart-bar .btn-clear-cart:hover {
        background: var(--background-hover);
        color: var(--dark-color);
    }

}


/* =============================================================================
   15.3 DESKTOP / NOTEBOOK / TABLET
   < 1440px
   Barra fixa inferior
   ========================================================================== */

@media (max-width: 1439px) {

    .cart-bar {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;

        width: 100%;

        padding: 8px 0;

        border: none;
        border-top:
            1px solid var(--border-light);

        border-radius: 0;

        background: rgba(255, 255, 255, .98);

        box-shadow:
            0 -5px 22px rgba(3, 18, 46, .12);

        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }


    .cart-bar-container {
        width: 100%;

        flex-direction: row;
        align-items: center;
        justify-content: flex-end;

        gap: 10px;
    }


    .cart-bar-info {
        flex: 0 1 auto;

        margin-right: 6px;

        text-align: left;
    }


    #cart-count,
    .cart-count {
        margin-bottom: 2px;

        font-size: .76rem;
    }


    #cart-total,
    .cart-total {
        font-size: 1.08rem;
    }


    /* -------------------------------------------------------------------------
       Ver Carrinho
       ---------------------------------------------------------------------- */

    .cart-bar .btn-view-cart {
        flex: 0 0 auto;

        width: auto;
        min-width: 180px;
        min-height: 44px;

        padding:
            8px 20px;

        background: var(--primary-color);
        color: var(--white);

        border-color: var(--primary-color);

        white-space: nowrap;

        box-shadow:
            0 4px 12px rgba(37, 211, 102, .18);
    }


    .cart-bar .btn-view-cart:hover {
        background: var(--primary-hover);
        color: var(--white);

        border-color: var(--primary-hover);
    }


    /* -------------------------------------------------------------------------
       Limpar Carrinho
       ---------------------------------------------------------------------- */

    .cart-bar .btn-clear-cart {
        flex: 0 0 auto;

        width: 44px;
        min-width: 44px;
        height: 44px;

        padding: 0;

        display: inline-flex;
        align-items: center;
        justify-content: center;

        overflow: hidden;

        font-size: 0;

        background: var(--background-soft);

        border:
            1px solid var(--border-color);

        box-shadow: none;
    }


    .cart-bar .btn-clear-cart::after {
        content: "×";

        color: var(--text-muted);

        font-size: 1.35rem;
        font-weight: 700;
        line-height: 1;
    }


    .cart-bar .btn-clear-cart:hover {
        background: var(--background-hover);
    }

}


/* =============================================================================
   15.4 NOTEBOOK / DESKTOP INTERMEDIÁRIO
   Barra inferior alinhada ao conteúdo principal
   ========================================================================== */

@media (min-width: 768px) and (max-width: 1439px) {

    .cart-bar-container {
        width: 100%;
        max-width: 1200px;

        margin: 0 auto;

        padding:
            0 20px;

        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;

        gap: 12px;
    }


    /*
     * Mantém as informações próximas das ações,
     * evitando grande área vazia entre os elementos.
     */

    .cart-bar-info {
        flex: 0 0 auto;

        margin: 0;

        min-width: 145px;

        text-align: left;
    }


    #cart-count,
    .cart-count {
        margin-bottom: 2px;

        font-size: .76rem;
        line-height: 1.20;
    }


    #cart-total,
    .cart-total {
        font-size: 1.08rem;
        line-height: 1.20;
    }


    /*
     * CTA principal.
     */

    .cart-bar .btn-view-cart {
        flex: 0 0 auto;

        width: auto;
        min-width: 200px;
        min-height: 44px;

        padding:
            8px 20px;

        white-space: nowrap;
    }


    /*
     * Limpar carrinho permanece compacto.
     */

    .cart-bar .btn-clear-cart {
        flex: 0 0 auto;

        width: 44px;
        min-width: 44px;
        height: 44px;
    }

}




/* =============================================================================
   15.5 MOBILE
   ========================================================================== */

@media (max-width: 767px) {

    .cart-bar {
        padding:
            8px 0;

        box-shadow:
            0 -4px 18px rgba(0, 0, 0, .10);
    }


    .cart-bar-container {
        padding:
            0 12px;

        justify-content: space-between;

        gap: 8px;
    }


    .cart-bar-info {
        flex:
            1 1 auto;

        margin: 0;

        min-width: 0;
    }


    #cart-count,
    .cart-count {
        font-size: .72rem;

        white-space: nowrap;
    }


    #cart-total,
    .cart-total {
        margin-top: 2px;

        font-size: 1rem;

        white-space: nowrap;
    }


    .cart-bar .btn-view-cart {
        flex: 0 0 auto;

        width: auto;
        min-width: 0;
        min-height: 44px;

        padding:
            8px 14px;

        font-size: .82rem;

        white-space: nowrap;
    }


    .cart-bar .btn-clear-cart {
        flex: 0 0 auto;

        width: 44px;
        min-width: 44px;
        height: 44px;
    }

}


/* =============================================================================
   15.6 MOBILE PEQUENO
   ========================================================================== */

@media (max-width: 420px) {

    .cart-bar {
        padding:
            7px 0;
    }


    .cart-bar-container {
        padding:
            0 8px;

        gap: 6px;
    }


    #cart-count,
    .cart-count {
        font-size: .68rem;
    }


    #cart-total,
    .cart-total {
        font-size: .92rem;
    }


    .cart-bar .btn-view-cart {
        min-height: 42px;

        padding:
            7px 10px;

        font-size: .76rem;
    }


    .cart-bar .btn-clear-cart {
        width: 42px;
        min-width: 42px;
        height: 42px;
    }


    .cart-bar .btn-clear-cart::after {
        font-size: 1.25rem;
    }

}


/* =============================================================================
   15.7 MOBILE MUITO PEQUENO
   ========================================================================== */

@media (max-width: 360px) {

    .cart-bar-container {
        padding:
            0 6px;

        gap: 5px;
    }


    #cart-count,
    .cart-count {
        font-size: .64rem;
    }


    #cart-total,
    .cart-total {
        font-size: .86rem;
    }


    .cart-bar .btn-view-cart {
        padding:
            7px 8px;

        font-size: .72rem;
    }


    .cart-bar .btn-clear-cart {
        width: 40px;
        min-width: 40px;
        height: 40px;
    }

}



/* =============================================================================
   16. ALERTAS & MENSAGENS DE ESTADO
   ========================================================================== */

.alert {
    padding: 20px;

    text-align: center;

    border-radius: var(--radius-lg);

    font-weight: 500;
}

.alert-danger {
    background: var(--danger-bg);
    color: var(--danger);

    border:
        1px solid rgba(228, 30, 63, .15);
}

.no-products {
    padding: 60px 20px;

    text-align: center;

    color: var(--text-muted);

    font-size: 1.10rem;

    grid-column: 1 / -1;
}


/* =============================================================================
   NOTIFICAÇÕES TEMPORÁRIAS — TOAST
   ========================================================================== */

.toast-container {
    position: fixed;

    top: 20px;
    left: 50%;

    transform: translateX(-50%);

    width: calc(100% - 40px);
    max-width: 480px;

    display: flex;
    flex-direction: column;
    align-items: stretch;

    gap: 10px;

    pointer-events: none;

    z-index: 9999;
}

.toast-message {
    width: 100%;

    padding: 12px 16px;

    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);

    background: var(--dark-color);
    color: var(--white);

    font-family: var(--font-main);
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.4;

    text-align: center;

    box-shadow: var(--shadow-hover);

    opacity: 0;

    transform: translateY(-10px);

    transition:
        opacity .30s ease,
        transform .30s ease;
}

.toast-message.toast-visible {
    opacity: 1;

    transform: translateY(0);
}


/* =============================================================================
   17. RODAPÉ — IDENTIDADE INSTITUCIONAL MEGABOX VIRTUAL
   ========================================================================== */

.main-footer {
    width: 100%;
    margin-top: 60px;

    background: var(--brand-color);
    color: var(--brand-text-soft);

    border-top: 1px solid rgba(255, 255, 255, .08);

    box-shadow:
        0 -4px 18px rgba(3, 18, 46, .10);
}


/* -----------------------------------------------------------------------------
   Container principal
   ----------------------------------------------------------------------------- */

.main-footer-container {
    min-height: 120px;

    padding-top: 24px;
    padding-bottom: 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}


/* -----------------------------------------------------------------------------
   Identidade institucional
   ----------------------------------------------------------------------------- */

.main-footer-brand {
    display: flex;
    flex-direction: column;

    min-width: 0;
}


.main-footer-brand-name {
    color: var(--brand-text);

    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
}


.main-footer-description {
    margin-top: 5px;

    max-width: 430px;

    color: var(--brand-text-soft);

    font-size: .82rem;
    font-weight: 400;
    line-height: 1.45;
}


/* -----------------------------------------------------------------------------
   Informações institucionais
   ----------------------------------------------------------------------------- */

.main-footer-info {
    display: flex;
    flex-direction: column;

    gap: 5px;

    color: var(--brand-text-soft);

    font-size: .78rem;
    line-height: 1.4;
}


.main-footer-copyright {
    color: var(--brand-text-soft);
}


/* -----------------------------------------------------------------------------
   Atendimento
   ----------------------------------------------------------------------------- */

.main-footer-contact {
    display: flex;
    align-items: center;

    gap: 6px;
}


.main-footer-contact-label {
    color: var(--brand-text-soft);
}


.main-footer-contact-link {
    color: var(--whatsapp-color);

    font-weight: 700;

    text-decoration: none;

    transition: var(--transition-fast);
}


.main-footer-contact-link:hover {
    color: var(--white);

    text-decoration: underline;
}


.main-footer-contact-link:active {
    color: var(--whatsapp-hover);
}


/* -----------------------------------------------------------------------------
   Compatibilidade temporária com a estrutura atual do footer.php

   Mantém o rodapé corretamente estilizado enquanto a estrutura institucional
   utiliza apenas .main-footer > .container.
   ----------------------------------------------------------------------------- */

.main-footer > .container {
    min-height: 120px;

    padding-top: 24px;
    padding-bottom: 24px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 5px;

    text-align: center;
}


.main-footer p {
    margin: 0;

    color: var(--brand-text-soft);

    font-size: .82rem;
    line-height: 1.55;
}


.main-footer small {
    color: inherit;

    font-size: inherit;
}


.main-footer a {
    color: var(--whatsapp-color);

    font-weight: 700;

    text-decoration: none;

    transition: var(--transition-fast);
}


.main-footer a:hover {
    color: var(--white);

    text-decoration: underline;
}


/* =============================================================================
   RESPONSIVIDADE DO RODAPÉ
   ========================================================================== */


/* -----------------------------------------------------------------------------
   Tablet
   ----------------------------------------------------------------------------- */

@media (max-width: 991px) {

    .main-footer {
        margin-top: 50px;
    }


    .main-footer-container {
        min-height: 110px;

        gap: 24px;
    }


    .main-footer-description {
        max-width: 360px;

        font-size: .78rem;
    }


    .main-footer-info {
        font-size: .76rem;
    }


    .main-footer > .container {
        min-height: 110px;
    }

}


/* -----------------------------------------------------------------------------
   Mobile
   ----------------------------------------------------------------------------- */

@media (max-width: 599px) {

    .main-footer {
        margin-top: 40px;
    }


    .main-footer-container {
        min-height: auto;

        padding-top: 22px;
        padding-bottom: 22px;

        flex-direction: column;
        align-items: center;

        gap: 14px;

        text-align: center;
    }


    .main-footer-brand {
        align-items: center;
    }


    .main-footer-brand-name {
        font-size: .95rem;
    }


    .main-footer-description {
        max-width: 320px;

        font-size: .75rem;
    }


    .main-footer-info {
        align-items: center;

        font-size: .74rem;
    }


    .main-footer-contact {
        justify-content: center;

        flex-wrap: wrap;
    }


    .main-footer > .container {
        min-height: auto;

        padding-top: 22px;
        padding-bottom: 22px;
    }


    .main-footer p {
        font-size: .75rem;
        line-height: 1.5;
    }

}


/* -----------------------------------------------------------------------------
   Mobile pequeno
   ----------------------------------------------------------------------------- */

@media (max-width: 380px) {

    .main-footer-container {
        padding-top: 20px;
        padding-bottom: 20px;
    }


    .main-footer-brand-name {
        font-size: .90rem;
    }


    .main-footer-description {
        max-width: 280px;

        font-size: .72rem;
    }


    .main-footer-info {
        font-size: .72rem;
    }


    .main-footer > .container {
        padding-top: 20px;
        padding-bottom: 20px;
    }


    .main-footer p {
        font-size: .72rem;
    }

}



/* =============================================================================
   18. PÁGINA DO PRODUTO
   ========================================================================== */

.produto-detalhes {
    width: 100%;
    max-width: 1200px;

    margin: 15px auto 25px;

    padding: 0 10px;
}

.produto-layout {
    display: grid;
    grid-template-columns: 1fr;

    gap: 20px;

    width: 100%;

    background: var(--white);

    padding: 15px;

    border-radius: var(--radius-md);

    box-shadow: var(--shadow-soft);

    align-items: start;
}

.produto-imagem {
    width: 100%;
    max-width: 100%;
    max-height: 400px;

    margin: 0 auto;

    overflow: hidden;

    border-radius: var(--radius-lg);

    background: var(--light-color);

    display: flex;
    align-items: center;
    justify-content: center;
}

.produto-imagem img {
    display: block;

    width: 100%;
    height: auto;

    max-height: 400px;

    object-fit: contain;

    border-radius: var(--radius-lg);
}

.produto-conteudo {
    display: flex;
    flex-direction: column;

    gap: 14px;

    min-width: 0;
    width: 100%;
}

.produto-titulo {
    margin: 0;

    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 800;

    color: var(--dark-color);

    overflow-wrap: break-word;
    word-break: break-word;
}

.produto-descricao {
    color: var(--text-muted);

    font-size: .95rem;
    line-height: 1.6;
}

.produto-conteudo .product-category {
    margin-bottom: 0;
}

.produto-conteudo .product-price-block {
    margin-top: 5px;
}

.produto-conteudo .product-variants {
    width: 100%;
}

.produto-conteudo .product-actions {
    display: flex;
    flex-direction: column;

    gap: 12px;

    margin-top: 5px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 100%;

    padding: 12px;

    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);

    background: var(--white);
    color: var(--dark-color);

    font-weight: 700;

    text-decoration: none;

    transition: var(--transition-fast);
}

.btn-back:hover {
    background: var(--background-hover);

    border-color: rgba(0, 0, 0, .25);
}

.product-highlight {
    display: inline-block;

    width: fit-content;

    padding: 6px 14px;

    border-radius: var(--radius-xl);

    background: var(--primary-color);
    color: var(--white);

    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .5px;

    text-transform: uppercase;
}

@media (min-width: 600px) {

    .produto-detalhes {
        margin-top: 25px;

        padding: 0 20px;
    }

    .produto-layout {
        gap: 25px;

        padding: 25px;

        border-radius: var(--radius-lg);
    }

    .produto-imagem {
        max-width: 500px;
    }

    .produto-titulo {
        font-size: 1.8rem;
    }

    .produto-descricao {
        font-size: 1rem;
        line-height: 1.7;
    }
}

@media (min-width: 992px) {

    .produto-layout {
        grid-template-columns:
            minmax(0, 500px)
            minmax(0, 1fr);

        gap: 40px;

        padding: 30px;
    }

    .produto-imagem {
        max-height: 550px;
    }

    .produto-imagem img {
        max-width: 500px;
        max-height: 550px;
    }

    .produto-titulo {
        font-size: 2rem;
    }
}


/* =============================================================================
   19. PÁGINA DO CARRINHO
   ========================================================================== */

.cart-page {
    display: grid;
    grid-template-columns: 1fr;

    gap: 30px;

    margin-top: 30px;
}

.cart-items {
    display: flex;
    flex-direction: column;

    gap: 20px;
}

.cart-item {
    background: var(--white);

    padding: 20px;

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-soft);
}


/* -----------------------------------------------------------------------------
   Estrutura interna do produto no carrinho
   ----------------------------------------------------------------------------- */

.cart-item-content {
    display: grid;

    grid-template-columns:
        120px minmax(0, 1fr);

    gap: 20px;

    align-items: start;
}


/* -----------------------------------------------------------------------------
   Imagem do produto no carrinho
   ----------------------------------------------------------------------------- */

.cart-item-image {
    width: 120px;

    aspect-ratio: 1 / 1;

    overflow: hidden;

    border-radius: var(--radius-md);

    background: var(--light-color);

    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}


/* -----------------------------------------------------------------------------
   Informações do produto
   ----------------------------------------------------------------------------- */

.cart-item-info {
    min-width: 0;
}

.cart-item-title {
    margin-bottom: 6px;

    font-size: 1.05rem;
    line-height: 1.3;
    font-weight: 700;

    overflow-wrap: break-word;
}

.cart-item-category {
    margin-bottom: 8px;

    color: var(--text-muted);

    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .8px;

    text-transform: uppercase;
}

.cart-item-variant,
.cart-item-observation,
.cart-item-quantity {
    margin-top: 5px;

    font-size: .90rem;
}


/* -----------------------------------------------------------------------------
   Controle de quantidade
   ----------------------------------------------------------------------------- */

.cart-item-quantity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 6px;

    margin-top: 12px;
}

.cart-item-quantity-label {
    font-weight: 600;

    color: var(--dark-color);
}

.cart-quantity-control {
    display: inline-flex;
    align-items: stretch;

    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);

    overflow: hidden;

    background: var(--white);
}

.btn-cart-quantity {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    min-width: 40px;
    height: 40px;

    padding: 0;

    border: none;

    background: var(--background-soft);
    color: var(--dark-color);

    font-family: var(--font-main);
    font-size: 1.20rem;
    font-weight: 700;
    line-height: 1;

    cursor: pointer;

    transition: var(--transition-fast);
}

.btn-cart-quantity:hover:not(:disabled) {
    background: var(--background-hover);
}

.btn-cart-quantity:disabled {
    opacity: .40;

    cursor: not-allowed;
}

.cart-quantity-input {
    width: 64px;
    height: 40px;

    padding: 0 6px;

    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);

    background: var(--white);
    color: var(--dark-color);

    font-family: var(--font-main);
    font-size: .95rem;
    font-weight: 700;

    text-align: center;

    appearance: textfield;
    -moz-appearance: textfield;
}

.cart-quantity-input::-webkit-inner-spin-button,
.cart-quantity-input::-webkit-outer-spin-button {
    margin: 0;

    -webkit-appearance: none;
}

.cart-quantity-input:focus {
    position: relative;

    z-index: 1;

    outline: none;

    box-shadow:
        inset 0 0 0 2px var(--primary-color);
}

.cart-item-price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    margin-top: 12px;
}


/* -----------------------------------------------------------------------------
   Botão remover
   ----------------------------------------------------------------------------- */

.btn-cart-remove {
    margin-top: 15px;

    padding: 8px 14px;

    border: none;
    border-radius: var(--radius-md);

    background: var(--danger);
    color: var(--white);

    font-size: .90rem;
    font-weight: 700;

    cursor: pointer;

    transition: var(--transition-fast);
}

.btn-cart-remove:hover {
    opacity: .90;
}


/* -----------------------------------------------------------------------------
   Carrinho vazio
   ----------------------------------------------------------------------------- */

.cart-empty {
    background: var(--white);

    padding: 50px;

    text-align: center;

    border-radius: var(--radius-lg);

    color: var(--text-muted);
}


/* -----------------------------------------------------------------------------
   Responsividade dos produtos no carrinho
   ----------------------------------------------------------------------------- */

@media (min-width: 600px) {

    .cart-item-content {
        grid-template-columns:
            150px minmax(0, 1fr);

        gap: 24px;
    }

    .cart-item-image {
        width: 150px;
    }
}

@media (max-width: 480px) {

    .cart-item {
        padding: 16px;
    }

    .cart-item-content {
        grid-template-columns: 1fr;

        gap: 16px;
    }

    .cart-item-image {
        width: 100%;
        max-width: 220px;

        margin: 0 auto;
    }

    .btn-cart-quantity {
        width: 44px;
        min-width: 44px;
        height: 44px;
    }

    .cart-quantity-input {
        width: 64px;
        height: 44px;
    }

    .btn-cart-remove {
        width: 100%;
        min-height: 44px;

        padding: 10px 14px;
    }

    .cart-summary {
        position: static;
    }
}


/* -----------------------------------------------------------------------------
   Resumo do carrinho
   ----------------------------------------------------------------------------- */

.cart-summary {
    position: sticky;

    top: 20px;

    height: fit-content;

    background: var(--white);

    padding: 25px;

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-soft);
}

.cart-summary h2 {
    margin-bottom: 20px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;

    margin-bottom: 15px;
}

.cart-summary-total {
    padding-top: 12px;

    margin-top: 5px;

    border-top:
        1px solid var(--border-light);
}

.cart-summary-economy {
    margin-top: -5px;
    margin-bottom: 15px;
}

.cart-summary-actions {
    display: flex;
    flex-direction: column;

    gap: 10px;

    margin-top: 25px;
}

@media (min-width: 992px) {

    .cart-page {
        grid-template-columns:
            2fr 350px;
    }
}


/* =============================================================================
   20. CONTROLES DE CATEGORIA & NAVEGAÇÃO SECUNDÁRIA
   ========================================================================== */

.category-header,
.category-filter {
    margin-bottom: 20px;
}

.category-title {
    margin-bottom: 15px;
}


/* =============================================================================
   21. ESTADOS DE CARREGAMENTO & ANIMAÇÕES
   ========================================================================== */

.loading {
    opacity: .65;

    pointer-events: none;
}

.spinner {
    width: 24px;
    height: 24px;

    margin: 20px auto;

    border:
        3px solid var(--border-light);

    border-top-color:
        var(--primary-color);

    border-radius: 50%;

    animation:
        spinner-rotate .8s linear infinite;
}

@keyframes spinner-rotate {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.fade-in {
    animation:
        fade-in .25s ease forwards;
}

.fade-out {
    animation:
        fade-out .25s ease forwards;
}

@keyframes fade-in {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fade-out {

    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}


/* =============================================================================
   22. ACESSIBILIDADE
   ========================================================================== */

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline:
        3px solid rgba(37, 211, 102, .35);

    outline-offset: 2px;
}


/* =============================================================================
   23. REDUÇÃO DE MOVIMENTO
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: .01ms !important;
    }
}


/* =============================================================================
   24. RESPONSIVIDADE DOS CAMPOS DE VARIAÇÃO — MOBILE
   ========================================================================== */

@media (max-width: 480px) {

    .product-variants {
        gap: 8px;

        margin-bottom: 12px;
    }

    .product-variants-row {
        flex-direction: column;

        gap: 8px;
    }

    .variant-input {
        min-height: 44px;

        padding: 10px 12px;

        font-size: 1rem;
    }

    textarea.variant-input {
        min-height: 96px;

        resize: vertical;
    }

    .btn-toggle-cart {
        min-height: 44px;

        padding: 10px 12px;

        font-size: .95rem;
    }
}

/* =============================================================================
   25. COMPACTAÇÃO RESPONSIVA — PRODUTO E CARRINHO
   Release 3.3.0 — revisão visual homologada

   Diretriz:
   - Preservar integralmente o catálogo já aprovado.
   - Compactar somente a página individual do produto.
   - Compactar principalmente o carrinho em mobile.
   - Manter áreas de toque confortáveis e legibilidade.
   ========================================================================== */


/* =============================================================================
   25.1 PÁGINA INDIVIDUAL DO PRODUTO — BASE
   ========================================================================== */

.produto-detalhes {
    margin-top: 12px;
    margin-bottom: 20px;
}

.produto-layout {
    gap: 16px;
    padding: 14px;
}

.produto-imagem {
    max-height: 360px;
}

.produto-imagem img {
    width: 100%;
    height: 100%;
    max-height: 360px;
    object-fit: contain;
    object-position: center;
}

.produto-conteudo {
    gap: 10px;
}

.produto-titulo {
    font-size: 1.45rem;
    line-height: 1.16;
}

.produto-descricao {
    font-size: .92rem;
    line-height: 1.45;
}

.produto-conteudo .product-price-block {
    margin-top: 2px;
    margin-bottom: 4px;
}

.produto-conteudo .product-variants {
    margin-bottom: 2px;
}

.produto-conteudo textarea.variant-input {
    min-height: 70px;
}

.produto-conteudo .product-actions {
    gap: 9px;
    margin-top: 2px;
}

.produto-conteudo .btn-back {
    min-height: 42px;
    padding: 9px 12px;
}


/* =============================================================================
   25.2 PÁGINA INDIVIDUAL DO PRODUTO — TABLET
   ========================================================================== */

@media (min-width: 600px) and (max-width: 991px) {

    .produto-detalhes {
        margin-top: 16px;
        padding: 0 18px;
    }

    .produto-layout {
        gap: 18px;
        padding: 18px;
    }

    .produto-imagem {
        max-width: 400px;
        max-height: 400px;
    }

    .produto-imagem img {
        max-height: 400px;
    }

    .produto-conteudo {
        gap: 10px;
    }

    .produto-titulo {
        font-size: 1.60rem;
    }

    .produto-conteudo textarea.variant-input {
        min-height: 68px;
    }
}


/* =============================================================================
   25.3 PÁGINA INDIVIDUAL DO PRODUTO — DESKTOP
   ========================================================================== */

@media (min-width: 992px) {

    .produto-detalhes {
        margin-top: 16px;
        margin-bottom: 20px;
    }

    .produto-layout {
        grid-template-columns:
            minmax(0, 440px)
            minmax(0, 1fr);

        gap: 34px;
        padding: 24px;

        align-items: center;
    }

    .produto-imagem {
        max-width: 410px;
        max-height: 410px;
    }

    .produto-imagem img {
        max-width: 410px;
        max-height: 410px;
    }

    .produto-conteudo {
        gap: 10px;
    }

    .produto-titulo {
        font-size: 1.82rem;
    }

    .produto-conteudo textarea.variant-input {
        min-height: 68px;
    }
}


/* =============================================================================
   25.4 PÁGINA INDIVIDUAL DO PRODUTO — MOBILE
   ========================================================================== */

@media (max-width: 599px) {

    .produto-detalhes {
        margin: 10px auto 16px;
        padding: 0 10px;
    }

    .produto-layout {
        gap: 11px;
        padding: 11px;
    }

    .produto-imagem {
        width: 100%;
        max-width: 270px;
        max-height: 270px;
    }

    .produto-imagem img {
        width: 100%;
        height: 100%;
        max-height: 270px;
        object-fit: contain;
    }

    .produto-conteudo {
        gap: 7px;
    }

    .produto-titulo {
        font-size: 1.15rem;
        line-height: 1.18;
    }

    .produto-descricao {
        font-size: .84rem;
        line-height: 1.38;
    }

    .produto-conteudo .product-category {
        font-size: .66rem;
    }

    .produto-conteudo .product-price-block {
        margin-top: 0;
        margin-bottom: 1px;
    }

    .produto-conteudo .price-current,
    .produto-conteudo .price-current.highlight {
        font-size: 1.06rem;
    }

    .produto-conteudo .price-old {
        font-size: .74rem;
    }

    .produto-conteudo .price-economy {
        font-size: .72rem;
    }

    /*
     * Específico da página individual.
     * Não modifica a observação dos cards do catálogo.
     */
    .produto-conteudo textarea.variant-input {
        min-height: 58px;
        padding: 7px 9px;
        font-size: .86rem;
        line-height: 1.30;
    }

    .produto-conteudo .product-actions {
        gap: 7px;
        margin-top: 0;
    }

    .produto-conteudo .btn-toggle-cart,
    .produto-conteudo .btn-back {
        min-height: 42px;
        padding: 8px 11px;
        font-size: .86rem;
    }
}


/* =============================================================================
   25.5 PÁGINA INDIVIDUAL DO PRODUTO — MOBILE PEQUENO
   ========================================================================== */

@media (max-width: 380px) {

    .produto-detalhes {
        padding: 0 8px;
    }

    .produto-layout {
        gap: 9px;
        padding: 9px;
    }

    .produto-imagem {
        max-width: 235px;
        max-height: 235px;
    }

    .produto-imagem img {
        max-height: 235px;
    }

    .produto-titulo {
        font-size: 1.06rem;
    }

    .produto-conteudo textarea.variant-input {
        min-height: 54px;
    }
}


/* =============================================================================
   25.6 CARRINHO — BASE COMPACTA
   ========================================================================== */

.cart-page {
    gap: 24px;
    margin-top: 24px;
}

.cart-items {
    gap: 16px;
}

.cart-item {
    padding: 18px;
}

.cart-item-content {
    gap: 18px;
}

.cart-item-title {
    margin-bottom: 4px;
    font-size: 1.02rem;
    line-height: 1.25;
}

.cart-item-category {
    margin-bottom: 6px;
    font-size: .72rem;
}

.cart-item-variant,
.cart-item-observation,
.cart-item-quantity {
    margin-top: 4px;
    font-size: .88rem;
}

.cart-item textarea {
    min-height: 68px;
    padding: 8px 10px;
    font-size: .88rem;
    line-height: 1.35;
}

.cart-item-quantity {
    gap: 5px;
    margin-top: 9px;
}

.cart-item-price {
    gap: 6px;
    margin-top: 9px;
}

.btn-cart-remove {
    margin-top: 11px;
}

.cart-summary {
    padding: 22px;
}

.cart-summary h2 {
    margin-bottom: 16px;
}

.cart-summary-row {
    margin-bottom: 12px;
}

.cart-summary-total {
    padding-top: 10px;
    margin-top: 4px;
}

.cart-summary-economy {
    margin-top: -3px;
    margin-bottom: 12px;
}

.cart-summary-actions {
    gap: 9px;
    margin-top: 20px;
}


/* =============================================================================
   25.7 CARRINHO — MOBILE
   ========================================================================== */

@media (max-width: 599px) {

    .cart-page {
        gap: 14px;
        margin-top: 14px;
    }

    .cart-items {
        gap: 12px;
    }

    .cart-item {
        padding: 12px;
    }

    /*
     * Mantém imagem e conteúdo lado a lado para reduzir
     * significativamente a altura do card no celular.
     */
    .cart-item-content {
        grid-template-columns:
            96px minmax(0, 1fr);

        gap: 12px;
        align-items: start;
    }

    .cart-item-image {
        width: 96px;
        max-width: 96px;
        margin: 0;
    }

    .cart-item-title {
        margin-bottom: 3px;
        font-size: .94rem;
        line-height: 1.22;
    }

    .cart-item-category {
        margin-bottom: 5px;
        font-size: .66rem;
    }

    .cart-item-variant,
    .cart-item-observation,
    .cart-item-quantity {
        font-size: .82rem;
    }

    .cart-item textarea {
        min-height: 58px;
        padding: 7px 9px;
        font-size: .82rem;
        line-height: 1.28;
    }

    .cart-item-price {
        gap: 5px;
        margin-top: 7px;
    }

    .cart-item .price-current,
    .cart-item .price-current.highlight {
        font-size: 1rem;
    }

    .cart-item .price-old {
        font-size: .72rem;
    }

    .cart-item .price-economy {
        font-size: .70rem;
    }

    .cart-item-quantity {
        gap: 4px;
        margin-top: 7px;
    }

    /*
     * 44px é mantido nos controles de quantidade para toque confortável.
     */
    .btn-cart-quantity {
        width: 44px;
        min-width: 44px;
        height: 44px;
    }

    .cart-quantity-input {
        width: 58px;
        height: 44px;
    }

    .btn-cart-remove {
        width: auto;
        min-height: 42px;
        margin-top: 9px;
        padding: 8px 14px;
    }

    .cart-summary {
        position: static;
        padding: 16px;
    }

    .cart-summary h2 {
        margin-bottom: 12px;
        font-size: 1.20rem;
    }

    .cart-summary-row {
        margin-bottom: 9px;
        font-size: .90rem;
    }

    .cart-summary-total {
        padding-top: 9px;
    }

    .cart-summary-economy {
        margin-bottom: 10px;
    }

    .cart-summary-actions {
        gap: 8px;
        margin-top: 14px;
    }
}


/* =============================================================================
   25.8 CARRINHO — MOBILE PEQUENO
   ========================================================================== */

@media (max-width: 380px) {

    .cart-item {
        padding: 10px;
    }

    .cart-item-content {
        grid-template-columns:
            82px minmax(0, 1fr);

        gap: 9px;
    }

    .cart-item-image {
        width: 82px;
        max-width: 82px;
    }

    .cart-item-title {
        font-size: .88rem;
    }

    .cart-item textarea {
        min-height: 54px;
    }

    .btn-cart-remove {
        min-height: 40px;
        font-size: .82rem;
    }

    .cart-summary {
        padding: 14px;
    }
}



/* =============================================================================
   26. CHECKOUT — FASE 4 / V3.4.0 DEV
   ========================================================================== */

.cart-item-description {
    margin: 5px 0 10px;
    color: var(--text-muted);
    font-size: .88rem;
    line-height: 1.45;
}

.checkout-page {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr);
    gap: 24px;
    align-items: start;
    padding: 24px 0 40px;
}

.checkout-form {
    display: grid;
    gap: 18px;
}

.checkout-card,
.checkout-summary {
    padding: 22px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    box-shadow: var(--shadow-soft);
}

.checkout-card h2,
.checkout-summary h2 {
    margin: 0 0 18px;
    font-size: 1.25rem;
}

.checkout-field {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.checkout-field:last-child { margin-bottom: 0; }
.checkout-field label,
.checkout-options legend { font-weight: 700; }
.checkout-field label span { font-weight: 400; color: var(--text-muted); }

.checkout-field input,
.checkout-field textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--white);
    font: inherit;
}

.checkout-field input:focus,
.checkout-field textarea:focus {
    outline: 2px solid rgba(37, 211, 102, .22);
    border-color: var(--primary-color);
}

.checkout-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin: 0 0 16px;
    padding: 0;
    border: 0;
}

.checkout-options legend { width: 100%; margin-bottom: 4px; }
.checkout-options label { display: flex; gap: 7px; align-items: center; cursor: pointer; }
.checkout-address[hidden] { display: none; }

.checkout-summary { position: sticky; top: 18px; }
.checkout-item { display: grid; gap: 4px; padding: 11px 0; border-bottom: 1px solid var(--border-light); }
.checkout-item small { color: var(--text-muted); line-height: 1.35; }
.checkout-item span { font-size: .88rem; }
.checkout-summary-row { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; }
.checkout-summary-total { padding-top: 12px; border-top: 1px solid var(--border-color); font-size: 1.05rem; }
.checkout-actions { display: grid; gap: 9px; margin-top: 18px; }
.checkout-actions .btn-back,
.checkout-actions .btn-submit-cart { width: 100%; text-align: center; }
.checkout-error { min-height: 20px; margin-top: 12px; color: var(--danger); font-size: .88rem; font-weight: 700; }
.checkout-empty { color: var(--text-muted); }

@media (max-width: 820px) {
    .checkout-page { grid-template-columns: 1fr; gap: 16px; padding-top: 16px; }
    .checkout-summary { position: static; }
}

@media (max-width: 520px) {
    .checkout-card,
    .checkout-summary { padding: 16px; }
    .checkout-options { display: grid; gap: 10px; }
}


/* =============================================================================
   27. CHECKOUT — COMPACTAÇÃO + ENDEREÇO POR CEP / V3.4.0 DEV
   ========================================================================== */
.checkout-card,
.checkout-summary { padding: 18px 20px; }
.checkout-card h2,
.checkout-summary h2 { margin-bottom: 14px; }
.checkout-form { gap: 14px; }
.checkout-field { gap: 5px; margin-bottom: 10px; }
.checkout-field input,
.checkout-field textarea { padding: 8px 10px; min-height: 40px; }
.checkout-field textarea { min-height: 72px; resize: vertical; }
.checkout-options { margin-bottom: 12px; }

.checkout-address { margin-top: 2px; }
.checkout-address-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 9px;
}
.checkout-correios-link { font-size: .82rem; font-weight: 700; }
.checkout-address-grid {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) 105px 150px;
    gap: 0 10px;
}
.checkout-field-cep { grid-column: 1; }
.checkout-field-logradouro { grid-column: 2 / 4; }
.checkout-field-numero { grid-column: 4; }
.checkout-field-complemento { grid-column: 1 / 3; }
.checkout-field-bairro { grid-column: 3 / 5; }
.checkout-field-cidade { grid-column: 1 / 4; }
.checkout-field-uf { grid-column: 4; }
.checkout-cep-status {
    display: block;
    min-height: 16px;
    font-size: .74rem;
    line-height: 1.2;
    color: var(--text-muted);
}
.checkout-cep-status[data-status="success"] { color: #287a3c; }
.checkout-cep-status[data-status="error"] { color: var(--danger); }

@media (max-width: 820px) {
    .checkout-card,
    .checkout-summary { padding: 18px; }
    .checkout-address-grid { grid-template-columns: 1fr 100px; gap: 0 10px; }
    .checkout-field-cep,
    .checkout-field-logradouro,
    .checkout-field-complemento,
    .checkout-field-bairro,
    .checkout-field-cidade { grid-column: 1 / 3; }
    .checkout-field-numero { grid-column: 1; }
    .checkout-field-uf { grid-column: 2; }
}

@media (max-width: 520px) {
    .checkout-address-head { align-items: flex-start; flex-direction: column; gap: 4px; }
    .checkout-field input,
    .checkout-field textarea { padding: 9px 10px; }
}


/* =============================================================================
   FASE 4 — ENTREGA / FRETE
   - Retirada: frete R$ 0,00
   - Entrega: frete a combinar
   ========================================================================== */

.checkout-summary-subtotal {
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

#checkout-frete {
    text-align: right;
}


/* =============================================================================
   CHECKOUT — CONFIRMAÇÃO / IDENTIFICAÇÃO DO PEDIDO — v3.4.4
   ========================================================================== */
.checkout-confirmation {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #b8e7c7;
    border-radius: 10px;
    background: #f2fbf5;
    line-height: 1.45;
}

.checkout-confirmation[hidden] { display: none; }

/* =============================================================================
   CHECKOUT — CICLO DE FINALIZAÇÃO DO PEDIDO — v3.4.4
   ========================================================================== */

.checkout-confirmation span {
    display: inline-block;
    margin-top: 4px;
}

.btn-checkout-complete {
    width: 100%;
    margin-top: 12px;
    padding: 11px 14px;
    border: 0;
    border-radius: 9px;
    background: #137333;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.btn-checkout-complete:hover {
    filter: brightness(.96);
}

.checkout-completed {
    grid-column: 1 / -1;
    max-width: 680px;
    width: 100%;
    margin: 32px auto;
    padding: 32px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(3, 18, 46, .08);
    text-align: center;
}

.checkout-completed-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #e9f8ee;
    color: #137333;
    font-size: 30px;
    font-weight: 800;
}

.checkout-completed h2 {
    margin: 0 0 12px;
}

.checkout-completed p {
    margin: 6px 0;
}

.checkout-completed-link {
    display: inline-block;
    margin-top: 20px;
    text-decoration: none;
}
