/**
 * Product Catalog CSS - New Design
 * References frontend.css for existing styles
 */

/* @import url('frontend.css'); */

/* ==========================================================================
   Main Layout
   ========================================================================== */

.product-catalog-wrapper {
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.catalog-breadcrumbs {
    margin: 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.catalog-breadcrumbs nav {
    font-size: 14px;
    color: #666;
}

.catalog-breadcrumbs a {
    color: #333;
    text-decoration: none;
}

.catalog-breadcrumbs a:hover {
    color: #000;
    text-decoration: underline;
}

.catalog-breadcrumbs .breadcrumb-separator {
    margin: 0 8px;
    color: #999;
}

/* ==========================================================================
   Category Filter Buttons
   ========================================================================== */

.category-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    background: transparent;
    border-radius: 0;
    padding: 0;
    gap: 0;
    border: 1px solid #e0e0e0;
    border-top: none;
}

.category-filter-btn {
    padding: 12px 12px;
    background: #fff;
    border: none;
    border-radius: 0;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-right: 1px solid #e0e0e0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.category-filter-btn:last-child {
    border-right: none;
}

.category-filter-btn:hover {
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
}

.category-filter-btn.active {
    background: #7C7D7F;
    color: #fff;
    box-shadow: 0 4px 12px 0 rgba(162, 157, 151, 0.25);
    font-weight: 600;
}

/* ==========================================================================
   Filter Bar
   ========================================================================== */

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 12px 20px;
    background: #4F4F4F;
    color: #fff;
    border-radius: 0;
    position: relative;
}

.filter-bar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
}

.filter-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: none;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.14px;
    line-height: 22px;
    transition: opacity 0.3s ease;
}

.filter-toggle-btn:hover {
    opacity: 0.8;
}

.filter-toggle-btn i {
    font-size: 16px;
    margin-right: 8px;
}

/* Custom filter icon to match Figma - sliders style with circle background */
.filter-toggle-btn i::before {
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cline x1='4' y1='8' x2='20' y2='8'/%3E%3Ccircle cx='16' cy='8' r='2' fill='none'/%3E%3Cline x1='4' y1='16' x2='20' y2='16'/%3E%3Ccircle cx='12' cy='16' r='2' fill='none'/%3E%3C/svg%3E");
    width: 32px;
    height: 32px;
    display: inline-block;
    background-size: 20px;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #d3d3d3;
    border-radius: 50%;
    padding: 6px;
}

.product-count {
    font-size: 16px;
    color: #fff;
    font-weight: 500;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.active-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 16px;
    background: #fff;
    border-radius: 20px; /* Pill-shaped with rounded corners */
    font-size: 14px;
    color: #000;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.active-filter:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.active-filter-remove {
    background: none;
    border: none;
    color: #000;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    margin-left: 4px;
    opacity: 0.7;
    font-weight: bold;
    transition: opacity 0.2s ease;
}

.active-filter-remove:hover {
    opacity: 1;
}

.clear-filters-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
    opacity: 0.8;
}

.clear-filters-btn:hover {
    opacity: 1;
}

.filter-right {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.sort-label {
    font-size: 14px;
    color: #fff;
    font-weight: 700;
    margin-right: 8px;
    text-transform: uppercase;
    letter-spacing: 0.14px;
    line-height: 22px;
    display: inline-block;
}

.sort-dropdown {
    position: relative;
    display: inline-block;
}

.sort-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    background: transparent;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.sort-dropdown-arrow {
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px;
    transition: transform 0.3s ease;
}

.sort-dropdown.open .sort-dropdown-arrow {
    transform: rotate(180deg);
}

.sort-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #5a5958;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 150px;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.sort-dropdown.open .sort-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sort-dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 12px;
    color: #fff;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.sort-dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sort-dropdown-item.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* ==========================================================================
   Filter Panel - Slides Over Results
   ========================================================================== */

.filter-panel {
    background: #ff0000; /* Temporary red for debugging */
    color: #fff;
    border-radius: 0 0 8px 8px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10; /* Lower z-index to allow mega menu above */
    max-height: 500px; /* Make it visible by default for debugging */
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 1; /* Make it visible by default */
    visibility: visible; /* Make it visible by default */
    transform: translateY(0); /* No transform by default */
    min-height: 200px; /* Ensure it has height */
}

.filter-panel.active {
    max-height: 1000px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Filter container - positioning context for filter panel */
.filter-container {
    position: relative;
    margin-bottom: 30px;
}

/* Ensure the filter bar has relative positioning for absolute filter panel */
.filter-bar {
    position: relative;
}

/* Filter panel - positioned by JavaScript */
div.filter-panel {
    background: #4F4F4F;
    color: #fff;
    border-radius: 0 0 8px 8px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Create a positioning context for the filter panel */
.product-catalog-wrapper {
    position: relative !important;
}

/* Ensure the filter bar is the positioning context */
.filter-bar {
    position: relative !important;
    z-index: 20 !important;
}

.filter-panel-header {
    display: none; /* Hide header since we don't need it for slide-down */
}

.filter-panel-content {
    padding: 30px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr 1.5fr;
    gap: 30px;
}

/* ==========================================================================
   Filter Sections
   ========================================================================== */

.filter-section {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* Size Filter */
.size-toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.toggle-label-text {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 20px;
    text-align: center;
}

.size-toggle {
    position: relative;
    display: flex;
    background: #C6C0B7; /* Updated background color */
    border-radius: 20px; /* Pill-shaped */
    padding: 3px;
    width: 48px; /* Further decreased width */
    height: 24px; /* Decreased height */
    cursor: pointer;
}

.size-toggle input[type="radio"] {
    display: none;
}

/* Toggle knob */
.size-toggle::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    width: 20px;
    height: 20px;
    background: #5C5C5C; /* Dark gray knob */
    border-radius: 50%;
    transition: transform 0.3s ease;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Move knob to right when CM is selected */
.size-toggle.cm-selected::after {
    transform: translateX(24px); /* Adjusted for smaller width */
}

.filter-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.filter-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #fff;
    margin-top: 2px;
    flex-shrink: 0;
}

.filter-checkbox-label {
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
}

/* Color Family Filter */
.color-swatch-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.color-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.color-swatch:hover {
    border-color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
}

.color-swatch.selected {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.color-box {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.color-name {
    font-size: 12px;
    color: #fff;
    text-align: center;
    font-weight: 500;
    line-height: 1.2;
    width: 100%;
    display: block;
    margin-top: 8px;
}

/* Fast Track Filter */
.fast-track-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Disabled filter checkboxes */
.filter-checkbox:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.filter-checkbox:disabled + .filter-checkbox-label {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Pattern Filter */
.pattern-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

/* Dye Method Filter */
.method-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Collection Filter */
.collection-select {
    width: 100%;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: #fff;
    color: #000;
    font-size: 14px;
    line-height: 2;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px 40%;
    background-size: 14px;
    padding-right: 36px;
}

.collection-select option {
    background: #fff;
    color: #000;
    padding: 8px;
}

.collection-select option:disabled {
    background: #f5f5f5;
    color: #999;
    display: none; /* Hide disabled options in Safari */
}

/* Dye Method Filter */
.dye-method-select {
    width: 100%;
    min-width: 200px;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    background: #fff;
    color: #000;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 44px;
}

.dye-method-select option {
    background: #fff;
    color: #000;
    padding: 8px;
}

.dye-method-select option:disabled {
    background: #f5f5f5;
    color: #999;
    display: none; /* Hide disabled options in Safari */
}

/* ==========================================================================
   Product Results - Add spacing for overlay filter panel
   ========================================================================== */

.product-results-grid {
    margin-top: 20px; /* Add spacing so results don't get covered by filter panel */
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px 0;
}

.product-item {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: none !important; /* Override frontend.css max-width: 31% */
    width: 100% !important; /* Ensure full width within grid column */
    min-height: 500px; /* Ensure minimum height for proper image display */
}

.product-item > a:first-child {
    display: block;
    position: relative;
    width: 100%;
    height: 400px; /* Target height for high-res images */
    overflow: hidden;
    aspect-ratio: 1; /* Force square aspect ratio */
}

.product-item > a:first-child img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.product-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    margin: 0 0 8px 0;
    padding-left: 12px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.product-name a {
    color: #333;
    text-decoration: none;
}

.product-collection {
    margin: 4px 0px 0 12px;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 400;
    line-height: 1.2;
}

/* View More Button */
.view-more-container {
    grid-column: 1 / -1;
    text-align: center;
    padding: 10px 0;
}

.view-more-btn {
    background: #7C7D7F;
    color: #fff;
    border: none;
    width: 192px;
    padding: 16px 50px 16px 50px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.view-more-btn:hover {
    background: #6B6C6E;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* No Products State */
.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-products p {
    margin: 0 0 10px 0;
    font-size: 16px;
}

/* ==========================================================================
   Filter Panel Footer
   ========================================================================== */

.filter-panel-footer {
    padding: 20px 30px;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.filter-apply-btn {
    padding: 8px 45px;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-apply-btn:hover {
    background: #f0f0f0;
}

.filter-clear-btn {
    padding: 12px 24px;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-clear-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Product Results Grid
   ========================================================================== */

.product-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.product-item {
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    min-height: 500px; /* Ensure minimum height for proper image display */
}

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

.product-image-link {
    display: block;
    position: relative;
    overflow: hidden;
}

.product-item > a:first-child img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.product-item:hover > a:first-child img {
    transform: scale(1.05);
}

/* Ensure all images in product items are properly sized */
.product-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.product-info {
    padding: 20px;
}

.product-name {
    margin: 0 0 8px 0;
    padding-left: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.product-name a {
    color: inherit;
    text-decoration: none;
}

.product-name a:hover {
    color: #666;
}

.product-item__heading {
    margin-left: 10px;
}

.product-item__link:hover .product-item__heading {
    text-decoration: underline;
}

.product-collection {
    margin: 4px 0px 0 12px;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 400;
    line-height: 1.2;
}

.product-collection .collection-link {
    color: #666 !important;
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
}

.product-collection .collection-link:hover {
    color: #000 !important;
    text-decoration: underline;
}

.product-collection .collection-text {
    color: #666 !important;
    text-decoration: none;
    cursor: default;
}

/* Product Status Indicators */
.product-item.fast-track::before {
    content: "Fast Track";
    position: absolute;
    top: 10px;
    left: 10px;
    background: #666;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 1;
}

.product-item.dropped::before {
    top: 10px;
    left: 10px;
    background: #999;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 1;
}

.product-item.non-standard::before {
    top: 10px;
    left: 10px;
    background: #666;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 1;
}

/* ==========================================================================
   View More Button
   ========================================================================== */



/* ==========================================================================
   Loading States
   ========================================================================== */

.product-results-grid.loading {
    opacity: 1;
    pointer-events: none;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Skeleton Loading States
   ========================================================================== */

/* Skeleton items are now direct children of product-results-grid, so they inherit the grid layout */

.skeleton-item {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: none !important; /* Override frontend.css max-width: 31% */
    width: 100% !important; /* Ensure full width within grid column */
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    position: relative;
    overflow: hidden;
}

.skeleton-content {
    padding: 20px;
}

.skeleton-title {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    margin-bottom: 8px;
    border-radius: 2px;
}

.skeleton-title:nth-child(1) {
    width: 85%;
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title:nth-child(2) {
    width: 60%;
    height: 14px;
    margin-bottom: 4px;
}

.skeleton-title:nth-child(3) {
    width: 45%;
    height: 12px;
    margin-bottom: 0;
}

@keyframes skeleton-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Responsive skeleton layout */
@media (max-width: 768px) {
    .skeleton-loading {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .skeleton-image {
        height: 180px;
    }
}

/* ==========================================================================
   Empty States
   ========================================================================== */

.no-products,
.error-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

.error-message {
    color: #e74c3c;
}

.error-message-with-retry {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin: 20px auto;
    max-width: 400px;
    grid-column: 1 / -1; /* Span all grid columns */
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-text {
    color: #666;
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.retry-button {
    background: #7C7D7F;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.retry-button:hover {
    background: #6a6b6d;
}

.retry-button:active {
    transform: translateY(1px);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .product-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .category-filter-buttons {
        display: grid;
        gap: 8px;
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-panel-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .color-swatch-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .color-swatch {
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }

    .color-box {
        margin: 0 !important;
        display: block !important;
    }

    .color-name {
        text-align: left !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100%;
        display: block;
    }

    .pattern-checkbox-group {
        grid-template-columns: repeat(3, 1fr);
    }

    .method-checkbox-group {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .filter-checkbox-group {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .filter-panel {
        max-height: none !important;
    }

    .filter-panel.active {
        max-height: none !important;
    }

    .filter-panel-footer {
        justify-content: center !important;
    }
}

@media (max-width: 992px) {
    .product-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .category-filter-buttons {
        display: grid;
        gap: 8px;
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-panel-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .color-swatch-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .color-swatch {
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }

    .color-box {
        margin: 0 !important;
        display: block !important;
    }

    .color-name {
        text-align: left !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100%;
        display: block;
    }

    .pattern-checkbox-group {
        grid-template-columns: repeat(3, 1fr);
    }

    .method-checkbox-group {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .filter-checkbox-group {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .filter-panel {
        max-height: none !important;
    }

    .filter-panel.active {
        max-height: none !important;
    }
}

@media (max-width: 768px) {
    .product-catalog-wrapper {
        padding: 0 15px;
    }

    .category-filter-buttons {
        display: grid;
        gap: 8px;
        grid-template-columns: repeat(2, 1fr);
    }

    .category-filter-btn {
        padding: 10px 16px;
        font-size: 12px;
    }

    .filter-bar {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .filter-left {
        flex-direction: row;
        gap: 15px;
        align-items: center;
        flex-wrap: wrap;
    }

    .active-filters {
        justify-content: center;
    }

    .filter-panel {
        width: 100%;
        max-width: 100%;
        max-height: none !important;
    }

    .filter-panel.active {
        max-height: none !important;
    }

    .product-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .color-swatch-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .color-swatch {
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }

    .color-box {
        margin: 0 !important;
        display: block !important;
    }

    .color-name {
        text-align: left !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100%;
        display: block;
    }

    .pattern-checkbox-group {
        grid-template-columns: repeat(3, 1fr);
    }

    .method-checkbox-group {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .filter-checkbox-group {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .filter-panel-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .filter-panel-footer {
        justify-content: center !important;
    }

    .filter-section:first-child .filter-section-title {
        display: none; /* Hide the original title */
    }

    .size-toggle-container::before {
        content: 'Size';
        font-size: 12px;
        font-weight: 600;
        color: #fff;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-right: 15px;
        align-self: center;
    }

    .size-toggle-container {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        margin-bottom: 15px;
    }
}

@media (max-width: 520px) {
    .product-results-grid {
        grid-template-columns: 1fr;
    }

    .category-filter-buttons {
        justify-content: center;
    }

    .filter-panel-content {
        padding: 15px;
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .filter-panel-footer {
        padding: 15px;
        justify-content: center !important;
    }
}

/* ==========================================================================
   Body States
   ========================================================================== */

body.filter-panel-open {
    overflow: hidden;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}
