* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --blue: #0072ce;
    --orange: #F5A623;
    --green: #10b981;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --bg-light: #f9fafb;
    --white: #ffffff;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    background: #ffffff;
    line-height: 1.6;
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 16px;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 24px 0 16px 0;
    font-size: 14px;
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--blue);
    text-decoration: none;
    transition: text-decoration 0.2s;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.separator {
    margin: 0 8px;
}

.current {
    color: var(--text-dark);
}

/* Category Hero */
.category-hero {
    background: var(--white);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    /* height: 400px; */
}

.category-hero h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.2;
}

.category-hero p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
    font-size: 16px;
}

.category-stats {
    display: flex;
    gap: 24px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.stat strong {
    color: var(--blue);
    font-weight: 700;
}

.category-image {
    overflow: hidden;
}

.category-image img {
    max-width: 280px;
    max-height: 220px;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Subcategories */
.section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.subcategories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.subcategory-chip {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.subcategory-chip:hover {
    border-color: var(--blue);
    box-shadow: 0 2px 8px rgba(0, 114, 206, 0.1);
    transform: translateY(-1px);
}

.subcategory-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.subcategory-image {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 4px;
    background: var(--bg-light);
    padding: 4px;
}

.subcategory-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-dark);
    display: block;
}

.subcategory-description {
    font-size: 13px;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
    line-height: 1.4;
}

.subcategory-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.2s;
}

.subcategory-chip:hover .subcategory-arrow {
    transform: translateX(4px);
    color: var(--blue);
}

.subcategory-chip.hidden {
    display: none;
}

.show-more-wrapper {
    text-align: center;
    margin-top: 16px;
}

.show-more-btn {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 24px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--blue);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.show-more-btn:hover {
    border-color: var(--blue);
    box-shadow: 0 2px 8px rgba(0, 114, 206, 0.1);
}

.show-more-btn svg {
    transition: transform 0.3s;
}

.show-more-btn.expanded svg {
    transform: rotate(180deg);
}

/* Filters Bar */
.filters-bar {
    background: var(--white);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.filter-select {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    background: var(--white);
    cursor: pointer;
    min-width: 180px;
    transition: border-color 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: var(--blue);
}

.search-box {
    flex: 1;
    min-width: 240px;
    display: flex;
    gap: 8px;
}

.search-input-category {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    transition: border-color 0.2s;
}

.search-input-category:focus {
    outline: none;
    border-color: var(--blue);
}

.search-btn {
    padding: 10px 24px;
    background: var(--blue);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
}

.search-btn:hover {
    background: #005a9e;
}

/* Results Header */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-count {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 16px;
}

.view-toggle {
    display: flex;
    gap: 8px;
}

.view-btn {
    padding: 8px 12px;
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn.active {
    background: var(--blue);
    color: var(--white);
    border-color: var(--blue);
}

.view-btn:hover:not(.active) {
    border-color: var(--blue);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr) !important;
    margin-bottom: 40px;
}

.product-card {
    background: var(--white);
    border: 1px solid #E6F1FB;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    width: 100% !important;
}

.product-image-wrapper {
    position: relative;
    background: #ffffff;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
}

.product-image {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    display: block;
}

.discount-badge {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    background: var(--green) !important;
    color: white !important;
    font-size: 12px !important;
    padding: 4px 8px !important;
    border-radius: 16px !important;
    font-weight: 600 !important;
}

.product-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.product-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

.current-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--blue);
}

.original-price {
    font-size: 14px;
    font-weight: 500;
    color: #A5A5A5;
    text-decoration: line-through;
}

.product-price-old {
    font-weight: 500;
    font-size: 14px;
    color: #A5A5A5;
    text-decoration: line-through;
}

.compare-btn {
    width: 100%;
    background: var(--blue);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'Manrope', sans-serif;
    text-decoration: none;
    text-align: center;
    display: block;
}

.compare-btn:hover {
    background: #005a9e;
}

/* Load More Button */
.load-more-wrapper {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 20px;
}

.load-more-btn {
    background-color: #0072ce00;
    font-family: "Manrope", Manrope;
    font-size: 16px;
    font-weight: 700;
    color: #0072CE;
}

.load-more-btn:hover:not(:disabled) {
    background: #0072CE14;
    color: #0072CE;
    padding: 8px;
    border-radius: 12px;
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading State */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Error State */
.error-state-page {
    text-align: center;
    padding: 80px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.error-animation {
    margin-bottom: 32px;
}

.error-state-page h1 {
    font-size: 28px;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.error-state-page p {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 16px;
}

.error-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.error-button,
.error-button-secondary {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    font-family: 'Manrope', sans-serif;
}

.error-button {
    background: var(--blue);
    color: var(--white);
    border: 2px solid var(--blue);
}

.error-button:hover {
    background: #005a9e;
    border-color: #005a9e;
}

.error-button-secondary {
    background: var(--white);
    color: var(--blue);
    border: 2px solid var(--blue);
}

.error-button-secondary:hover {
    background: var(--blue);
    color: var(--white);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: 12px;
    grid-column: 1 / -1;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.empty-state p {
    color: var(--text-muted);
}


.products-grid-loading {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.products-grid-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0072CE;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px 0;
    margin-bottom: 20px;
}

.active-filters .filter-label {
    font-weight: 600;
    color: #333;
}

.filter-tag {
    background: #0072CE;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.filter-tag:hover {
    background: #005aa3;
}

.filter-reset {
    color: #0072CE;
    text-decoration: underline;
    font-size: 14px;
    cursor: pointer;
}

.filter-reset:hover {
    color: #005aa3;
}

.load-more-wrapper {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 30px 0;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.empty-state p {
    color: #666;
    margin-bottom: 20px;
}

.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    background: #0072CE;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s;
    border: white;
}

.btn-primary:hover {
    background: #005aa3;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 900px) {
    .container {
        padding: 0 15px;
    }

    .category-hero {
        grid-template-columns: 1fr;
    }

    .category-image {
        display: none;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-select {
        width: 100%;
    }

    .subcategories-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .category-hero h1 {
        font-size: 24px;
    }

    .category-hero p {
        font-size: 14px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 12px !important;
    }

    .compare-btn {
        font-size: 12px !important;
    }

    .product-name {
        font-size: 14px !important;
    }

    .compare-btn {
        padding: 10px 8px !important;
    }

}