/*
Theme Name: Hello Elementor Child
Template: hello-elementor
Version: 1.0.1
*/

/* =========================================================
   1. RESET E BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

:root { --header-h: 80px; }          /* mude aqui se seu menu tiver outra altura */
body  { padding-top: var(--header-h); }

/* =========================================================
   2. CABEÇALHO FLUTUANTE (glassmorphism)
   position:fixed = continua visível ao rolar a página
   ========================================================= */
.cabecalho-vidro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.3) 60%, rgba(0, 0, 0, 0) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom-left-radius: 23px;
    border-bottom-right-radius: 23px;
    border-bottom: 1px solid rgb(255, 255, 255);
    transition: top 0.3s ease;
}

.cabecalho-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 30px;
}

/* =========================================================
   3. AJUSTE PARA A BARRA DE ADMIN DO WORDPRESS
   (só aparece quando você está logada)
   Desktop = 32px | Mobile (<=782px) = 46px
   ========================================================= */
body.admin-bar .cabecalho-vidro { top: 32px; }
@media screen and (max-width: 782px) {
    body.admin-bar .cabecalho-vidro { top: 46px; }
}

/* =========================================================
   4. LOGO (tamanho fluido com clamp)
   clamp(mínimo, ideal, máximo) -> respeita o tamanho da tela
   ========================================================= */
.cabecalho-logo { flex-shrink: 0; line-height: 0; }

.cabecalho-logo img,
.cabecalho-logo .custom-logo {
    width: clamp(120px, 18vw, 190px);
    height: auto;
    display: block;
}

.cabecalho-logo a {
    color: #fff;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

/* =========================================================
   5. ÍCONES (pesquisa / conta / carrinho)
   No hover: SÓ aumenta de tamanho, a cor NÃO muda.
   ========================================================= */
.cabecalho-icones {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.cabecalho-icones a {
    display: inline-flex;
    transition: transform 0.2s ease;
}
.cabecalho-icones a:hover {
    transform: scale(1.18); /* apenas cresce */
}

.cabecalho-icones svg {
    width: 24px !important;
    height: 24px !important;
    fill: none !important;
    display: block;
}

/* =========================================================
   6. MENU PRINCIPAL — DESKTOP (horizontal, em 1 linha)
   ========================================================= */
.menu-principal-lista {
    list-style: none;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0;
}

.menu-principal-lista li { position: relative; }

.menu-principal-lista a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}
.menu-principal-lista a:hover { opacity: 0.75; }

/* =========================================================
   7. SETINHA para itens que têm submenu (aponta pra baixo)
   ========================================================= */
.menu-item-has-children > a {
    display: inline-flex;
    align-items: center;
}
.menu-item-has-children > a::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);        /* v (pra baixo) */
    transition: transform 0.25s ease, top 0.25s ease;
    position: relative;
    top: -2px;
}
/* ao abrir o submenu, a seta vira pra cima */
.menu-item-has-children:hover > a::after {
    transform: rotate(-135deg);
    top: 2px;
}

/* =========================================================
   8. SUBMENUS — DESKTOP (aparecem no hover)
   ========================================================= */
.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 190px;
    margin: 0;
    padding: 8px 0;
    list-style: none;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.menu-principal-lista li:hover > .sub-menu { display: block; }

.sub-menu a {
    display: block;
    padding: 10px 18px;
    white-space: nowrap;
}

/* =========================================================
   9. HAMBÚRGUER — escondido no desktop
   ========================================================= */
.menu-toggle-checkbox { display: none; }

.hamburger-icon {
    display: none; /* aparece só no mobile/tablet */
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    flex-shrink: 0;
}
.hamburger-icon span {
    display: block;
    width: 26px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

/* =========================================================
   RESPONSIVIDADE
   ========================================================= */

/* --- Telas médias: reduz espaçamentos --------------------- */
@media (max-width: 1200px) {
    .menu-principal-lista { gap: 20px; }
    .cabecalho-container { padding: 12px 20px; }
}

/* --- Tablet retrato / Mobile (<=991px): vira hambúrguer --- */
@media (max-width: 991px) {

    .hamburger-icon { display: flex; order: 3; }
    .cabecalho-icones { order: 2; margin-left: auto; }
    .cabecalho-logo { order: 1; }

    /* menu vira painel que desliza abaixo do cabeçalho */
    .cabecalho-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: 0 0 18px 18px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }
    .menu-toggle-checkbox:checked ~ .cabecalho-menu {
        max-height: 80vh;
        overflow-y: auto;
    }

    /* itens em coluna */
    .menu-principal-lista {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 0;
    }
    .menu-principal-lista > li {
        width: 100%;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }
    .menu-principal-lista > li:first-child { border-top: 0; }
    .menu-principal-lista a { padding: 14px 26px; }

    /* submenus abertos por padrão no mobile (não há hover no toque) */
    .sub-menu {
        display: block;
        position: static;
        min-width: 0;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.05);
    }
    .sub-menu a { padding: 12px 26px 12px 42px; opacity: 0.85; }

    /* seta do submenu vai para a direita no mobile */
    .menu-item-has-children > a::after { margin-left: auto; }

    /* anima o hambúrguer virando um "X" */
    .menu-toggle-checkbox:checked ~ .hamburger-icon span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .menu-toggle-checkbox:checked ~ .hamburger-icon span:nth-child(2) { opacity: 0; }
    .menu-toggle-checkbox:checked ~ .hamburger-icon span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* --- Mobile pequeno (<=480px) ----------------------------- */
@media (max-width: 480px) {
    .cabecalho-container { padding: 10px 16px; gap: 14px; }
    .cabecalho-icones { gap: 12px; }
}


/* =========================================================
   10. RODAPÉ
   ========================================================= */
.rodape-site {
    background: #0b0b0f;
    color: rgba(255, 255, 255, 0.85);
    border-top-left-radius: 23px;
    border-top-right-radius: 23px;
    margin-top: 60px;
}

.rodape-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 56px 30px 24px;
}

/* grid que se adapta sozinho: quebra em menos colunas em telas menores */
.rodape-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.rodape-coluna h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 18px;
    color: #fff;
}
.rodape-coluna p {
    margin: 0 0 12px;
    line-height: 1.6;
    font-size: 0.95rem;
}
.rodape-marca img,
.rodape-marca .custom-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 16px;
}

.rodape-menu, .rodape-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.rodape-menu li { margin-bottom: 10px; }
.rodape-menu a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.2s ease, padding-left 0.2s ease;
}
.rodape-menu a:hover { color: #fff; padding-left: 4px; }

.rodape-social {
    display: flex;
    gap: 14px;
    margin-top: 10px;
}
.rodape-social a {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, background 0.2s ease;
}
.rodape-social a:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.16);
}
.rodape-social svg { width: 18px; height: 18px; fill: #fff; }

.rodape-base {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}
.rodape-base a { color: rgba(255, 255, 255, 0.75); text-decoration: none; }

@media (max-width: 600px) {
    .rodape-container { padding: 40px 20px 20px; }
    .rodape-base { flex-direction: column; text-align: center; padding: 20px; }
}

/* =========================================================
   GAVETA DO CARRINHO
   ========================================================= */
.gaveta-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 10000;
}
.gaveta-overlay.aberta { opacity: 1; visibility: visible; }

.gaveta-carrinho {
    position: fixed; top: 0; right: 0;
    width: 380px; max-width: 90vw; height: 100%;
    background: rgba(15, 15, 20, 0.85);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff; z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    display: flex; flex-direction: column;
}
.gaveta-carrinho.aberta { transform: translateX(0); }

.gaveta-cabecalho {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.gaveta-cabecalho h3 { margin: 0; font-size: 1.1rem; }
.gaveta-fechar {
    background: none; border: 0; color: #fff; font-size: 1.8rem;
    line-height: 1; cursor: pointer; padding: 0; transition: transform 0.2s ease;
}
.gaveta-fechar:hover { transform: scale(1.15); }

.gaveta-carrinho-conteudo { padding: 20px 24px; overflow-y: auto; flex: 1; }

/* mini-cart do WooCommerce dentro da gaveta */
.gaveta-carrinho-conteudo ul.cart_list { list-style: none; margin: 0; padding: 0; }
.gaveta-carrinho-conteudo ul.cart_list li {
    display: flex; gap: 12px; padding: 14px 0; position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.gaveta-carrinho-conteudo ul.cart_list img { width: 56px; height: auto; order: -1; border-radius: 6px; }
.gaveta-carrinho-conteudo a { color: #fff; text-decoration: none; }
.gaveta-carrinho-conteudo a.remove { position: absolute; top: 14px; right: 0; color: #fff !important; }
.gaveta-carrinho-conteudo .woocommerce-mini-cart__total {
    display: flex; justify-content: space-between; padding: 16px 0; margin-top: 8px;
    font-weight: 600; border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.gaveta-carrinho-conteudo .woocommerce-mini-cart__buttons {
    display: flex; flex-direction: column; gap: 10px; margin: 0;
}
.gaveta-carrinho-conteudo .woocommerce-mini-cart__buttons .button {
    display: block; text-align: center; padding: 12px 16px; border-radius: 10px;
    background: rgba(255, 255, 255, 0.12); color: #fff; transition: background 0.2s ease;
}
.gaveta-carrinho-conteudo .woocommerce-mini-cart__buttons .button:hover { background: rgba(255, 255, 255, 0.22); }
.gaveta-carrinho-conteudo .woocommerce-mini-cart__buttons .checkout { background: #fff; color: #0b0b0f; font-weight: 600; }
.gaveta-carrinho-conteudo .woocommerce-mini-cart__buttons .checkout:hover { background: rgba(255, 255, 255, 0.85); }

/* contador no ícone */
.icone-carrinho { position: relative; }
.carrinho-contador {
    position: absolute; top: -8px; right: -8px; min-width: 18px; height: 18px;
    padding: 0 5px; border-radius: 9px; background: #fff; color: #0b0b0f;
    font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}

body.gaveta-aberta { overflow: hidden; }

@media (max-width: 480px) {
    .gaveta-carrinho { width: 100%; max-width: 100%; }
}

/* =========================================================
   CARROSSEL DE PRODUTOS (SPLIDE)
   ========================================================= */
.card-produto-interno {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: transform 0.25s ease, border-color 0.25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.card-produto-interno:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.3);
}
.card-produto-interno img {
    border-radius: 23px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    max-width: 100%;
    height: auto;
    margin-bottom: 14px;
}
.card-produto-interno a {
    text-decoration: none;
    color: #fff;
    flex-grow: 1; /* Garante que o botão fique sempre no final, alinhado */
    display: flex;
    flex-direction: column;
}
.titulo-produto {
    font-size: 1rem;
    margin: 10px 0;
    font-weight: 600;
    line-height: 1.3;
}
.preco-produto {
    color: #fff;
    font-weight: 700;
    margin-bottom: 16px;
}
/* Botão "Comprar" ou "Ver opções" nativo do Woo */
.card-produto-interno .add_to_cart_button {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 12px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: background 0.2s ease;
    margin-top: auto;
}
.card-produto-interno .add_to_cart_button:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Customização das setas e bolinhas pro tema escuro */
.splide__arrow { background: rgba(255, 255, 255, 0.1); }
.splide__arrow svg { fill: #fff; }
.splide__arrow:hover { background: rgba(255, 255, 255, 0.3); }
.splide__pagination__page { background: rgba(255, 255, 255, 0.2); }
.splide__pagination__page.is-active { background: #fff; }

/* =========================================================
   POSICIONAMENTO DAS SETAS DO CARROSSEL (TOPO DIREITO)
   ========================================================= */

/* 1. Cria um "teto" invisível no carrossel para que as setas não fiquem por cima das fotos */
.splide-produtos {
    padding-top: 50px; 
}

/* 2. Regras que rodam apenas em telas maiores (já que desativamos as setas no mobile pelo JS) */
@media (min-width: 769px) {
    
    /* Remove a centralização vertical padrão (o meio da foto) e joga pro topo */
    .splide-produtos .splide__arrow {
        top: 0;
        transform: none;
    }

    /* A seta "Próximo" vai grudar totalmente na margem direita */
    .splide-produtos .splide__arrow--next {
        right: 0;
    }

    /* A seta "Anterior" abandona a margem esquerda e vai para a direita, 
       ficando exatamente ao lado da outra seta */
    .splide-produtos .splide__arrow--prev {
        left: auto;
        right: 78px; /* Se quiser as setas mais espaçadas, aumente este valor */
    }
}

/* =========================================================
   VITRINE DE CATEGORIAS (CÍRCULOS INLINE)
   ========================================================= */
.categorias-vitrine {
    width: 100%;
    margin: 10px 0 30px;
}

/* O Trilho: garante a linha única e a rolagem horizontal suave */
.categorias-trilho {
    display: flex;
    gap: 32px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px; /* Espaço pro hover não cortar a sombra */
    
    /* Oculta a barra de rolagem visual pra ficar mais limpo, mas mantém a função */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
.categorias-trilho::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* O Item (Link inteiro clicável) */
.categoria-item {
    flex: 0 0 auto; /* Impede que o item encolha para caber na tela */
    width: 130px; /* Largura total do bloco */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    scroll-snap-align: start;
    transition: transform 0.25s ease;
}
.categoria-item:hover {
    transform: translateY(-6px);
}

/* O Círculo da Imagem */
.categoria-img-wrap {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    overflow: hidden; /* Corta as quinas da imagem quadrada */
    margin-bottom: 14px;
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.categoria-item:hover .categoria-img-wrap {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* A Imagem com trava anti-deformação */
.categoria-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* O Texto */
.categoria-nome {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

/* Responsividade: Reduz o círculo para caber mais opções de uma vez no celular */
@media (max-width: 768px) {
    .categorias-trilho {
        gap: 20px;
    }
    .categoria-item, 
    .categoria-img-wrap {
        width: 95px;
        height: 95px;
    }
    .categoria-nome {
        font-size: 0.85rem;
        margin-top: -4px; /* Aproxima um pouco mais o texto no celular */
    }
}

/* =======================================================
   LAYOUT DA PÁGINA DE PRODUTO (GALERIA NATIVA NA BORDA)
   ======================================================= */
@media (min-width: 769px) {
    
    /* Remove a trava de largura do tema Hello Elementor */
    body.single-product .site-main,
    body.single-product .page-content {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Container do produto em tela dividida */
    body.single-product div.product {
        display: flex !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        margin: 0 !important;
        align-items: flex-start !important; /* Deixa rolar naturalmente */
    }

    /* -----------------------------------------
       LADO ESQUERDO: Galeria Nativa na Borda
       ----------------------------------------- */
    body.single-product div.product .woocommerce-product-gallery {
        width: 50% !important;
        float: none !important;
        margin: 0 !important;
        padding: 0 !important; /* Isso gruda a imagem na borda esquerda */
    }

    /* Ajuste para as miniaturas da galeria não ficarem coladas na foto principal */
    body.single-product div.product .woocommerce-product-gallery .flex-control-thumbs {
        padding: 10px 15px 0 15px; 
    }

    /* -----------------------------------------
       LADO DIREITO: Detalhes do Produto
       ----------------------------------------- */
    body.single-product div.product .summary.entry-summary {
        width: 50% !important;
        float: none !important;
        padding: 40px 5% !important; /* Espaço para o texto respirar e não grudar */
        margin: 0 !important;
    }

    /* -----------------------------------------
       LARGURA TOTAL: Produtos Relacionados (Upsell)
       ----------------------------------------- */
    body.single-product div.product .related.products,
    body.single-product div.product .upsells.products {
        width: 100% !important;
        flex: 0 0 100% !important;
        padding: 60px 5% !important;
        clear: both;
    }
}

/* =======================================================
   FONTES DA MARCA (GOOGLE FONTS)
   ======================================================= */

/* 1. Aplicando a Kanit nos textos gerais (Corpo do site, menus, botões) */
body, p, a, li, span, div, button, input {
    font-family: 'Kanit', sans-serif;
}

/* 2. Aplicando a Fraunces nos Títulos e Destaques */
h1, h2, h3, h4, h5, h6, .cabecalho-logo, .elementor-heading-title, .elementor-widget-heading h1, .elementor-widget-heading h2 {
    font-family: 'Fraunces', serif !important; 
    
    /* Ativa o eixo Soft para deixar arredondada */
    font-variation-settings: "SOFT" 100; 
}

/* =======================================================
   AJUSTES FINAIS DA PÁGINA DE PRODUTO
   ======================================================= */

/* 1. Margens: Trazendo os elementos de baixo de volta para o centro */
body.single-product .template-artesanal-container,
body.single-product .related.products,
body.single-product .upsells.products {
    max-width: 1140px !important; /* Largura padrão ideal para e-commerce */
    margin: 0 auto !important; /* Centraliza na tela */
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* =======================================================
   CONSERTO DE MARGEM GERAL (CONTAINER AMPLO)
   ======================================================= */

/* 1. Atualizando o container geral da parte de baixo para ficar amplo como a Home */
body.single-product .template-artesanal-container,
body.single-product .related.products,
body.single-product .upsells.products {
    /* Aumentamos de 1140px para uma medida mais moderna e ampla (1400px). 
       Se a sua home usar "Largura Total", podemos mudar para 95% ou 98vw. */
    max-width: 1400px !important; 
    margin: 0 auto !important; /* Mantém centralizado */
    padding-left: 4% !important; /* Usamos porcentagem para margens mais fluidas nas laterais */
    padding-right: 4% !important;
}

/* 2. Ajuste fino na Coluna da Direita (Texto) para alinhar com a nova margem ampla */
@media (min-width: 769px) {
    body.single-product div.product .summary.entry-summary {
        /* Recalcula o padding-right com base na nova largura de 1400px */
        padding-right: calc((100vw - 1400px) / 2) !important;
        
        /* Adiciona um respiro maior entre a galeria (esquerda) e o texto (direita) */
        padding-left: 5% !important; 
    }
}

/* 3. Limpeza: Escondendo SKU e Categorias da meta-informação */
.product_meta .sku_wrapper,
.product_meta .posted_in {
    display: none !important;
}

/* 4. Escondendo a Tabela nativa e feia do WooCommerce*/
.woocommerce-product-attributes {
    display: none !important;
}

/* =======================================================
   PRODUTOS RELACIONADOS (ESTILO HOMEPAGE / ELEMENTOR)
   ======================================================= */

/* 1. Transformando a lista em Grid e FORÇANDO 4 COLUNAS no Desktop */
@media (min-width: 769px) { 
    body.single-product .related.products ul.products,
    body.single-product .upsells.products ul.products {
        /* Saímos de Grid e fomos para Flexbox */
        display: flex !important;
        
        /* A REGRA DE OURO: flex-wrap: nowrap PROÍBE terminantemente os produtos de caírem para baixo. */
        flex-wrap: nowrap !important; 
        
        justify-content: space-between !important; /* Espalha os cards igualmente */
        gap: 15px !important; /* Diminuímos o gap um pouco mais para dar fôlego */
        margin-top: 30px !important;
        padding: 0 !important;
    }

    /* 2. Definindo o tamanho exato de cada card para 1/4 da linha */
    body.single-product .related.products ul.products li.product,
    body.single-product .upsells.products ul.products li.product {
        /* flex: 1 0 0 diz: cresça igualmente, nunca quebre a linha, comece do tamanho 0. */
        flex: 1 0 0 !important; 
        
        /* Forçamos uma largura máxima de 24% para garantir matematicamente que 4 cabem na linha (gap incluso) */
        max-width: 24% !important; 
        width: auto !important;
        margin: 0 !important;
    }
}

/* 2. O Card do Produto (A caixinha de cada dado) */
body.single-product .related.products ul.products li.product,
body.single-product .upsells.products ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    background: #ffffff;
    border-radius: 12px; /* Acompanha o design arredondado do site */
    border: 1px solid #eaeaea;
    transition: all 0.3s ease;
    padding-bottom: 20px;
    text-align: center;
    list-style: none;
    overflow: hidden; /* Garante que a foto não vaze das bordas arredondadas */
}

/* 3. Efeito de Hover (Levanta o card suavemente e dá uma sombra) */
body.single-product .related.products ul.products li.product:hover,
body.single-product .upsells.products ul.products li.product:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    transform: translateY(-5px);
}

/* 4. A Imagem do Produto no Card */
body.single-product .related.products ul.products li.product img,
body.single-product .upsells.products ul.products li.product img {
    width: 100%;
    height: auto;
    object-fit: cover;
    margin-bottom: 15px;
    border-radius: 12px 12px 0 0;
}

/* 5. O Título do Produto (Usando a sua fonte Fraunces) */
body.single-product .related.products ul.products li.product .woocommerce-loop-product__title,
body.single-product .upsells.products ul.products li.product .woocommerce-loop-product__title {
    font-family: 'Fraunces', serif !important;
    font-variation-settings: "SOFT" 100;
    font-size: 18px !important;
    color: #333;
    margin: 10px 15px !important;
}

/* 6. O Preço do Produto (Usando a sua fonte Kanit) */
body.single-product .related.products ul.products li.product .price,
body.single-product .upsells.products ul.products li.product .price {
    font-family: 'Kanit', sans-serif !important;
    font-size: 16px !important;
    color: #555;
    margin-bottom: 15px;
    display: block;
}

/* 7. O Botão de Comprar/Ver Opções (Estilo Elementor) */
body.single-product .related.products ul.products li.product .button,
body.single-product .upsells.products ul.products li.product .button {
    display: inline-block;
    background-color: #111; /* Se quiser mudar a cor do botão, é aqui! */
    color: #ffffff !important;
    font-family: 'Kanit', sans-serif !important;
    border-radius: 30px;
    padding: 10px 25px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.3s ease;
    margin: 0 15px;
}

/* 8. Efeito de Hover do Botão */
body.single-product .related.products ul.products li.product .button:hover,
body.single-product .upsells.products ul.products li.product .button:hover {
    background-color: #444; 
}