/**
 * suPixel AI Try On — Frontend styles.
 * Theme-proofed: all rules use !important to prevent WooCommerce theme overrides.
 * This is standard practice for plugin UI (WooCommerce, Elementor, WPForms all do this).
 *
 * @package SupixelAITryOn
 * @since   1.0.0
 */

/* ═══ TRY IT ON BUTTON (product page) ═══ */

button.sato-try-on-btn,
.woocommerce button.sato-try-on-btn,
.woocommerce-page button.sato-try-on-btn,
form.cart button.sato-try-on-btn,
.woocommerce div.product form.cart button.sato-try-on-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 10px 20px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    border: none !important;
    border-radius: var(--sato-btn-radius, 8px) !important;
    background: var(--sato-accent, #6AADA8) !important;
    color: #fff !important;
    cursor: pointer !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    white-space: nowrap !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    margin: 0 0 0 8px !important;
    min-height: auto !important;
    float: none !important;
    transition: opacity 0.2s !important;
}
button.sato-try-on-btn:hover,
.woocommerce button.sato-try-on-btn:hover { opacity: 0.85 !important; background: var(--sato-accent, #6AADA8) !important; color: #fff !important; }
button.sato-try-on-btn:focus { outline: none !important; box-shadow: none !important; }
.sato-try-on-btn .sato-btn-icon { width: 16px !important; height: 16px !important; flex-shrink: 0 !important; }

/* ───── Button below product image ─────
   PHP hooks the button via woocommerce_product_thumbnails, which renders
   it INSIDE .woocommerce-product-gallery. sato-frontend.js wraps the
   button in a 100%-width div (.sato-btn-wrap) and appends it as the
   LAST CHILD of the gallery. This keeps the button in the image column
   and below the gallery, on its own row, regardless of flex/grid layouts
   used by themes like Storefront, Astra, Flatsome, and Divi. */

/* Wrapper takes a full row below the gallery images. clear:both breaks
   out of any inline/flex layout. flex-basis:100% handles grid/flex
   parents that would otherwise squeeze it alongside thumbnails. */
.woocommerce-product-gallery .sato-btn-wrap {
    display: block !important;
    width: 100% !important;
    flex-basis: 100% !important;
    clear: both !important;
    margin: 16px 0 24px !important;
    text-align: center !important;
    position: relative !important;
    z-index: 10 !important;
    order: 999 !important; /* push to end in flex containers */
    grid-column: 1 / -1 !important; /* span all columns in grid containers */
}

/* ───── Overlay on product image ─────
   When button_position is 'overlay_image', sato-frontend.js anchors the
   wrapper to the image element (.woocommerce-product-gallery__image, which
   WooCommerce already sets position:relative) and tags it with a corner
   class. The button floats over the image in that corner.
   Top-right is offset to clear the gallery zoom trigger
   (.woocommerce-product-gallery__trigger), which lives there by default. */
.sato-btn-wrap.sato-btn-overlay {
    position: absolute !important;
    width: auto !important;
    flex-basis: auto !important;
    margin: 0 !important;
    clear: none !important;
    z-index: 60 !important; /* above slider thumbs, zoom layer, sale badges */
    pointer-events: none !important; /* let only the button catch clicks */
}
.sato-btn-wrap.sato-btn-overlay .sato-try-on-btn {
    pointer-events: auto !important;
    margin: 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18) !important;
}
.sato-btn-wrap.sato-btn-overlay--bottom_right { bottom: 12px !important; right: 12px !important; left: auto !important; top: auto !important; }
.sato-btn-wrap.sato-btn-overlay--bottom_left  { bottom: 12px !important; left: 12px !important;  right: auto !important; top: auto !important; }
.sato-btn-wrap.sato-btn-overlay--top_left     { top: 12px !important;    left: 12px !important;  right: auto !important; bottom: auto !important; }
/* Top-right: nudge down so it sits below the zoom magnifier icon. */
.sato-btn-wrap.sato-btn-overlay--top_right    { top: 52px !important;    right: 12px !important; left: auto !important;  bottom: auto !important; }

/* On small screens tighten the inset a touch. */
@media (max-width: 600px) {
    .sato-btn-wrap.sato-btn-overlay--bottom_right,
    .sato-btn-wrap.sato-btn-overlay--bottom_left { bottom: 8px !important; }
    .sato-btn-wrap.sato-btn-overlay--bottom_right,
    .sato-btn-wrap.sato-btn-overlay--top_right { right: 8px !important; }
    .sato-btn-wrap.sato-btn-overlay--bottom_left,
    .sato-btn-wrap.sato-btn-overlay--top_left { left: 8px !important; }
    .sato-btn-wrap.sato-btn-overlay--top_left { top: 8px !important; }
    .sato-btn-wrap.sato-btn-overlay--top_right { top: 44px !important; }
}

/* The repositioned button: centre it, give it some breathing room. */
.sato-try-on-btn.sato-btn-repositioned {
    display: inline-flex !important;
    justify-content: center !important;
    width: auto !important;
    margin: 0 auto !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Fallback: button still inside the gallery without wrapper (JS not yet run).
   Force it above slider thumbnails with a new stacking context. */
.woocommerce-product-gallery .sato-try-on-btn:not(.sato-btn-repositioned) {
    display: flex !important;
    justify-content: center !important;
    width: auto !important;
    margin: 16px auto !important;
    position: relative !important;
    z-index: 10 !important;
    clear: both !important;
}

/* ═══ MODAL RESET — kill all inherited theme styles ═══ */

body.sato-modal-open { overflow: hidden !important; }

#sato-modal { position: fixed !important; inset: 0 !important; z-index: 999999 !important; display: flex !important; align-items: center !important; justify-content: center !important; padding: 16px !important; margin: 0 !important; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important; }
#sato-modal[hidden] { display: none !important; }
#sato-modal *, #sato-modal *::before, #sato-modal *::after { box-sizing: border-box !important; margin: 0 !important; text-transform: none !important; letter-spacing: 0 !important; text-decoration: none !important; }
#sato-modal p { margin: 0 !important; }
#sato-modal h2, #sato-modal h3 { margin: 0 !important; padding: 0 !important; border: none !important; background: none !important; }

/* Kill theme button styles — beats [type=button] { color: #c36; border: 1px solid #c36 } */
#sato-modal button {
    color: #666 !important;
    border: none !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer !important;
    transition: all 0.15s !important;
}
    line-height: inherit !important;
    display: inline-flex !important;
    align-items: center !important;
}

#sato-modal svg { flex-shrink: 0 !important; }

/* ═══ BACKDROP ═══ */

#sato-modal .sato-modal-backdrop { position: absolute !important; inset: 0 !important; background: rgba(0,0,0,0.5) !important; backdrop-filter: blur(8px) !important; -webkit-backdrop-filter: blur(8px) !important; }

/* ═══ CONTAINER ═══ */

#sato-modal .sato-modal-container { position: relative !important; width: 100% !important; max-width: 400px !important; max-height: 90vh !important; overflow-y: auto !important; background: #fff !important; border-radius: 20px !important; box-shadow: 0 20px 60px rgba(0,0,0,0.2) !important; border: none !important; padding: 0 !important; animation: satoUp 0.35s cubic-bezier(0.16,1,0.3,1) !important; }
@keyframes satoUp { from { opacity:0; transform:translateY(20px) scale(0.98); } to { opacity:1; transform:translateY(0) scale(1); } }

/* ═══ HEADER ═══ */

#sato-modal .sato-modal-header { display: flex !important; align-items: center !important; justify-content: space-between !important; padding: 16px 20px 0 !important; }
#sato-modal .sato-modal-header-left { display: flex !important; align-items: center !important; gap: 8px !important; }
#sato-modal .sato-modal-logo { width: 24px !important; height: 24px !important; background: #1a1a1a !important; border-radius: 6px !important; display: flex !important; align-items: center !important; justify-content: center !important; }
#sato-modal .sato-modal-logo-dot { width: 8px !important; height: 8px !important; border: 1.5px solid #fff !important; border-radius: 50% !important; background: transparent !important; }
#sato-modal .sato-modal-title { font-size: 17px !important; font-weight: 500 !important; color: #1a1a1a !important; line-height: 1.3 !important; }
#sato-modal button.sato-modal-close { width: 28px !important; height: 28px !important; padding: 0 !important; border: 0.5px solid #e0e0e0 !important; border-radius: 6px !important; background: #fff !important; color: #999 !important; cursor: pointer !important; display: flex !important; align-items: center !important; justify-content: center !important; font-size: 18px !important; line-height: 1 !important; transition: all 0.15s !important; }
#sato-modal button.sato-modal-close:hover { border-color: #ccc !important; color: #666 !important; }

/* ═══ PRODUCT STRIP ═══ */

#sato-modal .sato-product-strip { display: flex !important; align-items: center !important; gap: 10px !important; margin: 12px 20px 0 !important; padding: 8px 12px !important; background: #fafafa !important; border-radius: var(--sato-btn-radius, 8px) !important; }
#sato-modal .sato-product-thumb { width: 36px !important; height: 36px !important; border-radius: 6px !important; object-fit: cover !important; background: #eee !important; border: 0.5px solid #e8e8e8 !important; flex-shrink: 0 !important; }
#sato-modal .sato-product-name { font-size: 14px !important; font-weight: 500 !important; color: #1a1a1a !important; display: block !important; line-height: 1.3 !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; max-width: 260px !important; }
#sato-modal .sato-product-price { font-size: 13px !important; color: #999 !important; display: block !important; line-height: 1.3 !important; }

/* ═══ BODY ═══ */

#sato-modal .sato-modal-body { padding: 16px 20px !important; }
#sato-modal .sato-view { display: block !important; }
#sato-modal .sato-view[hidden] { display: none !important; }

/* ═══ CONSENT ═══ */

#sato-modal .sato-consent-card { text-align: center !important; padding: 20px 8px !important; }
#sato-modal .sato-consent-icon-wrap { width: 44px !important; height: 44px !important; margin: 0 auto 14px !important; display: flex !important; align-items: center !important; justify-content: center !important; background: #f5f5f5 !important; border-radius: 10px !important; color: #999 !important; }
#sato-modal .sato-consent-title { font-size: 17px !important; font-weight: 500 !important; color: #1a1a1a !important; margin: 0 0 6px !important; }
#sato-modal .sato-consent-text { font-size: 14px !important; line-height: 1.6 !important; color: #666 !important; margin: 0 0 20px !important; }

/* ═══ UPLOAD ═══ */

#sato-modal .sato-upload-area { display: flex !important; flex-direction: column !important; align-items: center !important; padding: 32px 16px !important; border: 1.5px dashed #ddd !important; border-radius: 12px !important; cursor: pointer !important; transition: all 0.2s !important; text-align: center !important; position: relative !important; background: #fff !important; }
#sato-modal .sato-upload-area:hover, #sato-modal .sato-upload-area.sato-drag-over { border-color: var(--sato-accent, #6AADA8) !important; background: #f8fffe !important; }
#sato-modal .sato-upload-icon-wrap { width: 44px !important; height: 44px !important; display: flex !important; align-items: center !important; justify-content: center !important; background: #f5f5f5 !important; border-radius: 10px !important; color: #999 !important; margin: 0 0 12px !important; transition: all 0.2s !important; }
#sato-modal .sato-upload-area:hover .sato-upload-icon-wrap { background: #e8f5f4 !important; color: var(--sato-accent, #6AADA8) !important; }
#sato-modal .sato-upload-text { font-size: 15px !important; font-weight: 500 !important; color: #1a1a1a !important; margin: 0 0 3px !important; }
#sato-modal .sato-upload-hint { font-size: 13px !important; color: #bbb !important; margin: 0 !important; }
#sato-modal .sato-upload-formats { font-size: 12px !important; color: #ddd !important; margin: 2px 0 0 !important; }
#sato-modal .sato-upload-input { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; opacity: 0 !important; cursor: pointer !important; z-index: 10 !important; }

#sato-modal .sato-upload-divider { display: flex !important; align-items: center !important; gap: 10px !important; margin: 12px 0 !important; color: #ccc !important; font-size: 13px !important; }
#sato-modal .sato-upload-divider::before, #sato-modal .sato-upload-divider::after { content: '' !important; flex: 1 !important; height: 0.5px !important; background: #e8e8e8 !important; }

#sato-modal button.sato-camera-btn { display: flex !important; align-items: center !important; justify-content: center !important; gap: 6px !important; width: 100% !important; padding: 10px !important; font-size: 14px !important; color: #666 !important; background: #fff !important; border: 0.5px solid #e0e0e0 !important; border-radius: var(--sato-btn-radius, 8px) !important; cursor: pointer !important; transition: all 0.15s !important; }
#sato-modal button.sato-camera-btn:hover { border-color: #ccc !important; color: #333 !important; background: #fafafa !important; }

#sato-modal .sato-camera-preview { margin: 14px 0 0 !important; }
#sato-modal .sato-camera-video-wrap {
    position: relative !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background: #000 !important;
    /* Let the video's intrinsic aspect ratio drive the preview box so
       the user sees exactly what the camera captures. A forced 3:4 box
       combined with object-fit:cover was cropping the sides of the
       incoming 4:3 feed and making the preview look zoomed in — users
       would then lean back to "fit", and the AI would receive a frame
       with them small in the middle. Matching the preview to the real
       capture frame avoids that mismatch.

       Cap height on mobile and desktop so a tall viewport doesn't let
       a full-width landscape feed dominate the whole screen. */
    max-height: 60vh !important;
}
#sato-modal .sato-camera-video {
    /* object-fit:contain so the browser letterboxes rather than crops
       if the container happens to be a different aspect ratio. The goal
       is WYSIWYG: what the user frames in the preview is what the AI
       receives in the captured JPEG. Never crop silently. */
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    background: #000 !important;
    object-fit: contain !important;
    transition: transform 0.2s ease !important;
}
/* Front-camera mirror: users expect selfie previews to behave like a real
   mirror (moving your head left moves the image left). Applied as a class
   instead of a default so the back camera never gets mirrored by accident. */
#sato-modal .sato-camera-video.sato-cam-front {
    transform: scaleX(-1) !important;
}
/* When the user rotates the device to landscape, keep the preview box in
   its portrait framing so the video doesn't suddenly jump to a wide, squat
   box with the subject stretched sideways. Native camera apps do this too.

   We also rotate the back camera 180° in landscape because on some Android
   builds the back camera sensor delivers frames at its native landscape
   orientation, which appears upside-down when the device is held in
   landscape. The front camera doesn't need this — selfie sensors follow
   device rotation correctly on all platforms. */
@media (orientation: landscape) {
    #sato-modal .sato-camera-video-wrap {
        /* In landscape, keep the preview compact so the modal's other
           controls (camera flip, capture, skip) stay visible without
           scrolling. Don't force an aspect ratio — let the real camera
           feed determine it, same as in portrait. */
        max-height: 50vh !important;
        margin: 0 auto !important;
        max-width: 80vh !important;
    }
    #sato-modal .sato-camera-video.sato-cam-back {
        transform: rotate(180deg) !important;
    }
    /* Front camera in landscape: keep the mirror, add no rotation. */
    #sato-modal .sato-camera-video.sato-cam-front {
        transform: scaleX(-1) !important;
    }
}
#sato-modal .sato-camera-flip { position: absolute !important; top: 10px !important; right: 10px !important; width: 36px !important; height: 36px !important; padding: 0 !important; background: rgba(0, 0, 0, 0.55) !important; border: 0 !important; border-radius: 50% !important; color: #fff !important; display: flex !important; align-items: center !important; justify-content: center !important; cursor: pointer !important; backdrop-filter: blur(4px) !important; -webkit-backdrop-filter: blur(4px) !important; transition: background 0.15s !important; }
#sato-modal .sato-camera-flip:hover, #sato-modal .sato-camera-flip:active { background: rgba(0, 0, 0, 0.75) !important; }
#sato-modal .sato-camera-actions { display: flex !important; gap: 8px !important; justify-content: center !important; margin: 10px 0 0 !important; }

#sato-modal .sato-upload-privacy { display: flex !important; align-items: center !important; justify-content: center !important; gap: 5px !important; margin: 14px 0 0 !important; font-size: 12px !important; color: #ccc !important; }

/* ═══ LOADING ═══ */

#sato-modal .sato-loading-content { display: flex !important; flex-direction: column !important; align-items: center !important; padding: 36px 16px !important; text-align: center !important; }
#sato-modal .sato-loading-ring { width: 52px !important; height: 52px !important; border: 2.5px solid #eee !important; border-top-color: var(--sato-accent, #6AADA8) !important; border-radius: 50% !important; animation: satoSpin 1s linear infinite !important; margin: 0 0 24px !important; background: transparent !important; box-shadow: none !important; }
@keyframes satoSpin { to { transform: rotate(360deg); } }

#sato-modal .sato-loading-steps { display: flex !important; flex-direction: column !important; gap: 10px !important; margin: 0 auto 16px !important; width: auto !important; max-width: none !important; align-items: center !important; }
#sato-modal .sato-step-item { display: flex !important; align-items: center !important; gap: 8px !important; font-size: 14px !important; color: #ccc !important; transition: color 0.3s !important; }
#sato-modal .sato-step-item.sato-step-active { color: #1a1a1a !important; }
#sato-modal .sato-step-item.sato-step-done { color: var(--sato-accent, #6AADA8) !important; }
#sato-modal .sato-step-dot { width: 7px !important; height: 7px !important; border-radius: 50% !important; background: #e0e0e0 !important; flex-shrink: 0 !important; transition: all 0.3s !important; border: none !important; box-shadow: none !important; padding: 0 !important; }
#sato-modal .sato-step-item.sato-step-active .sato-step-dot { background: var(--sato-accent, #6AADA8) !important; box-shadow: 0 0 0 3px #e8f5f4 !important; animation: satoPulse 1.4s ease-in-out infinite !important; }
@keyframes satoPulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(106,173,168,0.2) !important; } 50% { box-shadow: 0 0 0 6px rgba(106,173,168,0.08) !important; } }
#sato-modal .sato-step-item.sato-step-done .sato-step-dot { background: var(--sato-accent, #6AADA8) !important; box-shadow: none !important; }
#sato-modal .sato-loading-time { font-size: 12px !important; color: #ccc !important; }

/* ═══ RESULT ═══ */

#sato-modal .sato-result-image-wrap { border-radius: 10px !important; overflow: hidden !important; background: #f5f5f5 !important; border: 0.5px solid #e8e8e8 !important; margin: 0 0 14px !important; }
#sato-modal .sato-result-image { width: 100% !important; height: auto !important; display: block !important; border: none !important; border-radius: 0 !important; }
#sato-modal .sato-result-image-wrap { position: relative !important; }
#sato-modal .sato-watermark { position: absolute !important; bottom: 8px !important; right: 8px !important; width: 120px !important; height: auto !important; opacity: 0.6 !important; pointer-events: none !important; z-index: 2 !important; }
#sato-modal .sato-watermark[hidden] { display: none !important; }

#sato-modal button.sato-btn-cart { display: flex !important; align-items: center !important; justify-content: center !important; gap: 6px !important; width: 100% !important; padding: 12px !important; background: #1a1a1a !important; color: #fff !important; border: none !important; border-radius: 10px !important; font-size: 15px !important; font-weight: 500 !important; cursor: pointer !important; transition: opacity 0.15s !important; margin: 0 !important; }
#sato-modal button.sato-btn-cart:hover { opacity: 0.85 !important; }

#sato-modal .sato-result-secondary { display: flex !important; gap: 4px !important; justify-content: center !important; margin: 8px 0 0 !important; position: relative !important; }

#sato-modal button.sato-btn-ghost { display: inline-flex !important; align-items: center !important; gap: 4px !important; padding: 7px 12px !important; font-size: 13px !important; color: #999 !important; background: transparent !important; border: none !important; border-radius: 6px !important; cursor: pointer !important; transition: all 0.15s !important; }
#sato-modal button.sato-btn-ghost:hover { background: #f5f5f5 !important; color: #666 !important; }

/* ═══ ERROR ═══ */

#sato-modal .sato-error-content { display: flex !important; flex-direction: column !important; align-items: center !important; padding: 40px 16px !important; text-align: center !important; }
#sato-modal .sato-error-icon-wrap { width: 40px !important; height: 40px !important; background: #fef2f2 !important; border-radius: 10px !important; display: flex !important; align-items: center !important; justify-content: center !important; margin: 0 0 12px !important; color: #ef4444 !important; font-size: 20px !important; font-weight: 500 !important; border: none !important; }
#sato-modal .sato-error-title { font-size: 16px !important; font-weight: 500 !important; color: #1a1a1a !important; margin: 0 0 4px !important; }
#sato-modal .sato-error-text { font-size: 13px !important; color: #999 !important; margin: 0 0 16px !important; line-height: 1.5 !important; }

/* ═══ GENERAL BUTTONS (consent, capture, retry) ═══ */

#sato-modal button.sato-btn { display: inline-flex !important; align-items: center !important; gap: 6px !important; padding: 10px 20px !important; font-size: 15px !important; font-weight: 500 !important; border-radius: var(--sato-btn-radius, 8px) !important; border: none !important; cursor: pointer !important; transition: opacity 0.15s !important; }
#sato-modal button.sato-btn-primary { background: #1a1a1a !important; color: #fff !important; }
#sato-modal button.sato-btn-primary:hover { opacity: 0.85 !important; }

/* ═══ MODE TOGGLE ═══ */

#sato-modal .sato-mode-toggle { display: flex !important; gap: 4px !important; margin: 14px 0 0 !important; background: var(--bg-elevated, #f5f5f5) !important; padding: 3px !important; border-radius: 10px !important; }
#sato-modal .sato-mode-toggle[hidden] { display: none !important; }
#sato-modal button.sato-mode-btn { flex: 1 !important; display: flex !important; align-items: center !important; justify-content: center !important; gap: 5px !important; padding: 8px 12px !important; font-size: 14px !important; font-weight: 500 !important; color: #999 !important; background: transparent !important; border: none !important; border-radius: 8px !important; cursor: pointer !important; transition: all 0.2s !important; }
#sato-modal button.sato-mode-btn:hover { color: #666 !important; }
#sato-modal button.sato-mode-btn.sato-mode-active { background: #fff !important; color: #1a1a1a !important; box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important; }
#sato-modal .sato-mode-badge { font-size: 11px !important; font-weight: 600 !important; color: var(--sato-accent, #6AADA8) !important; background: rgba(106,173,168,0.1) !important; padding: 1px 5px !important; border-radius: 4px !important; }

/* ═══ GALLERY STRIP ═══ */

#sato-modal .sato-gallery-strip { margin: 12px 0 20px !important; padding: 0 !important; }
#sato-modal .sato-gallery-strip[hidden] { display: none !important; }
#sato-modal .sato-gallery-label { font-size: 12px !important; color: #999 !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; display: block !important; margin: 0 0 4px !important; }
/* Vertical padding lets the absolutely-positioned close button stick out
   above the thumb without being clipped by the horizontal scroll. 6px is
   just enough to contain the -6px top offset without adding visible
   whitespace. */
#sato-modal .sato-gallery-thumbs { display: flex !important; gap: 6px !important; overflow-x: auto !important; overflow-y: visible !important; padding: 6px 2px 2px !important; }
#sato-modal .sato-gallery-thumb { width: 48px !important; height: 48px !important; border-radius: 6px !important; object-fit: cover !important; border: 2px solid transparent !important; cursor: pointer !important; flex-shrink: 0 !important; transition: border-color 0.15s !important; opacity: 0.7 !important; display: block !important; }
#sato-modal .sato-gallery-thumb:hover { opacity: 1 !important; }
#sato-modal .sato-gallery-thumb.sato-thumb-active { border-color: var(--sato-accent, #6AADA8) !important; opacity: 1 !important; }
#sato-modal .sato-gallery-thumb-wrap { position: relative !important; flex-shrink: 0 !important; }
/* On touch devices :hover doesn't fire reliably — show the remove button
   whenever the thumb is visible so users can always tap it. */
#sato-modal .sato-gallery-thumb-wrap .sato-gallery-remove { opacity: 1 !important; }
#sato-modal .sato-gallery-remove { position: absolute !important; top: -6px !important; right: -6px !important; width: 18px !important; height: 18px !important; padding: 0 !important; border-radius: 50% !important; background: #1a1a1a !important; color: #fff !important; border: 1.5px solid #fff !important; cursor: pointer !important; font-size: 12px !important; line-height: 1 !important; display: flex !important; align-items: center !important; justify-content: center !important; transition: background 0.15s !important; z-index: 2 !important; }
#sato-modal .sato-gallery-remove:hover { background: #ef4444 !important; }

/* ═══ SHARE MENU ═══ */

#sato-modal .sato-share-menu { display: flex !important; flex-direction: column !important; position: absolute !important; bottom: 100% !important; left: 50% !important; transform: translateX(-50%) !important; margin: 0 0 8px !important; background: #fff !important; border: 0.5px solid #e0e0e0 !important; border-radius: 10px !important; box-shadow: 0 8px 24px rgba(0,0,0,0.1) !important; overflow: hidden !important; z-index: 10 !important; min-width: 150px !important; }
#sato-modal .sato-share-menu button.sato-share-option { display: block !important; width: 100% !important; padding: 10px 16px !important; font-size: 14px !important; font-weight: 400 !important; border: none !important; background: #fff !important; color: #666 !important; cursor: pointer !important; text-align: left !important; transition: all 0.15s !important; border-radius: 0 !important; }
#sato-modal .sato-share-menu button.sato-share-option:hover { background: #f5f5f5 !important; color: #1a1a1a !important; }

/* ═══ FOOTER ═══ */

#sato-modal .sato-modal-footer { text-align: center !important; padding: 8px 20px 18px !important; }
#sato-modal .sato-powered { font-size: 12px !important; color: #ccc !important; }
#sato-modal .sato-powered a { color: #aaa !important; font-weight: 500 !important; }
#sato-modal .sato-powered a:hover { color: var(--sato-accent, #6AADA8) !important; }

/* ═══ MOBILE ═══ */

@media (max-width: 768px) {
    #sato-modal { padding: 0 !important; align-items: flex-end !important; }
    #sato-modal .sato-modal-container { max-width: 100% !important; max-height: 92vh !important; border-radius: 20px 20px 0 0 !important; animation: satoUpM 0.35s cubic-bezier(0.16,1,0.3,1) !important; }
    @keyframes satoUpM { from { transform: translateY(100%); } to { transform: translateY(0); } }

    /* Force button to full width on mobile — override any parent flex/inline */
    button.sato-try-on-btn,
    .sato-try-on-btn,
    .woocommerce button.sato-try-on-btn,
    .woocommerce-page button.sato-try-on-btn,
    form.cart button.sato-try-on-btn,
    .woocommerce div.product form.cart button.sato-try-on-btn,
    .elementor button.sato-try-on-btn,
    .elementor-widget button.sato-try-on-btn,
    .woocommerce-variation-add-to-cart button.sato-try-on-btn,
    .variations_button button.sato-try-on-btn {
        width: 100% !important;
        max-width: 100% !important;
        justify-content: center !important;
        margin: 10px 0 0 0 !important;
        display: flex !important;
        flex-shrink: 1 !important;
        flex-basis: 100% !important;
    }

    /* Force ALL possible cart form containers to wrap */
    form.cart,
    .woocommerce form.cart,
    .woocommerce div.product form.cart,
    .woocommerce-variation-add-to-cart,
    .woocommerce-variation-add-to-cart.variations_button,
    .elementor form.cart,
    .single-product form.cart,
    .product .cart,
    .summary form.cart,
    .entry-summary form.cart {
        flex-wrap: wrap !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }
}

/* ───── Button size presets ─────
   Applied via a class on the button (sato-size-sm/md/lg) set from the
   admin 'Button size' option. Medium matches the original sizing so
   existing buttons are unchanged. Scales font + padding together. */
button.sato-try-on-btn.sato-size-small,
.woocommerce button.sato-try-on-btn.sato-size-small {
    font-size: 13px !important;
    padding: 8px 14px !important;
}
button.sato-try-on-btn.sato-size-small .sato-btn-icon { width: 14px !important; height: 14px !important; }

button.sato-try-on-btn.sato-size-large,
.woocommerce button.sato-try-on-btn.sato-size-large {
    font-size: 17px !important;
    padding: 14px 24px !important;
}
button.sato-try-on-btn.sato-size-large .sato-btn-icon { width: 18px !important; height: 18px !important; }

/* ───── Hover polish ─────
   Subtle lift + shadow so the button reads as clickable. Works with any
   accent colour (unlike a colour-shift hover, which can clash with the
   shop's brand colour). The overlay button gets a slightly stronger
   shadow since it sits on top of an image. */
button.sato-try-on-btn {
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease !important;
}
button.sato-try-on-btn:hover,
.woocommerce button.sato-try-on-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18) !important;
}
.sato-btn-wrap.sato-btn-overlay .sato-try-on-btn:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.28) !important;
}
