/* UBICHEE header layout. The cart drawer styles live in cart-drawer.css. */

/* Drawer stacking variables (defined in ubi-global-style.php) */
/* --ubi-drawer-bg: var(--white); */
/* --ubi-drawer-shadow: -4px 0 18px rgba(0,0,0,.12); */
/* --ubi-drawer-width: 420px; */
/* --ubi-overlay-bg: rgba(0,0,0,.42); */
/* --ubi-overlay-z: 9998; */
/* --ubi-drawer-z: 9999; */
/* --ubi-drawer-radius: 18px; */

/* Mobile responsive: shop layout & header nav */
@media (max-width: 768px){
    .wp-block-columns{
        flex-direction: column !important;
    }
    .wp-block-column[style*="flex-basis: 220px"],
    .wp-block-column[style*="flex: 0 1 260px"]{
        flex-basis: auto !important;
        width: 100% !important;
        max-width: none !important;
    }
    .ubi-cat-list{
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        justify-content: center !important;
    }
    .ubi-cat-link{
        padding: 8px 14px !important;
        font-size: 13px !important;
    }
}
@media (max-width: 520px){
    .nav-ubi{
        flex-wrap: wrap !important;
        gap: 8px !important;
        height: auto !important;
        padding: 12px 5% !important;
    }
    .nav-ubi .navlinks{
        order: 3 !important;
        width: 100% !important;
        justify-content: center !important;
        gap: 8px !important;
        margin-top: 8px !important;
    }
    .nav-ubi .logo{
        order: 1 !important;
    }
    .nav-ubi .cart{
        order: 2 !important;
    }
    /* Category pills horizontal scroll */
    .ubi-cat-list{
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        overflow-x: auto !important;
        padding-bottom: 8px !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .ubi-cat-link{
        flex-shrink: 0 !important;
        padding: 8px 14px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
    }
    /* Hero section mobile */
    .hero{
        grid-template-columns: 1fr !important;
        padding: 40px 5% 40px !important;
        text-align: center !important;
        min-height: auto !important;
    }
    .hero-copy{
        order: 2 !important;
    }
    .hero-art{
        order: 1 !important;
        min-height: 300px !important;
    }
    .hero-slider{
        width: min(280px, 85%) !important;
    }
    .hero-dots{
        bottom: -30px !important;
    }
    .hero-dot{
        width: 9px !important;
        height: 9px !important;
    }
    .hero h1{
        font-size: clamp(32px, 8vw, 48px) !important;
        line-height: 1.1 !important;
        margin: 16px 0 16px !important;
        max-width: none !important;
    }
    .hero-copy p{
        font-size: 15px !important;
        line-height: 1.7 !important;
        max-width: none !important;
        margin-bottom: 20px !important;
    }
    .primary{
        padding: 14px 22px !important;
        font-size: 14px !important;
    }
    .hero-slide-label{
        font-size: 11px !important;
        padding: 8px 14px !important;
    }
    /* Sections mobile */
    .section{
        padding: 50px 5% !important;
    }
    .section-title{
        font-size: clamp(28px, 6vw, 40px) !important;
    }
    .intro, .inside{
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    .intro-mark{
        margin-bottom: 20px !important;
    }
    .product-grid{
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .product-visual{
        aspect-ratio: 1/1 !important;
    }
    .why-grid{
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    .cta{
        padding: 50px 15px !important;
    }
    .cta .section-title{
        font-size: clamp(28px, 7vw, 44px) !important;
    }
    /* Footer mobile */
    footer footer{
        flex-direction: column !important;
        text-align: center !important;
        padding: 30px 5% !important;
    }
    .footer-logo{
        margin-bottom: 15px !important;
    }
    .footlinks{
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 12px !important;
    }
    .bread{
        transform: scale(.7) rotate(8deg) !important;
    }
    .sticker{
        right: 3% !important;
        bottom: 20px !important;
        padding: 12px 16px !important;
        font-size: 14px !important;
    }
}

/* Ensure header/site-header doesn't clip drawer */
header, .site-header, .wp-site-blocks > header{
    overflow:visible !important;
}

main.wp-block-group{
    position: relative;
    z-index: 1;
    clear: both;
}

/* Sticky sidebar/menu — only while the columns sit side by side.
   Below 769px .wp-block-columns stacks; a sticky first column then floats
   over the next one (on the product page it covers the title, price and
   buy box). */
@media (min-width: 769px){
    .wp-block-columns .wp-block-column:first-child,
    .wp-block-column[style*="flex: 0 1 260px"],
    .wp-block-column[style*="max-width: 300px"],
    .is-layout-flex .wp-block-column:first-child{
        z-index: 100;
        position: sticky;
        top: calc(var(--ubi-admin-h, 0px) + var(--ubi-header-h, 120px) + 16px);
    }
}

/* Biarkan Konten Halaman Utama dan Footer Tetap Utuh */
body.cart-open, body{
    overflow-x: clip;
}
main.wp-block-group,
footer.wp-block-template-part{
    width: 100% !important;
    max-width: 100% !important;
}