/* ==========================================
   0. SUAS CONFIGURAÇÕES ANTIGAS (PRESERVADAS)
   ========================================== */

.header-widget-area-inner {
  width: 100%;
}

.woocommerce-js ul.products li.product .button {
  width: 100%;
  text-align: center;
}

/* ==========================================
   1. CORREÇÃO DO BANNER (100% DA LARGURA DA TELA)
   ========================================== */

.wp-block-spectra-slider,
.wp-block-uagb-slider,
.spectra-slider {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  position: relative !important;
  left: 0 !important;
  right: 0 !important;
}

/* Garante que as imagens estiquem e não fiquem distorcidas */

.wp-block-spectra-slider img,
.wp-block-uagb-slider img,
.spectra-slider img {
  width: 100vw !important;
  object-fit: cover !important;
}

#menu-item-5596.menu-item.menu-item-type-post_type.menu-item-object-page.menu-item-5596 {
  font-weight: bolder;
}

.woocommerce-js div.product p.ast-stock-detail {
  display: none;
}

/* Adiciona espaçamento entre a paginação e a descrição da categoria */

.term-description {
  margin-top: 50px;
}

/* =========================================================
   2. LOJA GERAL & AVALIAÇÕES (TUDO UNIFICADO AQUI)
   ========================================================= */

/* Transforma o cartão todo em uma coluna */

.woocommerce ul.products li.product {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* O "miolo" do cartão (Título, preço, estrelas e botão) */

.woocommerce ul.products li.product .astra-shop-summary-wrap {
  display: flex !important;
  flex-direction: column !important;
  flex-grow: 1;
  /* Faz o miolo preencher todo o espaço vertical livre do cartão */
  text-align: left;
  /* Alinha os textos à esquerda */
}

/* Define a ordem vertical dos elementos dentro do miolo */

.astra-shop-summary-wrap .ast-woo-product-category-wrap {
  order: 1 !important;
}

.astra-shop-summary-wrap .woocommerce-loop-product__title {
  order: 2 !important;
}

.astra-shop-summary-wrap .ast-woo-product-price-wrap {
  order: 3 !important;
}

/* Bloco de Avaliações (Ordem 4 - Abaixo do Preço e Acima do Botão) */

.astra-shop-summary-wrap .cr-star-rating,
.astra-shop-summary-wrap .review-rating {
  order: 4 !important;
  margin-bottom: 15px !important;
  /* Configurações internas do bloco para manter estrelas e texto lado a lado */
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
}

/* Tratamento para o texto "5 reviews" não atrapalhar */

.astra-shop-summary-wrap .cr-star-rating .cr-star-rating-count {
  order: 2 !important;
  margin: 0 !important;
  line-height: 1 !important;
}

/* Botão (Ordem 5 - Empurrado sempre para o final da base) */

.woocommerce-js ul.products li.product .button,
.astra-shop-summary-wrap .ast-add-to-cart-out-of-stock,
.astra-shop-summary-wrap .ast-add-to-cart-wrap {
  order: 5 !important;
  margin-top: auto !important;
  /* A "mágica" que joga o botão pro rodapé */
}

/* ===================================================
   4. IMAGEM NA PÁGINA DO PRODUTO (INDIVIDUAL)
   Proporção 1:1 e Contain (Correção do Trilho Swiper)
   =================================================== */

/* 1. O container principal dita o formato quadrado */

.nickx-slider-for {
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  background-color: #ffffff !important;
}

/* 2. Forçamos APENAS a altura. Deixamos a largura livre para o JS do plugin calcular o deslizamento corretamente */

.nickx-slider-for .nswiper-wrapper {
  height: 100% !important;
}

.nickx-slider-for .nswiper-slide {
  height: 100% !important;
}

/* 3. A imagem continua engessada e contida perfeitamente dentro do seu slide individual */

.nickx-slider-for .nswiper-slide img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
}

/* 4. Miniaturas (garante que não fiquem distorcidas) */

.nickx-slider-nav img {
  object-fit: contain !important;
  object-position: center !important;
  background-color: #ffffff !important;
}

/* Proporção das imagens na página de listagem */

/* ===================================================
   3. IMAGENS NAS LISTAGENS (ARQUIVOS / CATEGORIAS)
   Proporção 1:1 Direto na Imagem (Método Definitivo)
   =================================================== */

/* 1. Garante que o link não interfira no formato */
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap a.woocommerce-loop-product__link {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 2. Transforma a própria imagem física em um quadrado e contém a foto dentro dela */
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap img {
    width: 100% !important;
    height: auto !important; /* Deixa o aspect-ratio trabalhar */
    aspect-ratio: 1 / 1 !important; /* Força a TAG a ser um quadrado perfeito */
    object-fit: contain !important; /* Encolhe a foto para caber no quadrado */
    object-position: center !important;
    background-color: #ffffff !important; /* Preenche as sobras (em cima ou lados) de branco */
    display: block !important;
    margin: 0 auto !important;
}

/* ===================================================
   5. FORMATAÇÃO DE PREÇOS (QUEBRAS EXATAS E COR DINÂMICA)
   =================================================== */

.lcg-caixa-preco {
    display: flex !important;
    flex-direction: column !important;
    text-align: left !important;
    margin-top: 8px !important;
    margin-bottom: 15px !important;
    gap: 2px !important;
}

/* 🔒 TRAVA DE SEGURANÇA: Impede o WooCommerce de jogar o "R$" para outra linha */
.lcg-caixa-preco span,
.lcg-caixa-preco bdi {
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ➡️ LINHA 1: De R$ 112,70 */
.lcg-linha-1,
.lcg-linha-1 span,
.lcg-linha-1 bdi {
    font-size: 13px !important;
    color: #777777 !important;
    font-weight: normal !important;
    line-height: 1.2 !important;
}

/* ➡️ LINHA 2: O contêiner com "Por" e "à vista" em texto normal */
.lcg-linha-2 {
    font-size: 14px !important;
    color: #555555 !important;
    font-weight: normal !important;
    line-height: 1.2 !important;
    margin-top: 2px !important;
    margin-bottom: 4px !important;
}

/* Apenas o Valor Financeiro Dinâmico (Puxando a Cor Principal do Astra) */
.lcg-linha-2 span,
.lcg-linha-2 bdi {
    font-size: 22px !important;
    color: var(--ast-global-color-0, #e3000f) !important;
    font-weight: bold !important; /* Padrão universal para garantir o negrito */
}

/* ➡️ LINHA 3: Ou até 12x de R$ 9,39 */
.lcg-linha-3,
.lcg-linha-3 span,
.lcg-linha-3 bdi {
    font-size: 13px !important;
    color: #555555 !important;
    font-weight: normal !important;
    line-height: 1.2 !important;
    margin-top: 4px !important;
}

/* ➡️ LINHA 4: sem juros */
.lcg-linha-4 {
    font-size: 12px !important;
    color: #555555 !important;
    font-style: italic !important;
    line-height: 1 !important;
}

.lcg-marca-container {
    margin-top: 10px !important;  /* Adiciona espaço entre o título e o logo */
    margin-bottom: 12px !important;
}

.lcg-marca-logo-img {
    max-width: 90px !important;
    height: auto !important;
    display: block !important;
}