/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

/* ======================================================== */
/* AJUSTES BARRA LATERAL PRODUTO ÚNICO - ADICIONAR À SACOLA */
/* ======================================================== */

/* Produto simples */
form.cart:not(.variations_form) {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Produto com variação */
form.variations_form .woocommerce-variation-add-to-cart {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Quantidade */
form.cart .quantity,
form.variations_form .woocommerce-variation-add-to-cart .quantity {
    flex: 0 0 auto;
    display: flex;
    align-items: stretch;
    margin: 0 !important;
}

/* Botão adicionar à sacola */
form.cart .single_add_to_cart_button,
form.variations_form .woocommerce-variation-add-to-cart .single_add_to_cart_button {
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal !important;
    font-size: 14px !important;
    padding: 0 15px !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0 !important;
    box-sizing: border-box;
}

/* ================================================= */
/* CÁLCULO DE FRETE HUBGO - PRODUTO ÚNICO            */
/* ================================================= */

/* Container geral */
.single-product #hubgo-shipping-calc {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Texto superior - alinhado à esquerda */
.single-product #hubgo-shipping-calc .hubgo-info-shipping-calc {
    display: block;
    width: 100%;
    margin: 18px 0 8px 0;
    color: #777777 !important;
    font-size: 14px;
    font-weight: 400;
    text-align: left !important;
}

/* Linha input + botão */
.single-product #hubgo-shipping-calc .hubgo-form-group {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 8px;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Input do CEP */
.single-product #hubgo-shipping-calc .hubgo-postcode-input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    height: 52px;
    box-sizing: border-box;
    background-color: #FAFAFA !important;
    color: #777777 !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 4px !important;
    font-size: 14px;
}

/* Placeholder do input */
.single-product #hubgo-shipping-calc .hubgo-postcode-input::placeholder {
    color: #9A9A9A !important;
}

/* Botão Calcular - harmonizado com Adicionar à Sacola */
.single-product #hubgo-shipping-calc .hubgo-shipping-calc-button {
    background-color: #787878 !important;
    color: #ffffff !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    padding: 0 18px !important;
}

/* Hover do botão */
.single-product #hubgo-shipping-calc .hubgo-shipping-calc-button:hover {
    background-color: #8A774F !important;
    border-color: #8A774F !important;
    color: #ffffff !important;
}

/* Link "Não sei meu CEP" */
.single-product #hubgo-shipping-calc .hubgo-postcode-search {
    display: inline-block;
    margin-top: 8px;
    color: #9A9A9A !important;
    font-size: 13px;
    text-decoration: none !important;
}

/* Hover do link */
.single-product #hubgo-shipping-calc .hubgo-postcode-search:hover {
    color: #777777 !important;
}



/* ================================================= */
/* TABELA DE FRETE                                   */
/* ================================================= */

.single-product #hubgo-response {
    margin-top: 14px;
}

/* Tabela */
.single-product #hubgo-response .hubgo-table-shipping-methods {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0;
    overflow: hidden;
    background-color: #FAFAFA !important;
    border: 1px solid #eeeeee !important;
    border-radius: 4px !important;
    color: #777777 !important;
    font-size: 14px;
}

/* Cabeçalho: Entrega / Valor */
.single-product #hubgo-response .hubgo-shipping-header th {
    background-color: #787878 !important;
    color: #ffffff !important;
    font-weight: 600;
    padding: 10px 12px;
    border-bottom: 1px solid #787878 !important;
}

/* Linhas de métodos */
.single-product #hubgo-response .hubgo-shipping-method td {
    background-color: #FAFAFA !important;
    color: #777777 !important;
    padding: 10px 12px;
    border-bottom: 1px solid #eeeeee !important;
}

/* Valor do frete */
.single-product #hubgo-response .hubgo-shipping-method td:last-child,
.single-product #hubgo-response .hubgo-shipping-method .amount {
    color: #777777 !important;
    font-weight: 600;
}

/* Rodapé da tabela */
.single-product #hubgo-response .hubgo-shipping-bottom td {
    background-color: #FAFAFA !important;
    color: #9A9A9A !important;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.4;
}

/* Texto do rodapé */
.single-product #hubgo-response .hubgo-shipping-bottom span {
    color: #9A9A9A !important;
}



/* ======================================================== */
/* AJUSTES BARRA LATERAL PRODUTO ÚNICO - VARIAÇÕES DROPDOWN */
/* ======================================================== */

/* Remove o botão/link "Limpar" das variações */
form.variations_form .reset_variations,
form.variations_form .wd-reset-var {
    display: none !important;
}

/* Dropdown de variação ocupando 100% */
form.variations_form table.variations,
form.variations_form table.variations td.value,
form.variations_form table.variations select {
    width: 100% !important;
    max-width: 100% !important;
}


/* ============================================================================ */
/* AJUSTES BARRA LATERAL PRODUTO ÚNICO - MENU COMPARE, LISTA DE DESEJOS, ETC... */
/* ============================================================================ */

/* Ações: Compare, lista de desejos e monitor de preços */
.single-product .summary-inner .wd-action-btn,
.single-product .summary-inner .wd-action-btn a,
.single-product .summary-inner .wd-action-btn .wd-action-text {
    font-size: 14px !important;
    line-height: 1.2 !important;
    color: #777777 !important;
}

/* Espaçamento dos blocos de ação */
.single-product .summary-inner .wd-action-btn {
    margin-top: 2px !important;
    margin-bottom: 4px !important;
    margin-right: 16px !important;
    padding: 0 !important;
}

/* Link interno dos itens de ação */
.single-product .summary-inner .wd-action-btn a {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    min-height: auto !important;
}

/* Metadados: SKU e categoria */
.single-product .summary-inner .product_meta,
.single-product .summary-inner .product_meta span,
.single-product .summary-inner .product_meta a {
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #777777 !important;
}

.single-product .summary-inner .wd-product-info.wd-visits-count {
    margin-top: 15px !important;
}

/* ==================================================== */
/* AJUSTES BARRA LATERAL PRODUTO ÚNICO - ITENS DIVERSOS */
/* ==================================================== */

/* AJUSTE DO PADDING DO RESUMO DO PRODUTO */
.summary-inner.wd-set-mb.reset-last-child {
    padding: 25px !important;
}

/* MOBILE E TABLET PEQUENO */
@media (max-width: 768px) {
    .summary-inner.wd-set-mb.reset-last-child {
        padding: 15px !important;
    }
}


/* AJUSTE DO TEXTO PESSOAS VENDO ESTE ITEM AGORA! */
.wd-visits-count .wd-info-msg::after {
    content: "Clientes vendo esta peça";
    font-size: 15px;
    /* ajusta o tamanho do texto novo */
}

.wd-visits-count .wd-info-msg {
    font-size: 0;
    /* esconde o texto original */
}

/* deixa o texto do botão do carrinho da aba lateral que abre em branco */
.button.btn.btn-default.btn-cart.wc-forward {
    color: #FFFFFF !important;
}


/* =============================================== */
/* Oculta breadcrumb Rank Math apenas no mobile    */
/* =============================================== */

@media (max-width: 768px) {
    .single-product .single-breadcrumbs-wrapper {
        display: none !important;
    }
}


/* ====================================================== */
/* EM PRODUTO ÚNICO - VARIAÇÕES DE IMAGENS, CONTORNO DE SELEÇÃO MODIFICADO   */
/* ====================================================== */

/* Swatches de variação - contorno mais suave */
.single-product .wd-swatches .wd-swatch {
    border-color: #d9d9d9 !important;
}

/* Swatch selecionado - destaque elegante */
.single-product .wd-swatches .wd-swatch.wd-active {
    border-color: #7f9f8a !important;
    box-shadow: 0 0 0 2px rgba(127, 159, 138, 0.22) !important;
    position: relative;
}

/* Ícone de confirmação no item selecionado */
.single-product .wd-swatches .wd-swatch.wd-active::after {
    content: "✓";
    position: absolute;
    top: -7px;
    right: -7px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #7f9f8a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    z-index: 3;
}

/* Swatch ao passar o mouse - verde suave */
.single-product .wd-swatches .wd-swatch:hover {
    border-color: #7f9f8a !important;
    box-shadow: 0 0 0 2px rgba(127, 159, 138, 0.22) !important;
}


/* ====================== */
/* LISTA DE PRODUTOS LOJA */
/* ====================== */

.product-element-bottom {
    padding: 15px 10px 15px 10px;
}

/* Apenas na listagem de produtos (loja/galeria) */
.archive .woo-custom-installments-group .woo-custom-installments-group-main-price .amount,
.woocommerce-page .products .woo-custom-installments-group .woo-custom-installments-group-main-price .amount {
    font-size: 15px !important;
}

/* MUDANÇA NO TÍTULO DO PRODUTO */
/* Título dos produtos em cards/listagens */
.product-grid-item .wd-entities-title,
.product-grid-item .wd-entities-title a {
    text-align: left !important;
    font-family: "Inter", sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
}

/* ================================================= */
/* LOJA E CATEGORIAS - MOBILE                        */
/* Remove título quando houver categorias             */
/* Ajusta espaçamentos no mobile                      */
/* ================================================= */

@media (max-width: 768px) {

    /* Remove o título quando houver navegação de categorias na página */
    .woocommerce-shop:has(.wd-nav-product-cat) .wd-title-wrapp,
    .tax-product_cat:has(.wd-nav-product-cat) .wd-title-wrapp {
        display: none !important;
    }

    /* Quando houver apenas título, sem categorias */
    .woocommerce-shop:not(:has(.wd-nav-product-cat)) .wd-title-wrapp,
    .tax-product_cat:not(:has(.wd-nav-product-cat)) .wd-title-wrapp {
        margin-top: 15px !important;
        margin-bottom: 35px !important;
    }

    /* Quando houver botão Categorias */
    .woocommerce-shop .wd-btn-show-cat,
    .tax-product_cat .wd-btn-show-cat {
        margin-top: 25px !important;
        margin-bottom: 45px !important;
    }

    /* Quando houver lista de categorias visível */
    .woocommerce-shop .wd-nav-product-cat,
    .tax-product_cat .wd-nav-product-cat {
        margin-top: 25px !important;
        margin-bottom: 45px !important;
    }
}

/* ============================================= */
/* MENU 1 - ESTÁTICO (apenas antes de rolar)     */
/* ============================================= */

/* Menu principal desktop */
.whb-header:not(.whb-sticked) .whb-row:has(.whb-visible-lg .wd-switch-logo) .wd-nav-main>li>a .nav-link-text {
    color: #ffffff !important;
}

/* Minha Conta */
.whb-header:not(.whb-sticked) .whb-row:has(.whb-visible-lg .wd-switch-logo) .wd-header-my-account .wd-tools-text {
    color: #ffffff !important;
}

/* Carrinho */
.whb-header:not(.whb-sticked) .whb-row:has(.whb-visible-lg .wd-switch-logo) .wd-header-cart .wd-tools-icon,
.whb-header:not(.whb-sticked) .whb-row:has(.whb-visible-lg .wd-switch-logo) .wd-header-cart .wd-cart-number,
.whb-header:not(.whb-sticked) .whb-row:has(.whb-visible-lg .wd-switch-logo) .wd-header-cart .wd-cart-subtotal .amount,
.whb-header:not(.whb-sticked) .whb-row:has(.whb-visible-lg .wd-switch-logo) .wd-header-cart .subtotal-divider,
.whb-header:not(.whb-sticked) .whb-row:has(.whb-visible-lg .wd-switch-logo) .wd-header-cart .wd-tools-text {
    color: #ffffff !important;
}

/* Lista de desejos e comparar */
.whb-header:not(.whb-sticked) .whb-row:has(.whb-visible-lg .wd-switch-logo) .wd-header-wishlist .wd-tools-icon,
.whb-header:not(.whb-sticked) .whb-row:has(.whb-visible-lg .wd-switch-logo) .wd-header-wishlist .wd-tools-count,
.whb-header:not(.whb-sticked) .whb-row:has(.whb-visible-lg .wd-switch-logo) .wd-header-compare .wd-tools-icon,
.whb-header:not(.whb-sticked) .whb-row:has(.whb-visible-lg .wd-switch-logo) .wd-header-compare .wd-tools-count {
    color: #ffffff !important;
}

/* Mobile: menu hamburguer e ícones */
.whb-header:not(.whb-sticked) .whb-row:has(.whb-visible-lg .wd-switch-logo) .wd-tools-element.wd-header-mobile-nav>a,
.whb-header:not(.whb-sticked) .whb-row:has(.whb-visible-lg .wd-switch-logo) .wd-tools-element.wd-header-mobile-nav>a i,
.whb-header:not(.whb-sticked) .whb-row:has(.whb-visible-lg .wd-switch-logo) .wd-tools-element.wd-header-mobile-nav .wd-tools-icon,
.whb-header:not(.whb-sticked) .whb-row:has(.whb-visible-lg .wd-switch-logo) .wd-tools-element.wd-header-mobile-nav .wd-tools-text {
    color: #ffffff !important;
}

/* Ícones genéricos */
.whb-header:not(.whb-sticked) .whb-row:has(.whb-visible-lg .wd-switch-logo) .wd-tools-element>a i,
.whb-header:not(.whb-sticked) .whb-row:has(.whb-visible-lg .wd-switch-logo) .wd-tools-element>a:before {
    color: #ffffff !important;
}

/* ============================================= */
/* MENU 1 - MOBILE ESTÁTICO - ÍCONES BRANCOS     */
/* Usa a logo branca apenas como referência       */
/* NÃO altera a logo                             */
/* NÃO afeta o sticky                            */
/* NÃO afeta o menu 2                            */
/* ============================================= */

@media (max-width: 1024px) {

    .whb-header:not(.whb-sticked) .whb-general-header-inner:has(.whb-mobile-center .wd-main-logo img[src*="logo-mikania-branco"]) .wd-header-mobile-nav>a,

    .whb-header:not(.whb-sticked) .whb-general-header-inner:has(.whb-mobile-center .wd-main-logo img[src*="logo-mikania-branco"]) .wd-header-mobile-nav .wd-tools-text,

    .whb-header:not(.whb-sticked) .whb-general-header-inner:has(.whb-mobile-center .wd-main-logo img[src*="logo-mikania-branco"]) .wd-header-mobile-nav .wd-tools-icon,

    .whb-header:not(.whb-sticked) .whb-general-header-inner:has(.whb-mobile-center .wd-main-logo img[src*="logo-mikania-branco"]) .wd-header-mobile-nav .wd-tools-icon:before,

    .whb-header:not(.whb-sticked) .whb-general-header-inner:has(.whb-mobile-center .wd-main-logo img[src*="logo-mikania-branco"]) .wd-header-mobile-nav>a:before,

    .whb-header:not(.whb-sticked) .whb-general-header-inner:has(.whb-mobile-center .wd-main-logo img[src*="logo-mikania-branco"]) .wd-header-cart>a,

    .whb-header:not(.whb-sticked) .whb-general-header-inner:has(.whb-mobile-center .wd-main-logo img[src*="logo-mikania-branco"]) .wd-header-cart .wd-tools-icon,

    .whb-header:not(.whb-sticked) .whb-general-header-inner:has(.whb-mobile-center .wd-main-logo img[src*="logo-mikania-branco"]) .wd-header-cart .wd-tools-icon:before,

    .whb-header:not(.whb-sticked) .whb-general-header-inner:has(.whb-mobile-center .wd-main-logo img[src*="logo-mikania-branco"]) .wd-header-cart .wd-cart-number,

    .whb-header:not(.whb-sticked) .whb-general-header-inner:has(.whb-mobile-center .wd-main-logo img[src*="logo-mikania-branco"]) .wd-header-cart .wd-tools-count,

    .whb-header:not(.whb-sticked) .whb-general-header-inner:has(.whb-mobile-center .wd-main-logo img[src*="logo-mikania-branco"]) .wd-header-cart .wd-tools-count span {
        color: #ffffff !important;
    }

}


/* ================================================= */
/* BORDA DELICADA - SOMENTE PÁGINA ÚNICA DO PRODUTO  */
/* Imagem principal + miniaturas da galeria           */
/* ================================================= */

/* Imagem principal da galeria do produto */
.single-product .woocommerce-product-gallery__image img {
    border: 1px solid #dcdcdc !important;
    box-sizing: border-box !important;
}

/* Miniaturas da galeria do produto */
.single-product .wd-gallery-thumb img,
.single-product .wd-carousel-thumb img,
.single-product .woocommerce-product-gallery .wd-carousel-pagin img,
.single-product .woocommerce-product-gallery .wd-carousel-thumb img {
    border: 1px solid #dcdcdc !important;
    box-sizing: border-box !important;
}



/* ================================================= */
/* BOTÃO WHATSAPP          */
/* ================================================= */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background-color: #25D366;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.whatsapp-float:hover {
    background-color: #1ebe5d;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 46px;
        height: 46px;
        bottom: 70px;
        left: 16px;
    }

    .whatsapp-float svg {
        width: 22px;
        height: 22px;
    }
}


/* ================================================= */
/* AJUSTE RODAPÉ PRODUTOS RELACIONAS         */
/* ================================================= */
/* Alinha o bloco de parcelamento à esquerda */
.woo-custom-installments-card-container {
    display: flex;
    justify-content: flex-start;
}

.woo-custom-installments-details-without-fee {
    text-align: left;
}

/* Remove o corte de texto no título do produto */
[class*="title-line-"] .wd-product .wd-entities-title {
    max-height: none !important;
}


/* ================================================= */
/* POPUP DE COOKIES - AJUSTE DE POSIÇÃO E MOBILE     */
/* ================================================= */
.wd-cookies-popup {
    left: 50% !important;
    right: auto !important;
    bottom: 0 !important;
    inset: auto auto 0 50% !important;
    width: min(680px, calc(100vw - 32px)) !important;
    padding: 15px 24px !important;
    border-top-left-radius: 18px !important;
    border-top-right-radius: 18px !important;
    transform: translate3d(-50%, 100%, 0) !important;
    transition: none !important;
    box-sizing: border-box !important;
}

.wd-cookies-popup.popup-display {
    transform: translate3d(-50%, 0, 0) !important;
}

.wd-cookies-popup.popup-hide {
    transform: translate3d(-50%, 100%, 0) !important;
}

.wd-cookies-popup .wd-cookies-inner {
    gap: 20px;
}

.wd-cookies-popup .cookies-info-text {
    font-size: 16px;
    line-height: 1.45;
}

@media (max-width: 768px) {
    .wd-cookies-popup {
        width: 260px !important;
        max-width: 260px !important;
        margin: 0 !important;
        padding: 8px !important;
        border-top-left-radius: 14px !important;
        border-top-right-radius: 14px !important;
    }

    .wd-cookies-popup .wd-cookies-inner {
        gap: 8px;
    }

    .wd-cookies-popup .cookies-info-text {
        padding-inline-end: 0 !important;
        padding: 0 !important;
        font-size: 14px !important;
        line-height: 1.3 !important;
    }

    .wd-cookies-popup .cookies-buttons {
        margin-top: 0 !important;
    }

    .wd-cookies-popup .cookies-buttons>a,
    .wd-cookies-popup .cookies-buttons .cookies-more-btn,
    .wd-cookies-popup .cookies-buttons .cookies-accept-btn {
        margin-inline-end: 8px !important;
        padding: 6px 10px !important;
        font-size: 12px !important;
        line-height: 1.2 !important;
    }

    .wd-cookies-popup .cookies-buttons .cookies-more-btn {
        border-bottom-width: 1px !important;
    }

    .wd-cookies-popup .cookies-buttons .cookies-accept-btn.btn {
        --btn-height: 28px !important;
        min-height: 28px !important;
        height: 28px !important;
        padding: 4px 10px !important;
        line-height: 1 !important;
    }

}


/* ================================================= */
/* AJUSTE BOTÕES COMPRAR E ADD AO CARRINHO     */
/* ================================================= */
.woocommerce-mini-cart__buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.woocommerce-mini-cart__buttons a {
    float: none !important;
    width: 100% !important;
}

.woocommerce-mini-cart__buttons a.checkout {
    order: 1 !important;
}

.woocommerce-mini-cart__buttons a.btn-cart {
    order: 2 !important;
    background: #ccc !important;
    color: #000 !important;
}


