/*
 * File: product-overview.css
 * Styling for the product overview grid section.
 * Depends on color variables defined in header.css
 */

.product-overview-section {
    padding: 80px 0;
    background-color: var(--color-white);
}

/* --- Section Header Styling --- */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem); /* Responsive font size */
    font-weight: 700;
    color: var(--color-dark);
    margin: 0 0 10px 0;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-medium-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* --- Product Grid Layout --- */
.product-grid {
    display: grid;
    /* 4 columns on large desktops */
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* --- Product Card Styling --- */
.product-card {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.product-image-container {
    position: relative;
    overflow: hidden;
}

.product-image {
    display: block;
    width: 100%;
    /* Use aspect-ratio for consistent image heights */
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05); /* Zoom effect on hover */
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    z-index: 5;
}

.product-info {
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allows button to stick to the bottom */
}

.product-category {
    font-size: 13px;
    color: var(--color-medium-gray);
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-dark);
    margin: 0 0 10px 0;
    flex-grow: 1; /* Pushes price/button down */
}

.product-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-name a:hover {
    color: var(--color-primary);
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 20px 0;
}

.product-card-btn {
    /* width: 100%; */
    padding-top: 12px;
    padding-bottom: 12px;
}

/* --- Responsive Grid Adjustments --- */
@media (max-width: 991px) {
    .product-grid {
        /* 3 columns on tablets */
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .product-grid {
        /* 2 columns on small tablets */
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .product-overview-section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .product-grid {
        /* 1 column on mobile */
        grid-template-columns: 1fr;
    }
}