/* 
 * STYLOFITNESS - Correcciones de Contraste y Visibilidad
 * Soluciona problemas de legibilidad en header y productos
 */

/* =============================================
   CORRECCIONES HEADER - CONTRASTE MEJORADO
   ============================================= */

/* Header principal con mejor contraste */
.header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%) !important;
    border-bottom: 2px solid rgba(255, 107, 0, 0.3) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

/* Logo con mejor visibilidad */
.logo {
    color: #FFFFFF !important;
    text-shadow: 0 0 20px rgba(255, 107, 0, 0.8) !important;
    background: linear-gradient(135deg, #FF6B00 0%, #FFB366 50%, #FF6B00 100%) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)) !important;
}

/* Enlaces de navegación con mejor contraste */
.nav-link {
    color: #FFFFFF !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(5px) !important;
}

.nav-link:hover {
    background: rgba(255, 107, 0, 0.2) !important;
    border-color: rgba(255, 107, 0, 0.5) !important;
    color: #FFFFFF !important;
    text-shadow: 0 0 10px rgba(255, 107, 0, 0.8) !important;
    transform: translateY(-2px) !important;
}

.nav-link.active {
    background: rgba(255, 107, 0, 0.3) !important;
    border-color: #FF6B00 !important;
    color: #FFFFFF !important;
    text-shadow: 0 0 15px rgba(255, 107, 0, 1) !important;
}

/* Iconos del carrito y usuario con mejor visibilidad */
.cart-icon,
.wishlist-icon,
.user-trigger {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #FFFFFF !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(5px) !important;
}

.cart-icon:hover,
.wishlist-icon:hover,
.user-trigger:hover {
    background: rgba(255, 107, 0, 0.3) !important;
    border-color: #FF6B00 !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4) !important;
}

/* Buscador con mejor contraste */
.search-input {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(255, 107, 0, 0.3) !important;
    color: #2A2A2A !important;
    font-weight: 500 !important;
}

.search-input::placeholder {
    color: rgba(42, 42, 42, 0.6) !important;
    font-weight: 400 !important;
}

.search-btn {
    background: linear-gradient(135deg, #FF6B00 0%, #E55A00 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    box-shadow: 0 2px 10px rgba(255, 107, 0, 0.3) !important;
}

/* =============================================
   CORRECCIONES PRODUCTOS - VISIBILIDAD MEJORADA
   ============================================= */

/* Asegurar que todos los productos sean visibles */
.product-card-enhanced {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    background: #F0F0F0 !important;
    border: 2px solid rgba(255, 107, 0, 0.1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
    min-height: 400px !important;
    position: relative !important;
}

.product-card-enhanced:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 30px rgba(255, 107, 0, 0.2) !important;
    border-color: rgba(255, 107, 0, 0.3) !important;
}

/* Imágenes de productos siempre visibles */
.product-image-enhanced {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    background: #f8f9fa !important;
    border-radius: 8px !important;
}

/* Información de productos con mejor contraste */
.product-info-enhanced {
    padding: 1rem !important;
    background: #F0F0F0 !important;
    color: #2A2A2A !important;
}

.product-category-enhanced {
    color: #FF6B00 !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 0.5rem !important;
}

.product-title-enhanced {
    color: #2A2A2A !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0.5rem !important;
    min-height: 2.6rem !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.product-description-enhanced {
    color: #666666 !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
    margin-bottom: 1rem !important;
    min-height: 2.8rem !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Precios con mejor visibilidad */
.product-pricing-enhanced {
    margin-bottom: 1rem !important;
}

.current-price-enhanced {
    color: #FF6B00 !important;
    font-weight: 800 !important;
    font-size: 1.3rem !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.original-price-enhanced {
    color: #999999 !important;
    text-decoration: line-through !important;
    font-size: 1rem !important;
    margin-left: 0.5rem !important;
}

.savings-badge-enhanced {
    background: linear-gradient(135deg, #28A745 0%, #20C997 100%) !important;
    color: #FFFFFF !important;
    padding: 0.2rem 0.5rem !important;
    border-radius: 12px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    margin-left: 0.5rem !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

/* Botones con mejor contraste */
.btn-add-cart-enhanced {
    background: linear-gradient(135deg, #FF6B00 0%, #E55A00 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    width: 100% !important;
}

.btn-add-cart-enhanced:hover {
    background: linear-gradient(135deg, #E55A00 0%, #CC4F00 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4) !important;
    color: #FFFFFF !important;
}

/* Badges y etiquetas */
.discount-badge-enhanced {
    background: linear-gradient(135deg, #DC3545 0%, #C82333 100%) !important;
    color: #FFFFFF !important;
    padding: 0.3rem 0.6rem !important;
    border-radius: 15px !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 10 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3) !important;
}

.featured-badge-enhanced {
    background: linear-gradient(135deg, #6F42C1 0%, #5A2D91 100%) !important;
    color: #FFFFFF !important;
    padding: 0.3rem 0.6rem !important;
    border-radius: 15px !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    z-index: 10 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.3) !important;
}

/* Stock indicators */
.stock-indicator-enhanced {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
    padding: 0.2rem 0.5rem !important;
    border-radius: 10px !important;
    text-align: center !important;
}

.stock-high {
    background: rgba(40, 167, 69, 0.1) !important;
    color: #28A745 !important;
    border: 1px solid rgba(40, 167, 69, 0.3) !important;
}

.stock-low {
    background: rgba(255, 193, 7, 0.1) !important;
    color: #FFC107 !important;
    border: 1px solid rgba(255, 193, 7, 0.3) !important;
}

.stock-out {
    background: rgba(220, 53, 69, 0.1) !important;
    color: #DC3545 !important;
    border: 1px solid rgba(220, 53, 69, 0.3) !important;
}

/* Cuadros de características con fondo negro */
.product-features {
    background: rgba(0, 0, 0, 0.8) !important;
    padding: 1.5rem !important;
    border-radius: 15px !important;
    border: 2px solid rgba(255, 107, 0, 0.3) !important;
    backdrop-filter: blur(10px) !important;
}

.feature-item {
    background: linear-gradient(135deg, rgba(121, 85, 72, 0.7), rgba(141, 110, 99, 0.5)) !important;
    padding: 1rem !important;
    border-radius: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    text-align: center !important;
    color: #ffffff !important;
    margin-bottom: 0.5rem !important;
}

.feature-item i {
    color: #FF6B00 !important;
    text-shadow: 0 0 10px rgba(255, 107, 0, 0.5) !important;
    margin-bottom: 0.5rem !important;
    font-size: 1.5rem !important;
}

.feature-item span {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
}

/* =============================================
   CORRECCIONES RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    .header {
        padding: 0.3rem 0 !important;
    }
    
    .navbar {
        height: 45px !important;
    }
    
    .logo {
        font-size: 1.4rem !important;
    }
    
    .nav-link {
        padding: 0.5rem 0.8rem !important;
        font-size: 0.85rem !important;
    }
    
    .product-card-enhanced {
        min-height: 350px !important;
    }
    
    .product-image-enhanced {
        height: 180px !important;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.2rem 0 !important;
    }
    
    .navbar {
        height: 40px !important;
    }
    
    .logo {
        font-size: 1.2rem !important;
    }
    
    .product-card-enhanced {
        min-height: 320px !important;
    }
    
    .product-image-enhanced {
        height: 160px !important;
    }
}

/* =============================================
   FORZAR VISIBILIDAD DE PRODUCTOS
   ============================================= */

/* Asegurar que los productos 3, 4 y 5 sean visibles */
.product-grid-enhanced .product-card-enhanced:nth-child(3),
.product-grid-enhanced .product-card-enhanced:nth-child(4),
.product-grid-enhanced .product-card-enhanced:nth-child(5) {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Eliminar cualquier overlay que pueda estar ocultando productos */
.product-card-enhanced::before,
.product-card-enhanced::after {
    display: none !important;
}

/* Asegurar que el contenido del producto sea visible */
.product-card-enhanced * {
    opacity: 1 !important;
    visibility: visible !important;
}

/* =============================================
   CORRECCIONES PARA MEGA CARRUSEL
   ============================================= */

/* Mejorar contraste del texto sobre imágenes */
.product-info-mega {
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 15px !important;
    padding: 2rem !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
}

.product-category-mega {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
    background: rgba(255, 107, 0, 0.8) !important;
    padding: 0.3rem 0.8rem !important;
    border-radius: 20px !important;
    display: inline-block !important;
    font-weight: 700 !important;
}

.product-title-mega {
    color: #ffffff !important;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9) !important;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6)) !important;
    padding: 1rem !important;
    border-radius: 10px !important;
    border-left: 4px solid #FF6B00 !important;
}

.product-description-mega {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
    background: rgba(0, 0, 0, 0.6) !important;
    padding: 1rem !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.price-mega {
    background: rgba(0, 0, 0, 0.8) !important;
    padding: 1rem !important;
    border-radius: 10px !important;
    border: 2px solid #FF6B00 !important;
}

.original-price-mega,
.sale-price-mega,
.current-price-mega {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9) !important;
}

.savings-mega {
    color: #90EE90 !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9) !important;
    background: rgba(0, 0, 0, 0.7) !important;
    padding: 0.5rem !important;
    border-radius: 5px !important;
}

/* Contador regresivo con mejor contraste */
.countdown-timer {
    background: rgba(0, 0, 0, 0.8) !important;
    padding: 1.5rem !important;
    border-radius: 15px !important;
    border: 2px solid rgba(255, 107, 0, 0.5) !important;
}

.timer-label {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9) !important;
    font-weight: 700 !important;
}

.timer-unit {
    background: rgba(255, 107, 0, 0.9) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important;
}

.timer-value {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9) !important;
}

.timer-label-small {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
}

.timer-separator {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9) !important;
}

/* Debug: Fondo temporal para identificar productos */
.product-card-enhanced:nth-child(3) {
    border: 3px solid #28A745 !important;
}

.product-card-enhanced:nth-child(4) {
    border: 3px solid #17A2B8 !important;
}

.product-card-enhanced:nth-child(5) {
    border: 3px solid #6F42C1 !important;
}