/* =========================================
   products.css  –  Products listing page
   ========================================= */

.products-section {
    padding: 60px 0;
}

/* Shop bar: search + filter */
.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 15px;
    flex-wrap: wrap;
}

.search-bar {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 320px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.search-bar:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(212,163,115,0.15);
}

.category-filter {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.3s;
}

.category-filter:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

.product-card > a {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1; /* Perfect Square */
    overflow: hidden;
    background-color: #f8f9fa;
}

.product-img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
    display: block;
}

.product-card:hover .product-img {
    transform: scale(1.1);
}

.product-info {
    padding: 15px;
    text-align: center;
}

.product-title {
    font-size: 1.15rem;
    font-family: 'Playfair Display', serif;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.product-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .shop-header {
        flex-direction: column;
        align-items: stretch;
    }

    .search-bar {
        width: 100%;
    }

    .category-filter {
        width: 100%;
    }

    /* Product Grid – 2 Columns on Mobile */
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 0 5px;
    }

    .product-card > a {
        aspect-ratio: 1 / 1;
    }

    .product-info {
        padding: 10px !important;
    }

    .product-title {
        font-size: 0.95rem !important;
        height: 2.4em;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        margin-bottom: 5px !important;
    }

    .product-price {
        font-size: 1rem !important;
        margin-bottom: 8px !important;
    }

    .product-rating {
        font-size: 0.75rem !important;
        margin-bottom: 5px !important;
    }

    .product-info .btn {
        padding: 8px 5px !important;
        font-size: 0.75rem !important;
        flex: 1;
    }
}
