/* ==========================================================================
   CLICK724 - HOJA DE ESTILOS MAESTRA
   ==========================================================================
   ÍNDICE:
   1. MÓDULO: CARRUSEL DE CATEGORÍAS (Clase: .categorias-app)
   2. MÓDULO: CARRUSEL DE OFERTAS (Clase: .click724-ofertas)
   3. MÓDULO: CUADRÍCULA DE PRODUCTOS (Clase: .click724-cuadricula)
   4. UTILIDADES GENERALES (Iconos, etiquetas, etc.)
   ========================================================================== */


/* ==========================================================================
   1. MÓDULO: CARRUSEL DE CATEGORÍAS (Clase: .categorias-app)
   ========================================================================== */

/* Contenedor Principal (ul) */
.categorias-app ul.products {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 2px !important; 
    margin: 0 !important;
    padding: 0px 0px 0px !important;
    scrollbar-width: none !important;
    justify-content: flex-start !important;
}

.categorias-app ul.products::-webkit-scrollbar {
    display: none !important;
}

/* El ítem individual (li): Ancho fijo y alineación central */
.categorias-app ul.products li.product-category {
    flex: 0 0 auto !important;
    width: 85px !important; 
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important; 
    text-align: center !important;
}

/* El enlace interior (a) */
.categorias-app ul.products li.product-category a {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important; 
    width: 100% !important;
    text-decoration: none !important;
    background: transparent !important;
}

/* La imagen circular y SU ESPACIADO */
.categorias-app ul.products li.product-category a img {
    width: 58px !important; 
    height: 58px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 1px solid #EBEBEB !important;
    margin: 0 auto 15px auto !important; 
    display: block !important;
    box-shadow: 0 2px 10px rgb(90 90 90 / 20%) !important;
    margin: 4px 0 !important;
}

/* Textos (Empujados hacia abajo) */
.categorias-app ul.products li.product .woocommerce-loop-product__title {
    margin-top: auto !important; 
    margin-bottom: 4px !important;
    line-height: 1.3 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important; 
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* El texto (Con corrección de margen izquierdo) */
.categorias-app ul.products li.product-category a h2.woocommerce-loop-category__title {
    position: relative !important;
    width: 100% !important;
    text-align: center !important; 
    font-size: 12px !important;
    font-weight: 700 !important; 
    color: #444444 !important;
    line-height: 1.2 !important;
    text-transform: capitalize !important; 
    margin: 28px 0px 0px -25px !important; 
    padding: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important; 
    -webkit-box-orient: vertical !important;
    white-space: normal !important; 
}

/* Ocultar contador "(5)" */
.categorias-app ul.products li.product-category a h2 mark.count {
    display: none !important;
}

/* --- AJUSTE SOLICITADO: Margen derecho e izquierdo del carrusel --- */
.categorias-app ul.products li.product-category:first-child {
    margin-left: 7px !important; 
}
.categorias-app ul.products li.product-category:last-child {
    margin-right: 10px !important; 
}

/* ========== VISTA PC Y TABLET ========== */
@media (min-width: 768px) {
    .categorias-app ul.products {
        justify-content: center !important;
        gap: 25px !important;
    }
    .categorias-app ul.products li.product-category {
        width: 110px !important; 
    }
    .categorias-app ul.products li.product-category a img {
        width: 65px !important;
        height: 65px !important;
        margin-bottom: 12px !important; 
    }
    .categorias-app ul.products li.product-category a h2.woocommerce-loop-category__title {
        font-size: 13px !important;
        margin: 20px 0px 0px -25px !important;
    }
    .categorias-app ul.products {
        justify-content: flex-start !important; 
        gap: 20px !important;
    }
    .categorias-app ul.products li.product-category {
        width: 110px !important;
    }
}


/* ==========================================================================
   2. MÓDULO: CARRUSEL DE OFERTAS (Clase: .click724-ofertas)
   ========================================================================== */

/* CONTENEDOR PRINCIPAL (Siempre Flex/Horizontal) */
.click724-ofertas ul.products {
    display: flex !important;
    flex-wrap: nowrap !important; 
    overflow-x: auto !important;  
    -webkit-overflow-scrolling: touch !important;
    gap: 10px !important; 
    margin: 0 !important;
    padding: 10px 5px 25px 20px !important; 
    scrollbar-width: none !important;
    align-items: stretch !important;
}
.click724-ofertas ul.products::-webkit-scrollbar { display: none !important; }

/* Unificar alineación a la izquierda */
.click724-ofertas ul.products li.product .woocommerce-loop-product__title,
.click724-ofertas ul.products li.product .price {
    text-align: left !important;
    width: 100% !important;
}

/* TARJETA BLANCA (Base Móvil) */
.click724-ofertas ul.products li.product {
    flex: 0 0 auto !important;
    width: 135px !important; 
    margin-bottom: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    height: auto !important; 
    position: relative !important;
    background-color: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0px 6px 18px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid rgba(0,0,0,0.03) !important;
    padding: 10px !important;
}

/* --- AJUSTE SOLICITADO: Margen derecho de 20px al final del carrusel --- */
.click724-ofertas ul.products li.product:last-child {
    margin-right: 20px !important;
}

/* CONTENEDORES INTERNOS */
.click724-ofertas ul.products li.product a.woocommerce-loop-product__link {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important; 
    margin-bottom: 0 !important; 
}
.click724-ofertas ul.products li.product .astra-shop-summary-wrap {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    width: 100% !important;
}

/* IMAGEN (1:1) */
.click724-ofertas ul.products li.product a.woocommerce-loop-product__link img {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important; 
    height: auto !important; 
    flex: 0 0 auto !important; 
    object-fit: contain !important; 
    object-position: center !important; 
    border-radius: 8px !important;
    margin-bottom: 10px !important; 
    display: block !important;
    background-color: #ffffff !important; 
}

/* TEXTOS (Ajuste personalizado) */
.click724-ofertas ul.products li.product .woocommerce-loop-product__title {
    color: #333 !important;
    font-size: 12px !important;
    line-height: 1.15 !important;
    margin-top: auto !important; 
    margin-bottom: 6px !important; 
    min-height: 28px !important; 
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-transform: capitalize;
}

/* ==========================================================================
   3. MÓDULO: CUADRÍCULA DE PRODUCTOS (Clase: .click724-cuadricula)
   ========================================================================== */

/* Tarjeta de Producto (Mantiene tus 5 columnas exactas) */
.click724-cuadricula ul.products li.product {
    flex: 0 0 calc(20% - 20px) !important; 
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important; 
    position: relative !important;
}

/* Unificar alineación a la izquierda para Catálogo General */
.click724-cuadricula ul.products li.product .woocommerce-loop-product__title,
.click724-cuadricula ul.products li.product .price {
    text-align: left !important;
    width: 100% !important;
}

/* LOS RESORTES INTERNOS (Para empujar el contenido) */
.click724-cuadricula ul.products li.product a.woocommerce-loop-product__link {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important; 
    margin-bottom: 0 !important; 
}

.click724-cuadricula ul.products li.product .astra-shop-summary-wrap {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important; 
    width: 100% !important;
}

/* Control de Imágenes (1:1 Absoluto y sin cortes) */
.click724-cuadricula ul.products li.product a.woocommerce-loop-product__link img {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important; 
    height: auto !important;
    flex: 0 0 auto !important;
    object-fit: contain !important; 
    object-position: center !important;
    border-radius: 12px !important; 
    margin-bottom: 10px !important; 
    display: block !important;
    background-color: #ffffff !important;
}

/* Textos (Agrupados al fondo, alineación recta) */
.click724-cuadricula ul.products li.product .woocommerce-loop-product__title {
    color: #333 !important;
    font-size: 13px !important;
    line-height: 1.15 !important;
    margin-top: auto !important; 
    margin-bottom: 6px !important; 
    min-height: 30px !important; 
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-transform: capitalize;
}


/* ==========================================================================
   4. UTILIDADES GENERALES Y COMPARTIDAS (Precios, Botones, Iconos)
   ========================================================================== */

/* PRECIOS: Bloque base */
.click724-ofertas ul.products li.product .price,
.click724-cuadricula ul.products li.product .price {
    margin-top: 0 !important; 
    margin-bottom: 10px !important; 
    display: block !important;
    line-height: 1.2 !important; 
}

/* PRECIO VIEJO / TACHADO (Sincronización del precio original) */
.click724-ofertas ul.products li.product .price del,
.click724-ofertas ul.products li.product .price del .amount,
.click724-cuadricula ul.products li.product .price del,
.click724-cuadricula ul.products li.product .price del .amount {
    color: #888888 !important;
    opacity: 1 !important;
    font-weight: 400 !important;
    font-size: 13px !important;
    text-decoration: line-through !important;
    margin-right: 6px !important;
    display: inline-block !important;
}

/* PRECIO ACTUAL (Negro por defecto en cuadrícula) */
.click724-cuadricula ul.products li.product .price ins,
.click724-cuadricula ul.products li.product .price ins .amount,
.click724-cuadricula ul.products li.product .price > .amount {
    font-size: 16px !important;  
    font-weight: 800 !important; 
    color: #111111 !important; 
    text-decoration: none !important; 
}

/* PRECIO OFERTA (Rojo en Ofertas o en Cuadrícula rebajada) */
.click724-ofertas ul.products li.product .price ins,
.click724-ofertas ul.products li.product .price ins .amount,
.click724-ofertas ul.products li.product .price > .amount,
.click724-cuadricula.elementor-widget-woocommerce-products.elementor-wc-products ul.products li.product .price ins .amount {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #E63946 !important;
    text-decoration: none !important;
}

/* BOTONES (Compartidos Ofertas y Cuadrícula) */
.click724-ofertas ul.products li.product .button,
.click724-cuadricula ul.products li.product .button {
    width: 100% !important;
    text-align: center !important;
    padding: 10px !important; 
    font-size: 14px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    border-radius: 8px;
    background-color: #222;
    font-weight: 500 !important;
}

.click724-cuadricula ul.products li.product .button {
    margin-top: 0 !important; 
}

/* ICONO DEL CARRITO */
.click724-ofertas ul.products li.product .button:not(.product_type_variable)::before,
.click724-ofertas ul.products li.product .added_to_cart::before,
.click724-cuadricula ul.products li.product .button:not(.product_type_variable)::before,
.click724-cuadricula ul.products li.product .added_to_cart::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="%23ffffff"><path d="M0 24C0 10.7 10.7 0 24 0H69.5c22 0 41.5 12.8 50.6 32h411c26.3 0 45.5 25 38.6 50.4l-41 152.3c-8.5 31.4-37 53.3-69.5 53.3H170.7l5.4 28.5c2.2 11.3 12.1 19.5 23.6 19.5H488c13.3 0 24 10.7 24 24s-10.7 24-24 24H199.7c-34.6 0-64.3-24.6-70.7-58.5L77.4 54.5c-.7-3.8-4-6.5-7.9-6.5H24C10.7 48 0 37.3 0 24zM128 464a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm336-48a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}

/* ETIQUETA OFERTAS */
.click724-ofertas .ast-on-card-button.ast-onsale-card,
.click724-cuadricula .ast-on-card-button.ast-onsale-card {
    background: #E63946 !important; 
    color: #ffffff !important;
    border-radius: 6px !important; 
    font-weight: 700 !important;
    padding: 4px 8px !important;
    position: absolute !important;
    top: 20px !important;
    left: 20px !important;
    right: auto !important;
    margin: 0 !important;
    transform: none !important;
    z-index: 10 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* ELIMINAR BOLSITA INTRUSA DE ASTRA */
.click724-ofertas span.ahfb-svg-iconset,
.click724-cuadricula span.ahfb-svg-iconset {
    display: none !important;
}

/* VISTAS TABLET Y PC (Para Ofertas) */
@media (min-width: 768px) and (max-width: 1023px) {
    .click724-ofertas ul.products li.product { width: 190px !important; }
    .click724-ofertas ul.products li.product .button { font-size: 13px !important; padding: 10px !important; }
}
@media (min-width: 1024px) {
    .click724-ofertas ul.products { gap: 25px !important; }
    .click724-ofertas ul.products li.product { 
        width: calc(20% - 20px) !important; 
        max-width: 100% !important;
        margin: 0 !important;
        padding: 10px !important; 
    }
