/* CATALOG SECTION */
.catalog-container {
    max-width: 1400px;
    margin: -40px auto 80px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.catalog-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

.filter-reset-wrapper {
    padding: 15px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.filter-reset-btn {
    width: 100%;
    padding: 12px 20px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-reset-btn:hover {
    background-color: #e0e0e0;
    border-color: #ccc;
}

.filter-reset-btn:active {
    transform: scale(0.98);
}

/* FILTERS */
.filters {
    background: var(--light);
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.filters h3 {
    font-size: 1.4rem;
    padding: 25px 30px;
    margin: 0;
    color: var(--dark);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--light);
}

.filters-content {
    padding: 0 30px 30px;
}

.filter-group {
    margin-bottom: 30px;
}

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

.filter-group h4 {
    font-size: 1.05rem;
    margin-bottom: 15px;
    color: var(--dark);
    font-weight: 700;
}

.filter-option {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.filter-option:hover {
    background: var(--light-gray);
}

.filter-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--primary);
}

.filter-option label {
    cursor: pointer;
    color: var(--dark);
    font-size: 0.95rem;
    flex: 1;
}

.price-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: center;
}

.price-inputs input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

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

.price-inputs span {
    color: var(--gray);
}

.reset-filters {
    width: 100%;
    padding: 14px;
    background: var(--light-gray);
    border: none;
    border-radius: 10px;
    color: var(--dark);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 25px;
    font-size: 0.95rem;
}

.reset-filters:hover {
    background: var(--dark);
    color: var(--light);
}


.filter-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.filter-arrow {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .3s ease;
}

.filter-group.closed .filter-arrow {
    transform: rotate(-135deg);
}

.filter-body {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transition:
            max-height .35s ease,
            opacity .25s ease,
            visibility 0s linear .35s;
}

.filter-group:not(.closed) .filter-body {
    opacity: 1;
    visibility: visible;
}

.filter-group {
    contain: layout paint;
}



    /* PRODUCTS */
.products-section {
    background: transparent;
    padding: 0;
}

.products-header {
    width: calc(100% - 60px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding: 25px 30px;
    background: var(--light);
    border-radius: 16px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
    flex-wrap: wrap;
    gap: 15px;
}

.products-count {
    color: var(--dark);
    font-size: 1rem;
    font-weight: 600;
}

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

.products-sort {
    display: flex;
    align-items: center;
    gap: 12px;
}

.products-sort label {
    color: var(--dark);
    font-weight: 600;
}

.woocommerce-ordering {
    margin-bottom: 0 !important;

    display: flex;
    align-items: center;
}

.products-sort select {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    cursor: pointer;
    background: var(--light);
    font-weight: 500;
    transition: border-color 0.3s ease;
}

@media (max-width: 500px) {
}

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

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

.product-card {
    background: var(--light);
    border: none;
    border-radius: 20px;
    transition: all 0.4s ease;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);

    display: flex;
    flex-flow: column;
    justify-content: space-between;
}

.product-title a,
.btn-buy {
    text-decoration: none;
}

.btn-buy {
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card:hover {
    box-shadow: 0 15px 50px rgba(20, 40, 160, 0.15);
}

.product-badge {
    position: absolute;
    top: 25px;
    right: 25px;
    background: var(--secondary);
    color: var(--light);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.product-badge.new {
    background: var(--success);
}

.product-image {
    width: 100%;
    height: 280px !important;
    object-fit: contain;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-image {
    position: relative;
}

.main-image .badge {
    padding: 8px 12px;

    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 100;

    font-weight: bold;
    font-size: 12px;
    background: white;
    color: var(--primary);
    border-radius: 10px 0 0 0;
}

.product-title {
    font-size: 1.15rem;
    margin-bottom: 16px;
    font-weight: 700;
    min-height: 50px;
    line-height: 1.4;
    padding: 10px 25px 0;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; /* максимум 2 строки */
    overflow: hidden;
}

.product-title a {
    color: var(--dark);
}

.key-features {
    background: linear-gradient(135deg, #f8fafb 0%, #f1f5f9 100%);
    padding: 20px;
    border-radius: 12px;
    margin: 0 25px 20px;
    border: 1px solid #e8edf2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.feature-list {
    list-style: none;
}

.feature-list li {
    padding: 6px 0;
    padding-left: 28px;
    position: relative;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
    font-size: 16px;
    width: 20px;
    height: 20px;
    background: rgba(46, 204, 113, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.product-specs {
    display: none;
}

.product-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 25px;
}

.product-old-price {
    font-size: 1.2rem;
    color: var(--gray);
    text-decoration: line-through;
    font-weight: 600;
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 25px 25px;
}

.btn-cart,
.btn-buy {
    padding: 12px 8px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.btn-cart {
    background: var(--light-gray);
    color: var(--dark);
    border: 2px solid var(--border);
}

.btn-cart:hover {
    background: var(--dark);
    color: var(--light);
    border-color: var(--dark);
}

.btn-cart i {
    font-size: 0.9rem;
}

.btn-buy {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--light);
    border: none;
}

.btn-buy:hover {
    box-shadow: 0 8px 25px rgba(20, 40, 160, 0.4);
}

.btn-favorite {
    width: 48px;
    padding: 12px;
    background: var(--light-gray);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--gray);
}

.btn-favorite:hover {
    background: var(--primary);
    color: var(--light);
}

.btn-cart, .btn-buy {
    display: inline-block;
    padding: 8px 16px;
    margin: 5px 0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
}


/* PAGINATION */
.pagination ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
    padding: 30px;
    background: var(--light);
    border-radius: 16px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);

    list-style: none;
}

.pagination li a,
.pagination li span {
    padding: 12px 18px;
    border: none;
    background: var(--light-gray);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
    color: var(--dark);
    text-decoration: none;
    min-width: 48px;
}

.pagination li a:hover {
    background: var(--primary);
    color: var(--light);
}

.pagination li span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--light);
    cursor: auto;
}

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

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

    .filters.active {
        left: 0;
    }

    .filters-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .filters-overlay.active {
        display: block;
    }

    .filters-mobile-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .filters-close {
        display: block;
        position: absolute;
        top: 30px;
        right: 30px;
        background: rgba(255, 255, 255, 0.2);
        border: none;
        color: var(--light);
        font-size: 1.5rem;
        cursor: pointer;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        transition: all 0.3s ease;
    }

    .filters-close:hover {
        background: rgba(255, 255, 255, 0.3);
    }
}

.filters-close {
    display: none;
}

@media (max-width: 768px) {
    .hero {
        padding: 100px 20px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-decoration {
        display: none;
    }

    .catalog-container {
        margin-top: -60px;
    }

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

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



/* Мобильные фильтры */
.filters-mobile-btn {
    display: none;
    position: fixed;
    bottom: 5px;
    right: 5px;
    z-index: 999;
    background: var(--primary-color, #007bff);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
    transition: all 0.3s ease;
}

.filters-mobile-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.5);
}

.filters-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.filters-close {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    padding: 0;
    line-height: 1;
}

@media (max-width: 768px) {
    .filters-mobile-btn {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .filters-content {
        padding: 0 20px 30px;
    }

    .filters {
        position: fixed;
        top: 55px;
        left: -100%;
        width: 80%;
        max-width: 320px;
        height: calc(100vh - 85px);
        background: white;
        z-index: 1003;
        overflow-y: auto;
        transition: left 0.3s ease;
        border-radius: 0;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .filters.active {
        left: 0;
    }

    .filters-close {
        display: block;
    }

    .filters h3 {
        background: white;
        color: black;
        border-bottom: 1px solid #eee;
    }

    body.filters-open {
        overflow: hidden;
    }
}

/* Индикатор загрузки */
.products-grid {
    transition: opacity 0.3s ease;
}