/* 
 * WooCommerce Unified Styles for Incormaderas V2
 * Estilos simplificados y optimizados
 */

/* --------------------------------------------------------------------------
 * 1. RESET Y CONTENEDORES BÁSICOS
 * -------------------------------------------------------------------------- */
.woocommerce-page .woocommerce-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.woocommerce-layout {
    display: block;
    margin: 2rem 0;
}

/* --------------------------------------------------------------------------
 * 2. GRID DE PRODUCTOS SIMPLIFICADO Y CENTRADO
 * -------------------------------------------------------------------------- */

/* Contenedor principal del grid */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
}

/* Tablet: 2 columnas */
@media (min-width: 768px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
    }
}

/* Desktop: 3 columnas - CENTRADO Y EQUILIBRADO */
@media (min-width: 992px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(3, 1fr);
        max-width: 100%;
        gap: 2rem;
    }
    
    /* Tarjetas ocupan el 100% de su columna del grid */
    .woocommerce ul.products li.product {
        width: 100%;
        max-width: none;
        margin: 0;
    }
}

/* Desktop Grande: 4 columnas - CENTRADO */
@media (min-width: 1200px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(4, 1fr);
        max-width: 100%;
        gap: 2rem;
    }
    
    .woocommerce ul.products li.product {
        width: 100%;
        max-width: none;
        margin: 0;
    }
}

/* --------------------------------------------------------------------------
 * 3. TARJETA DE PRODUCTO SIMPLE
 * -------------------------------------------------------------------------- */
.woocommerce ul.products li.product {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease;
    position: relative;
    margin: 0;
    padding: 0;
    width: 100%;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Imagen del producto */
.woocommerce ul.products li.product a img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* Información del producto */
.woocommerce ul.products li.product .product-info {
    padding: 1rem;
}

/* Título */
.woocommerce ul.products li.product h2,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    text-align: center;
}

/* Precio */
.woocommerce ul.products li.product .price {
    color: #ff6b00;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0.5rem 0 1rem 0;
    display: block;
    text-align: center;
}

.woocommerce ul.products li.product .price del {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.woocommerce ul.products li.product .price ins {
    text-decoration: none;
}

/* Botón */
.woocommerce ul.products li.product .button {
    display: block;
    background: #ff6b00;
    color: white;
    text-align: center;
    padding: 0.6rem 1rem;
    margin: 0.5rem 0 0 0;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
}

.woocommerce ul.products li.product .button:hover {
    background: #e55a00;
}

/* Etiqueta de oferta */
.woocommerce span.onsale {
    background: #ff6b00;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 10;
    line-height: 1;
}

/* --------------------------------------------------------------------------
 * 4. HEADER Y BREADCRUMB
 * -------------------------------------------------------------------------- */
.woocommerce-products-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.woocommerce-products-header__title {
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 1rem;
}

.woocommerce-breadcrumb {
    font-size: 0.9rem;
    color: #64748b;
    margin: 1rem 0;
    padding: 0.5rem 0;
}

.woocommerce-breadcrumb a {
    color: #ff6b00;
    text-decoration: none;
}

.woocommerce-breadcrumb a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
 * 5. HERRAMIENTAS DE ORDENACIÓN Y BÚSQUEDA
 * -------------------------------------------------------------------------- */
.woocommerce-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.tools-left, .tools-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tools-left {
    flex: 1;
}

.tools-right {
    flex-shrink: 0;
}

/* Contador de resultados - UBICADO POR FUERA */
.woocommerce .woocommerce-result-count {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 2rem;
    display: block;
    text-align: center;
}

/* Selector de ordenación */
.woocommerce .woocommerce-ordering select {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 160px;
}

.woocommerce .woocommerce-ordering select:focus {
    outline: none;
    border-color: #ff6b00;
}

/* Campo de búsqueda */
.product-search-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-search-input {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 200px;
    background: white;
}

.product-search-input:focus {
    outline: none;
    border-color: #ff6b00;
}

.product-search-btn {
    padding: 0.5rem 1rem;
    background: #ff6b00;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
}

.product-search-btn:hover {
    background: #e65100;
}

.woocommerce .woocommerce-result-count {
    font-size: 0.9rem;
    color: #64748b;
}

.woocommerce .woocommerce-ordering select {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: white;
    font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
 * 6. PAGINACIÓN
 * -------------------------------------------------------------------------- */
.woocommerce nav.woocommerce-pagination {
    margin: 3rem 0;
    text-align: center;
}

.woocommerce nav.woocommerce-pagination ul {
    display: inline-flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    display: block;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    text-decoration: none;
    color: #334155;
    font-size: 0.9rem;
}

.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li span.current {
    background: #ff6b00;
    color: white;
    border-color: #ff6b00;
}

/* --------------------------------------------------------------------------
 * 7. SIDEBAR (si existe)
 * -------------------------------------------------------------------------- */
@media (min-width: 992px) {
    .woocommerce-layout {
        display: grid;
        grid-template-columns: 25% 75%;
        gap: 2rem;
    }
    
    .woocommerce-sidebar {
        padding-right: 2rem;
        border-right: 1px solid #e2e8f0;
    }
}

/* --------------------------------------------------------------------------
 * 8. MENSAJES
 * -------------------------------------------------------------------------- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid;
}

.woocommerce-message {
    background: #f0fdf4;
    border-left-color: #10b981;
    color: #10b981;
}

.woocommerce-info {
    background: #eff6ff;
    border-left-color: #3b82f6;
    color: #3b82f6;
}

.woocommerce-error {
    background: #fef2f2;
    border-left-color: #ef4444;
    color: #ef4444;
}

/* --------------------------------------------------------------------------
 * 9. CTA SECTION - FULL WIDTH
 * -------------------------------------------------------------------------- */
.woocommerce-cta {
    margin: 4rem 0 0 0;
    padding: 6rem 0; /* Más alto que en single product */
    background: linear-gradient(135deg, #FF6B00 0%, #E65100 100%);
    color: white;
    border-radius: 0;
    text-align: center;
    width: 100vw; /* Full viewport width */
    margin-left: calc(50% - 50vw); /* Centrar con viewport */
    margin-right: calc(50% - 50vw);
    position: relative;
}

.woocommerce-cta h2 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 2.5rem; /* Más grande para categorías */
}

.woocommerce-cta .lead-text {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.woocommerce-cta .cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.woocommerce-cta .btn {
    min-width: 200px;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
}

.woocommerce-cta .btn-primary {
    background: white;
    color: #ff6b00;
}

.woocommerce-cta .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.woocommerce-cta .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* --------------------------------------------------------------------------
 * 10. CORRECCIONES ESPECÍFICAS - SIN ESPACIOS FANTASMA
 * -------------------------------------------------------------------------- */

/* Asegurar que las imágenes carguen */
.woocommerce ul.products li.product img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Quitar floats y asegurar que no haya elementos fantasma */
.woocommerce ul.products li.product {
    float: none !important;
    clear: none !important;
}

/* Grid de productos - ALINEACIÓN IZQUIERDA, SIN CENTRADO */
.woocommerce ul.products {
    justify-items: stretch;
    justify-content: start;
    align-content: start;
    width: 100%;
}

/* Eliminar cualquier pseudo-elemento que pueda causar espacios */
.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none !important;
    content: none !important;
}

/* Espaciado uniforme */
.woocommerce ul.products li.product {
    margin-bottom: 0;
}

/* Contenedor de productos para ocupar ancho completo */
.woocommerce-products {
    width: 100%;
}

/* Asegurar que el layout ocupe ancho completo */
.woocommerce-layout {
    width: 100%;
}

/* El contador de resultados no debe interferir con el grid */
.woocommerce .woocommerce-result-count {
    display: block;
    width: 100%;
    grid-column: 1 / -1;
}

/* Cuando hay sidebar, ajustar el ancho de productos */
@media (min-width: 992px) {
    .woocommerce-products {
        width: 100%;
        max-width: none;
    }
    
    .woocommerce ul.products {
        max-width: none;
        width: 100%;
    }
}

/* Responsive adicional */
@media (max-width: 767px) {
    /* Forzar contenedores a ancho completo */
    .woocommerce-page .woocommerce-container,
    .woocommerce .woocommerce-container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .woocommerce-layout {
        margin: 1rem 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .woocommerce-products {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .woocommerce ul.products {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 0.5rem !important;
    }
    
    .woocommerce ul.products li.product {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    .woocommerce ul.products li.product .product-info {
        padding: 1rem;
    }
    
    .woocommerce ul.products li.product a img {
        height: 320px !important;
        max-height: 320px !important;
        width: 100% !important;
    }
    
    .woocommerce-tools {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        padding: 1rem 0.5rem !important;
    }
}

/* --------------------------------------------------------------------------
 * 11. CORRECCIÓN ESPECÍFICA PARA 3 COLUMNAS EN ESCRITORIO
 * -------------------------------------------------------------------------- */
@media (min-width: 992px) and (max-width: 1199px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(3, 1fr);
        max-width: 100%;
        width: 100%;
    }
    
    .woocommerce ul.products li.product {
        width: 100%;
        max-width: none;
        margin: 0;
    }
    
    /* Asegurar que ocupe todo el ancho disponible */
    .woocommerce-products {
        display: block;
        width: 100%;
    }
}

/* --------------------------------------------------------------------------
 * 12. AJUSTES FINALES DE CENTRADO (SOLO PARA TIENDA)
 * -------------------------------------------------------------------------- */
.woocommerce-page .woocommerce-container {
    display: block;
    width: 100%;
}

/* Solo aplicar centrado en páginas de tienda (shop, categorías) */
.woocommerce-page:not(.single-product-page) .woocommerce-container {
    display: block;
    width: 100%;
}

.woocommerce-page:not(.single-product-page) .woocommerce-layout {
    display: block;
    width: 100%;
}

.woocommerce-page:not(.single-product-page) .woocommerce-products {
    display: block;
    width: 100%;
}

/* --------------------------------------------------------------------------
 * 13. ESTILOS ESPECÍFICOS PARA CATEGORÍAS
 * -------------------------------------------------------------------------- */

/* Contenido SEO organizado y estético */
.category-seo-content {
    margin: 3rem 0;
    font-family: inherit;
}

.seo-content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.category-guide {
    padding: 3rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #ffffff 100%);
    border-radius: 20px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.category-guide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b00 0%, #e65100 50%, #ff6b00 100%);
}

.category-guide h2 {
    color: var(--color-text, #1e293b) !important;
    margin-bottom: 2rem !important;
    font-size: 2.5rem !important;
    text-align: center !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px !important;
}

.category-intro {
    margin-bottom: 3rem !important;
    padding: 2rem !important;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%) !important;
    border-radius: 16px !important;
    border-left: 5px solid #ff6b00 !important;
    box-shadow: 0 4px 16px rgba(255, 107, 0, 0.1) !important;
    position: relative !important;
}

.category-intro::before {
    content: '📋';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    opacity: 0.7;
}

.category-intro h3 {
    color: var(--color-text, #1e293b) !important;
    margin-bottom: 1.5rem !important;
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.category-intro h3::before {
    content: '🎯';
    font-size: 1.2rem;
}

/* Secciones informativas con mejor diseño */
.info-section {
    margin-bottom: 3rem !important;
    padding: 2.5rem !important;
    background: white !important;
    border-radius: 16px !important;
    border: 2px solid #f1f5f9 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important;
}

.info-section h3 {
    color: var(--color-primary, #ff6b00) !important;
    margin-bottom: 2rem !important;
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    text-align: center !important;
    position: relative !important;
}

.info-section h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary, #ff6b00) 0%, var(--color-primary-dark, #e65100) 100%);
    border-radius: 2px;
}

/* Cards de consejos mejoradas */
.tip-card {
    padding: 2rem !important;
    background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%) !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

.tip-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #ff6b00 0%, #e65100 100%);
}

.tip-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.15) !important;
    border-color: #ff6b00 !important;
}

.tip-card h4 {
    color: #1e293b !important;
    margin-bottom: 1rem !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.tip-card h4::before {
    content: '💡';
    font-size: 1rem;
}

/* Características de calidad mejoradas */
.quality-features {
    margin-bottom: 3rem !important;
    padding: 2.5rem !important;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%) !important;
    border-radius: 16px !important;
    border: 2px solid #e2e8f0 !important;
}

.quality-features h3 {
    color: #ff6b00 !important;
    margin-bottom: 2rem !important;
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    text-align: center !important;
}

.feature-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: 1rem !important;
    padding: 1.5rem !important;
    background: white !important;
    border-radius: 12px !important;
    border: 1px solid #f1f5f9 !important;
    transition: all 0.3s ease !important;
    margin-bottom: 1rem !important;
}

.feature-item:hover {
    transform: translateX(5px) !important;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.1) !important;
    border-color: #10b981 !important;
}

.feature-item span:first-child {
    color: #10b981 !important;
    font-size: 1.5rem !important;
    font-weight: bold !important;
    flex-shrink: 0 !important;
    margin-top: -2px !important;
}

.feature-item strong {
    color: #1e293b !important;
    font-weight: 700 !important;
    display: block !important;
    margin-bottom: 0.5rem !important;
}

/* FAQ mejorado */
.faq-section {
    margin-bottom: 3rem !important;
    padding: 2.5rem !important;
    background: linear-gradient(135deg, #ffffff 0%, #fff8f0 100%) !important;
    border-radius: 16px !important;
    border: 2px solid #fed7aa !important;
}

.faq-section h3 {
    color: #ff6b00 !important;
    margin-bottom: 2rem !important;
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    text-align: center !important;
}

.faq-item {
    padding: 1.5rem !important;
    background: white !important;
    border-radius: 12px !important;
    border: 1px solid #fed7aa !important;
    transition: all 0.3s ease !important;
    margin-bottom: 1rem !important;
}

.faq-item:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.1) !important;
    border-color: #ff6b00 !important;
}

.faq-item h4 {
    color: #1e293b !important;
    margin-bottom: 1rem !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.faq-item h4::before {
    content: '❓';
    font-size: 1rem;
}

/* Información técnica mejorada */
.technical-info {
    padding: 2rem !important;
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%) !important;
    border-radius: 16px !important;
    border: 2px solid #bae6fd !important;
    position: relative !important;
}

.technical-info::before {
    content: '🔧';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    opacity: 0.7;
}

.technical-info h3 {
    color: #1e293b !important;
    margin-bottom: 1.5rem !important;
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
}

.technical-info h3::before {
    content: '⚙️';
    font-size: 1.2rem;
}

/* Sección de palabras clave mejorada */
.seo-keywords-section {
    text-align: center !important;
}

.seo-keywords-section div {
    max-width: 900px !important;
    margin: 0 auto !important;
    padding: 2.5rem !important;
    background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%) !important;
    border-radius: 16px !important;
    border: 2px solid #e2e8f0 !important;
    box-shadow: 0 6px 24px rgba(0,0,0,0.08) !important;
    position: relative !important;
}

.seo-keywords-section h3 {
    color: #1e293b !important;
    margin-bottom: 1.5rem !important;
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
}

.seo-keywords-section h3::before {
    content: '🔍';
    font-size: 1.2rem;
}

.seo-keywords-section p {
    color: #64748b !important;
    line-height: 1.8 !important;
    font-size: 1rem !important;
    text-align: left !important;
}

/* Responsive para contenido SEO */
@media (max-width: 768px) {
    .category-guide {
        padding: 2rem 1.5rem !important;
    }

    .category-guide h2 {
        font-size: 2rem !important;
    }

    .info-section,
    .quality-features,
    .faq-section {
        padding: 2rem 1.5rem !important;
    }

    .tip-card,
    .feature-item,
    .faq-item {
        padding: 1.5rem !important;
    }

    .seo-keywords-section div {
        padding: 2rem 1.5rem !important;
    }
}

/* Subcategorías como MENÚ - ESTILO BOTONES */
.subcategories-widget {
    margin-bottom: 2rem;
    padding: 1.5rem 1.5rem 1.5rem 1.5rem; /* Más espacio arriba */
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.subcategories-widget .widget-title {
    margin-bottom: 1.5rem;
    color: #1e293b;
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
}

.subcategories-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.subcategory-item {
    flex: 0 0 auto;
    width: 180px; /* Ancho fijo para que quepan todas en una fila */
    min-width: 160px;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid transparent;
}

.subcategory-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.3);
    border-color: #ff6b00;
    background: #ff6b00;
}

.subcategory-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    text-decoration: none;
    color: inherit;
    width: 100%;
    text-align: center;
    min-height: 140px;
    justify-content: center;
}

.subcategory-image {
    width: 60px;
    height: 60px;
    margin-bottom: 0.75rem;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.subcategory-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.subcategory-item:hover .subcategory-image img {
    transform: scale(1.1);
}

.subcategory-info {
    width: 100%;
}

.subcategory-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #1e293b;
    font-weight: 700;
    line-height: 1.3;
}

.subcategory-count {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
    opacity: 0.8;
}

.subcategory-item:hover .subcategory-info h4,
.subcategory-item:hover .subcategory-info .subcategory-count {
    color: white !important;
}

/* Responsive para menú horizontal de subcategorías */
@media (max-width: 768px) {
    .subcategories-widget {
        padding: 1rem;
    }

    .subcategories-list {
        gap: 0.5rem;
        justify-content: flex-start; /* Alinear a la izquierda en tablet */
        overflow-x: auto; /* Scroll horizontal si es necesario */
        padding-bottom: 0.5rem;
    }

    .subcategory-item {
        width: 140px; /* Ancho más pequeño para tablet */
        min-width: 130px;
        flex-shrink: 0;
    }

    .subcategory-link {
        padding: 1rem 0.5rem;
        min-height: 110px;
    }

    .subcategory-image {
        width: 45px;
        height: 45px;
        margin-bottom: 0.5rem;
    }

    .subcategory-info h4 {
        font-size: 0.95rem;
    }

    .subcategory-count {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .subcategories-list {
        flex-direction: row;
        gap: 0.5rem;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .subcategory-item {
        width: 120px;
        min-width: 110px;
    }

    .subcategory-link {
        min-height: 100px;
        padding: 0.75rem 0.5rem;
    }

    .subcategory-image {
        width: 40px;
        height: 40px;
        margin-bottom: 0.25rem;
    }

    .subcategory-info h4 {
        font-size: 0.9rem;
    }

    .subcategory-count {
        font-size: 0.75rem;
    }
}

/* Mensaje cuando no hay productos */
.no-products-in-category {
    text-align: center;
    padding: 3rem 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.no-products-in-category h2 {
    color: #1e293b;
    margin-bottom: 1rem;
}

.no-products-in-category p {
    color: #64748b;
    margin-bottom: 2rem;
}

/* CTA específico para categorías */
.category-cta {
    margin-top: 4rem;
}

/* Responsive para categorías */
@media (max-width: 991px) {
    .category-hero-image {
        height: 250px;
    }
    
    .category-title {
        font-size: 2rem;
    }
    
    .category-hero-content {
        padding: 1.5rem;
    }
}

@media (max-width: 767px) {
    .category-hero-image {
        height: 200px;
    }
    
    .category-title {
        font-size: 1.75rem;
    }
    
    .subcategory-link {
        flex-direction: column;
        text-align: center;
    }
    
    .subcategory-image {
        margin-right: 0;
        margin-bottom: 0.75rem;
    }
}

/* --------------------------------------------------------------------------
 * 14. HEADER Y BANNER PARA PÁGINAS WOOCOMMERCE
 * -------------------------------------------------------------------------- */
/* Asegurar que el header sea visible en páginas WooCommerce */
.woocommerce-page .site-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 0; /* Sin margen bottom porque ahora hay banner */
}

/* Ajustar el título del sitio en páginas WooCommerce */
.woocommerce-page .site-title {
    color: var(--color-primary);
    font-family: var(--font-body);
    font-weight: 700;
}

/* Banner para páginas WooCommerce */
.woocommerce-page-banner {
    background: var(--bg-dark-gradient);
    color: white;
    padding: 5rem 0 4rem 0; /* Altura reducida */
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px; /* Altura mínima reducida */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: 120px; /* Espacio para el header fijo */
}

.woocommerce-page-banner::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 600px;
    height: 500px;
    background: radial-gradient(circle at center, rgba(255,107,0,0.15) 0%, rgba(0,0,0,0) 65%);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}

.woocommerce-page-banner .banner-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 900px;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 200px;
}

.woocommerce-page-banner h1 {
    color: white;
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -1px;
}

.woocommerce-page-banner p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.4rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.5;
    font-weight: 400;
}

@media (max-width: 768px) {
    .woocommerce-page-banner {
        padding: 3rem 1rem;
        margin-top: 80px; /* Menos espacio en móvil porque el header tiene menos padding */
    }

    .woocommerce-page-banner h1 {
        font-size: 2rem;
    }

    .woocommerce-page-banner p {
        font-size: 1rem;
    }
}

/* --------------------------------------------------------------------------
 * 15. ESTILOS PARA CATÁLOGO DE COTIZACIÓN
 * -------------------------------------------------------------------------- */

/* Distintivo "Fabricación a medida" */
.fabricacion-medida-badge {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0.75rem 0;
    text-align: center;
    display: block;
}

/* Botón de cotización por WhatsApp */
.btn-quote-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #ff6b00;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

.btn-quote-whatsapp:hover {
    background: #e55a00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

.btn-quote-whatsapp span {
    font-weight: 700;
}

/* Estilos para vista individual de producto */
.single-product-badge {
    font-size: 1rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    margin: 1rem 0;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.single-product-quote-section {
    text-align: center;
    margin: 2rem 0;
}

.btn-quote-whatsapp-single {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: #25D366;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    min-width: 250px;
}

.btn-quote-whatsapp-single:hover {
    background: #128C7E;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-quote-whatsapp-single span {
    font-weight: 800;
}

/* Responsive para botones */
@media (max-width: 768px) {
    .btn-quote-whatsapp {
        max-width: 180px;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .btn-quote-whatsapp-single {
        min-width: 220px;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .single-product-badge {
        font-size: 0.9rem;
        margin: 0.75rem 0;
    }
}

/* --------------------------------------------------------------------------
 * 16. OCULTAR PRECIOS EN PRODUCTOS RELACIONADOS Y UPSELLS
 * -------------------------------------------------------------------------- */

/* OCULTAMIENTO AGRESIVO DE PRECIOS - TODAS LAS VARIACIONES POSIBLES */
.related.products .price,
.related.products .woocommerce-Price-amount,
.related.products .woocommerce-Price-currencySymbol,
.related.products ins .woocommerce-Price-amount,
.related.products del .woocommerce-Price-amount,
.cross-sells .price,
.upsells .price,
.woocommerce .related .price,
.woocommerce .upsells .price,
.product-related .price,
.related-products .price,
.single-product .related .price,
.single-product .upsells .price,
.single-product .cross-sells .price,
.tab-content .related .price,
.tab-content .upsells .price {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    font-size: 0 !important;
    line-height: 0 !important;
}

/* TODOS los elementos de precio en productos relacionados */
.related ul.products li.product .price,
.related ul.products li.product .woocommerce-Price-amount,
.related ul.products li.product .woocommerce-Price-currencySymbol,
.related ul.products li.product ins,
.related ul.products li.product del,
.upsells ul.products li.product .price,
.upsells ul.products li.product .woocommerce-Price-amount,
.upsells ul.products li.product .woocommerce-Price-currencySymbol,
.cross-sells ul.products li.product .price,
.cross-sells ul.products li.product .woocommerce-Price-amount,
.cross-sells ul.products li.product .woocommerce-Price-currencySymbol {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    font-size: 0 !important;
    line-height: 0 !important;
}

/* ESPECÍFICAMENTE PARA PÁGINAS SINGLE PRODUCT */
body.single-product .related ul.products li.product .price,
body.single-product .related ul.products li.product .woocommerce-Price-amount,
body.single-product .related ul.products li.product .woocommerce-Price-currencySymbol,
body.single-product .upsells ul.products li.product .price,
body.single-product .upsells ul.products li.product .woocommerce-Price-amount,
body.single-product .upsells ul.products li.product .woocommerce-Price-currencySymbol,
body.single-product .woocommerce-tabs .related .price,
body.single-product .woocommerce-tabs .upsells .price {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    font-size: 0 !important;
    line-height: 0 !important;
    clip: rect(0,0,0,0) !important;
}

/* JavaScript fallback para asegurar ocultamiento */
.related ul.products li.product .price,
.upsells ul.products li.product .price,
.cross-sells ul.products li.product .price {
    display: none !important;
}

/* Selector universal para cualquier precio en secciones relacionadas */
section.related .price,
section.upsells .price,
section.cross-sells .price,
div.related .price,
div.upsells .price,
div.cross-sells .price {
    display: none !important;
    visibility: hidden !important;
}
