/* ============================================ */
/* ARCA ENERGIES - productos.css                */
/* Estilos específicos para página de productos */
/* ============================================ */

/* Product Filters */
.product-filters {
    position: sticky;
    top: 72px;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.filter-btn {
    transition: all 0.3s ease;
    user-select: none;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--sombra-sm);
}

.filter-btn.active {
    background: var(--azul);
    color: var(--blanco);
    border-color: var(--azul);
}

.filter-btn[data-filter="invertek"].active {
    background: linear-gradient(135deg, var(--azul), #1a6fd4);
}

.filter-btn[data-filter="schrack"].active {
    background: linear-gradient(135deg, var(--azul), #2980b9);
}

.filter-btn[data-filter="murr"].active {
    background: linear-gradient(135deg, var(--azul), var(--verde));
}

/* Product Category Sections */
.product-category {
    scroll-margin-top: 120px;
}

.category-title {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--verde), transparent);
}

.category-title img {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Product Cards Enhanced */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--azul), var(--verde));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-card > div:first-child {
    position: relative;
    overflow: hidden;
}

.product-card > div:first-child::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover > div:first-child::after {
    opacity: 1;
}

.product-card img {
    transition: transform 0.4s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

/* Product Tags */
.product-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-tag::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.product-tag.verde::before {
    background: var(--verde);
}

/* Product Specifications List */
.product-card ul {
    font-size: 0.85rem;
    line-height: 1.6;
}

.product-card ul li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 6px;
}

.product-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--verde);
    font-weight: 700;
    font-size: 0.8rem;
}

/* Product Card Button */
.product-card .btn {
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.product-card .btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.product-card .btn:active::after {
    width: 300px;
    height: 300px;
}

/* Category Divider */
.product-category:not(:last-child) {
    margin-bottom: 64px;
    padding-bottom: 48px;
    border-bottom: 2px solid var(--gris-claro);
}

/* Quick View Badge (Optional feature) */
.product-quick-view {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: var(--blanco);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: var(--sombra-sm);
    cursor: pointer;
    z-index: 10;
}

.product-card:hover .product-quick-view {
    opacity: 1;
    transform: translateY(0);
}

.product-quick-view:hover {
    background: var(--azul);
    color: var(--blanco);
}

/* Stock Indicator (Optional) */
.product-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 8px;
}

.product-stock.in-stock::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--verde);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.product-stock.low-stock::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--amarillo);
    border-radius: 50%;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* Responsive adjustments for products page */
@media (max-width: 1024px) {
    .product-filters {
        top: 64px;
        padding: 10px 0;
    }
    
    .filter-btn {
        padding: 6px 16px;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .product-filters {
        position: relative;
        top: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .product-filters::-webkit-scrollbar {
        display: none;
    }
    
    .product-filters > div {
        display: flex;
        gap: 8px;
        padding: 0 12px;
        min-width: max-content;
    }
    
    .filter-btn {
        white-space: nowrap;
        padding: 8px 20px;
    }
    
    .product-category {
        scroll-margin-top: 140px;
    }
    
    .category-title img {
        height: 28px !important;
    }
}

@media (max-width: 480px) {
    .product-card ul {
        font-size: 0.8rem;
    }
    
    .product-card ul li {
        padding-left: 14px;
        margin-bottom: 4px;
    }
    
    .product-tag {
        font-size: 0.65rem;
        padding: 3px 10px;
    }
    
    .category-title {
        font-size: 1.2rem !important;
    }
}

/* Grid animations */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: clamp(16px, 3vw, 24px);
}

.products-grid .product-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.products-grid .product-card:nth-child(1) { animation-delay: 0.1s; }
.products-grid .product-card:nth-child(2) { animation-delay: 0.2s; }
.products-grid .product-card:nth-child(3) { animation-delay: 0.3s; }
.products-grid .product-card:nth-child(4) { animation-delay: 0.4s; }
.products-grid .product-card:nth-child(5) { animation-delay: 0.5s; }
.products-grid .product-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Filter transition */
.product-card.filtered-out {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

/* Print styles */
@media print {
    .product-filters,
    .product-quick-view,
    .btn {
        display: none !important;
    }
    
    .product-card {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #ddd;
    }
}