/* Smart Filters Styles */

.dflex-filter-widget {
    background: var(--dflex-filter-bg, #fff);
    border: 1px solid var(--dflex-filter-border, #f0f0f0);
    border-radius: var(--dflex-filter-radius, 16px);
    padding: 10px;
    margin-bottom: 8px;
    box-shadow: none;
    transition: all 0.3s ease;
}

.dflex-filter-widget:hover {
    /* no transform or shadow */
}

.dflex-filter-title {
    font-size: var(--filter-title-size, 1.1rem);
    font-weight: var(--dflex-filter-title-weight, 700);
    margin-bottom: 15px;
    color: #1a1a1a;
}

.dflex-filter-pagination {
    margin-top: 30px;
    text-align: center;
}

.dflex-filter-pagination a,
.dflex-filter-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 4px;
    border-radius: 8px;
    background: #fff;
    color: #333;
    border: 1px solid #eee;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.dflex-filter-pagination a:hover {
    background: var(--dflex-color-primary, #E53935);
    color: #fff;
    border-color: var(--dflex-color-primary, #E53935);
}

.dflex-filter-pagination span.current {
    background: var(--dflex-color-primary, #E53935);
    color: #fff;
    border-color: var(--dflex-color-primary, #E53935);
}

.dflex-filter-not-found {
    text-align: center;
    padding: 40px;
    width: 100%;
}

/* Checkboxes */
.dflex-checkbox-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dflex-checkbox-list li {
    margin-bottom: 10px;
    transition: opacity 0.2s ease;
}

.dflex-checkbox-list label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: #444;
    width: 100%;
}

.dflex-checkbox-list input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 6px;
    margin-right: 12px;
    position: relative;
    transition: all 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.dflex-checkbox-list input[type="checkbox"]:checked {
    background-color: var(--dflex-color-primary, #E53935);
    border-color: var(--dflex-color-primary, #E53935);
}

.dflex-checkbox-list input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.dflex-term-count {
    margin-left: auto;
    font-size: 0.8rem;
    color: #999;
    background: #f5f7f8;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

/* Select */
.dflex-filter-select-wrapper select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #eee;
    border-radius: 10px;
    outline: none;
    background: #fff;
    font-size: 0.95rem;
    color: #444;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.dflex-filter-select-wrapper select:focus {
    border-color: var(--dflex-color-primary, #E53935);
}

/* Search */
.dflex-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #eee;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
}

.dflex-search-input:focus {
    border-color: var(--dflex-color-primary, #E53935);
    box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.1);
}

/* Double Price Slider */
.dflex-price-range-container {
    position: relative;
    padding-top: 15px;
    margin-bottom: 10px;
}

.dflex-price-range-container input[type="range"] {
    position: absolute;
    width: 100%;
    height: 5px;
    top: 5px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    outline: none;
}

/* Chrome, Safari, Opera */
.dflex-price-range-container input[type="range"]::-webkit-slider-thumb {
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: var(--dflex-color-primary, #E53935);
    cursor: pointer;
    pointer-events: auto;
    -webkit-appearance: none;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    transition: transform 0.1s ease;
}

.dflex-price-range-container input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

/* Firefox */
.dflex-price-range-container input[type="range"]::-moz-range-thumb {
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: var(--dflex-color-primary, #E53935);
    cursor: pointer;
    pointer-events: auto;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    transition: transform 0.1s ease;
}

.dflex-price-range-container input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.15);
}

/* Track styling for Range */
.dflex-price-range-container::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 4px;
    background: #eef1f2;
    top: 12px;
    left: 0;
    border-radius: 2px;
    z-index: 0;
}

.dflex-price-inputs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 25px;
}

.dflex-price-inputs input {
    width: 45%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    outline: none;
    transition: border-color 0.2s ease;
}

.dflex-price-inputs input:focus {
    border-color: var(--dflex-color-primary, #E53935);
}

.dflex-price-inputs span {
    color: #999;
}

/* Disabled state (Faceted Search) */
.dflex-disabled {
    cursor: not-allowed;
    pointer-events: none;
}

.dflex-disabled label {
    color: #bbb !important;
}

.dflex-disabled .dflex-term-count {
    background: #fafafa !important;
    color: #ccc !important;
}

/* Action buttons */
.dflex-filters-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.dflex-filters-submit-btn {
    flex: 1;
    min-width: 120px;
    background: var(--dflex-color-primary, #E53935);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.2);
    text-align: center;
}

.dflex-filters-submit-btn:hover {
    background: #d32f2f;
    transform: translateY(-1px);
}

.dflex-filters-submit-btn:active {
    transform: translateY(0);
}

.dflex-filters-reset-btn {
    display: none;
    flex: 1;
    min-width: 120px;
    background: #f0f2f5;
    color: #333;
    border: 1px solid #e0e0e0;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    text-align: center;
}

.dflex-filters-reset-btn:hover {
    background: #e4e6eb;
    border-color: #d0d0d0;
}

/* ═══════ Skeleton Cards ═══════ */
@keyframes dflex-skeleton-pulse {
    0% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 0.4;
    }
}

.dflex-skeleton-card {
    background: var(--dflex-card-bg, #fff);
    border-radius: 20px;
    border: var(--dflex-card-border, 1px solid #f0f0f0);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dflex-skeleton-image {
    aspect-ratio: 1 / 1;
    max-height: 190px;
    background: #f5f7fa;
    position: relative;
    overflow: hidden;
}

.dflex-skeleton-pulse {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f2f5 25%, #e4e8ed 50%, #f0f2f5 75%);
    background-size: 200% 100%;
    animation: dflex-skeleton-shimmer 1.5s infinite ease-in-out;
}

@keyframes dflex-skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

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

.dflex-skeleton-content {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 8px;
}

.dflex-skeleton-line {
    border-radius: 6px;
    overflow: hidden;
}

.dflex-skeleton-title {
    height: 18px;
    width: 85%;
}

.dflex-skeleton-title-short {
    height: 14px;
    width: 55%;
}

.dflex-skeleton-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    gap: 12px;
}

.dflex-skeleton-price {
    height: 20px;
    width: 80px;
}

.dflex-skeleton-btn {
    height: 38px;
    width: 110px;
    border-radius: var(--dflex-btn-radius, 12px);
    overflow: hidden;
}

@media (max-width: 1024px) {
    .dflex-skeleton-image {
        max-height: 160px;
    }
}

@media (max-width: 767px) {
    .dflex-skeleton-image {
        max-height: 140px;
    }

    .dflex-skeleton-content {
        padding: 12px 14px;
    }
}

/* Products Count */
.dflex-products-count {
    font-size: 14px;
    font-weight: 500;
    color: var(--echo-light-gray, #222);
    margin: 10px 0;
}

/* Catalog Ordering Dropdown */
.dflex-catalog-ordering-select-wrap {
    position: relative;
    display: inline-block;
    min-width: 220px;
    margin: 10px 0;
}

.dflex-catalog-ordering-select-wrap select.dflex-custom-orderby {
    width: 100%;
    height: 44px;
    padding: 0 40px 0 16px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    background-color: #fff;
    border: 1px solid var(--dflex-filter-border, #f0f0f0);
    border-radius: var(--dflex-filter-radius, 12px);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dflex-catalog-ordering-select-wrap select.dflex-custom-orderby:focus,
.dflex-catalog-ordering-select-wrap select.dflex-custom-orderby:hover {
    border-color: var(--dflex-color-primary, #E53935);
}

/* Custom Arrow SVG Icon */
.dflex-catalog-ordering-select-wrap::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 10px;
    height: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    transition: transform 0.2s ease;
}

/* SEO Filters Description Text */
.dflex-seo-description-text {
    margin-top: 40px;
    margin-bottom: 25px;
    padding: 25px;
    background: var(--dflex-filter-bg, #ffffff);
    border: 1px solid var(--dflex-filter-border, #f0f0f0);
    border-radius: var(--dflex-filter-radius, 16px);
    line-height: 1.6;
    color: #444;
}

/* Плашка "Товары не найдены" */
.dflex-no-products-box {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 40px 24px;
    text-align: center;
    margin: 20px 0;
    width: 100%;
}

.dflex-no-products-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: #EAE6DD;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777266;
}

.dflex-no-products-title {
    font-size: 22px;
    font-weight: 600;
    color: #2C2B29;
    margin-bottom: 10px;
}

.dflex-no-products-text {
    font-size: 15px;
    line-height: 1.6;
    color: #68645C;
    max-width: 480px;
    margin: 0 auto 24px;
}

.dflex-no-products-btn {
    margin-top: 10px;
}