:root {
    --primary-font: 'Vazirmatn', sans-serif;
    --secondary-font: 'Playfair Display', serif;
    --primary-color: #333;
    --secondary-color: #f4f4f4;
    --accent-color: #C5BBAE;
}

/* ================== PAGE LAYOUT & TOOLBAR ================== */
.page-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.breadcrumbs {
    padding: 1rem 0;
    color: #888;
}
.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
}

.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.sort-select {
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 0.5rem;
    font-family: var(--primary-font);
    background-color: #fff;
}

.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
}

/* ================== FILTER SIDEBAR ================== */
.filter-sidebar {
    background-color: #fdfdfd;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    height: fit-content; /* Make sidebar only as tall as its content */
    position: sticky;
    top: 120px;
}

.filter-group {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}
.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.filter-group h3 {
    font-family: var(--secondary-font);
    margin-bottom: 1rem;
}
.category-list {
    list-style: none;
    padding: 0;
}
.category-list li a {
    text-decoration: none;
    color: var(--primary-color);
    padding: 0.5rem 0;
    display: block;
    transition: color 0.3s;
}
.category-list li a:hover {
    color: var(--accent-color);
}
.category-list li a.active {
    font-weight: 700;
    color: var(--accent-color);
}
.price-filter-form input {
    width: 100%;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border-radius: 5px;
    border: 1px solid #ccc;
}
.price-filter-form button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}


/* ================== PRODUCT GRID ================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}
.grid-item {
    position: relative;
    height: auto;
}
.no-products-found {
    grid-column: 1 / -1; /* Span all columns */
    text-align: center;
    padding: 3rem;
}

/* Reusing the card component from the homepage for perfect consistency */
.product-card-content {
    display: flex; flex-direction: column; height: 100%;
    background-color: #fff; border-radius: 8px;
    border: 1px solid #eee; overflow: hidden; transition: box-shadow 0.3s;
}
.grid-item:hover .product-card-content { box-shadow: 0 4px 15px rgba(0,0,0,0.07); }
.product-card-link { position: absolute; top: 0; right: 0; width: 100%; height: 100%; z-index: 1; }
.product-card-image { width: 100%; aspect-ratio: 4 / 5; overflow: hidden; }
.product-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.grid-item:hover .product-card-image img { transform: scale(1.05); }
.product-card-details { padding: 1rem; text-align: right; flex-grow: 1; }
.product-card-details h3 { font-size: 1.1rem; margin: 0 0 0.5rem 0; color: var(--primary-color); }
.product-card-details .price { font-weight: 700; color: var(--accent-color); }
.product-card-actions { padding: 0 1rem 1rem 1rem; position: relative; z-index: 2; }
.btn-add-to-cart {
    width: 100%; background-color: var(--primary-color); color: #fff; border: none;
    padding: 0.75rem; border-radius: 5px; font-family: var(--primary-font);
    font-weight: 700; font-size: 8px; cursor: pointer; transition: background-color 0.3s;
    
}
.btn-add-to-cart:hover { background-color: #000; }

/* ================== PAGINATION ================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    gap: 0.5rem;
}
.pagination a, .pagination .current {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0.5rem;
    border: 1px solid #eee;
    text-decoration: none;
    color: var(--primary-color);
    border-radius: 5px;
}
.pagination a:hover {
    background-color: #f5f5f5;
    border-color: #ddd;
}
.pagination .current {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* ================== RESPONSIVE ================== */
@media (max-width: 992px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }
    .filter-sidebar {
        display: none;
    }
}
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}