/*
Theme Name: EMIT Astra Child
Theme URI: https://emitsports.com.br/
Description: Child Theme do Astra para personalizações da EMIT Sports.
Author: EMIT Sports
Template: astra
Version: 1.0.0
Text Domain: emit-astra-child
*/

/* ==========================================================
   EMIT SPORTS — CHILD THEME
   Organização dos estilos

   1. Variáveis globais
   2. WooCommerce Geral
   3. Página de Produto
   4. Produtos Relacionados
   5. Carrinho
   6. Checkout
   7. Responsividade
========================================================== */


/* ==========================================================
   1. VARIÁVEIS GLOBAIS
========================================================== */

:root {

    /* EMIT — Paleta oficial */
    --emit-green: #93CC19;
    --emit-blue: #3E12FD;
    --emit-pink: #FF0052;
    --emit-dark: #1C1C1A;
    --emit-nude: #DDBC91;

    /* Neutros de interface */
    --emit-white: #FFFFFF;
    --emit-light: #F7F7F7;
    --emit-border: #E6E6E6;
    --emit-gray: #6B6B6B;

    --emit-radius: 18px;
    --emit-transition: .25s ease;
}


/* ==========================================================
   2. WOO GERAL
========================================================== */

/* ==========================================================
   BOTÕES — PADRÃO GERAL DO SITE
========================================================== */

/*
 * Mantém as maiúsculas e minúsculas exatamente
 * como o texto do botão foi escrito.
 */
button,
.button,
.wp-element-button,
.elementor-button,
input[type="submit"],
input[type="button"],
input[type="reset"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    text-transform: none !important;
}

/* ==========================================================
   3. PÁGINA DE PRODUTO
========================================================== */

/* ==========================================================
   DISPONIBILIDADE DO PRODUTO
   Oculta "Em estoque" / disponibilidade na página
========================================================== */

.single-product .stock {
    display: none !important;
}


/* ==========================================================
   4. PRODUTOS RELACIONADOS
========================================================== */

/* Todo CSS dos produtos relacionados ficará aqui. */

/* ---------- TÍTULO ---------- */

.related.products{
    margin-top:70px;
}

.related.products > h2{

    text-transform:uppercase;
    letter-spacing:.12em;

    font-size:26px;
    font-weight:700;

    color:var(--emit-dark);

    margin-bottom:32px;
}


/* ---------- GRID ---------- */

.related.products ul.products{

    display:grid !important;

    grid-template-columns:repeat(4,1fr);

    gap:28px;

    margin-top:25px;
}


/* ---------- CARD ---------- */

.related.products li.product {
    background: #FFFFFF !important;
    border: none !important;
    border-radius: 18px !important;
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: auto !important;

    box-shadow:
        0 4px 10px rgba(28, 28, 26, 0.08),
        0 10px 28px rgba(28, 28, 26, 0.10) !important;
}

/* Mantém exatamente o mesmo visual no hover */
.related.products li.product:hover {
    border: none !important;
    transform: none !important;

    box-shadow:
        0 4px 10px rgba(28, 28, 26, 0.08),
        0 10px 28px rgba(28, 28, 26, 0.10) !important;
}

/* ---------- IMAGEM DO PRODUTO ---------- */

.related.products li.product a.woocommerce-LoopProduct-link {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.related.products li.product a.woocommerce-LoopProduct-link img {
    width: 100% !important;
    height: 280px !important;
    object-fit: contain !important;
    object-position: center !important;
    margin: 0 0 18px 0 !important;
}

/* ---------- CONTEÚDO DO CARD ---------- */

/* Link principal ocupa o espaço disponível */
.related.products li.product .woocommerce-LoopProduct-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* ---------- TÍTULO DO PRODUTO ---------- */

.related.products li.product .woocommerce-loop-product__title {
    color: var(--emit-dark) !important;
    font-size: 17px !important;
    font-weight: 500 !important;
    line-height: 1.25 !important;
    letter-spacing: .06em;
    text-transform: uppercase;

    text-align: center;

    margin: 0 0 8px !important;

    /* Reserva espaço para até duas linhas */
   height: 43px;
min-height: 43px;

display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;

overflow: hidden;
text-overflow: ellipsis;
}

/* ---------- PREÇO ---------- */

.related.products li.product .price {
    color: var(--emit-dark) !important;

    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.3;

    text-align: center;

    margin: 0 0 16px !important;
}

/* Preço promocional */
.related.products li.product .price ins {
    color: var(--emit-dark) !important;
    text-decoration: none;
    font-weight: 700;
}

/* Preço antigo */
.related.products li.product .price del {
    color: var(--emit-gray) !important;
    opacity: .65;
    font-weight: 400;
}

/* ---------- BOTÃO ---------- */

/* Oculta os botões nos produtos relacionados */
.related.products li.product .button {
    display: none !important;
}

/* ==========================================================
   5. LOJA / CATÁLOGO
   Shop + todas as categorias WooCommerce
========================================================== */


/* ==========================================================
   ÁREA GERAL
========================================================== */

.woocommerce.archive .site-content {
    background: #FFFFFF;
}


/* ==========================================================
   PRODUTOS
========================================================== */

/* Remove aparência de card */
.woocommerce.archive ul.products li.product {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Não altera no hover */
.woocommerce.archive ul.products li.product:hover {
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}


/* ---------- IMAGEM ---------- */

.woocommerce.archive ul.products li.product img {
    width: 100% !important;
    height: 250px !important;
    object-fit: contain !important;
    object-position: center !important;
    margin: 0 0 14px !important;
}


/* ---------- TÍTULO ---------- */

.woocommerce.archive ul.products li.product
.woocommerce-loop-product__title {
    color: var(--emit-dark) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    text-transform: uppercase;
    text-align: left;

    min-height: 39px;
    margin: 0 0 5px !important;
}


/* ---------- PREÇO ---------- */

.woocommerce.archive ul.products li.product .price {
    color: var(--emit-dark) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-align: left;
    margin: 0 !important;
}


/* ---------- BOTÕES ---------- */

/* Cliente acessa o produto clicando no próprio produto */
.woocommerce.archive ul.products li.product .button {
    display: none !important;
}


/* ==========================================================
   DESKTOP
========================================================== */

@media (min-width: 922px) {

    /* Container geral */
    .woocommerce.archive .ast-container {
        max-width: 1480px !important;
    }


    /* ---------- LATERAL ---------- */

    .woocommerce.archive #secondary {
        width: 22% !important;
        padding-right: 28px !important;
        margin-top: 0 !important;
    }

    .woocommerce.archive #secondary .widget {
        margin-bottom: 28px !important;
        padding-bottom: 24px;
        border-bottom: 1px solid var(--emit-border);
    }

    .woocommerce.archive #secondary .widget:last-child {
        border-bottom: none;
    }

    .woocommerce.archive #secondary .widget-title {
        color: var(--emit-dark);
        font-size: 19px;
        font-weight: 600;
        line-height: 1.25;
        letter-spacing: .04em;
        margin-bottom: 20px;
    }

    .woocommerce.archive #secondary .widget ul {
        margin: 0;
    }

    .woocommerce.archive #secondary .widget li {
        margin-bottom: 8px;
        line-height: 1.35;
    }


    /* ---------- ÁREA PRINCIPAL ---------- */

    .woocommerce.archive #primary {
        width: 78% !important;
        padding-left: 38px !important;

        /* Alinha o topo com a lateral */
        margin-top: -55px !important;
    }


    /* ---------- CABEÇALHO ---------- */

    .woocommerce.archive .woocommerce-breadcrumb {
        color: var(--emit-gray);
        font-size: 14px;
        margin: 0 0 16px !important;
    }

    .woocommerce.archive .emit-shop-heading h1 {
        color: var(--emit-dark);
        font-size: 24px;
        font-weight: 700;
        line-height: 1.2;
        letter-spacing: .04em;
        text-transform: uppercase;
        margin: 0 0 14px;
    }

    .woocommerce.archive .woocommerce-result-count {
        color: var(--emit-gray);
        font-size: 14px;
        margin: 0 0 22px !important;
    }

    .woocommerce.archive .woocommerce-ordering {
        margin: 0 0 22px !important;
    }

    .woocommerce.archive .woocommerce-ordering select {
        color: var(--emit-dark);
        font-size: 14px;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0 24px 0 0;
        cursor: pointer;
    }


    /* ---------- GRADE ---------- */

    .woocommerce.archive ul.products {
        column-gap: 34px !important;
        row-gap: 28px !important;
    }

    .woocommerce.archive ul.products li.product img {
        height: 300px !important;
    }


    /* ---------- ESPAÇO SUPERIOR ---------- */

    .woocommerce.archive .site-content > .ast-container {
        padding-top: 55px !important;
    }
}

/* ==========================================================
   ESPAÇAMENTO SUPERIOR — CATEGORIAS
   Iguala categorias ao espaçamento visual da Shop
========================================================== */

@media (min-width: 922px) {

    /* Área principal */
    .woocommerce.archive.tax-product_cat #primary {
        margin-top: 0 !important;
    }

    /* Coluna lateral */
    .woocommerce.archive.tax-product_cat #secondary {
        margin-top: 55px !important;
    }

}

/* ==========================================================
   PARCELAMENTO — VITRINES
========================================================== */

.emit-installments-loop {
    display: block !important;

    width: 100% !important;

    color: var(--emit-gray) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;

    text-align: center !important;
    white-space: nowrap !important;

    margin: 4px 0 0 !important;
    padding: 0 !important;
}

.emit-installments-loop strong {
    display: inline !important;

    color: inherit !important;
    font-size: inherit !important;
    font-weight: 400 !important;
    line-height: inherit !important;
}

/* ==========================================================
   PARCELAMENTO — PÁGINA DO PRODUTO
========================================================== */

.single-product .emit-installments-single {
    color: var(--emit-gray) !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;

    margin: 4px 0 12px !important;
    padding: 0 !important;
}


/* Linha principal:
   6x sem juros ou 12x de R$ X,XX */

.single-product .emit-installments-single-main {
    display: flex !important;
    align-items: baseline !important;
    flex-wrap: wrap !important;

    font-size: inherit !important;
    font-weight: 400 !important;
    line-height: inherit !important;
}


/* 6x sem juros também sem negrito */

.single-product .emit-no-interest {
    color: var(--emit-gray) !important;
    font-weight: 400 !important;
}


/* Cria o espaço correto ao redor de "ou" */

.single-product .emit-installments-separator {
    display: inline-block !important;
    margin: 0 4px !important;

    color: var(--emit-gray) !important;
    font-weight: 400 !important;
}


/* Garante que o restante também não tenha bold */

.single-product .emit-installments-single-main span {
    font-weight: 400 !important;
}


/* Total a prazo */

.single-product .emit-installments-total {
    color: var(--emit-gray) !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;

    margin-top: 1px !important;
}


/* ==========================================================
   PARCELAMENTO DO PRODUTO — MOBILE
========================================================== */

@media (max-width: 767px) {

    .single-product .emit-installments-single {
        font-size: 13px !important;
        margin: 4px 0 11px !important;
    }

    .single-product .emit-installments-total {
        font-size: 11px !important;
    }

}


/* ==========================================================
   ALINHAMENTO DOS PRODUTOS — SHOP E CATEGORIAS
========================================================== */

.woocommerce.archive ul.products li.product
.woocommerce-loop-product__title {
    text-align: center !important;
}

.woocommerce.archive ul.products li.product .price {
    text-align: center !important;
}


/* ==========================================================
   ALINHAMENTO — PRODUTOS RELACIONADOS
========================================================== */

.related.products li.product .emit-installments-loop {
    text-align: center !important;
}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 767px) {

    .emit-installments-loop {
        font-size: 12px !important;
        line-height: 1.25 !important;
        margin-top: 3px !important;

        white-space: nowrap;
    }

}



/* ==========================================================
   8. RESPONSIVO
========================================================== */

@media(max-width:921px){

}

@media(max-width:544px){

}


/* =========================================================
   COMPRA INFERIOR — ESCOLHA DO CABO
   ========================================================= */

.single-product .emit-bottom-grip-options {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 18px;
}

/* E1 / E2 / E3 */
.single-product .emit-grip-option {
    width: auto !important;
    min-width: 49px;
    height: 32px;

    padding: 5px 10px !important;
    margin: 0 !important;

    background: #fff !important;
    color: #161616 !important;

    border: 1px solid #ddd !important;
    border-radius: 3px !important;

    box-shadow: none !important;

    font-family: inherit;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 20px !important;

    cursor: pointer;
}

/* Hover */
.single-product .emit-grip-option:hover {
    border-color: #999 !important;
    background: #fff !important;
    color: #161616 !important;
}

/* Cabo selecionado */
.single-product .emit-grip-option.is-selected {
    border-color: #161616 !important;
    background: #fff !important;
    color: #161616 !important;
}

/* Quantidade + adicionar ao carrinho */
.single-product .emit-bottom-cart {
    display: flex;
    align-items: stretch;
    gap: 16px;
}

/* Quantidade */
.single-product .emit-bottom-quantity {
    width: 64px !important;
    height: 40px !important;
    padding: 0 16px !important;

    border: 1px solid #ddd !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #161616 !important;

    font-size: 15px !important;
}

/* Botão comprar */
.single-product .emit-bottom-add-to-cart {
    min-height: 40px;
    padding: 8px 22px !important;
}


/* =========================================================
   EMIT SPORTS — DESCRIÇÃO RECOLHIDA / VER MAIS
   ========================================================= */

.single-product .woocommerce-product-details__short-description {
    position: relative;
}

/* Só é aplicada quando o JS identifica uma descrição longa */
.single-product .woocommerce-product-details__short-description.emit-description-collapsible {
    max-height: 190px;
    overflow: hidden;
    transition: max-height 0.45s ease;
}

/* Degradê no final do texto recolhido */
.single-product .woocommerce-product-details__short-description.emit-description-collapsible::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 55px;
    pointer-events: none;

    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        #ffffff 90%
    );

    transition: opacity 0.25s ease;
}

/* Descrição aberta */
.single-product .woocommerce-product-details__short-description.emit-description-expanded {
    max-height: none;
}

/* Remove o degradê quando aberta */
.single-product .woocommerce-product-details__short-description.emit-description-expanded::after {
    opacity: 0;
}

/* Botão */
.single-product .emit-description-toggle {
    display: none;
    padding: 0;
    margin: 10px 0 18px;

    border: 0;
    background: transparent;

    color: #191970;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;

    cursor: pointer;
}

/* Só mostra o botão quando realmente necessário */
.single-product .emit-description-toggle.is-visible {
    display: inline-block;
}

.single-product .emit-description-toggle:hover {
    text-decoration: underline;
}
