/* Joo Filter Specific Styles - Avoid WordPress theme conflicts */
.joo-filter-container {
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
}

.joo-filter-container * {
    box-sizing: border-box;
}

.joo-filter-container .filter-box {
    max-width: 100%;
    margin: auto;
    border-radius: 12px;
}
.joo-filter-container .filter-pill:focus, .joo-filter-container .btn:focus, .joo-filter-container .form-control:focus, .joo-filter-container .form-select:focus {
    outline: none !important;
    outline-offset: none !important;
}
.btn:hover,.btn-check:checked+.btn, .btn.active, .btn.show, .btn:first-child:active, :not(.btn-check)+.btn:active {
    color: #212529 !important;
    background-color: #0d6efd00 !important;
    border-color: #cccccc !important;
}
.joo-filter-container .filter-pill:focus, .joo-filter-container .btn:focus, .joo-filter-container .form-control:focus, .joo-filter-container .form-select:focus {
    outline: none !important;
    outline-offset: 2px !important;
}
button.btn.btn-outline-primary.dropdown-toggle.w-100 {
    border: 1px solid #cccccc;
    color: #212529;
    font-size: 14px !important;
    font-weight: 400;
    max-width: 200px;
    height: 40px;
}
.joo-filter-container .form-select:focus {
    outline: none !important;
    border: 1px solid #cccccc !important;
}
.joo-filter-container .filter-pill:focus, .joo-filter-container .btn:focus, .joo-filter-container .form-control:focus, .joo-filter-container .form-select:focus {
    outline: none !important;
}


.joo-filter-container .filter-pill:focus, .joo-filter-container .btn:focus, .joo-filter-container .form-control:focus, .joo-filter-container .form-select:focus {
    outline: none !important;
    outline-offset: 2px !important;
}

.joo-filter-container .scroll-x {
    display: flex;
    overflow-x: auto; /* This will be toggled by JS on mobile */
	overflow-y: hidden !important;
    gap: 10px;
    padding-bottom: 10px;
    scrollbar-width: none; /* Firefox */
    margin-bottom: 15px;
    cursor: grab;
    user-select: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: auto;	
    overscroll-behavior-x: contain;
    transform: translateZ(0);
    will-change: scroll-position;
}

.joo-filter-container .scroll-x:active {
    cursor: grabbing;
}

.joo-filter-container .scroll-x.active {
    cursor: grabbing;
}

.joo-filter-container .scroll-x::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}
.price-item.dropdown {
    position: initial !important;
}
.dropdown, .dropdown-center, .dropend, .dropstart, .dropup, .dropup-center {
    position: initial !important;
}
/* Hide subcategories on PC - only show in mobile modal */
.subcategory-section-mobile {
    display: none !important;
}

/* * ===================================================================
 * MOBILE SCROLL FIX (START) - v4 COMPATIBILITY
 * ===================================================================
 */
@media (max-width: 768px) {
    .joo-filter-container .scroll-x {
        -webkit-overflow-scrolling: touch;	
        overscroll-behavior-x: contain;	
        scroll-behavior: auto;	
        cursor: default;	
        
        /* --- ISOLATION FIX (from v3) --- */
        /* * These properties help isolate the slider from page reflows,
         * making the new JS v4 (overflow-toggle) even more reliable.
         */
        contain: layout paint;
        overflow-anchor: auto;
        /* --- END ISOLATION FIX --- */
        
        /* * All conflicting transform/position/snap rules have been removed.
         * The JS v4 will now control 'overflow-x' directly.
         */
        transform: none !important;
        position: static;	
        left: auto;
        right: auto;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
        scroll-snap-type: none !important;
    }

    .joo-filter-container .scroll-x:active {
        cursor: default;
    }

    .joo-filter-container .filter-box {
         overflow-x: hidden;
         position: static;
         left: auto;
         right: auto;
         margin-left: 0;
         margin-right: 0;
    }

    .joo-filter-container .filter-pill {
        flex-shrink: 0; /* Critical for horizontal scrolling */
        
        /* Apply to pills as well for stability */
        contain: layout paint;	
        overflow-anchor: auto;

        transform: none !important;	
        position: relative;
        left: auto !important;
        right: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
    
    /* Show subcategories on mobile */
    .subcategory-section-mobile {
        display: block !important;
    }
    
    .joo-filter-container {
        position: relative;
        overflow-x: none;
        width: 100%;
        max-width: 100%;
    }
}
/* * ===================================================================
 * MOBILE SCROLL FIX (END)
 * ===================================================================
 */


/* Attribute pills styling */
.joo-filter-container .attribute-group {
    margin-bottom: 15px;
}

.joo-filter-container .attribute-group .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.joo-filter-container .attribute-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.joo-filter-container .attribute-pill {
    border-radius: 20px;
    padding: 6px 16px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    user-select: none;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}

.joo-filter-container .attribute-pill.active {
    background: #007cba !important;
    color: #fff !important;
    border-color: #007cba !important;
}

.joo-filter-container .attribute-pill:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.joo-filter-container .attribute-pill.active:hover {
    background: #005a87 !important;
}

.joo-filter-container .filter-pill {
    border-radius: 50px;
    padding: 8px 20px;
    border: 1px solid #ccc;
    background: #f1f1f1;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    user-select: none;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    min-width: fit-content;
}

.joo-filter-container .filter-pill.active {
    background: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
}

.joo-filter-container .filter-pill:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.joo-filter-container .filter-pill.active:hover {
    background: #333 !important;
}

.joo-filter-container .filter-section {
    margin-top: 20px;
}

.joo-filter-container .attr-box, 
.joo-filter-container .price-box {
    max-width: 400px;
    margin-bottom: 20px;
}

.joo-filter-container .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.joo-filter-container .form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    margin-bottom: 10px;
    cursor: pointer;
}

.joo-filter-container .form-select:focus {
    outline: none !important;
    outline-offset: 2px !important;
    border-color: #007cba;
}

.joo-filter-container .attr-box {
    max-width: 100%;
    margin-bottom: 20px;
}

/* Inline attribute layout for desktop */
.joo-filter-container .attributes-inline {	
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}
.attribute-item {
    float: left;
    margin-right: 10px;
}
.joo-filter-container .attribute-item {
    flex: 1;
    min-width: 200px;
    max-width: 250px;
}

.joo-filter-container .attribute-item .form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.joo-filter-container .form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
}

.joo-filter-container .form-select:focus {
    outline: none !important;
    outline-offset: 2px !important;
    border-color: #007cba;
}




.joo-filter-container .filter-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 15px;
}

.joo-filter-container .filter-results-header .results-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    text-align: left;
}

.joo-filter-container .filter-results-header .results-info span {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.joo-filter-container .filter-results-header .results-controls {
    min-width: 200px;
}

.joo-filter-container .filter-results-header .results-controls select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

/* Mobile Filter Toggle in Results Header */
.joo-filter-container .filter-results-header .mobile-filter-toggle {
    display: none;
    margin: 0;
}

.joo-filter-container .filter-results-header .filter-toggle-btn {
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
    height: 42px;
    box-sizing: border-box;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .joo-filter-container .filter-results-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .joo-filter-container .filter-results-header .results-info {
        order: 1;
        width: 45%;
        text-align: left;
    }
    
    .joo-filter-container .filter-results-header .mobile-filter-toggle {
        display: block;
        order: 2;
        width: 100%;
    }
    
    .joo-filter-container .filter-results-header .results-controls {
        order: 3;
        width: 45%;
        text-align: right;
        min-width: unset;
    }
    
    .joo-filter-container .filter-results-header .results-info span {
        margin-bottom: 15px;
        font-size: 16px;
    }
}

.joo-filter-container .results-info {
    text-align: left;
    font-weight: 500;
}

.joo-filter-container .results-controls {
    text-align: right;
}

.joo-filter-container .results-controls select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    height: 42px;
    box-sizing: border-box;
}

/* Mobile responsive - stack vertically on small screens */
@media (max-width: 768px) {
    .joo-filter-container .attributes-inline {
        flex-direction: column;
        gap: 10px;
    }
    
    .joo-filter-container .attribute-item {
        max-width: 100%;
        min-width: 100%;
    }
}

.joo-filter-container .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
}

.joo-filter-container .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s ease;
}

.joo-filter-container .btn-dark {
    background: #000;
    color: #fff;
}

.joo-filter-container .btn-dark:hover {
    background: #333;
}

.joo-filter-container .btn-outline-secondary {
    background: transparent;
    color: #666;
    border: 1px solid #ccc;
}

.joo-filter-container .btn-outline-secondary:hover {
    background: #f8f9fa;
}

.joo-filter-container .btn-primary {
    background: #000 !important;
    color: #fff;
    border: 1px solid #000;
}

.joo-filter-container .btn-primary:hover {
    background: #333 !important;
    border-color: #333;
	color: #fff !important;
}

.joo-filter-container .d-flex {
    display: flex;
}

.joo-filter-container .gap-2 {
    gap: 10px;
}

.joo-filter-container .mt-3 {
    margin-top: 20px;
}

.joo-filter-container .mt-4 {
    margin-top: 25px;
}

.joo-filter-container .mb-2 {
    margin-bottom: 10px;
}

.joo-filter-container #filter-results {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 20px;
    min-height: 100vh;
    transition: min-height 0.3s ease;
}

/* Remove min-height when products are loaded */
.joo-filter-container #filter-results:not(:empty) {
    min-height: auto;
}

/* Loading state styling */
/* Loading Spinner */
.joo-filter-container .loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    flex-direction: column;
    gap: 15px;
}

.joo-filter-container .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.joo-filter-container .loading-text {
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

/* Loading Spinner at Top */
.joo-filter-container .loading-spinner-top {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    flex-direction: column;
    gap: 15px;
    position: sticky;
    top: 0;
    background: white;
    z-index: 100;
    border-bottom: 1px solid #eee;
}

.joo-filter-container .loading-spinner-top .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.loading-spinner-top{
    width: 100% !important;
    margin-bottom: 100vh;
}
.joo-filter-container .loading-spinner-top .loading-text {
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

/* Auto adjust min-height for single product pages */
body.single-product .joo-filter-container #filter-results {
    min-height: auto !important;
}

/* Keep 100vh for other pages */
.joo-filter-container #filter-results {
    min-height: 100vh;
    transition: min-height 0.3s ease;
}

/* Remove min-height when products are loaded */
.joo-filter-container #filter-results:not(:empty) {
    min-height: auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.joo-filter-container {
    padding: 0 !important;
}
.joo-filter-container .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: -20px;
}

/* Mobile responsive - 2 products per line using width approach */
@media (max-width: 768px) {
    .joo-filter-container .product-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: space-between;
    }
    
    .joo-filter-container .product-card {
        width: 48%;
        padding: 10px;
    }
    
    .joo-filter-container .product-card img {
        height: 150px;
    }
    
    .joo-filter-container .product-title {
        font-size: 14px;
        margin: 8px 0;
    }
}

/* For very small screens (phones in portrait) */
@media (max-width: 480px) {
    .joo-filter-container .product-card {
        width: 48%;
        padding: 8px;
    }
    
    .joo-filter-container .product-card img {
        height: 120px;
    }
    
    .joo-filter-container .product-title {
        font-size: 13px;
        margin: 6px 0;
    }
}

.joo-filter-container .product-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0px;
    text-align: center;
    transition: transform 0.2s;
    background: #fff;
}

.joo-filter-container .product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Make entire product card clickable */
.joo-filter-container .product-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
	padding: 0 10px;
}

.joo-filter-container .product-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.joo-filter-container .product-card:hover .product-card-link {
    transform: none;
}

/* Ensure button stays separate and clickable */
.joo-filter-container .product-button {
    position: relative;
    z-index: 2;
    margin-top: 10px;
    display: inline-block;
}

.joo-filter-container .product-card img {
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

.joo-filter-container .product-title {
    font-weight: bold;
    margin: 10px 0;
    font-size: 14px;
    color: #333;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.2;
}

/* Rating styles for product cards */
.joo-filter-container .jet-woo-builder-archive-product-rating {
    margin: 10px 0 5px 0;
    display: flex;
    justify-content: center;
}

.joo-filter-container .jet-woo-product-rating {
    position: relative;
    display: inline-block;
}

.joo-filter-container .product-star-rating {
    position: relative;
    display: inline-block;
    font-size: 14px;
    color: #ddd;
}

.joo-filter-container .product-star-rating__rated {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    color: #ffc107;
}

.joo-filter-container .product-rating__icon {
    color: #878787;
    font-size: 24px;
    margin-right: 1px;
}

/**mobile responsive**/
@media (max-width: 480px){
	.joo-filter-container .product-rating__icon {
    color: #878787;
    font-size: 24px;
    margin-right: 1px;
}
}

.joo-filter-container .product-rating__icon.active {
    color: #ffc107;
}

.joo-filter-container .product-rating__icon:before {
    content: "★";
}

.joo-filter-container .jet-woo-product-rating.empty {
    opacity: 0.5;
}

.joo-filter-container .product-price {
    color: #000000;
    font-weight: 400;
    font-size: 18px;
    text-decoration: none !important;
}

/* For very small screens (phones in portrait) */
@media (max-width: 480px){
	.joo-filter-container .product-price {
    color: #000000;
    font-weight: 500;
    font-size: 15px;
    text-decoration: none !important;
}
}

/* Loading states */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hide subcategories on PC - only show in mobile modal */
.subcategory-section-mobile,.mobile-filter-toggle,.filter-actions.filter-section-mobile {
    display: none !important;
}
div:where(.swal2-container).swal2-backdrop-show, div:where(.swal2-container).swal2-noanimation {
    background: #fff !important;
}
	
div#filter-results {
    margin-top: -25px !important;
}
.attr-box.filter-section-mobile,.price-box.filter-section-mobile {
    display: block !important;
    width: 100% !important;
    height: 30px;
}
#price-range-section,.filter-actions.filter-section-mobile {
    display: block ! IMPORTANT;
}
button.btn.btn-outline-secondary.more-attributes-btn {
    background: none !important;
    border: 1px solid #cccccc !important;
    max-height: 38px !important;
    color: #212529 !important;
    font-weight: 300 !important;
}
button#apply-filter:hover,button#reset-filter:hover {
    background: #000000;
    color: #fff !important;
}
/* Mobile-specific styles */
@media (max-width: 768px) {
    .joo-filter-container #filter-results{
        margin-top: -10px !important;
        padding-top: 0px !important;
    }
    .filter-actions.filter-section-mobile {
        margin-top: -10px !important;
    }
    button.swal2-close.custom-close-btn {
        background: #222222 !important;
        border: 1px solid black;
        padding: 15px 10px;
        margin-top: 5px;
    }
    .filter-actions.filter-section-mobile,#price-range-section,.subcategory-section-mobile,.attr-box.filter-section-mobile,.price-box.filter-section-mobile {
        display: none !important;
    }
    
    /* Fix price range section layout when shown */
    #price-range-section.showInMobile {
        display: block !important;
        margin-bottom: 20px !important;
        padding: 15px !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 8px !important;
        background: #f9f9f9 !important;
        position: relative !important;
        z-index: 10 !important;
        animation: slideDown 0.3s ease-out !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    }
    
    /* Animation for price range section */
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
            max-height: 0;
        }
        to {
            opacity: 1;
            transform: translateY(0);
            max-height: 300px;
        }
    }
    
    /* Ensure price range section is properly positioned */
    #price-range-section {
        transition: all 0.3s ease !important;
        overflow: hidden !important;
    }
    
    /* Ensure action button doesn't cover price range */
    .filter-actions.filter-section-mobile {
        margin-top: 20px !important;
        position: relative !important;
        z-index: 5 !important;
        transition: margin-top 0.3s ease !important;
    }
    .mobile-filter-toggle,.showInMobile{
        display: block !important;
    }
    
    .showInPc {
        display: none !important;
    }
    
    /* Ensure proper mobile layout for results header */
    .joo-filter-container .filter-results-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    /* Create inline row for results-info and results-controls on mobile */
    .joo-filter-container .filter-results-header .inline-row {
        order: 1;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 15px;
    }
    
    .joo-filter-container .filter-results-header .results-info {
        flex: 1;
        text-align: left;
        align-items: flex-start;
    }
    
    .joo-filter-container .filter-results-header .results-controls {
        flex: 0 0 auto;
        min-width: 150px;
        text-align: right;
    }
    
    .joo-filter-container .filter-results-header .mobile-filter-toggle {
        order: 2;
        width: 100%;
        text-align: left;
    }
    div#filter-sections {
        margin-bottom: -25px !important;
    }
    
    /* Ensure proper spacing between filter sections */
    .filter-section {
        margin-bottom: 15px !important;
    }
    
    /* Fix overlapping issues */
    .joo-filter-container * {
        box-sizing: border-box !important;
    }
}

/* Desktop styles for results header */
@media (min-width: 769px) {
    .joo-filter-container .filter-results-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
    }
    
    .joo-filter-container .filter-results-header .inline-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex: 1;
        gap: 20px;
    }
    
    .joo-filter-container .filter-results-header .results-info {
        flex: 1;
        text-align: left;
    }
    
    .joo-filter-container .filter-results-header .results-controls {
        min-width: 200px;
        text-align: right;
    }
    
    .joo-filter-container .filter-results-header .mobile-filter-toggle,.filter-section-mobile,.price-box.filter-section-mobile {
        display: none !important;
    }
    
    .showInMobile {
        display: none !important;
    }
    
    .showInPc {
        display: block !important;
        text-align: left;
    }
}

/* * ===================================================================
 * SKELETON LOADER STYLES (NEW - CUSTOM)
 * All styles are prefixed with .joo-filter-container to prevent conflicts.
 * ===================================================================
 */

/* Shimmer Animation */
@keyframes shimmer-animation {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

/* Base element for all skeleton parts */
.joo-filter-container .skeleton-wrap [class^="skeleton-"] {
    animation: shimmer-animation 1.2s linear infinite forwards;
    background: #f6f7f8;
    background-image: linear-gradient(to right, #eeeeee 0%, #dddddd 20%, #eeeeee 40%, #eeeeee 100%);
    background-repeat: no-repeat;
    background-size: 800px 400px; /* Large size to cover all elements */
}

/* Skeleton Container */
.joo-filter-container .skeleton-wrap {
    padding: 0 10px; /* Adjust padding to match your layout */
    margin-top: 20px;
}

/* Skeleton Header */
.joo-filter-container .skeleton-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    gap: 15px;
}

.joo-filter-container .skeleton-controls .skeleton-text {
    height: 21px;
    border-radius: 4px;
}

.joo-filter-container .skeleton-controls .skeleton-text.short {
    width: 200px;
}

.joo-filter-container .skeleton-controls .skeleton-text.long {
    width: 200px;
    height: 42px; /* Match sort dropdown height */
}

/* Skeleton Grid (uses the *real* product grid class for layout) */
.joo-filter-container .skeleton-wrap .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 0; /* Override the negative margin */
}

/* Skeleton Product Card */
.joo-filter-container .skeleton-product-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    background: #fff; /* White background */
}

.joo-filter-container .skeleton-image {
    max-width: 100%;
    height: 200px; /* Same as .product-card img */
    object-fit: cover;
    border-radius: 4px; /* Same as .product-card img */
    margin-bottom: 10px; /* Space between image and title */
}

.joo-filter-container .skeleton-content {
    /* No extra padding needed, card has padding */
}

.joo-filter-container .skeleton-title {
    width: 80%;
    height: 19px; /* Matches .product-title font-size/line-height */
    margin: 10px auto; /* Centered, with same margin as .product-title */
    border-radius: 4px;
}

.joo-filter-container .skeleton-price {
    width: 40%;
    height: 22px; /* Matches .product-price */
    margin: 10px auto; /* Centered */
    border-radius: 4px;
}

.joo-filter-container .skeleton-rating {
    width: 100px; /* Fixed width for the 5 stars */
    height: 17px; /* Matches .jet-woo-builder-archive-product-rating */
    margin: 10px auto 5px auto; /* Matches .jet-woo-builder-archive-product-rating */
    border-radius: 4px;
}

.joo-filter-container .skeleton-button {
    width: 90%; /* A bit smaller than 100% */
    height: 35px; /* Matches .product-button (btn-sm) */
    margin: 10px auto 0 auto; /* Matches .product-button */
    border-radius: 6px; /* Matches .btn */
}

/* Responsive for skeleton cards */
@media (max-width: 768px) {
    .joo-filter-container .skeleton-wrap .product-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: space-between;
    }

    .joo-filter-container .skeleton-product-card {
        width: 48%;
        padding: 10px;
    }

    .joo-filter-container .skeleton-image {
        height: 150px; /* Same as responsive .product-card img */
    }

    .joo-filter-container .skeleton-title {
        height: 17px;
        margin: 8px auto;
    }
}

@media (max-width: 480px) {
    .joo-filter-container .skeleton-product-card {
        width: 48%;
        padding: 8px;
    }

    .joo-filter-container .skeleton-image {
        height: 120px; /* Same as small-screen .product-card img */
    }

    .joo-filter-container .skeleton-title {
        height: 16px;
        margin: 6px auto;
    }
}


a.btn.btn-primary.btn-sm.mt-2.product-button {
    display: none;
}