/* PRODUCTS PAGE STYLES */

.products-page {
    padding-top: 70px;
    min-height: 100vh;
    background: #fafafa;
}

/* PAGE HEADER */
.products-header {
    background: white;
    padding: 60px 40px 40px;
    border-bottom: 1px solid #e5e5e5;
}

.products-header-content {
    max-width: 1400px;
    margin: 0 auto;
}

.products-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.products-header p {
    font-size: 14px;
    color: #666;
    letter-spacing: 1px;
}

/* FILTERS & SEARCH */
.products-controls {
    background: white;
    padding: 20px 40px;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 70px; /* default when navbar is visible */
    z-index: 900;
    transition: top 0.3s ease;
}

/* When navbar is hidden */
.products-controls.controls-top {
    top: 0;
}

.controls-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.search-bar {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid #ddd;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s;
}

.search-bar input:focus {
    outline: none;
    border-color: #1a1a1a;
}

.search-bar button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.filter-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-select {
    padding: 12px 16px;
    border: 1px solid #ddd;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    background: white;
    cursor: pointer;
    min-width: 150px;
    transition: border-color 0.3s;
}

.filter-select:focus {
    outline: none;
    border-color: #1a1a1a;
}

/* PRODUCTS GRID */
.products-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
}

.products-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.products-count {
    font-size: 13px;
    color: #666;
    letter-spacing: 1px;
}

.view-toggle {
    display: flex;
    gap: 10px;
}

.view-btn {
    background: white;
    border: 1px solid #ddd;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.view-btn.active {
    background: #1a1a1a;
    border-color: #1a1a1a;
}

.view-btn svg {
    width: 18px;
    height: 18px;
    stroke: #666;
}

.view-btn.active svg {
    stroke: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.product-image {
    position: relative;
    width: 100%;
    padding-top: 133%;
    background: #f5f5f5;
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff6b6b;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-name {
    font-size: 0.95em;
    color: #1a1a1a;
    font-weight: 500;
    margin: 8px 0;
}

.product-price {
    font-size: 1.2em;
    color: #1a1a1a;
    font-weight: 600;
}

.loading-state, .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    grid-column: 1 / -1;
}

/* PAGINATION */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination button {
    background: white;
    border: 1px solid #ddd;
    padding: 12px 18px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
    background: #1a1a1a;
    color: white;
}

.pagination button.active {
    background: #1a1a1a;
    color: white;
}

.pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* RESPONSIVE */
@media (max-width: 968px) {
    .products-header {
        padding: 40px 20px 30px;
    }

    .products-controls {
        padding: 15px 20px;
    }

    .controls-container {
        flex-direction: column;
    }

    .search-bar {
        width: 100%;
    }

    .filter-group {
        width: 100%;
        flex-wrap: wrap;
    }

    .products-container {
        padding: 30px 20px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }

    /* MOBILE – FORCE 2 COLUMNS */
@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .product-info {
        padding: 14px;
    }

    .product-name {
        font-size: 0.9em;
    }

    .product-price {
        font-size: 1.05em;
    }
}

}