#primary {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px; /* Add some padding on the sides for mobile */
}

/* Product Grid */
.products-grid {
    display: grid;
    gap: 20px;
    padding: 20px 0;
}

/* 💻 Desktop Layout (4 Columns) */
@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 📱 Tablet/Mobile Layout (2 Columns) */
@media (max-width: 767px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.product-item {
    /* Ensure no padding/margin inside the item causes issues */
    background-color: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); 
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center; /* Center the title */
}

.product-image-container {
    /* 🛠️ NEW CONTAINER FOR ASPECT RATIO */
    position: relative;
    padding-bottom: 66.66%; /* 3:2 Aspect Ratio */
    height: 0;
    overflow: hidden;
    margin: 0;
}

.product-image-container img {
    /* Position image within the forced aspect ratio container */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.product-item figure {
    /* Container for the image, forcing 3:2 ratio */
    position: relative;
    padding-bottom: 66.66%; /* 2 / 3 = 0.6666... */
    height: 0;
    overflow: hidden;
    margin: 0;
}

.product-item img {
    /* Position image within the forced aspect ratio container */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the space without distortion */
    display: block;
}

.product-title {
    /* 🛠️ TARGETING THE SEPARATE TITLE DIV */
    padding: 10px 15px;
    font-size: 1em;
    font-weight: 600;
    color: #333; 
    background-color: #f7f7f7;
    min-height: 40px; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.product-item a {
    text-decoration: none;
    display: block; /* Ensure the link wraps the whole content */
}

/* Sticky Filter Bar */
.sticky-filter-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    color: #fff;
    padding: 10px 20px;
    z-index: 1000;
	display:none;
}

.filter-controls {
      max-width: 500px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgb(51 51 51 / 63%);
    padding: 5px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
}

.filters-button {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 50px; /* Pill shape */
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
    font-weight: bold;
}


.filters-button:hover {
    background-color: #005177;
}

.filters-button .arrow-icon {
    margin-left: 10px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #fff;
    transition: transform 0.3s ease;
}

.filters-button.active .arrow-icon {
    transform: rotate(180deg);
}

.active-filters {
   gap: 8px;
}

.active-filter-tag {
    background-color: rgba(255, 255, 255, 0.1); /* Lighter, subtle tag background */
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 15px;
}

.active-filter-tag .remove-filter {
    margin-left: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.2s;
}
.active-filter-tag .remove-filter:hover {
    color: #f00;
}

.clear-filters-button {
    background-color: transparent; /* Make clear button subtle */
    color: #ffcccc; /* Light red text */
    border: 1px solid #ffcccc;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}
.clear-filters-button:hover {
    background-color: #b92c2c;
}

.filter-panel-header h2{
    color: #f1f1f1;
}

.filter-panel {
	display: none;
    background-color: rgba(34, 34, 34, 0.95); /* Darker background for readability */
    backdrop-filter: none; /* No blur inside the expanded panel */
    padding: 25px;
    margin-top: 10px;
    border-radius: 8px;
    max-width: 1200px;
    margin: 10px auto 0 auto;
}

.filter-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #555;
    padding-bottom: 10px;
}

.filter-panel-header {
    border-bottom: 1px solid #444;
}

.apply-filters-button {
    background-color: #28a745;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.apply-filters-button:hover {
    background-color: #1e7e34;
}

.filter-options {
    display: grid;
    gap: 15px;
    padding-bottom: 10px; /* Add space below options */
}

@media (min-width: 900px) {
    .filter-options {
        grid-template-columns: repeat(4, 1fr); /* 4 columns on large screens */
    }
}
@media (max-width: 899px) and (min-width: 500px) {
    .filter-options {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
    }
}
@media (max-width: 499px) {
    .filter-options {
        grid-template-columns: 1fr; /* 1 column on small mobiles */
    }
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-weight: 600;
    font-size: 0.95em;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.filter-group select {
    width: 100%;
    padding: 8px;
    border-radius: 6px; /* Slightly more rounded */
    border: 1px solid #444; /* Darker border */
    background-color: #2a2a2a; /* Slightly lighter background than panel */
    color: #fff;
    height: 120px; /* Give multiple options space */
    font-size: 1em;
    cursor: pointer;
    transition: border-color 0.2s;
    
    /* Remove default system styling */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none; 
}

.filter-group select::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}


.filter-group select::-webkit-scrollbar-track {
    background: #333; 
    border-radius: 10px;
}


.filter-group select::-webkit-scrollbar-thumb {
    background: #555; 
    border-radius: 10px;
}

.filter-group select::-webkit-scrollbar-thumb:hover {
    background: #777;
}

.filter-group select:focus {
    border-color: #0073aa; 
    outline: none;
	background:none;
}

.filter-group select option:checked {
    background-color: #0073aa;
    color: #fff;
}

/* Lightbox */
.product-lightbox {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

.product-lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    background-color: #fefefe;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    overflow-y: auto;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
	min-width:300px;
    height: auto;
    display: block;
    margin: 0 auto 15px auto;
}

.lightbox-content h3 {
    color: #333;
    margin-bottom: 0;
}

.close-lightbox {
    position: absolute;
    top: 10px;
    right: 25px;
    color: #aaa;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: #333;
}