/* Специфични стилове за продуктовата страница */
html {
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: var(--dark);
    overflow-x: hidden !important;
    overflow-y: auto;
    min-height: 100vh;
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* Ensure navbar is always on top */
.navbar {
    z-index: 9999 !important;
    position: fixed !important;
    top: 0 !important;
}

.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    max-width: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: 
        radial-gradient(circle at 20% 30%, rgba(79, 109, 245, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(244, 88, 102, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(79, 109, 245, 0.1) 0%, transparent 60%),
        linear-gradient(135deg, rgba(18, 18, 18, 1) 0%, rgba(12, 12, 12, 1) 100%);
}

/* Анимирани кръгове */
.animated-circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.5;
    filter: blur(40px);
    overflow: hidden;
    contain: layout style paint;
}

@media (max-width: 768px) {
    .animated-circles {
        filter: none;
    }
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: var(--gradient);
    animation: moveCircle 20s infinite;
    opacity: 0.3;
    will-change: transform;
}

.circle:nth-child(1) {
    width: 400px;
    height: 400px;
    top: -100px;
    left: -100px;
    animation-delay: -5s;
    background: linear-gradient(45deg, var(--primary), transparent);
    max-width: 50%;
}

.circle:nth-child(2) {
    width: 600px;
    height: 600px;
    top: 40%;
    right: -200px;
    animation-delay: -10s;
    background: linear-gradient(-45deg, var(--secondary), transparent);
    max-width: 60%;
}

.circle:nth-child(3) {
    width: 300px;
    height: 300px;
    bottom: -50px;
    left: 30%;
    animation-delay: -15s;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    max-width: 40%;
}

@keyframes moveCircle {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -20px) scale(1.1);
    }
    50% {
        transform: translate(0, 30px) scale(0.9);
    }
    75% {
        transform: translate(-30px, 0) scale(1.05);
    }
}

/* Светещи линии */
.glowing-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    opacity: 0.4;
    contain: layout style paint;
}

.line {
    position: absolute;
    height: 1px;
    max-width: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--primary) 50%, 
        transparent 100%
    );
    animation: moveLine 8s ease-in-out infinite;
    transform-origin: center;
    will-change: transform;
}

.line:nth-child(1) { 
    top: 25%; 
    animation-delay: 0s; 
    width: 60%;
    max-width: 60%;
    left: 20%;
}
.line:nth-child(2) { 
    top: 45%; 
    animation-delay: -2s;
    width: 70%;
    max-width: 70%;
    left: 15%;
}
.line:nth-child(3) { 
    top: 65%; 
    animation-delay: -4s;
    width: 50%;
    max-width: 50%;
    left: 25%;
}
.line:nth-child(4) { 
    top: 85%; 
    animation-delay: -6s;
    width: 65%;
    max-width: 65%;
    left: 17%;
}

@keyframes moveLine {
    0%, 100% {
        transform: translateX(0) translateY(0);
        opacity: 0.2;
    }
    50% {
        transform: translateX(20px) translateY(5px);
        opacity: 0.6;
    }
}

/* 3D частици */
.particles-3d {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    perspective: 1000px;
    transform-style: preserve-3d;
    overflow: hidden;
    contain: layout style paint;
}

.particle-3d {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(79, 109, 245, 0.8);
    border-radius: 50%;
    animation: float3D 10s infinite;
    will-change: transform;
    max-width: 4px;
    box-shadow: 0 0 8px rgba(79, 109, 245, 0.6);
}

.particle-3d:nth-child(2n) {
    background: rgba(244, 88, 102, 0.8);
    animation-duration: 15s;
    animation-delay: -5s;
    box-shadow: 0 0 8px rgba(244, 88, 102, 0.6);
}

.particle-3d:nth-child(3n) {
    background: rgba(79, 109, 245, 0.9);
    animation-duration: 12s;
    animation-delay: -7s;
    box-shadow: 0 0 8px rgba(79, 109, 245, 0.6);
}

@keyframes float3D {
    0%, 100% {
        transform: translateX(0) translateY(0);
        opacity: 0;
    }
    25% {
        transform: translateX(30px) translateY(-30px);
        opacity: 0.6;
    }
    75% {
        transform: translateX(-30px) translateY(30px);
        opacity: 0.6;
    }
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    overflow: hidden;
    contain: layout style paint;
}


.hero-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    max-width: 100%;
    top: 0;
    left: 0;
    opacity: 0.8;
    overflow: hidden;
    contain: layout style paint;
    background: 
        radial-gradient(circle at 30% 40%, rgba(138, 43, 226, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(75, 0, 130, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(72, 61, 139, 0.2) 0%, transparent 70%);
    background-size: 200% 200%, 200% 200%, 150% 150%;
}

.hero-waves {
    display: none !important;
}

.hero-glow {
    position: absolute;
    width: 150%;
    height: 150%;
    max-width: 150%;
    top: -25%;
    left: -25%;
    background: conic-gradient(
        from 0deg at 50% 50%,
        var(--primary) 0deg,
        var(--secondary) 90deg,
        var(--primary) 180deg,
        var(--secondary) 270deg,
        var(--primary) 360deg
    );
    opacity: 0.1;
    filter: blur(60px);
    overflow: hidden;
    contain: layout style paint;
}

@media (max-width: 768px) {
    .hero-glow {
        filter: none;
    }
}


.content-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding-top: 80px;
    background: linear-gradient(to bottom, 
        rgba(18, 18, 18, 0) 0%,
        rgba(18, 18, 18, 0.8) 200px,
        rgba(18, 18, 18, 0.95) 300px
    );
}

.products-hero {
    padding: 100px 0 30px;
    position: relative;
    display: flex;
    align-items: center;
    z-index: 1;
    overflow: visible;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform: translateZ(-50px);
}

.hero-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    max-width: 100%;
    top: 0;
    left: 0;
    opacity: 0.8;
    overflow: hidden;
    contain: layout style paint;
    background: 
        radial-gradient(circle at 30% 40%, rgba(138, 43, 226, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(75, 0, 130, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(72, 61, 139, 0.2) 0%, transparent 70%);
    background-size: 200% 200%, 200% 200%, 150% 150%;
}


.hero-waves {
    display: none !important;
}

@keyframes waveEffect {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-10px) scale(1.05);
        opacity: 0.8;
    }
}

.hero-glow {
    display: none !important;
}



/* Светещи точки */
.glowing-dots {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
    contain: layout style paint;
}

.glowing-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(79, 109, 245, 0.8);
    box-shadow: 0 0 20px rgba(79, 109, 245, 0.6), 0 0 40px rgba(79, 109, 245, 0.4);
    animation: dotPulse 3s ease-in-out infinite;
}

.dot-1 {
    top: 20%;
    left: 15%;
    background: rgba(79, 109, 245, 0.9);
    box-shadow: 0 0 15px rgba(79, 109, 245, 0.7), 0 0 30px rgba(79, 109, 245, 0.5);
    animation-delay: 0s;
}

.dot-2 {
    top: 60%;
    right: 20%;
    background: rgba(244, 88, 102, 0.9);
    box-shadow: 0 0 15px rgba(244, 88, 102, 0.7), 0 0 30px rgba(244, 88, 102, 0.5);
    animation-delay: 0.6s;
}

.dot-3 {
    bottom: 25%;
    left: 25%;
    background: rgba(79, 109, 245, 0.8);
    box-shadow: 0 0 10px rgba(79, 109, 245, 0.6), 0 0 20px rgba(79, 109, 245, 0.4);
    animation-delay: 1.2s;
}

.dot-4 {
    top: 40%;
    right: 30%;
    background: rgba(244, 88, 102, 0.9);
    box-shadow: 0 0 12px rgba(244, 88, 102, 0.7), 0 0 25px rgba(244, 88, 102, 0.5);
    animation-delay: 1.8s;
}

.dot-5 {
    bottom: 40%;
    right: 15%;
    background: rgba(79, 109, 245, 0.9);
    box-shadow: 0 0 12px rgba(79, 109, 245, 0.7), 0 0 25px rgba(79, 109, 245, 0.5);
    animation-delay: 2.4s;
}

@keyframes dotPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}


.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    max-width: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
    contain: layout style paint;
}

.particle {
    position: absolute;
    background: rgba(79, 109, 245, 0.7);
    border-radius: 50%;
    filter: blur(1px);
    animation: particleFloat 6s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(79, 109, 245, 0.5);
}

@media (max-width: 768px) {
    .particle {
        filter: none;
    }
}

.particle:nth-child(3n) {
    width: 2px;
    height: 2px;
    background: rgba(244, 88, 102, 0.7);
    animation-duration: 8s;
    box-shadow: 0 0 4px rgba(244, 88, 102, 0.5);
}

.particle:nth-child(3n + 1) {
    width: 3px;
    height: 3px;
    background: rgba(79, 109, 245, 0.8);
    animation-duration: 10s;
    animation-delay: -2s;
    box-shadow: 0 0 5px rgba(79, 109, 245, 0.6);
}

.particle:nth-child(3n + 2) {
    width: 4px;
    height: 4px;
    background: rgba(244, 88, 102, 0.9);
    animation-duration: 12s;
    animation-delay: -4s;
    box-shadow: 0 0 6px rgba(244, 88, 102, 0.7);
}

@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0;
    }
    25% {
        opacity: 0.8;
    }
    75% {
        opacity: 0.8;
    }
    50% {
        transform: translate(100px, -100px);
    }
}

.section-header {
    position: relative;
    z-index: 3;
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 20px;
    background: rgba(30, 30, 30, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .section-header {
        backdrop-filter: none;
    }
}

.section-header {
    position: relative;
    z-index: 2;
}

.product-card {
    background: var(--dark-card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: 1px solid var(--dark-border);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.product-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--dark-card), rgba(79, 109, 245, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
    display: block;
}

.product-image a {
    display: block;
    width: 100%;
    height: 100%;
}

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

.product-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-content h3 {
    margin-bottom: 15px;
}

.product-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-content h3 a:hover {
    color: var(--primary);
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin: 15px 0;
}

.product-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    flex-grow: 1;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.product-features li i {
    color: var(--primary);
    font-size: 14px;
}

.product-category-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

.product-category-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

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

.product-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--gradient);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.product-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-product {
    flex: 1;
    min-width: 120px;
    text-align: center;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
}

.product-order-note {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: center;
    justify-content: center;
}

.product-order-note i {
    color: var(--primary);
    font-size: 0.9rem;
}

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

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .products-hero {
        padding: 150px 0 80px;
    }
}

.filters-section {
    padding: 40px 0;
    background: var(--dark-surface);
    border-radius: 20px;
    /* margin-bottom: 60px; */
    border: 1px solid var(--dark-border);
    position: relative;
    z-index: 5;
}

.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.filter-btn {
    padding: 12px 25px;
    border-radius: 50px;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 10;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.filter-btn i {
    font-size: 16px;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: var(--dark-gradient);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.filter-btn.active {
    background: var(--gradient);
    color: var(--white);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 109, 245, 0.3);
}

.filter-btn.active i {
    transform: scale(1.2);
}

.product-card {
    transition: all 0.5s ease;
    opacity: 1;
    transform: scale(1);
}

.product-card.hidden {
    display: none;
    opacity: 0;
    transform: scale(0.8);
}

.filters-extra {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-top: 20px;
    padding: 0 20px;
}

.price-filter {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--dark-card);
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid var(--dark-border);
}

.price-filter label {
    color: var(--text-secondary);
    font-size: 14px;
}

.price-filter select {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    color: var(--text-primary);
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.search-filter {
    position: relative;
    flex: 0 1 300px;
    display: flex;
    align-items: center;
}

.search-filter input {
    width: 100%;
    padding: 10px 45px 10px 40px;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.search-filter input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 109, 245, 0.1);
}

.search-filter .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    z-index: 1;
}

.search-filter .clear-search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0.7;
    pointer-events: auto;
}

.search-filter .clear-search-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    opacity: 1;
    transform: translateY(-50%) scale(1.15);
}

.search-filter .clear-search-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.search-filter .clear-search-btn i {
    font-size: 14px;
    line-height: 1;
    display: block;
}

.svg-filter {
    position: absolute;
    width: 0;
    height: 0;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 18px;
    display: none;
}

.no-results-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.products-section {
    /* padding: 80px 0; */
    background: var(--dark);
    position: relative;
    z-index: 1;
    overflow: visible;
}

.products-section .text-center {
    position: relative;
    z-index: 1000;
}

.products-section .text-center a.btn,
.products-section .clear-filters-btn {
    pointer-events: auto !important;
    position: relative;
    z-index: 1001;
    cursor: pointer !important;
    user-select: none;
}

.products-section .text-center a.btn:hover,
.products-section .clear-filters-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.no-results.visible {
    display: block;
}

@media (max-width: 768px) {
    .products-section,
    .products-section *,
    .content-wrapper,
    .content-wrapper *,
    .filters-section,
    .filters-section *,
    .filters,
    .filter-btn,
    .price-filter,
    .search-filter,
    .search-filter input {
        backdrop-filter: none !important;
        filter: none !important;
    }
    
    .filters-extra {
        flex-direction: column;
        gap: 15px;
    }

    .price-filter {
        flex-wrap: wrap;
        justify-content: center;
    }

    .search-filter {
        flex: 1;
        width: 100%;
    }
    
    .search-filter input {
        padding: 10px 38px 10px 35px;
    }
    
    .search-filter .search-icon {
        left: 12px;
    }
    
    .search-filter .clear-search-btn {
        right: 10px;
        width: 26px;
        height: 26px;
        min-width: 26px;
        min-height: 26px;
    }
    
    .search-filter .clear-search-btn i {
        font-size: 13px;
    }
}

/* Empty state styles */
.products-empty-state {
    padding: 60px 20px;
    position: relative;
    z-index: 1000;
}

.products-empty-state-icon {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.products-empty-state-link {
    margin-top: 20px;
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    pointer-events: auto !important;
    position: relative;
    z-index: 1001;
}

/* Product badge styles */
.product-badge-out-of-stock {
    background: var(--secondary);
}

/* Pagination styles */
.products-pagination {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination-ellipsis {
    color: var(--text-secondary);
    padding: 0 10px;
}

.pagination-current {
    cursor: default;
}

/* Clear search button visibility */
.clear-search-btn-hidden {
    display: none !important;
}

.clear-search-btn-visible {
    display: flex !important;
}

/* Products Layout with Sidebar */
.products-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Mobile Filter Toggle Button */
.mobile-filter-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--dark-card);
    color: var(--text-primary);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    position: sticky;
    top: 80px;
    z-index: 100;
    width: 100%;
    justify-content: center;
}

.mobile-filter-toggle:hover {
    background: var(--dark-surface);
    border-color: var(--primary);
}

.mobile-filter-toggle .filter-badge {
    background: var(--primary);
    color: var(--white);
    border-radius: 12px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    padding: 0 6px;
    margin-left: auto;
}

/* Mobile Filter Overlay */
.mobile-filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.mobile-filter-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 992px) {
    .mobile-filter-overlay {
        display: none !important;
    }
}

/* Filters Sidebar */
.filters-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--dark-card);
    border-radius: 12px;
    padding: 0;
    border: 1px solid var(--dark-border);
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}


.filters-sidebar::-webkit-scrollbar {
    width: 6px;
}

.filters-sidebar::-webkit-scrollbar-track {
    background: var(--dark-surface);
    border-radius: 10px;
}

.filters-sidebar::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.filters-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 15px 20px;
    border-bottom: 1px solid var(--dark-border);
    position: sticky;
    top: 0;
    background: var(--dark-card);
    z-index: 10;
    margin: 0;
}

.filters-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-close-filters {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mobile-close-filters:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.filters-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filters-header h3 i {
    color: var(--text-secondary);
    font-size: 16px;
}

.clear-all-filters {
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.clear-all-filters:hover {
    color: var(--primary);
    background: rgba(79, 109, 245, 0.1);
}

.mobile-close-filters {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 22px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

.mobile-close-filters:hover {
    background: rgba(244, 88, 102, 0.1);
    color: var(--secondary);
}

.filter-group {
    border-bottom: 1px solid var(--dark-border);
    padding: 0;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 16px 20px;
    margin: 0;
    transition: background 0.2s ease;
    user-select: none;
}

.filter-group-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.filter-group-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
}

.filter-toggle-icon {
    color: var(--text-secondary);
    font-size: 10px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    opacity: 0.6;
}

.filter-group-collapsed .filter-toggle-icon {
    transform: rotate(0deg);
}

.filter-group-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    transition: all 0.2s ease;
    padding: 0 20px 16px 20px;
}

.filter-group-collapsed .filter-group-content {
    display: none;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 0;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
}

.filter-checkbox:hover {
    padding-left: 4px;
}

.filter-checkbox:hover span:first-of-type {
    color: var(--text-primary);
}

.filter-checkbox input[type="checkbox"],
.filter-checkbox input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    margin: 0;
}

.filter-checkbox input[type="checkbox"]:checked,
.filter-checkbox input[type="radio"]:checked {
    accent-color: var(--primary);
}

.filter-checkbox span {
    color: var(--text-secondary);
    font-size: 14px;
    flex-grow: 1;
    transition: color 0.2s ease;
    line-height: 1.4;
}

.filter-checkbox input:checked + span {
    color: var(--text-primary);
    font-weight: 500;
}

.filter-checkbox .filter-count {
    color: var(--text-secondary);
    font-size: 13px;
    opacity: 0.7;
    margin-left: auto;
    font-weight: normal;
}

.filter-count {
    color: var(--text-secondary);
    font-size: 12px;
    opacity: 0.7;
}

/* Products Content */
.products-content {
    flex: 1;
    min-width: 0;
    margin-top: 0;
    padding-top: 0;
}

.results-header {
    margin-bottom: 24px;
}

.results-count-sort {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.results-count {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
    margin-bottom: 20px;
    align-items: center;
    padding-top: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--dark-border);
}

.active-filters-label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    margin-right: 4px;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    padding: 5px 10px 5px 12px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.active-filter-tag:hover {
    border-color: var(--primary);
    background: rgba(79, 109, 245, 0.05);
}

.active-filter-tag .remove-filter {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    transition: all 0.2s ease;
    margin-left: 2px;
    font-size: 11px;
}

.active-filter-tag .remove-filter:hover {
    background: rgba(244, 88, 102, 0.2);
    color: var(--secondary);
}

/* Search Section */
.search-section {
    margin-bottom: 30px;
}

.search-section .search-filter {
    max-width: 500px;
    margin: 0 auto;
}

/* Responsive Design */
/* Mobile Filter Actions */
.mobile-filter-actions {
    display: none;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid var(--dark-border);
    margin-top: 20px;
}

.mobile-filter-actions button {
    flex: 1;
    padding: 12px 20px;
    font-weight: 600;
}

@media (max-width: 992px) {
    .mobile-filter-toggle {
        display: flex;
    }
    
    .products-layout {
        flex-direction: column;
    }
    
    /* Скриваме sidebar-а по подразбиране на мобилни */
    .filters-sidebar {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Показваме sidebar-а само когато е отворен като модал на цял екран */
    .filters-sidebar.mobile-filters-open {
        display: flex !important;
        flex-direction: column !important;
        visibility: visible !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        z-index: 99999 !important;
        border-radius: 0 !important;
        border: none !important;
        opacity: 1 !important;
        transform: scale(1) !important;
        transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding-bottom: 0 !important;
        box-shadow: none !important;
        background: var(--dark-card) !important;
        margin: 0 !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .filters-sidebar.mobile-filters-open form {
        display: flex !important;
        flex-direction: column !important;
        min-height: 100% !important;
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }
    
    /* Блокираме скрола на body когато филтрите са отворени - използваме само overflow */
    body.mobile-filters-open,
    html.mobile-filters-open {
        overflow: hidden !important;
        height: 100% !important;
        position: relative !important;
    }
    
    /* Скриваме продуктите и всичко друго когато филтрите са отворени */
    body.mobile-filters-open .products-content,
    body.mobile-filters-open .mobile-filter-toggle,
    body.mobile-filters-open .products-layout .products-content {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
    
    .mobile-close-filters {
        display: flex !important;
    }
    
    .mobile-filter-actions {
        display: none !important;
    }
    
    .filters-sidebar.mobile-filters-open .mobile-filter-actions {
        display: flex !important;
        position: sticky !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        margin-bottom: 0 !important;
        background: var(--dark-card) !important;
        padding-top: 16px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        padding-bottom: max(20px, calc(16px + env(safe-area-inset-bottom))) !important;
        min-height: calc(60px + env(safe-area-inset-bottom)) !important;
        border-top: 1px solid var(--dark-border) !important;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1) !important;
        z-index: 10000 !important;
        gap: 12px !important;
        margin-top: auto !important;
        flex-shrink: 0 !important;
        box-sizing: border-box !important;
    }
    
    .mobile-filter-actions .btn-apply-filters {
        flex: 1;
        padding: 14px 20px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 8px;
        background: var(--gradient);
        color: var(--white);
        border: none;
        cursor: pointer;
        transition: all 0.2s ease;
        min-width: 0;
    }
    
    .mobile-filter-actions .btn-back-filters {
        flex: 0 0 auto;
        width: 50px;
        min-width: 50px;
        max-width: 50px;
        height: 50px;
        padding: 0;
        font-size: 20px;
        font-weight: 500;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }
    
    .mobile-filter-actions .btn-back-filters:hover {
        transform: translateY(-1px);
    }
    
    .mobile-filter-actions .btn-back-filters:active {
        transform: translateY(0);
    }
    
    .mobile-filter-actions .btn-apply-filters:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(79, 109, 245, 0.4);
    }
    
    .mobile-filter-actions .btn-apply-filters:active {
        transform: translateY(0);
    }
    
    .products-content {
        width: 100%;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .active-filters {
        margin-top: 0 !important;
        padding-top: 0 !important;
        margin-bottom: 16px !important;
    }
    
    .filters-header {
        padding: 16px 16px 12px 16px;
        position: sticky;
        top: 0;
        z-index: 10;
        background: var(--dark-card);
        border-bottom: 1px solid var(--dark-border);
    }
    
    .filters-header h3 {
        font-size: 20px;
        font-weight: 600;
    }
    
    .mobile-close-filters {
        display: flex;
        color: var(--secondary);
        font-size: 24px;
    }
    
    .filter-group-header {
        padding: 14px 16px;
    }
    
    .filter-group-content {
        padding: 0 16px 12px 16px;
    }
    
    .mobile-filter-overlay {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .mobile-filter-toggle {
        top: 70px;
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .filters-sidebar.mobile-filters-open {
        padding: 20px 20px 0 20px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .filters-header {
        padding: 16px 16px 12px 16px !important;
        position: sticky !important;
        top: 0 !important;
    }
    
    .filter-group-content {
        gap: 8px;
    }
    
    .filter-checkbox {
        padding: 8px 10px;
    }
    
    .active-filters {
        gap: 8px;
    }
    
    .active-filter-tag {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .filters-sidebar.mobile-filters-open .mobile-filter-actions {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        padding-top: 15px !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        padding-bottom: max(20px, calc(15px + env(safe-area-inset-bottom))) !important;
        min-height: calc(56px + env(safe-area-inset-bottom)) !important;
    }
    
    .mobile-filter-actions .btn-apply-filters {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .mobile-filter-actions .btn-back-filters {
        width: 46px;
        min-width: 46px;
        max-width: 46px;
        height: 46px;
        font-size: 18px;
    }
}