/* Shop Filter Styles */

/* Offcanvas overlay */
body.offcanvas__filter--sidebar_active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
}

/* Offcanvas sidebar positioning */
.offcanvas__filter--sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100%;
    background: #fff;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.offcanvas__filter--sidebar.active {
    left: 0;
}

/* Ensure content is visible in offcanvas */
.offcanvas__filter--sidebar .widget__bg {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.offcanvas__filter--sidebar .widget__title {
    color: #333;
    margin-bottom: 15px;
}

.offcanvas__filter--sidebar .modern-category-list {
    display: block !important;
}

.offcanvas__filter--sidebar .category-item {
    display: block !important;
    margin-bottom: 8px;
}

.offcanvas__filter--sidebar .category-filter-label {
    display: flex !important;
    color: #333;
}

.offcanvas__filter--sidebar .category-name {
    color: #333 !important;
    font-size: 14px;
}

.offcanvas__filter--sidebar .product-count {
    display: inline-block !important;
}

.offcanvas__filter--sidebar .checkbox__filter--form {
    display: block !important;
}

.offcanvas__filter--sidebar .checkbox__filter--form__inner {
    display: block !important;
}

.offcanvas__filter--sidebar .checkbox__filter--group {
    display: block !important;
}

.offcanvas__filter--sidebar .widget__tagcloud {
    display: block !important;
    list-style: none;
    padding: 0;
    margin: 0;
}

.offcanvas__filter--close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    z-index: 10;
}

.offcanvas__filter--close:hover {
    color: var(--primary-color);
}

.offcanvas__filter--sidebar__inner {
    margin-top: 50px;
}

/* Mobile offcanvas category header */
.offcanvas__filter--sidebar .category-filter-header {
    background-color: var(--primary-color, #000);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin: -20px -20px 20px -20px;
}

.offcanvas__filter--sidebar .category-filter-header .widget__title {
    color: white !important;
    font-size: 16px;
    margin-bottom: 0;
}

.offcanvas__filter--sidebar .category-filter-header svg {
    color: white !important;
}

.offcanvas__filter--sidebar .btn-clear-filters {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
}

.offcanvas__filter--sidebar .btn-clear-filters:hover {
    background: white;
    color: var(--primary-color, #000);
}

/* Mobile offcanvas active filters section */
.offcanvas__filter--sidebar .selected-categories-summary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 2px dashed #667eea;
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
}

.offcanvas__filter--sidebar .summary-header {
    color: #667eea;
    font-size: 12px;
    margin-bottom: 8px;
}

.offcanvas__filter--sidebar .filter-badge {
    display: inline-flex !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.offcanvas__filter--sidebar .badge-text {
    color: white !important;
}

.offcanvas__filter--sidebar .badge-remove {
    background: rgba(255, 255, 255, 0.2);
    color: white !important;
    text-decoration: none;
}

.shop__search--section {
    padding: 15px 0;
}

.shop__search--input {
    height: 45px;
    border: 1px solid #e1e1e1;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 14px;
    background: #fff;
    transition: all 0.3s ease;
}

.shop__search--input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.shop__search--input::placeholder {
    color: #999;
}

/* Category Filter Header */
.category-filter-header {
    background-color: var(--primary-color);
    padding: 20px;
    border-radius: 12px 12px 0 0;
    margin: -20px -20px 20px -20px;
    color: white;
}

.category-filter-header .widget__title {
    color: white;
    font-size: 18px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.category-filter-header svg:first-child {
    color: rgba(255, 255, 255, 0.9);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.btn-clear-filters {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
    text-decoration: none;
}

.btn-clear-filters:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-clear-filters svg {
    transition: transform 0.3s ease;
}

.btn-clear-filters:hover svg {
    transform: rotate(90deg);
}

/* Modern Category List */
.modern-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 8px;
}

.category-filter-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.category-filter-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-filter-link:hover {
    background: #ffffff;
    border-color: #e8ecf4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateX(4px);
}

.category-filter-link:hover::before {
    opacity: 1;
}

.category-filter-link.selected {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
}

.category-filter-link.selected::before {
    opacity: 1;
}

.custom-radio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e0;
    border-radius: 50%;
    margin-right: 12px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    background: white;
}

.custom-radio svg {
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
    color: white;
}

.category-filter-link:hover .custom-radio {
    border-color: #667eea;
    transform: scale(1.1);
}

.category-filter-link.selected .custom-radio {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.category-filter-link.selected .custom-radio svg {
    opacity: 1;
    transform: scale(1);
}

.category-filter-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    font-size: 14px;
    color: #2d3748;
    font-weight: 500;
}

.category-filter-name.active {
    color: #667eea;
    font-weight: 600;
}

.category-name {
    flex: 1;
}

.product-count {
    background: #e8ecf4;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    margin-left: 8px;
}

.category-filter-link.selected .product-count {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    color: #667eea;
}

/* Selected Categories Summary */
.selected-categories-summary {
    margin-top: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 2px dashed #667eea;
    border-radius: 12px;
    padding: 15px;
}

.summary-header {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #667eea;
    margin-bottom: 12px;
    font-weight: 600;
}

.summary-header svg {
    color: #667eea;
}

.filter-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.filter-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.badge-text {
    line-height: 1;
}

.badge-remove {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    color: white;
    text-decoration: none;
}

.badge-remove:hover {
    background: white;
    color: #764ba2;
    transform: rotate(90deg) scale(1.1);
}

.widget__title.mb-0 {
    font-size: 18px;
}

/* Mobile Filter Badge & Chip */
.widget__filter--btn {
    position: relative;
    background: var(--primary-color, #000);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    gap: 8px;
}

.widget__filter--btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.widget__filter--btn__icon {
    width: 20px;
    height: 20px;
}

.widget__filter--btn__text {
    line-height: 1;
}

.filter-active-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.mobile-active-filter {
    display: flex;
    align-items: center;
}

.mobile-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--secondary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mobile-filter-chip svg {
    flex-shrink: 0;
}

.chip-text {
    line-height: 1;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chip-remove {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    color: white;
    text-decoration: none;
    flex-shrink: 0;
}

.chip-remove:hover {
    background: white;
    color: #764ba2;
    transform: rotate(90deg) scale(1.1);
}

.gap-2 {
    gap: 0.5rem !important;
}

/* Loading Overlay */
.shop-loading-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .shop__search--wrapper {
        flex-direction: column;
        align-items: stretch !important;
    }

    .shop__search--form {
        margin-right: 0 !important;
        margin-bottom: 15px;
    }

    .shop__header {
        padding: 12px 15px !important;
    }
}

@media (max-width: 576px) {
    .chip-text {
        max-width: 80px;
    }
}

