/* ===== CSS RESET & BASE STYLES ===== */
.products-page .card {
    overflow: visible !important;
}

.container,
.row,
.col-md-5,
.col-md-7 {
    position: static;
    z-index: auto;
    overflow: visible !important;
}

.text-grey {
    color: #495057 !important;
}

/* ===== HERO SECTION ===== */
.products-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.8)), 
                url('/images/Banner_Home_Fitaflex_ESP.png') center center/cover no-repeat;
    padding: 40px 0 20px;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.section-title h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 30px;
    border-bottom: 2px solid #f39c12;
    padding-bottom: 10px;
}

/* ===== CARDS & LAYOUT ===== */
.products-page .catalog-card,
.products-page .main-category-card,
.products-page .subcategory-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: visible;
    z-index: 1;
}

.products-page .main-category-card {
    border-radius: 15px;
}

.products-page .subcategory-card {
    border-radius: 10px;
}

.products-page .catalog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #CC0000, #f39c12);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.products-page .catalog-card:hover::before {
    transform: scaleX(1);
}

.products-page .catalog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.products-page .main-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.products-page .subcategory-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    z-index: 10;
}

.card-body {
    padding: 1.5rem;
    position: relative;
    overflow: visible;
}

/* ===== FILTER CARD ===== */
.filter-card {
    position: relative;
    z-index: 100;
    border: none;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

.filter-card .card-body {
    padding: 2rem;
}

.filter-group {
    border-bottom: 1px solid #f8f9fa;
    padding-bottom: 12px;
}

.filter-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.filter-group-content {
    transition: all 0.3s ease;
}

/* ===== CHIPS SYSTEM ===== */
.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-start;
    position: relative;
}

.chips-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

/* Base Chip Styles */
.category-chip, 
.quick-filter-chip,
.filter-chip,
.subcategory-chip,
.simple-category-chip {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    font-weight: 500;
    white-space: nowrap;
}

/* Inactive State for All Chips */
.category-chip:not(.active),
.quick-filter-chip:not(.active),
.filter-chip:not(.active),
.subcategory-chip:not(.active),
.simple-category-chip:not(.active) {
    background: #f8f9fa !important;
    color: #495057 !important;
    border-color: #e9ecef !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Active State for All Chips */
.category-chip.active,
.quick-filter-chip.active,
.filter-chip.active,
.subcategory-chip.active,
.simple-category-chip.active {
    background: #CC0000 !important;
    border-color: #CC0000 !important;
    color: white !important;
}

/* Specific Chip Types */
.category-chip, 
.quick-filter-chip {
    padding: 6px 12px;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    font-size: 0.875rem;
}

.filter-chip {
    padding: 10px 18px;
    border: 1.5px solid #dee2e6;
    border-radius: 20px;
    font-size: 0.9rem;
}

.simple-category-chip {
    padding: 12px 24px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.subcategory-chip {
    padding: 6px 12px;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    font-size: 0.8rem;
    flex-shrink: 0;
    position: relative;
    z-index: 10000;
    pointer-events: auto;
}

/* Hover States */
.category-chip:hover, 
.quick-filter-chip:hover,
.filter-chip:hover,
.simple-category-chip:hover:not(.active) {
    border-color: #CC0000;
    transform: translateY(-1px);
}

.category-chip:hover, 
.quick-filter-chip:hover {
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.15);
}

.filter-chip:hover {
    background: #e9ecef;
}

.simple-category-chip:hover:not(.active) {
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15);
    transform: translateY(-2px);
}

.subcategory-chip:hover {
    background: #e9ecef;
    border-color: #CC0000;
}

/* Chip Elements */
.chip-text {
    margin-right: 4px;
}

.subcategory-chip .chip-text {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chip-count {
    background: rgba(0,0,0,0.1);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.category-chip.active .chip-count {
    background: rgba(255,255,255,0.3);
}

/* ===== MAIN CATEGORY CHIPS ===== */
.main-category-chip {
    position: relative;
    display: inline-block;
    z-index: 1001;
}

.main-category-chip .chip-main {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.875rem;
    color: #495057;
    position: relative;
    z-index: 1002;
}

.main-category-chip:not(.expanded) .chip-main {
    background: white !important;
    color: #495057 !important;
    border-color: #dee2e6 !important;
}

.main-category-chip:hover .chip-main {
    border-color: #CC0000;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.15);
}

.main-category-chip.expanded .chip-main {
    border-color: #CC0000;
    background: #fff5f5;
}

.main-category-chip.expanded {
    z-index: 1002;
}

.chip-arrow {
    margin-left: 4px;
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.main-category-chip.expanded .chip-arrow {
    transform: rotate(180deg);
}

/* ===== SUBCATEGORY DROPDOWNS ===== */
.subcategory-chips {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    min-width: 220px;
    max-width: 300px;
    z-index: 9999;
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    pointer-events: auto;
}

.subcategory-chips.auto-width {
    min-width: auto;
    width: max-content;
    max-width: 400px;
}

.main-category-chip.expanded .subcategory-chips {
    display: flex;
}

/* ===== MORE/LESS CHIPS ===== */
.more-chip {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1.5px dashed #6c757d;
    color: #6c757d;
    font-weight: 600;
    z-index: 10000;
    pointer-events: auto;
}

.more-chip:not(.active) {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
    border: 1.5px dashed #6c757d !important;
    color: #6c757d !important;
}

.more-chip:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    border-color: #CC0000;
    color: #CC0000;
}

/* Additional Filters Animation */
.additional-filters {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
}

.additional-filters.show {
    opacity: 1;
    max-height: 500px;
}

/* ===== ACTIVE FILTERS ===== */
#active-filters {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    position: relative;
    z-index: 5;
}

#active-filters.d-none {
    display: none !important;
}

.active-filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background: #CC0000;
    color: white;
    border-radius: 14px;
    font-size: 0.8rem;
    font-weight: 500;
}

.active-filter-chip .remove-filter {
    margin-left: 4px;
    cursor: pointer;
    opacity: 0.8;
}

.active-filter-chip .remove-filter:hover {
    opacity: 1;
}

/* ===== SEARCH & FILTERS ===== */
.search-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e9ecef;
    height: fit-content;
}

.search-container {
    position: relative;
    margin-bottom: 1.5rem;
    z-index: 2;
}

.search-container .input-group {
    width: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.search-container .form-control {
    border-left: none;
    padding-left: 0;
}

.search-container .input-group-text {
    border-right: none;
    background-color: white;
}

.search-input {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    width: 100%;
}

.search-input:focus {
    border-color: #e9ecef;
    box-shadow: none;
    outline: none;
}

.search-hint {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 8px;
    line-height: 1.4;
}

#clear-search {
    visibility: hidden;
    transition: all 0.3s ease;
}

/* ===== PRODUCT ITEMS & CONTAINERS ===== */
#products-container {
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.product-item {
    transition: all 0.4s ease;
}

.product-item.hidden {
    opacity: 0;
    transform: scale(0.9);
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Contenedor completo: que parezca una sola caja */
.input-group {
    border: 1px solid #ced4da;   /* borde gris */
    border-radius: 0.75rem;      /* bordes redondeados */
    overflow: hidden;            /* aplica bien el redondeo */
}

/* Input de búsqueda */
#product-search {
    border: none !important;         /* sin bordes internos */
    box-shadow: none !important;     /* sin sombra */
    padding-left: 2.2rem;            /* corre el placeholder hacia la derecha */
}

#product-search:focus {
    border: none !important;         /* mantiene sin borde rojo */
    outline: none !important;        /* sin contorno azul */
    box-shadow: none !important;     /* sin sombra */
}

/* Ícono dentro del input-group */
.input-group-text {
    background: transparent !important;  /* mismo fondo que input */
    border: none !important;             /* sin borde extra */
    margin-right: -0.5rem;               /* ajusta separación si queda línea */
}

/* Botón de limpiar (X) */
#clear-search {
    border: none !important;         /* sin borde extra */
    box-shadow: none !important;
    background: transparent !important; /* uniforme con input */
}

/* ===== RESULTS & MESSAGES ===== */
#results-counter {
    border-left: 4px solid #CC0000;
}

#no-results .alert {
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

/* ===== SECTION TITLES ===== */
.section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #495057;
    margin-bottom: 1rem;
    display: block;
}
/*
.card-title {
    color: #495057;
}
*/
/* ===== ICONS & ANIMATIONS ===== */
.category-icon, 
.subcategory-icon {
    transition: transform 0.3s ease;
}

.main-category-card:hover .category-icon,
.subcategory-card:hover .subcategory-icon {
    transform: scale(1.1);
}

.feature-item {
    padding: 2rem 1rem;
}

/* ===== COLOR THEME INTEGRATION ===== */
.category-chip[data-filter="all"].active,
.quick-filter-chip[data-filter="interior"].active,
.quick-filter-chip[data-filter="exterior"].active,
.quick-filter-chip[data-filter="waterproof"].active {
    background: #CC0000;
    border-color: #CC0000;
}

.main-category-chip[data-category="pintura"] .chip-main:hover,
.main-category-chip[data-category="pintura"].expanded .chip-main {
    border-color: #CC0000;
    background: #fff5f5;
}

.main-category-chip[data-category="impermeabilizante"] .chip-main:hover,
.main-category-chip[data-category="impermeabilizante"].expanded .chip-main {
    border-color: #CC0000;
    background: #f0f8ff;
}

.main-category-chip[data-category="industrial"] .chip-main:hover,
.main-category-chip[data-category="industrial"].expanded .chip-main {
    border-color: #ffc107;
    background: #fffbf0;
}

.main-category-chip[data-category="decorative"] .chip-main:hover,
.main-category-chip[data-category="decorative"].expanded .chip-main {
    border-color: #17a2b8;
    background: #f0fdff;
}

.main-category-chip[data-category="primers"] .chip-main:hover,
.main-category-chip[data-category="primers"].expanded .chip-main {
    border-color: #28a745;
    background: #f0fff4;
}

/* ===== MODAL STYLING ===== */
#subcategoriesModal .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

#subcategoriesModal .modal-header {
    background: linear-gradient(135deg, #CC0000 0%, #c82333 100%);
    color: white;
    border-bottom: none;
    padding: 1.5rem 2rem;
    position: relative;
}

#subcategoriesModal .modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
}

#subcategoriesModal .modal-title {
    font-weight: 700;
    font-size: 1.4rem;
    text-align: center;
    width: 100%;
    margin: 0;
}

#subcategoriesModal .modal-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0.9;
    transition: all 0.3s ease;
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

#subcategoriesModal .modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

#subcategoriesModal .modal-body {
    padding: 2rem;
    background: #f8f9fa;
}

#subcategoriesModal .modal-footer {
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 1.5rem 2rem;
    gap: 12px;
}

/* Modal Grid Layout */
.modal-subcategories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin: 0;
}

/* Modal Subcategory Items */
.modal-subcategory-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modal-subcategory-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: #CC0000;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.modal-subcategory-item:hover {
    border-color: #CC0000;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.15);
}

.modal-subcategory-item:hover::before {
    transform: scaleY(1);
}

.modal-subcategory-item.active {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%);
    border-color: #CC0000;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.2);
}

.modal-subcategory-item.active::before {
    transform: scaleY(1);
    background: #CC0000;
}

.modal-subcategory-item.active::after {
    content: '✓';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: #CC0000;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Modal Icons */
.modal-subcategory-icon {
    font-size: 1.5rem;
    margin-right: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.modal-subcategory-item:hover .modal-subcategory-icon {
    background: #CC0000;
    color: white;
    transform: scale(1.1);
}

.modal-subcategory-item.active .modal-subcategory-icon {
    background: #CC0000;
    color: white;
}

/* Modal Text */
.modal-subcategory-text {
    font-weight: 600;
    color: #495057;
    font-size: 1rem;
    transition: color 0.3s ease;
    flex: 1;
}

.modal-subcategory-item:hover .modal-subcategory-text {
    color: #CC0000;
}

.modal-subcategory-item.active .modal-subcategory-text {
    color: #CC0000;
    font-weight: 700;
}

/* Modal Buttons */
#subcategoriesModal .btn-secondary {
    background: #6c757d;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#subcategoriesModal .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

#subcategoriesModal .btn-primary {
    background: linear-gradient(135deg, #CC0000 0%, #c82333 100%);
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#subcategoriesModal .btn-primary:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

#subcategoriesModal .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
}

/* Modal Animation */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Loading state for modal */
.modal-subcategories-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.modal-subcategories-grid.loading::after {
    content: 'Cargando subcategorías...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #6c757d;
    font-style: italic;
}

/* ===== UTILITY CLASSES ===== */
.sticky-element {
    position: sticky;
    top: 0;
    z-index: 100;
}

.modal-backdrop {
    z-index: 1040;
}

.modal {
    z-index: 1050;
}

.dropdown-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    z-index: 1040;
    display: none;
}

.main-category-chip.expanded ~ .dropdown-backdrop {
    display: block;
}

.mobile-dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    display: none;
}

.main-category-chip.expanded ~ .mobile-dropdown-overlay {
    display: block;
}

.products-page .chips-section {
    position: relative;
    z-index: 100;
}

.collapsing {
    transition: height 0.3s ease;
}

.cursor-pointer {
    cursor: pointer;
    transition: color 0.2s;
}

.cursor-pointer:hover {
    color: #495057 !important;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* ===== BORRAR TODO BUTTONS ===== */
#clear-all-filters,
#clear-filters,
#reset-search {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
    transition: all 0.3s ease;
}

#clear-all-filters:hover,
#clear-filters:hover,
#reset-search:hover {
    background: #5a6268;
    border-color: #545b62;
    transform: translateY(-1px);
}

/* ===== SMOOTH ANIMATIONS ===== */
.filter-chip, 
.simple-category-chip {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== PRODUCT GRID STYLES ===== */
#products-container .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

#products-container .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 10px;
    margin-bottom: 30px;
}

#products-container .item {
    display: block;
    text-decoration: none;
    color: inherit;
    text-align: center;
    transition: all 0.3s ease;
    padding: 25px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    height: 100%;
    background: white;
    position: relative;
    overflow: hidden;
}

#products-container .item:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-color: #CC0000;
}

#products-container .item img {
    max-height: 120px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

#products-container .item h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.3;
    min-height: 2.6em;
    display: flex;
    align-items: center;
    justify-content: center;
}

#products-container .item .description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    display: block;
    min-height: 2.7em;
}

/* ===== PRODUCT GRID STYLES ===== */
#products-container .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

#products-container .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 15px;
    margin-bottom: 30px;
}

#products-container .col-sm-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

#products-container .product-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

#products-container .product-card:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-color: #CC0000;
}

#products-container .product-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
    text-align: center;
}

#products-container .product-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
    display: block;
    text-align: center;
}

/* Waterproofing Product Specific Styles */
#products-container .product-card[data-categ-name*="impermeabilizante"] .product-title {
    color: #CC0000;
}

#products-container .product-card[data-categ-name*="impermeabilizante"]:hover {
    border-color: #CC0000;
}

/* Paint Product Specific Styles */
#products-container .product-card[data-categ-name*="pintura"] .product-title {
    color: #CC0000;
}

#products-container .product-card[data-categ-name*="pintura"]:hover {
    border-color: #CC0000;
}

/* Loading State */
#products-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ===== FIX PRODUCT IMAGE SIZE CONFLICTS ===== */
/* Override conflicting styles from productos.php */
.modern-products-grid .product-image-container,
#products-container .modern-product-card .product-image-container {
    height: 260px !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    padding: 10px !important;
    border-bottom: 1px solid #f1f1f1 !important;
}

.modern-products-grid .product-image,
#products-container .modern-product-card .product-image {
    width: auto !important;
    height: auto !important;
    max-width: 90% !important;
    max-height: 90% !important;
    object-fit: contain !important;
}

/* Override the old small image styles */
#products-container .product-image-container:not(.modern-product-card .product-image-container) {
    height: 260px !important;
}

#products-container .product-image-container img:not(.modern-product-card .product-image) {
    max-width: 90% !important;
    max-height: 90% !important;
}

/* Ensure our modern product cards take precedence */
.modern-product-card .product-image-container {
    height: 260px !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    padding: 10px !important;
}

.modern-product-card .product-image {
    width: auto !important;
    height: auto !important;
    max-width: 90% !important;
    max-height: 90% !important;
    object-fit: contain !important;
}

/* Improved Product Grid */
.products-grid-container {
    position: relative;
    z-index: 1;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 25px;
}

.products-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.products-count {
    font-size: 0.9rem;
    color: #7f8c8d;
    background: #f8f9fa;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}

/* Modern Product Cards */
.product-card-wrapper {
    height: 100%;
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.product-link:hover {
    text-decoration: none;
    color: inherit;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #f1f1f1;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: #CC0000;
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #f1f1f1;
}

.product-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.3;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    font-size: 0.9rem;
    color: #7f8c8d;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* Enhanced animations */
.fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Improved no results state */
.no-products-found .alert {
    border-radius: 12px;
    border: 2px dashed #dee2e6;
    background: #f8f9fa;
}

/* ===== ALL MEDIA QUERIES AT THE BOTTOM ===== */

@media (min-width: 769px) {
    .subcategory-chips {
        z-index: 9999;
    }
    
    .main-category-chip .subcategory-chips {
        left: 0;
        right: auto;
    }
    
    .main-category-chip:last-child .subcategory-chips,
    .main-category-chip:nth-last-child(2) .subcategory-chips {
        left: auto;
        right: 0;
    }
    
    .main-category-chip .subcategory-chips.adjust-right {
        left: auto;
        right: 0;
    }
}

@media (max-width: 1200px) {
    .modern-product-card .product-image-container,
    #products-container .modern-product-card .product-image-container {
        height: 240px !important;
    }
}

@media (max-width: 991.98px) {
    .products-hero {
        padding: 40px 0 20px;
        margin-top: 20px;
    }
    
    .products-hero h1 {
        font-size: 2.5rem;
    }
    
    .products-hero.compact-hero {
        padding: 3rem 0 !important;
    }

    .products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .products-count {
        align-self: flex-start;
    }

    #products-container .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    #products-container .item {
        padding: 20px 15px;
    }
    
    #products-container .item img {
        max-height: 100px;
        margin-bottom: 15px;
    }
    
    #products-container .item h4 {
        font-size: 1rem;
        min-height: 2.4em;
    }
    
    #products-container .item .description {
        font-size: 0.85rem;
        min-height: 2.55em;
    }

    #products-container .product-card {
        padding: 15px;
    }
    
    #products-container .product-image-container {
        height: 100px;
        margin-bottom: 12px;
    }
    
    #products-container .product-title {
        font-size: 1rem;
    }
    
    #products-container .product-description {
        font-size: 0.85rem;
    }

    .modern-product-card .product-image-container,
    #products-container .modern-product-card .product-image-container {
        height: 220px !important;
    }
}

@media (max-width: 768px) {
    .products-hero {
        margin-top: 40px;
        padding: 80px 0 40px;
    }
    
    .products-hero h1 {
        font-size: 2rem;
    }
    
    .products-hero.compact-hero {
        padding: 2rem 0 !important;
    }
    
    .chips-container {
        gap: 4px;
    }
    
    .category-chip, .quick-filter-chip {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
    
    .main-category-chip {
        z-index: 1001;
    }

    .main-category-chip .chip-main {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .subcategory-chips {
        position: fixed;
        left: 5vw;
        right: 5vw;
        top: 20vh;
        transform: none;
        width: auto;
        max-width: none;
        max-height: 60vh;
        overflow-y: auto;
        z-index: 9999;
        margin: 0;
        padding: 16px;
        box-sizing: border-box;
    }
    
    .subcategory-chip {
        padding: 8px 14px;
        font-size: 0.85rem;
        margin: 2px;
    }
    
    .subcategory-chips.scrollable {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .subcategory-chips.scrollable .subcategory-chip {
        width: calc(100% - 4px);
        justify-content: flex-start;
    }
    
    .col-md-5, .col-md-7 {
        width: 100%;
    }
    
    .search-container {
        margin-top: 1.5rem;
    }
    
    .mobile-dropdown-overlay {
        z-index: 9998;
    }

    /* Modal Responsive */
    #subcategoriesModal .modal-dialog {
        margin: 20px;
        max-width: calc(100% - 40px);
    }
    
    #subcategoriesModal .modal-header {
        padding: 1.25rem 1.5rem;
    }
    
    #subcategoriesModal .modal-body {
        padding: 1.5rem;
    }
    
    #subcategoriesModal .modal-footer {
        padding: 1.25rem 1.5rem;
        flex-direction: column;
    }
    
    #subcategoriesModal .modal-footer .btn {
        width: 100%;
        margin: 0;
    }
    
    .modal-subcategories-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .modal-subcategory-item {
        padding: 14px 16px;
    }
    
    .modal-subcategory-icon {
        font-size: 1.25rem;
        width: 36px;
        height: 36px;
        margin-right: 12px;
    }
    
    .modal-subcategory-text {
        font-size: 0.9rem;
    }
    
    /* Mobile specific adjustments */
    .simple-categories {
        gap: 10px;
    }
    
    .simple-category-chip {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .chips-grid {
        gap: 8px;
    }
    
    .filter-chip {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .search-section {
        margin-top: 20px;
    }
    
    .col-md-5 {
        border-top: 1px solid #e9ecef;
        padding-top: 1.5rem;
        margin-top: 1rem;
    }

    .modern-product-card .product-image-container,
    #products-container .modern-product-card .product-image-container {
        height: 200px !important;
    }
}

@media (max-width: 576px) {
    #products-container .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    #products-container .item {
        padding: 15px;
    }
    
    #products-container .item img {
        max-height: 90px;
        margin-bottom: 12px;
    }
    
    #products-container .item h4 {
        font-size: 0.95rem;
        min-height: auto;
    }
    
    #products-container .item .description {
        font-size: 0.8rem;
        min-height: auto;
    }

    #products-container .col-md-4,
    #products-container .col-sm-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    #products-container .product-card {
        padding: 15px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    #products-container .product-image-container {
        height: 90px;
        /*width: 120px;*/
        margin-bottom: 10px;
    }
    
    #products-container .product-title {
        font-size: 0.95rem;
        text-align: center;
    }
    
    #products-container .product-description {
        font-size: 0.8rem;
        text-align: center;
    }

    .modern-product-card .product-image-container,
    #products-container .modern-product-card .product-image-container {
        height: 180px !important;
    }
}

@media (prefers-color-scheme: dark) {
    #subcategoriesModal .modal-body {
        background: #1a1d20;
    }
    
    .modal-subcategory-item {
        background: #2d3035;
        border-color: #3d4046;
    }
    
    .modal-subcategory-text {
        color: #e9ecef;
    }
    
    .modal-subcategory-icon {
        background: #3d4046;
        color: #adb5bd;
    }
}

/* Category-specific hover effects */
.modern-product-card[data-product-type="paint"]:hover {
    border-color: #CC0000;
}

.modern-product-card[data-product-type="waterproofing"]:hover {
    border-color: #CC0000;
}

.modern-product-card[data-product-type="industrial"]:hover {
    border-color: #ffc107;
}

.modern-product-card[data-product-type="decorative"]:hover {
    border-color: #17a2b8;
}

.modern-product-card[data-product-type="primer"]:hover {
    border-color: #28a745;
}

/* Rest of your existing styles remain the same */
.modern-products-grid {
    position: relative;
    z-index: 1;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 30px;
}

.products-main-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.products-count-badge {
    background: #f8f9fa;
    color: #6c757d;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #e9ecef;
}

.modern-product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f1f3f4;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.modern-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.product-image-container {
    position: relative;
    height: 260px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    overflow: hidden;
    border-bottom: 1px solid #f1f1f1;
}

.product-image {
    width: auto !important;
    height: auto !important;
    max-width: 90% !important;
    max-height: 90% !important;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.modern-product-card:hover .product-image {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.modern-product-card:hover .product-overlay {
    opacity: 1;
}

.btn-quick-view {
    background: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: translateY(10px);
}

.modern-product-card:hover .btn-quick-view {
    transform: translateY(0);
}

.btn-quick-view:hover {
    background: #CC0000;
    color: white;
    transform: translateY(-2px);
}

.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-badge {
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
    margin-bottom: 12px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-subtitle {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.product-features {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #6c757d;
    border: 1px solid #e9ecef;
}

.feature-item i {
    color: #CC0000;
    font-size: 0.8rem;
}

.product-actions {
    margin-top: auto;
}

.btn-product-primary {
    background: #CC0000;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    text-align: center;
    width: 100%;
    transition: all 0.3s ease;
    display: block;
}

.btn-product-primary:hover {
    color: white;
    text-decoration: none;
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(220, 53, 69, 0.3);
}

/* Responsive styles */
@media (max-width: 1200px) {
    .product-image-container {
        height: 240px;
    }
}

@media (max-width: 992px) {
    .product-image-container {
        height: 220px;
    }
}

@media (max-width: 768px) {
    .product-image-container {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .product-image-container {
        height: 180px;
    }
}
/* ===== FEATURE CARDS STYLING ===== */
.feature-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    background: white;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #CC0000, #f39c12);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
}

.feature-icon {
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-card:hover .feature-icon i {
    background: linear-gradient(135deg, #CC0000, #f39c12);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-card .card-title {
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.feature-card:hover .card-title {
    color: #CC0000 !important;
}

.feature-card .card-text {
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
    word-spacing: normal;
    letter-spacing: normal;
}

/* Responsive adjustments for feature cards */
@media (max-width: 768px) {
    .feature-card {
        margin-bottom: 1.5rem;
    }
    
    .feature-icon i {
        font-size: 2.5rem !important;
    }
    
    .feature-card .card-body {
        padding: 1.5rem !important;
    }
}


/* Quick Surfaces Styles */
.surfaces-container {
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
}

.surfaces-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.surface-chip {
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
    font-size: 0.875rem;
}

.surface-chip:hover {
    background-color: #e9ecef;
    border-color: #6c757d;
}

.surface-chip.active {
    background-color: #CC0000;
    color: white;
    border-color: #CC0000;
}


.hidden-surface {
    display: none;
}

.surfaces-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    padding: 6px 12px;
    background-color: #f1f1f1;
    border-radius: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.2s ease;
}

.filter-chip:hover {
    background-color: #e0e0e0;
}

.more-chip-surface {
    background-color: #e9ecef;
    border: 1px dashed #adb5bd;
}

.surface-chip.active {
    background-color: #CC0000;
    color: white;
}

.more-chip-surface.expanded {
    background-color: #dee2e6;
}


/* ===== MOBILE WIDTH OPTIMIZATION ===== */
@media (max-width: 768px) {
    /* Make container fluid on mobile */
    .products-page .container {
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }
    
    /* Remove any horizontal margins/padding that restrict width */
    .products-page .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    /* Ensure rows use full width */
    .products-page .row {
        margin-left: -10px !important;
        margin-right: -10px !important;
        width: calc(100% + 20px) !important;
    }
    
    /* Make columns full width with proper padding */
    .products-page .col-12,
    .products-page .col-md-7,
    .products-page .col-md-5 {
        padding-left: 10px !important;
        padding-right: 10px !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Adjust filter card for full width */
    .products-page .filter-card {
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 12px !important;
    }
    
    .products-page .filter-card .card-body {
        padding: 1.5rem 1rem !important;
    }
    
    /* Optimize chips container for mobile */
    .products-page .chips-container {
        gap: 4px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .products-page .chips-grid {
        gap: 6px !important;
        justify-content: flex-start !important;
    }
    
    /* Make search input full width */
    .products-page .search-container .input-group {
        width: 100% !important;
    }
    
    .products-page #product-search {
        width: 100% !important;
        flex: 1 !important;
    }
    
    /* Adjust hero section for mobile */
    .products-page .products-hero {
        margin-left: -15px !important;
        margin-right: -15px !important;
        width: calc(100% + 30px) !important;
        border-radius: 0 !important;
    }
    
    .products-page .products-hero .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* Ensure no horizontal scrolling */
    body {
        overflow-x: hidden !important;
        width: 100% !important;
    }
    
    .products-page {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
}

@media (max-width: 576px) {
    /* Extra small devices optimization */
    .products-page .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    .products-page .row {
        margin-left: -5px !important;
        margin-right: -5px !important;
        width: calc(100% + 10px) !important;
    }
    
    .products-page .col-12 {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
    
    /* Adjust filter card padding */
    .products-page .filter-card .card-body {
        padding: 1rem 0.75rem !important;
    }
    
    /* Make chips more compact */
    .products-page .filter-chip {
        padding: 6px 10px !important;
        font-size: 0.8rem !important;
    }
    
    /* Optimize search section */
    .products-page .search-container {
        margin-bottom: 1rem !important;
    }
    
    .products-page .surfaces-container {
        margin-top: 1rem !important;
        padding-top: 1rem !important;
    }
}

/* ===== FIX SPECIFIC ELEMENTS THAT CAUSE OVERFLOW ===== */
@media (max-width: 768px) {
    /* Fix any elements that might cause horizontal scroll */
    .products-page * {
        max-width: 100% !important;
    }
    
    /* Ensure images don't overflow */
    .products-page img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Fix dropdowns and modals */
    .products-page .subcategory-chips {
        left: 5px !important;
        right: 5px !important;
        width: calc(100vw - 10px) !important;
        max-width: calc(100vw - 10px) !important;
    }
    
    /* Adjust modal for mobile */
    .products-page #subcategoriesModal .modal-dialog {
        margin: 10px !important;
        max-width: calc(100vw - 20px) !important;
    }
    
    .products-page #subcategoriesModal .modal-content {
        width: 100% !important;
    }
}

/* ===== ENSURE PROPER TOUCH TARGETS WHILE MAINTAINING WIDTH ===== */
@media (max-width: 768px) {
    .products-page .filter-chip,
    .products-page .category-chip,
    .products-page .subcategory-chip {
        min-height: 44px !important; /* Minimum touch target size */
        display: inline-flex !important;
        align-items: center !important;
        padding: 8px 12px !important;
    }
    
    /* Maintain readability while using full width */
    .products-page .card-title {
        font-size: 1.1rem !important;
        word-wrap: break-word !important;
    }
    
    .products-page .chip-text {
        font-size: 0.85rem !important;
        word-wrap: break-word !important;
        white-space: normal !important;
    }
}

/* ===== SPECIFIC FIXES FOR YOUR LAYOUT ===== */
@media (max-width: 768px) {
    /* Fix the main content area */
    .products-page .py-5 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Ensure the search and filter sections stack properly */
    .products-page .col-md-5,
    .products-page .col-md-7 {
        margin-bottom: 1rem !important;
    }
    
    /* Remove any borders that might constrain width */
    .products-page .border,
    .products-page .border-start,
    .products-page .border-end {
        border: none !important;
    }
    
    /* Adjust the active filters section */
    .products-page #active-filters {
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 8px !important;
    }
    
    /* Fix results counter */
    .products-page #results-counter {
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 8px !important;
    }
}

/* ===== UTILITY CLASSES FOR MOBILE WIDTH ===== */
.products-page .mobile-full-width {
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
}

@media (max-width: 768px) {
    .products-page .hero-full-width {
        width: 100vw !important;
        position: relative !important;
        left: 50% !important;
        right: 50% !important;
        margin-left: -50vw !important;
        margin-right: -50vw !important;
    }
}

@media (max-width: 768px){
    modern-products-grid .product-image, #products-container .modern-product-card .product-image
    {
        width: auto !important;
        height: auto !important;
        max-width: 150% !important;
        max-height: 150% !important;
        object-fit: contain !important;
    }
}

/*NEW*/
/* Mobile filter chips */
.filter-chip-mobile {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 2rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-chip-mobile.active {
    background-color: #CC0000;
    border-color: #CC0000;
    color: white;
}

.filter-chip-mobile .chip-count {
    margin-left: 0.3rem;
    font-size: 0.7rem;
    background-color: rgba(0,0,0,0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 1rem;
}

.filter-chip-mobile.active .chip-count {
    background-color: rgba(255,255,255,0.2);
}

#mobileFilterPanel {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
