/* Estilos Desktop - BgfTech (min-width: 1025px) */

/* Cuadrícula de 5 productos */
ul.products li.product, 
.wc-block-grid__product,
.wc-block-product {
    max-width: 220px !important; 
    flex: 0 0 220px !important;
}

/* Forzar Títulos a 2 líneas con altura fija */
.wc-block-grid__product-title, 
.wp-block-woocommerce-product-title, 
.woocommerce-loop-product__title {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    height: 2.8em !important;
}

/* Tooltip de Título (Solo Desktop) */
[data-title]::after {
    content: attr(data-title) !important;
    position: absolute !important;
    bottom: 120% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: rgba(24, 23, 23, 0.98) !important;
    color: #fff !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    border-radius: 4px !important;
    width: 200px !important;
    z-index: 9999;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.2s ease-in-out !important;
}

[data-title]:hover::after {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Validación para BgfTech - Desktop */
/* body::before { */
    /* content: "MODO: DESKTOP ACTIVADO" !important; */
    /* position: fixed; */
    /* top: 10px; */
    /* left: 10px; */
    /* background: #2eb82e !important; */
    /* color: white !important; */
    /* padding: 5px 10px; */
    /* font-size: 12px; */
    /* z-index: 999999; */
    /* border-radius: 4px; */
    /* font-family: sans-serif; */
/* } */



/**
 * Estilos Desktop - BgfTech
 * Diseño de flechas de navegación y contenedor.
 */
.bgf-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #003366; /* Azul BgfTech */
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.bgf-nav-btn:hover {
    background: #5a0bbd;
    transform: translateY(-50%) scale(1.1);
}

.bgf-prev { left: -20px; }
.bgf-next { right: -20px; }

/* Ocultar scrollbar en PC para estética limpia */
.wc-block-product-template, 
.wc-block-grid__products,
.wp-block-woocommerce-product-collection ul {
    scrollbar-width: none !important;
}
.wc-block-product-template::-webkit-scrollbar { display: none; }


/**
 * BgfTech - Desktop 
 * Aseguramos que las flechas floten sobre el carrusel.
 */
.bgf-nav-btn {
    display: flex !important; /* Forzamos visibilidad */
    position: absolute !important;
    z-index: 999 !important;
    background: #003366 !important;
}

.bgf-prev { left: -25px !important; }
.bgf-next { right: -25px !important; }

.wc-block-product-template li,
.wc-block-grid__product {
    flex: 0 0 calc(25% - 15px) !important;
    min-width: calc(25% - 15px) !important;
}

/**
 * BgfTech - Alineación Profesional en Pantallas Grandes
 */
.wc-block-grid__product, 
.product {
    display: flex !important;
    flex-direction: column !important;
}

/* El botón siempre al final */
.wc-block-grid__product-add-to-cart, 
.add_to_cart_button {
    margin-top: auto !important; 
    width: 100% !important;
    text-align: center;
}

/* Títulos consistentes */
.wc-block-grid__product-title {
    min-height: 3em; /* Espacio uniforme para títulos en Desktop */
}






/**
 * BGF INVERSIONES C.A. - FIX ESTRUCTURA PRODUCTO (DESKTOP)
 * Descripción: Modificación para mantener galería y resumen juntos sin romper el resto de la página.
 */

@media (min-width: 992px) {
    /* 1. Reset del contenedor para que los bloques de abajo (relacionados) no floten */
    .single-product div.product {
        display: block !important; /* Volvemos al estándar */
    }

    /* 2. CREAMOS LA FILA SUPERIOR (Solo para Imagen y Resumen) */
    /* Usamos el clearfix de WooCommerce o forzamos un contenedor flex en la parte superior */
    .single-product div.product > .images, 
    .single-product div.product > .summary {
        display: block;
        float: left !important; /* Técnica clásica pero segura para temas Envo */
    }

    /* 3. Galería (60%) */
    .single-product div.product div.images {
        width: 60% !important;
        max-width: 60% !important;
        margin-right: 4% !important;
        display: flex !important;
        flex-direction: row-reverse !important; 
        gap: 20px !important;
    }

    /* 4. Resumen (36%) */
    .single-product div.product div.summary {
        width: 36% !important;
        max-width: 36% !important;
        float: right !important; /* Lo empujamos a la derecha */
        margin-bottom: 40px !important;
    }

    /* 5. EL TRUCO MAESTRO: Limpiar el flujo para que los relacionados aparezcan ABAJO */
    /* Esto evita que los relacionados intenten subir al hueco del 4% */
    .woocommerce-tabs, 
    .related.products, 
    .upsells.products {
        clear: both !important;
        display: block !important;
        width: 100% !important;
        padding-top: 40px !important;
    }
}