/**
 * Products Grid CSS
 * Luxe 2050 design met zwart-gouden thema
 * Adalya Point E-cigarette Webshop
 */

/* ========== SECTION ========== */
.products-grid-section {
    width: 100%;
    padding: 5rem 0 6rem 0;
    background: #0a0a0a;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(218, 165, 32, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(218, 165, 32, 0.06) 0%, transparent 40%);
    background-size: 100% 100%;
    background-position: 0 0, 100% 100%;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

.products-grid-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(218, 165, 32, 0.12) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(218, 165, 32, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(218, 165, 32, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
    animation: goldenGlow 8s ease-in-out infinite alternate;
}

@keyframes goldenGlow {
    0% {
        opacity: 0.6;
        transform: scale(1);
    }
    100% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.products-grid-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
    position: relative;
    z-index: 2;
}

/* ========== GRID HEADER ========== */
.products-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
}

.products-grid-header::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #DAA520 0%, #FFD700 100%);
    border-radius: 2px;
}

/* ========== GRID TITLE ========== */
.products-grid-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 50%, #DAA520 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    text-align: left;
    letter-spacing: 0.1em;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-transform: uppercase;
    position: relative;
}

/* ========== VIEW ALL LINK ========== */
.products-grid-view-all {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #d4d4d4;
    text-decoration: none;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(218, 165, 32, 0.3);
    border-radius: 8px;
    background: rgba(218, 165, 32, 0.05);
}

.products-grid-view-all:hover {
    color: #FFD700;
    border-color: rgba(218, 165, 32, 0.5);
    background: rgba(218, 165, 32, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(218, 165, 32, 0.2);
}

.products-grid-view-all::after {
    content: '→';
    font-size: 1.125rem;
    transition: transform 0.3s ease;
}

.products-grid-view-all:hover::after {
    transform: translateX(4px);
}

/* Desktop: meer ruimte voor bredere kaarten - wordt overschreven door grid layout */

/* ========== GRID LAYOUT ========== */
.products-grid {
    display: grid;
    gap: 2rem;
    width: 100%;
}

/* Mobile: 2 products per row, max 4 products (2 rows) - verberg 5e product */
@media (max-width: 767px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
    }
    
    .products-grid-container {
        padding: 0 1rem;
    }
    
    /* Verberg het 5e product op mobiel */
    .product-card:nth-child(5) {
        display: none;
    }
}

/* Tablet: 3 products per row, 6 products total (2 rows) */
@media (min-width: 768px) and (max-width: 1023px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* Desktop: 5 products per row */
@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1.5rem;
    }
    
    .products-grid-container {
        max-width: 1600px;
        padding: 0 2rem;
    }
}

/* Large Desktop: 5 products per row met meer ruimte */
@media (min-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 2rem;
    }
    
    .products-grid-container {
        max-width: 1800px;
        padding: 0 3rem;
    }
}

/* ========== PRODUCT CARD ========== */
.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(218, 165, 32, 0.15);
    height: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(218, 165, 32, 0.5) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 3;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: rgba(218, 165, 32, 0.4);
    box-shadow: 0 12px 40px rgba(218, 165, 32, 0.2), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.product-card:hover::before {
    opacity: 1;
}

/* ========== PRODUCT LINK ========== */
.product-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    flex: 1;
    min-height: 0;
}

/* ========== PRODUCT IMAGE ========== */
.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 aspect ratio */
    background: #0f0f0f;
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(218, 165, 32, 0.3);
    font-size: 2.5rem;
    background: #0f0f0f;
}

/* ========== PRODUCT BADGE ========== */
.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: auto;
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%);
    color: #0a0a0a;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    letter-spacing: 0.05em;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(218, 165, 32, 0.4);
    text-transform: uppercase;
}

/* ========== PRODUCT INFO ========== */
.product-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.75rem;
    background: #1a1a1a;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: #e8e8e8;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.8em;
    letter-spacing: 0.01em;
}

.product-flavor {
    font-size: 0.75rem;
    color: #DAA520;
    margin: 0;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.875rem;
    background: linear-gradient(135deg, rgba(218, 165, 32, 0.15) 0%, rgba(255, 215, 0, 0.12) 100%);
    border-radius: 10px;
    width: fit-content;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1.5px solid rgba(218, 165, 32, 0.3);
    box-shadow: 0 2px 8px rgba(218, 165, 32, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.product-flavor-text {
    display: inline-block;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.product-card:hover .product-flavor {
    background: linear-gradient(135deg, rgba(218, 165, 32, 0.2) 0%, rgba(255, 215, 0, 0.18) 100%);
    border-color: rgba(218, 165, 32, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(218, 165, 32, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    color: #FFD700;
}

/* ========== PRODUCT PRICE ========== */
.product-price-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.75rem;
}

.product-compare-price {
    font-size: 0.875rem;
    color: #666666;
    text-decoration: line-through;
    font-weight: 400;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

/* ========== ADD TO CART BUTTON ========== */
.product-add-cart-btn {
    margin: 0 1.25rem 1.25rem 1.25rem;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%);
    color: #0a0a0a;
    border: none;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(218, 165, 32, 0.3);
}

.product-add-cart-btn:hover {
    background: linear-gradient(135deg, #FFD700 0%, #DAA520 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(218, 165, 32, 0.5);
}

.product-add-cart-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(218, 165, 32, 0.3);
}

.product-add-cart-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.product-add-cart-btn .btn-icon {
    display: none;
}

.product-add-cart-btn:hover .btn-text {
    display: none;
}

.product-add-cart-btn:hover .btn-icon {
    display: inline-block;
}

/* ========== RESPONSIVE ADJUSTMENTS ========== */

/* Mobile adjustments */
@media (max-width: 767px) {
    .products-grid-section {
        padding: 3rem 0 4rem 0;
    }
    
    .products-grid-container {
        padding: 0 1.5rem;
    }
    
    .products-grid-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .products-grid-header::after {
        width: 60px;
        height: 2px;
        bottom: -0.75rem;
    }
    
    .products-grid-title {
        font-size: 2rem;
        letter-spacing: 0.05em;
        flex: 1;
    }
    
    .products-grid-view-all {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
        flex-shrink: 0;
    }
    
    .product-info {
        padding: 1rem;
        gap: 0.625rem;
    }
    
    .product-title {
        font-size: 0.875rem;
        min-height: 2.6em;
    }
    
    .product-flavor {
        font-size: 0.6875rem;
        padding: 0.375rem 0.625rem;
    }
    
    .product-price {
        font-size: 1.125rem;
    }
    
    .product-compare-price {
        font-size: 0.8125rem;
    }
    
    .product-add-cart-btn {
        margin: 0 1rem 1rem 1rem;
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }
    
    .product-badge {
        top: 0.75rem;
        left: 0.75rem;
        right: auto;
        font-size: 0.6875rem;
        padding: 0.375rem 0.625rem;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .products-grid-section {
        padding: 4rem 0 5rem 0;
    }
    
    .products-grid-container {
        padding: 0 2rem;
    }
    
    .product-info {
        padding: 1.125rem;
    }
}

/* ========== LOADING STATE ========== */
.product-add-cart-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.product-add-cart-btn.loading .btn-text::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* ========== ACCESSIBILITY ========== */
.product-card:focus-within {
    outline: 2px solid rgba(218, 165, 32, 0.6);
    outline-offset: 2px;
}

.product-add-cart-btn:focus {
    outline: 2px solid rgba(218, 165, 32, 0.6);
    outline-offset: 2px;
}

/* ========== NO PRODUCTS STATE ========== */
.products-grid-section:empty::before {
    content: 'No products available at the moment.';
    display: block;
    text-align: center;
    padding: 4rem 1rem;
    color: rgba(218, 165, 32, 0.6);
    font-size: 1rem;
}

/* ========== DECORATIVE ELEMENTS ========== */
.products-grid-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 40%, rgba(0, 0, 0, 0.6) 70%, rgba(0, 0, 0, 0.9) 100%);
    z-index: 2;
    pointer-events: none;
}

/* ========== PRODUCT GRID IMAGES ========== */
.products-grid-images {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #0a0a0a;
    position: relative;
}

.product-grid-image-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.product-grid-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    margin: 0;
    padding: 0;
}

/* Responsive adjustments for product grid images */
@media (max-width: 767px) {
    .products-grid-images {
        gap: 0;
    }
    
    .product-grid-image {
        width: 100%;
        max-width: 100%;
    }
}

@media (min-width: 768px) {
    .product-grid-image {
        width: 100%;
        max-width: 100%;
    }
}
