/* Ultimate Smart FilterFrontend Styles */
.usf-search-filter-container {
    display: flex;
    gap: 30px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.usf-filter-sidebar {
    flex: 0 0 280px;
    background-color: var(--usf-filter-bg, #ffffff);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    height: fit-content;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.usf-filter-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 24px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #f3f4f6;
}

.usf-filter-group {
    margin-bottom: 28px;
}

.usf-filter-group-price {
    margin-bottom: 28px;
}

.usf-filter-group.active .usf-filter-content {
    display: block;
}

.arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.usf-filter-group.active .arrow {
    transform: rotate(180deg);
}

.usf-filter-label {
    font-size: var(--usf-label-font-size, 16px);
    font-weight: 600;
    color: var(--usf-label-color, #374151);
    margin-bottom: 12px;
    cursor: pointer;
    padding: 8px 12px;
    background-color: var(--usf-label-bg, #f4f4f4);
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

/* Search Input */
.usf-search-wrapper {
    position: relative;
}

.usf-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #ffffff;
}

.usf-search-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.usf-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.usf-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.usf-suggestion-item:hover {
    background-color: #f8fafc;
}

.usf-suggestion-item:last-child {
    border-bottom: none;
}

.usf-suggestion-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.usf-suggestion-details h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

.usf-suggestion-details .price {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

/* Checkbox Groups */
.usf-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.usf-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding-left: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.usf-checkbox-label:hover {
    background-color: var(--usf-label-bg, #ffffff);
}

.usf-filter-checkbox {
    margin: 0 8px 0 0;
    accent-color: var(--usf-label-bg, #ffffff);
}

.usf-checkbox-text:hover {
    .usf-count {
        color: var(--usf-checkbox-color, #ffffff);
    }

    color: var(--usf-checkbox-color, #ffffff);
}

.usf-checkbox-text {
    font-size: var(--usf-checkbox-font-size, 14px);
    color: var(--usf-checkbox-color, #374151);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.usf-count {
    color: var(--usf-checkbox-color, #6b7280);
    font-size: var(--usf-checkbox-font-size, 12px);
    padding-right: 5px;
}

/* Color Options */
.usf-color-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.usf-color-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;

    transition: all 0.2s ease;
    background: #ffffff;
}

.usf-color-option:hover {
    border-color: none;
    transform: translateY(-1px);
}

.usf-color-option input {
    display: none;
}

.usf-color-option input:checked+.usf-color-swatch {
    border: 1px solid #e3e3e4;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);

}

.usf-color-swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    margin-right: 6px;
    border: 1px solid #d1d5db;
    transition: all 0.2s ease;
}

.usf-color-name {
    font-size: 12px;
    color: #374151;
    font-weight: 500;
}

/* Price Range */
.usf-price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.usf-price-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.usf-price-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.usf-price-separator {
    color: #6b7280;
    font-weight: 500;
}

/* Rating */
.usf-rating-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.usf-rating-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.usf-rating-option:hover {
    background-color: var(--usf-label-bg, #f8fafc);
}

.usf-rating-input {
    margin: 0 8px 0 0;
    accent-color: #fbbf24;
}

.usf-stars {
    margin-right: 8px;
}

.usf-star {
    color: #d1d5db;
    font-size: 16px;
    transition: color 0.2s ease;
}

.usf-star.filled {
    color: #fbbf24;
}

.usf-rating-text {
    color: var(--usf-checkbox-color, #6b7280);
    font-size: var(--usf-checkbox-font-size, 12px);
}

/* Filter Actions */
.usf-filter-actions {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
}

.usf-clear-btn {
    width: 100%;
    padding: 12px 16px;
    color: var(--usf-clear-color, #374151);
    background: var(--usf-clear-bg, #f8fafc);
    border: var(--usf-clear-border-size, 1px) solid var(--usf-clear-border-color, #e5e7eb);

    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.usf-clear-btn:hover {
    background: #f1f5f9;
    border-color: #d1d5db;
}

/* Products Area */
.usf-products-area {
    flex: 1;
}

.usf-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 10px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.usf-results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
}

.usf-results-info>#usf-sort-select {
    margin-left: auto;
    min-width: 90px;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.usf-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    font-size: 14px;
    color: #464747;
}

.usf-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #464747;
    border-radius: 50%;
    animation: usf-spin 1s linear infinite;
}

.usf-sort-by {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}


@keyframes usf-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Products Grid */
.usf-products-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 5px;
}

.usf-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.usf-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.usf-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.usf-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

#usf-no-products {
    display: none;
    /* By default it is hidden */
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 200px;
    flex-direction: column;
}

.usf-no-products {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #374151;
    margin-top: auto;
    width: 100%;
}

.usf-no-products-icon {
    font-size: 60px;
    margin: 50px 0 15px 0;
}

.usf-product-card:hover {
    border-color: #d1d5db;
    border-radius: 5px;
}

.add_to_cart_inline {
    border: none !important;
    box-shadow: none !important;
}

.usf-filter-content {
    display: none;
    margin-top: 5px;
}


.usf-toggle-filters-btn {
    display: none;
    border: none;
    padding: 8px 12px;
    font-size: 10px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    border-radius: 8px;
}

.usf-close-btn {
    display: none;
}

.usf-product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.usf-product-image img {
    width: 100%;
    height: 100%;
    padding: 30px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.usf-product-card:hover .usf-product-image img {
    transform: scale(1.05);
}

.usf-sale-badge {
    position: absolute;
    top: 0px;
    left: 12px;
    background: #dc2626;
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.usf-product-info {
    align-items: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.usf-product-title {
    margin: 10px 0 5px 0;
    font-size: 15px;
    color: #1f2937;

}

.usf-product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.usf-product-title a:hover {
    color: #3b82f6;
}

.usf-product-excerpt {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.usf-add-to-cart {
    margin-right: 0;
    margin-top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.usf-add-to-cart .button {
    border-radius: 5px;
    padding: 5px 20px;
    font-size: 16px;
}

.usf-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.usf-product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.usf-product-rating .usf-stars {
    display: flex;
    gap: 1px;
}

.usf-product-rating .usf-rating-count {
    font-size: 8px;
    font-weight: 600;
    color: #1f2937;
}

.usf-product-price {
    font-size: 11px;
    font-weight: 500;
    color: #1f2937;
    margin: 0;
    text-align: center;
}

.usf-product-price del {
    font-size: 14px;
    color: #dc2626;
    margin-right: 8px;
}

.usf-product-price ins {
    text-decoration: none;
}

/* Pagination */
.usf-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
}

.usf-pagination button {
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #374151;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.usf-pagination button:hover {
    background: #f8fafc;
    border-color: #d1d5db;
}

.usf-pagination button.active {
    background: #374151;
    border-color: #374151;
    color: #ffffff;
}

.usf-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* No Products Message */
.usf-no-products {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    /* This will take the full height of the viewport */
    text-align: center;
    /* Centers text within the div */
    margin: 0;
    /* Removes any margin */
    padding: 0;
    /* Removes any padding */
}

.usf-no-products h3 {
    font-size: 24px;
    color: #374151;
    margin-bottom: 12px;
}

.usf-no-products p {
    font-size: 16px;
    line-height: 1.6;
}

/* Mobile layout */
/* Responsive Design */
@media (max-width: 1034px) {
    .usf-products-header {
        padding: 0;
    }

    .usf-results-count {
        margin-top: 3px;
        margin-top: auto;
        margin-bottom: auto;
    }

    .usf-toggle-filters-btn {
        display: block;
    }

    .usf-filter-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #fff;
        z-index: 10000;
        overflow-y: auto;
        padding: 20px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        border-radius: 0;
        padding-top: 30px;
    }

    .usf-filter-sidebar.active {
        display: block;
    }

    .usf-close-btn {
        display: block;
        background: none;
        border: none;
        font-size: 15px;
        position: absolute;
        top: 3px;
        right: 3px;
        cursor: pointer;
    }
}

@media (max-width: 1024px) {
    .usf-search-filter-container {
        flex-direction: column;
    }

    .usf-filter-sidebar {
        flex: none;
        margin-bottom: 20px;
    }

    .usf-columns-4,
    .usf-columns-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {

    .usf-columns-3,
    .usf-columns-4,
    .usf-columns-5 {
        grid-template-columns: repeat(2, 1fr);
    }

    .usf-filter-sidebar {
        padding: 20px;
    }

    .usf-products-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .usf-add-to-cart {
        justify-content: center;
        align-items: center;
    }

    .usf-add-to-cart .button {
        width: 100%;
        font-size: 12px;
    }

    .usf-filter-group {
        flex-direction: column;
    }

    .usf-filter-label {
        font-size: 16px;
    }



    .usf-filter-content {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .usf-product-title {
        font-size: 13px;

    }

    .usf-product-price {
        font-size: 12px;
        font-weight: 700;
        color: #1f2937;
        margin: 0;
    }

    .usf-product-price del {
        font-size: 10px;
        color: #9ca3af;
        margin-right: 8px;
    }

    .usf-product-price ins {
        font-size: 12px;
        text-decoration: none;
        color: #dc2626;
    }

    .usf-columns-2,
    .usf-columns-3,
    .usf-columns-4,
    .usf-columns-5 {
        grid-template-columns: repeat(2, 1fr);
    }

    .usf-search-filter-container {
        gap: 20px;
    }

    .usf-color-group {
        gap: 6px;
    }

    .usf-color-option {
        padding: 4px;
    }

    .usf-price-inputs {
        gap: 8px;
    }

    .usf-price-separator {
        display: none;
    }
}

#usf-voice-btn {
    color: #686868;
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
}

#usf-camera-btn {
    color: #686868;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 20px;
}

.bi-mic-fill {
    color: rgb(207, 63, 63);
}

.usf-filter-placeholder {
    background: #e5e7eb;
    border: 2px dashed #9ca3af;
    margin: 5px 0;
    min-height: 50px;
    border-radius: 4px;
}

.usf-preview-filters .usf-filter-label {
    cursor: move;
}

.usf-drag-handle {
    display: inline-block;
    margin-right: 10px;
    cursor: move;
    color: #888;
}