/* ============================================================
   GameStop Medellín - Product Catalog Styles
   ============================================================ */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-gray) 100%);
    padding: var(--space-10) 0 var(--space-8);
    color: var(--primary-white);
    text-align: center;
}

.page-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: var(--weight-bold);
    margin-bottom: var(--space-3);
    color: var(--primary-white);
}

.page-subtitle {
    font-size: var(--text-base);
    color: var(--light-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Products Section */
.products-section {
    padding: var(--space-10) 0;
    background: var(--bg-secondary);
}

.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-8);
    align-items: start;
}

/* Filters Sidebar */
.filters-sidebar {
    background: var(--primary-white);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--light-gray);
}

.filters-header h2 {
    font-size: var(--text-h4);
    font-weight: var(--weight-semibold);
    color: var(--primary-dark);
    margin: 0;
}

/* Hide any counter badges in filters header */
.filters-header .badge,
.filters-header .counter,
.filters-header .count {
    display: none !important;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary-red);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    cursor: pointer;
    padding: 0;
    transition: color 0.3s ease;
}

.btn-text:hover {
    color: #C91530;
    text-decoration: underline;
}

/* Filter Groups */
.filter-group {
    margin-bottom: var(--space-6);
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-title {
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    color: var(--primary-dark);
    margin-bottom: var(--space-3);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--secondary-gray);
    transition: color 0.3s ease;
}

.filter-checkbox:hover {
    color: var(--primary-dark);
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-red);
}

/* Price Range */
.price-range {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.price-inputs {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.price-inputs input {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    transition: border-color 0.3s ease;
}

.price-inputs input:focus {
    outline: none;
    border-color: var(--primary-red);
}

.price-inputs span {
    color: var(--medium-gray);
    text-align: center;
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
}

/* Products Content */
.products-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

/* Toolbar */
.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--primary-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.mobile-filters-toggle {
    display: none;
    align-items: center;
    gap: var(--space-2);
}

.results-count {
    font-size: var(--text-sm);
    color: var(--secondary-gray);
    margin: 0;
}

.results-count strong {
    color: var(--primary-dark);
}

.sort-label {
    font-size: var(--text-sm);
    color: var(--secondary-gray);
}

.sort-select {
    padding: var(--space-2) var(--space-4);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--primary-dark);
    background: var(--primary-white);
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-red);
}

/* Active Filters */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    padding: var(--space-4);
    background: var(--primary-white);
    border-radius: var(--radius-lg);
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--light-gray);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    color: var(--primary-dark);
}

.filter-tag button {
    background: none;
    border: none;
    color: var(--primary-red);
    cursor: pointer;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    transition: opacity 0.3s ease;
}

.filter-tag button:hover {
    opacity: 0.7;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-6);
}

/* Product Card */
.product-card {
    background: var(--primary-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.product-card__badge {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    padding: var(--space-1) var(--space-3);
    background: var(--primary-red);
    color: var(--primary-white);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-full);
    z-index: 1;
}

.product-card__badge--sale {
    background: var(--primary-red);
}

.product-card__badge--new {
    background: var(--accent-green);
}

.product-card__badge--featured {
    background: var(--accent-purple);
}

.product-card__badge--out-stock {
    background: var(--medium-gray);
}

.product-card__image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--light-gray);
    overflow: hidden;
}

.product-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-card__image {
    transform: scale(1.05);
}

.product-card__content {
    padding: var(--space-4);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card__platform {
    display: inline-block;
    padding: var(--space-1) var(--space-2);
    background: var(--accent-blue);
    color: var(--primary-white);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-2);
    align-self: flex-start;
}

.product-card__title {
    font-size: var(--text-h5);
    font-weight: var(--weight-semibold);
    color: var(--primary-dark);
    margin-bottom: var(--space-2);
    line-height: var(--line-tight);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__category {
    font-size: var(--text-sm);
    color: var(--medium-gray);
    margin-bottom: var(--space-3);
}

.product-card__price-wrapper {
    margin-bottom: var(--space-4);
    margin-top: auto;
}

.product-card__compare-price {
    font-size: var(--text-sm);
    color: var(--medium-gray);
    text-decoration: line-through;
    margin-right: var(--space-2);
}

.product-card__price {
    font-size: var(--text-price);
    font-weight: var(--weight-bold);
    color: var(--primary-red);
    font-family: var(--font-mono);
}

.product-card__stock {
    font-size: var(--text-sm);
    margin-bottom: var(--space-3);
}

.product-card__stock--available {
    color: var(--accent-green);
}

.product-card__stock--low {
    color: var(--accent-orange);
}

.product-card__stock--out {
    color: var(--error);
}

.product-card__actions {
    display: flex;
    gap: var(--space-2);
}

/* Product card links */
.product-card__title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-card__title-link:hover {
    color: var(--primary-red);
}

.product-card__image-wrapper {
    text-decoration: none;
    display: block;
}

/* View details button */
.btn-view-details {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    background: transparent;
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-view-details:hover {
    background: var(--primary-red);
    color: var(--primary-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(227, 25, 55, 0.3);
}

/* Add to cart button */
.btn-add-cart {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    background: var(--primary-red);
    color: var(--primary-white);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-add-cart:hover:not(:disabled) {
    background: #C91530;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(227, 25, 55, 0.3);
}

.btn-add-cart:disabled {
    background: var(--medium-gray);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: var(--space-10) var(--space-4);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--light-gray);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-4);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-state p {
    color: var(--medium-gray);
    font-size: var(--text-base);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-10) var(--space-4);
}

.empty-state svg {
    color: var(--medium-gray);
    margin-bottom: var(--space-4);
}

.empty-state h3 {
    font-size: var(--text-h3);
    color: var(--primary-dark);
    margin-bottom: var(--space-2);
}

.empty-state p {
    color: var(--medium-gray);
    margin-bottom: var(--space-5);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-6) 0;
}

.pagination-button {
    padding: var(--space-2) var(--space-4);
    border: 2px solid var(--light-gray);
    background: var(--primary-white);
    color: var(--primary-dark);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-button:hover:not(:disabled) {
    border-color: var(--primary-red);
    color: var(--primary-red);
}

.pagination-button.active {
    background: var(--primary-red);
    color: var(--primary-white);
    border-color: var(--primary-red);
}

.pagination-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    background: var(--primary-dark);
    color: var(--primary-white);
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toast.success {
    background: var(--accent-green);
}

.toast.error {
    background: var(--error);
}

/* Responsive Design */

/* Tablet */
@media (max-width: 1024px) {
    .products-layout {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 320px;
        max-width: 90vw;
        height: 100vh;
        max-height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        border-radius: 0;
    }

    .filters-sidebar.open {
        left: 0;
    }

    .mobile-filters-toggle {
        display: flex;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: var(--space-4);
    }
}

/* Mobile */
@media (max-width: 640px) {
    .page-header {
        padding: var(--space-8) 0 var(--space-6);
    }

    .products-section {
        padding: var(--space-6) 0;
    }

    .products-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-left,
    .toolbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .product-card__title {
        font-size: var(--text-base);
    }

    .product-card__price {
        font-size: var(--text-h5);
    }

    .toast {
        left: var(--space-4);
        right: var(--space-4);
        bottom: var(--space-4);
    }

    .pagination {
        flex-wrap: wrap;
    }
}

/* Filter Overlay (Mobile) */
.filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.filter-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ============================================================
   ENHANCED CATALOG LAYOUT
   ============================================================ */

/* Main Container */
.catalog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
}

/* Catalog Grid */
.catalog-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

/* Filters Sidebar */
.filters-sidebar {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 100px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-red, #E31937);
}

.filters-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark, #2C3E50);
    margin: 0;
}

.clear-filters {
    background: none;
    border: none;
    color: var(--primary-red, #E31937);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.clear-filters:hover {
    background: rgba(227, 25, 55, 0.1);
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-dark, #2C3E50);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.filter-option:hover {
    background: rgba(227, 25, 55, 0.05);
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-red, #E31937);
}

.filter-option label {
    flex: 1;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-option-count {
    font-size: 0.8rem;
    color: #999;
    background: #f0f0f0;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
}

/* Price Range Filter */
.price-range-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.75rem;
}

.price-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.price-separator {
    color: #999;
    font-weight: 600;
}

.apply-price-btn {
    margin-top: 0.5rem;
    width: 100%;
    padding: 0.5rem;
    background: var(--primary-red, #E31937);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.apply-price-btn:hover {
    background: #c41530;
}

/* Products Section */
.products-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 1rem;
}

.products-count {
    font-size: 1.125rem;
    color: var(--primary-dark, #2C3E50);
}

.products-count strong {
    color: var(--primary-red, #E31937);
    font-weight: 700;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sort-controls label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.sort-select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    background: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    appearance: none;
}

.sort-select:focus {
    outline: 2px solid var(--primary-red, #E31937);
    outline-offset: 2px;
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Product Card */
.product-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-red, #E31937);
}

.product-image-container {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: #f5f5f5;
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

/* Product Badges */
.product-badges {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.product-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
}

.badge-sale {
    background: var(--primary-red, #E31937);
    color: white;
}

.badge-new {
    background: #4CAF50;
    color: white;
}

.badge-featured {
    background: #FF9800;
    color: white;
}

.badge-out-of-stock {
    background: #757575;
    color: white;
}

.badge-low-stock {
    background: #FFC107;
    color: #333;
}

/* Product Info */
.product-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark, #2C3E50);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    min-height: 2.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-platform {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.product-platform::before {
    content: '🎮';
    font-size: 0.9rem;
}

.product-price-container {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
}

.product-price-wrapper {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-red, #E31937);
}

.product-compare-price {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-add-cart {
    flex: 1;
    padding: 0.75rem;
    background: var(--primary-red, #E31937);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-add-cart:hover:not(:disabled) {
    background: #c41530;
    transform: scale(1.02);
}

.btn-add-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-quick-view {
    padding: 0.75rem;
    background: white;
    color: var(--primary-dark, #2C3E50);
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-quick-view:hover {
    background: #f5f5f5;
    border-color: var(--primary-red, #E31937);
    color: var(--primary-red, #E31937);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: white;
    color: var(--primary-dark, #2C3E50);
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-red, #E31937);
    color: white;
    border-color: var(--primary-red, #E31937);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: var(--primary-red, #E31937);
    color: white;
    border-color: var(--primary-red, #E31937);
}

.pagination-info {
    padding: 0.5rem 1rem;
    color: #666;
    font-size: 0.9rem;
}

/* Loading States */
.loading-spinner {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top-color: var(--primary-red, #E31937);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--primary-dark, #2C3E50);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #666;
    margin-bottom: 1.5rem;
}

.btn-reset-filters {
    padding: 0.75rem 1.5rem;
    background: var(--primary-red, #E31937);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn-reset-filters:hover {
    background: #c41530;
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

@media (max-width: 1024px) {
    .catalog-grid {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        width: 300px;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    .filters-sidebar.active {
        left: 0;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 640px) {
    .catalog-container {
        padding: 1rem 0.5rem;
    }

    .products-section {
        border-radius: 0;
        padding: 1rem;
    }

    .products-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .product-name {
        font-size: 0.9rem;
        min-height: 2.6rem;
    }

    .product-price {
        font-size: 1.25rem;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .pagination-info {
        width: 100%;
        text-align: center;
        order: -1;
        margin-bottom: 0.5rem;
    }
}
/* Category Hierarchy Styles */

/* Category Hierarchy Filters */
.filter-category-group {
    margin-bottom: 0.75rem;
}

.filter-category-parent {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    margin-bottom: 0.5rem;
}

.filter-category-parent.has-children:hover {
    background: #f3f4f6;
    border-color: #E31937;
}

.filter-category-parent.expanded {
    background: linear-gradient(135deg, rgba(227, 25, 55, 0.1) 0%, rgba(196, 21, 48, 0.05) 100%);
    border-color: #E31937;
}

.category-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.category-name {
    flex: 1;
    font-weight: 600;
    color: #111827;
    font-size: 0.95rem;
}

.category-count {
    background: #E31937;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
    display: none; /* Ocultar contador de categorías */
}

.category-toggle {
    font-size: 0.875rem;
    color: #6B7280;
    transition: transform 0.3s ease;
}

.filter-category-parent.expanded .category-toggle {
    transform: rotate(180deg);
}

.filter-category-children {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 1rem;
}

.filter-category-children.expanded {
    max-height: 500px;
}

.filter-subcategory {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.filter-subcategory:hover {
    background: #f9fafb;
}

.filter-subcategory input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #E31937;
}

.subcategory-name {
    flex: 1;
    font-size: 0.9rem;
    color: #374151;
}

.subcategory-count {
    font-size: 0.8rem;
    color: #6B7280;
}

.filter-subcategory input[type="checkbox"]:checked ~ .subcategory-name {
    font-weight: 600;
    color: #E31937;
}
