/**
 * Products Stylesheet
 * Evolux Cards - Product grid en product cards styling
 * Aparte CSS voor product gerelateerde elementen
 */

/* ===== PRODUCTS GRID ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
}

/* Featured Products en New Products Section - Alles op één lijn op desktop met max 4 producten */
.products-section .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

@media (min-width: 1200px) {
    .products-section .products-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 24px;
        max-width: 100%;
    }
    
    /* Alle product secties - max 5 producten (20% elk) */
    .products-section .product-card {
        flex: 1 1 calc(20% - 19.2px);
        min-width: 0;
        max-width: calc(20% - 19.2px);
    }
    
    /* Verberg 6e product op desktop (alleen 5 zichtbaar) */
    .products-section .product-card:nth-child(6) {
        display: none;
    }
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
}

/* ===== PRODUCT CARD ===== */
.product-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    isolation: isolate;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

/* ===== PRODUCT LINK ===== */
.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
    flex: 1;
    position: relative;
    z-index: 1;
    cursor: pointer;
    width: 100%;
}

.product-link:hover {
    text-decoration: none;
}

.product-link:hover .product-name {
    color: var(--primary-color);
}

.product-link:active {
    opacity: 0.9;
}

/* ===== PRODUCT IMAGE ===== */
.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: var(--bg-light);
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 48px;
}

/* ===== PRODUCT BADGE ===== */
.product-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
}

.product-badge.sale {
    background: #ef4444;
    color: white;
}

.product-badge.new {
    background: #10b981;
    color: white;
    left: 16px;
    right: auto;
}

.product-badge.new + .product-badge.sale {
    right: 16px;
    left: auto;
}

/* ===== PRODUCT INFO ===== */
.product-info {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-category {
    display: none;
}

/* ===== PRODUCT PRICE ===== */
.product-price {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.price-old {
    font-size: 16px;
    color: var(--text-light);
    text-decoration: line-through;
}

.price-current {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

/* ===== PRODUCT STOCK STATUS ===== */
.product-stock-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #10b981;
}

.product-stock-status i {
    font-size: 14px;
    color: #10b981;
}

/* ===== ADD TO CART BUTTON ===== */
.btn-add-to-cart {
    width: calc(100% - 48px);
    margin: 16px 24px 24px 24px;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    pointer-events: auto;
    align-self: flex-end;
}

.btn-add-to-cart:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-add-to-cart:active {
    transform: translateY(0);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-gray);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 24px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 18px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .products-grid,
    .products-section .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }
    
    .product-card {
        border-radius: 16px;
    }
    
    .product-info {
        padding: 12px;
        display: flex;
        flex-direction: column;
    }
    
    .product-name {
        font-size: 15px;
        line-height: 1.3;
        margin-bottom: 6px;
    }
    
    .product-category {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .product-price {
        margin-bottom: 8px;
    }
    
    .product-stock-status {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .product-stock-status i {
        font-size: 12px;
    }
    
    .price-current {
        font-size: 18px;
    }
    
    .price-old {
        font-size: 14px;
    }
    
    .btn-add-to-cart {
        width: calc(100% - 24px);
        margin: 12px 12px 12px 12px;
        padding: 12px;
        font-size: 13px;
        align-self: stretch;
    }
    
    .btn-add-to-cart i {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-card {
        border-radius: 12px;
    }
    
    .product-info {
        padding: 10px;
        display: flex;
        flex-direction: column;
    }
    
    .product-name {
        font-size: 14px;
        line-height: 1.2;
        margin-bottom: 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-clamp: 2;
    }
    
    .product-category {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .product-price {
        margin-bottom: 6px;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .product-stock-status {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .product-stock-status i {
        font-size: 11px;
    }
    
    .price-current {
        font-size: 16px;
    }
    
    .price-old {
        font-size: 12px;
    }
    
    .btn-add-to-cart {
        padding: 10px;
        font-size: 12px;
        width: calc(100% - 20px);
        margin: 10px 10px 10px 10px;
        align-self: stretch;
    }
    
    .btn-add-to-cart i {
        font-size: 11px;
    }
    
    .product-badge {
        top: 8px;
        right: 8px;
        padding: 4px 8px;
        font-size: 10px;
    }
}

