/* UBICHEE Global Styles - Single source of truth for CSS variables, fonts, base styles */
/* Loaded on all pages via ubi-assets.php */


:root{
    --purple:#6737a5;
    --deep:#35165f;
    --pink:#f28eb9;
    --yellow:#ffd65a;
    --cream:#fff7e8;
    --ink:#291d35;
    --white:#fff;
    --ubi-header-h:120px;
}

/* Base styles */
*{box-sizing:border-box}
html,body{scroll-behavior:smooth;margin:0;background:var(--cream);color:var(--ink);font-family:'DM Sans',sans-serif;overflow-x:clip}
a{text-decoration:none;color:inherit}
button{font:inherit;cursor:pointer;border:0}
h1,h2,h3,h4{font-family:'Fredoka',sans-serif;color:var(--deep)}
p{color:var(--ink)}

/* Fix sticky nav: overflow:hidden creates a scroll container and breaks position:sticky.
   overflow:clip clips horizontally without creating one (Chrome 90+, FF 81+, Safari 16+). */
.wp-site-blocks{overflow:visible !important}
html{overflow:visible;scroll-padding-top:calc(var(--ubi-admin-h, 0px) + var(--ubi-header-h, 120px) + 8px)}
body{overflow-x:clip;overflow-y:visible}
@supports not (overflow: clip){
    body{overflow-x:hidden}
}
header.wp-block-template-part{
    position:sticky !important;
    top:var(--ubi-admin-h, 0px) !important;
    left:0 !important;
    right:0 !important;
    z-index:1000 !important;
    background:#fff7e8 !important;
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
    box-shadow:0 2px 8px rgba(0,0,0,.06) !important;
}
/* Pointer focus stays quiet, keyboard focus gets a ring everywhere. */
:where(.wp-site-blocks) :focus:not(:focus-visible){outline:none}
:where(.wp-site-blocks) :focus-visible{outline:2px solid var(--deep);outline-offset:2px}

/* Topbar */
.topbar-ubi{
    background:#35165f;
    color:#fff;
    text-align:center;
    padding:9px 16px;
    font-size:12px;
    letter-spacing:.12em;
    font-weight:700;
}

/* Navigation */
.nav-ubi{
    height:82px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 7%;
    background:#fff7e8;
    border-bottom:1px solid #eadfce;
    overflow:visible;
}
.nav-ubi .logo{
    display:flex;
    align-items:center;
    flex-shrink:0;
    text-decoration:none;
}
.nav-ubi .logo:focus-visible{
    outline:2px solid var(--deep);
    outline-offset:3px;
    border-radius:8px;
}
.nav-ubi .logo img{
    height:46px;
    width:auto;
    display:block;
}
.nav-ubi .navlinks{
    display:flex;
    gap:32px;
    font-size:14px;
    font-weight:700;
    font-family:'Fredoka',sans-serif;
    letter-spacing:-.2px;
}
.nav-ubi .navlinks a{
    text-decoration:none;
    color:#291d35 !important;
    white-space:nowrap;
}
.nav-ubi .navlinks a:hover{
    color:#6737a5 !important;
}
.nav-ubi .navlinks a:focus-visible{
    outline:2px solid var(--deep);
    outline-offset:3px;
    border-radius:4px;
}
body.home header.wp-block-template-part .nav-ubi .navlinks a{
    color:#291d35 !important;
}
body.home header.wp-block-template-part .nav-ubi .navlinks a:hover{
    color:#6737a5 !important;
}
.nav-ubi .cart{
    background:#ffd65a;
    color:#35165f;
    padding:12px 18px;
    border:0;
    border-radius:99px;
    font:700 14px 'Fredoka',sans-serif;
    text-decoration:none;
    cursor:pointer;
    position:relative;
}
.ubi-cart-count{
    position:absolute;
    top:-8px;
    right:-8px;
    background:#6B4C9A;
    color:#fff;
    font:700 11px 'DM Sans',sans-serif;
    min-width:20px;
    height:20px;
    border-radius:10px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:0 6px;
    box-shadow:0 2px 6px rgba(0,0,0,.15);
}
.ubi-cart-count[hidden]{
    display:none;
}

/* Mobile responsive: nav */
@media (max-width: 520px){
    .nav-ubi{
        padding:0 2.5%;
        height:60px;
    }
    .nav-ubi .logo img{
        height:32px;
    }
    .nav-ubi .navlinks{
        gap:6px;
        font-size:12px;
        font-family:'Fredoka',sans-serif;
    }
    .nav-ubi .cart{
        padding:8px 11px;
        font-size:12px;
        font-family:'Fredoka',sans-serif;
    }
}

/* Cart toast */
.cart-toast{
    position:fixed;
    right:20px;
    bottom:20px;
    background:var(--deep);
    color:white;
    padding:15px 20px;
    border-radius:14px;
    box-shadow:0 10px 30px #0003;
    opacity:0;
    transform:translateY(15px);
    transition:.25s;
    z-index:50;
    font-size:13px;
}
.cart-toast.show{
    opacity:1;
    transform:translateY(0);
}

/* Footer */
.ubi-footer{
    background:#24113e;
    color:white;
    padding:0 0 28px;
    width:100%;
    display:block;
}
.ubi-footer-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:34px 30px;
    max-width:1240px;
    margin:0 auto;
    padding:55px 7% 0;
}
.ubi-footer-brand{
    max-width:300px;
}
.ubi-footer-logo{
        height:38px;
        width:auto;
        display:block;
    }
    /* Force footer logo size on all pages including shop */
    .ubi-footer .ubi-footer-logo,
    footer.wp-block-template-part .ubi-footer-logo{
        height:38px !important;
        width:auto !important;
        display:block !important;
    }
.ubi-footer-tagline{
    font-size:12.5px;
    color:#cdbfd8;
    line-height:1.75;
    margin:14px 0 0;
}
.ubi-footer-col{
    flex:1 1 120px;
}
.ubi-footer-title{
    font-size:11px;
    font-weight:800;
    letter-spacing:.14em;
    text-transform:uppercase;
    color:#e8dff0;
    margin-bottom:15px;
}
.ubi-footer-col a{
    display:block;
    color:#cdbfd8;
    text-decoration:none;
    font-size:12.5px;
    margin-bottom:10px;
}
.ubi-footer-col a:hover{
    color:var(--yellow);
}
.ubi-footer-col a:focus-visible{
    outline:2px solid var(--yellow);
    outline-offset:3px;
    border-radius:4px;
}
.ubi-footer-bottom{
    border-top:1px solid #ffffff22;
    margin:42px 7% 0;
    padding-top:22px;
    text-align:center;
}
.ubi-footer-bottom p{
    font-size:12px;
    color:#cdbfd8;
    margin:0;
}

/* Mobile responsive: footer */
@media (max-width: 520px){
    .ubi-footer-grid{
        grid-template-columns:1fr !important;
        gap:24px !important;
        padding:30px 5% 0 !important;
    }
    .ubi-footer-brand{
        max-width:none !important;
        text-align:center !important;
        margin-bottom:15px !important;
    }
    /* display:block on the logo wins over text-align, so center it explicitly */
    .ubi-footer-brand .ubi-footer-logo{
        margin-left:auto !important;
        margin-right:auto !important;
    }
    .ubi-footer-col{
        text-align:center !important;
    }
    .ubi-footer-col a{
        margin-bottom:8px !important;
        font-size:13px !important;
    }
    .ubi-footer-title{
        margin-bottom:10px !important;
    }
    .ubi-footer-bottom{
        margin:30px 5% 0 !important;
        padding-top:18px !important;
    }
    .ubi-footer-bottom p{
        font-size:11px !important;
    }
}

/* FAQ: widen the narrow inline container (page renders its own H1) */
.page-id-42 .entry-content section[style*="padding:60px 7%"] {
    padding-left: 5% !important;
    padding-right: 5% !important;
}
.page-id-42 .entry-content div[style*="max-width:800px"] {
    max-width: 1080px !important;
}

/* Kontak: widen the narrow inline container */
.page-id-28 .entry-content section[style*="padding:60px 7%"] {
    padding-left: 5% !important;
    padding-right: 5% !important;
}
.page-id-28 .entry-content div[style*="max-width:700px"] {
    max-width: 1080px !important;
}

/* Tentang Kami: widen the narrow inline container */
.page-id-27 .entry-content section[style*="padding:60px 7%"] {
    padding-left: 5% !important;
    padding-right: 5% !important;
}
.page-id-27 .entry-content div[style*="max-width:800px"] {
    max-width: 1080px !important;
}

/* ===== Accessibility helper + "was" price =====
   WooCommerce's .screen-reader-text ("Harga aslinya adalah: ...") used to become
   visible whenever its plugin stylesheet was missing, leaving that sentence sitting
   between the two prices. Declare it here so it never depends on plugin CSS.
   The struck-through old price also needs an explicit line: browsers stop drawing
   the UA decoration once any ancestor sets text-decoration. */
.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
.screen-reader-text:focus {
    position: static !important;
    width: auto;
    height: auto;
    clip: auto;
    clip-path: none;
    background: #fff;
    color: var(--ink);
    padding: 8px 12px;
}
/* "Was" price: a drawn bar rather than text-decoration. Relying on the UA
   line-through left the old price looking un-struck at 13px in the cards. */
del {
    text-decoration: none !important;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 100% 2px;
    background-position: 0 55%;
    background-repeat: no-repeat;
}
del .woocommerce-Price-amount,
del .amount {
    opacity: .65;
}
ins {
    text-decoration: none !important;
}

/* ===== Product buy box: radio sizes as brand pills =====
   The swatch plugin leaves a 30px radio and a bare text label. Make the label
   the pill so the whole option is tappable, keeping the real radio for a11y. */
.single-product .tawcvs-swatches {
    gap: 8px;
}
.single-product .tawcvs-swatches .swatch-item-wrapper {
    display: inline-flex;
    width: max-content;
}
.single-product .tawcvs-swatches input.swatch {
    position: absolute !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
}
.single-product .tawcvs-swatches label.swatch-label {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 108px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--purple);
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
}
.single-product .tawcvs-swatches input:checked + label.swatch-label {
    background: var(--purple);
    color: #fff;
}
.single-product .tawcvs-swatches input:focus-visible + label.swatch-label {
    outline: 2px solid var(--deep);
    outline-offset: 2px;
}
.single-product .quantity input.qty {
    border: 1px solid var(--purple);
    border-radius: 10px;
    font-size: 15px;
    text-align: center;
}
.single-product .single_add_to_cart_button {
    border-radius: 10px;
}
/* Keep the reset link beside the size pills instead of on its own line. */
.single-product .reset_variations {
    display: inline !important;
    margin-left: 4px;
}

/* Sale badge on the product page (gallery block + classic templates).
   Same purple pill as the shop cards so the two views match. */
.woocommerce span.onsale,
.wp-block-woocommerce-product-image-gallery .onsale{
    position: absolute !important;
    top: 16px !important;
    left: 16px !important;
    right: auto !important;
    z-index: 3;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 7px 13px !important;
    border-radius: 999px !important;
    background: var(--purple) !important;
    color: #fff !important;
    font: 800 11px/1.1 'DM Sans', sans-serif !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
    box-shadow: 0 3px 10px rgba(53,22,95,.28) !important;
    pointer-events: none;
}
.ubi-coupon-notice{
    grid-column: 1 / -1;
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #f0c36d;
    border-radius: 12px;
    background: #fff8e6;
    color: #5a3b00;
    font-size: 13px;
    line-height: 1.5;
}
@media (max-width: 600px){
    .woocommerce span.onsale,
    .wp-block-woocommerce-product-image-gallery .onsale{
        top: 12px !important;
        left: 12px !important;
        font-size: 10px !important;
        padding: 6px 11px !important;
    }
}
