/* ==========================================================================
   Site UI Enhancer - Responsive Carousel Only
   ========================================================================== */

/**
 * ─── 1. MOBILE & TABLET ONLY CAROUSEL ( < 1024px ) ───
 * On desktop, we let the theme/shortcode handle the grid defaultly.
 */
@media (max-width: 1023px) {

    /* Container Setup */
    .auto-site-carousel ul.products,
    .auto-site-carousel .elementor-posts-container,
    .auto-site-carousel .products.elementor-grid,
    .auto-site-carousel .elementor-widget-container > ul.products,
    .auto-site-carousel .wpcap-grid-container {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        gap: 16px !important;
        padding-bottom: 20px !important;
        justify-content: flex-start !important;
        align-items: stretch !important;
        
        /* Hide scrollbar */
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }

    .auto-site-carousel ul.products::-webkit-scrollbar,
    .auto-site-carousel .elementor-posts-container::-webkit-scrollbar,
    .auto-site-carousel .products.elementor-grid::-webkit-scrollbar,
    .auto-site-carousel .wpcap-grid-container::-webkit-scrollbar {
        display: none !important;
    }

    /* Item Widths & Normalization */
    .auto-site-carousel ul.products li.product,
    .auto-site-carousel .elementor-post,
    .auto-site-carousel .elementor-grid-item,
    .auto-site-carousel .wpcap-post {
        scroll-snap-align: start !important;
        margin: 0 !important; 
        float: none !important;
        clear: none !important;
        text-align: inherit !important;
        
        /* Default Responsive Width (2 per view) */
        flex: 0 0 calc(50% - 16px) !important;
        width: calc(50% - 16px) !important;
        min-width: calc(50% - 16px) !important;
    }

    /* Pure Mobile ( < 768px ): 1 per view for Posts */
    @media (max-width: 767px) {
        .auto-site-carousel .elementor-post,
        .auto-site-carousel .wpcap-post {
            flex: 0 0 100% !important;
            width: 100% !important;
            min-width: 100% !important;
        }
    }
}

/**
 * ─── 2. GLOBAL CLEANUPS (Applies to all devices) ───
 */
/* Hide accessibility price text */
.woocommerce-Price-amount > .screen-reader-text,
.price > .screen-reader-text,
.woocommerce-Price-amount del .screen-reader-text,
.woocommerce-Price-amount ins .screen-reader-text {
    display: none !important;
}

/* Hide Uncategorized categories */
.posted_in a[href*="uncategorized"],
.posted_in a[href*="tanpa-kategori"] {
    display: none !important;
}

.posted_in { font-size: 0 !important; }
.posted_in a { font-size: 13px !important; }
