/* --- General Product Listing Page Styles --- */
.product-listing-main {
    background-color: #0a0a0a; /* Or your chosen bg */
    color: #ddd;
    min-height: 80vh;
}
.container {
    max-width: 1300px; /* Slightly wider for listing pages */
    margin: 0 auto;
    padding: 0 20px;
}

/* Breadcrumbs (similar to product page) */
.product-listing-breadcrumbs {
    margin-bottom: 25px;
    padding-top: 15px;
}
.product-listing-breadcrumbs .breadcrumb {
    background-color: transparent; padding: 0; margin: 0;
}
.product-listing-breadcrumbs .breadcrumb-item a {
    color: #aaa; text-decoration: none; transition: color 0.3s ease;
}
.product-listing-breadcrumbs .breadcrumb-item a:hover { color: #D4AF37; }
.product-listing-breadcrumbs .breadcrumb-item.active { color: #fff; }
.product-listing-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
    color: #777; content: ">"; padding: 0 0.5rem;
}

/* Listing Header */
.listing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}
.listing-page-title {
    font-size: 2rem;
    color: #fff;
    font-weight: 500;
    margin: 0;
}
.listing-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}
/* Style for form-select-luxury (can reuse from product page or define here) */
.form-select-luxury {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 10px 15px;
    color: #fff;
    font-family: 'Vazirmatn', sans-serif;
    border-radius: 4px;
    min-width: 180px; /* Give it some base width */
}
.filter-toggle-mobile { /* For future mobile filter button */
    display: none; /* Hidden on desktop */
}

/* Product Listing Layout (with optional sidebar) */
.product-listing-layout {
    display: flex; /* Use flex if you plan a sidebar */
    gap: 30px;
}

/* Filter Sidebar (Optional) */
.filter-sidebar {
    flex: 0 0 250px; /* Fixed width for sidebar */
    background-color: #121212;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid rgba(212, 175, 55, 0.1);
    /* Styles for filter groups, inputs, etc. would go here */
}
.filter-sidebar h2 {
    font-size: 1.3rem; color: #fff; margin-bottom: 20px;
    padding-bottom: 10px; border-bottom: 1px solid #333;
}
/* ... more filter styles ... */


/* Product Grid Container (takes remaining space if sidebar present) */
.product-grid-container {
    flex-grow: 1;
}

.product-grid-listing {
    display: grid;
    /* grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); */
    grid-template-columns: repeat(4, 1fr); /* Default to 4 columns */
    gap: 25px;
}

/* Individual Product Card Item */
.product-card-item {
    background-color: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(212, 175, 55, 0.1);
    display: flex;
    flex-direction: column; /* Ensure details are below image */
}
.product-card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.3);
}
.product-card-link {
    text-decoration: none;
    color: inherit; /* Inherit color from parent for text */
    display: flex;
    flex-direction: column;
    height: 100%; /* Make link fill card */
}

.product-card-image-wrapper {
    position: relative;
    /* aspect-ratio: 1 / 1; /* Make image area square */
    /* Or fixed height for image area: */
    height: 280px; /* Adjust as needed */
    overflow: hidden;
    background-color: #000; /* Fallback if image is transparent or takes time to load */
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Or 'contain' if you prefer to see whole image */
    transition: transform 0.4s ease;
}
.product-card-item:hover .product-card-image {
    transform: scale(1.05);
}
.sale-badge-listing {
    position: absolute;
    top: 10px;
    right: 10px; /* For RTL */
    background-color: #D4AF37;
    color: #000;
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 3px;
    font-weight: bold;
    z-index: 1;
}

.product-card-details {
    padding: 20px;
    text-align: right; /* RTL */
    flex-grow: 1; /* Allow details to take up remaining space */
    display: flex;
    flex-direction: column;
}
.product-card-category {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.product-card-name {
    font-size: 1.1rem;
    color: #fff;
    font-weight: 500;
    margin-bottom: 10px;
    line-height: 1.3;
    /* Limit to 2 lines with ellipsis (optional) */
    /* display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden; */
}
.product-card-price {
    margin-top: auto; /* Push price to the bottom if details have varying height */
    font-size: 1rem;
}
.product-card-price .current-price {
    color: #D4AF37;
    font-weight: bold;
}
.product-card-price .original-price {
    color: #777;
    text-decoration: line-through;
    font-size: 0.9em;
    margin-right: 8px; /* For RTL */
}

/* Product Card Actions (Optional) */
.product-card-actions {
    padding: 0 15px 15px 15px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid #2a2a2a;
    margin-top: 15px;
    padding-top: 15px;
}
.btn-action {
    background: transparent;
    border: 1px solid #444;
    color: #aaa;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-action:hover {
    color: #D4AF37;
    border-color: #D4AF37;
}

/* No Products Found Message */
.no-products-found {
    text-align: center;
    padding: 50px 20px;
    color: #aaa;
}
.no-products-found p {
    font-size: 1.1rem;
    margin-bottom: 25px;
}

/* Pagination */
.pagination-container {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}
.luxury-pagination { /* Assuming Bootstrap pagination base */
    padding-right: 0; /* RTL reset */
}
.luxury-pagination .page-item .page-link {
    background-color: #1a1a1a;
    border: 1px solid #333;
    color: #D4AF37;
    margin: 0 3px;
    border-radius: 4px;
    transition: all 0.3s;
}
.luxury-pagination .page-item .page-link:hover {
    background-color: #222;
    border-color: #D4AF37;
}
.luxury-pagination .page-item.active .page-link {
    background-color: #D4AF37;
    border-color: #D4AF37;
    color: #000;
}
.luxury-pagination .page-item.disabled .page-link {
    background-color: #151515;
    color: #555;
    border-color: #2a2a2a;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .product-grid-listing {
        grid-template-columns: repeat(3, 1fr); /* 3 columns */
    }
}
@media (max-width: 992px) {
    .listing-header {
        flex-direction: column;
        align-items: flex-end; /* RTL */
        gap: 15px;
    }
    .listing-page-title { font-size: 1.8rem; }
    .product-listing-layout {
        flex-direction: column; /* Stack sidebar and grid if sidebar was used */
    }
    .filter-sidebar {
        flex: 0 0 auto; /* Allow sidebar to take natural height */
        width: 100%;
        margin-bottom: 20px;
        /* Logic to show/hide mobile filter sidebar would go here */
    }
    .product-grid-listing {
        grid-template-columns: repeat(2, 1fr); /* 2 columns */
        gap: 20px;
    }
    .product-card-image-wrapper { height: 240px; }
}
@media (max-width: 767px) {
    .listing-page-title { font-size: 1.6rem; }
    .product-card-image-wrapper { height: 200px; }
    .product-card-name { font-size: 1rem; }
    grid-template-columns: repeat(2, 1fr); /* 1 column on very small screens */
    gap: 15px;
}
@media (max-width: 576px) {
    .product-grid-listing {
        grid-template-columns: repeat(2, 1fr); /* 1 column on very small screens */
        gap: 15px;
    }
    .product-card-image-wrapper { height: 200px; /* Can be taller on single column */ }
}