/**
 * Shoppable Interactive Display — Full-Width & Container-Responsive 3D Round Runway Stylesheet
 *
 * - Clean Badge-Free 3D Product Cards (VIEW circular badge & slide-up modal completely removed)
 * - Clicking the active 3D card navigates directly to its WooCommerce Product Page
 * - Fits 100% cleanly inside any container (Full-width, Boxed, 2-Column, or Sidebar)
 * - Dynamic --shoppable-c-scale factor scales 3D coordinates proportionally to parent container width
 * - Native Light Mode & Dark Mode integration (html.opif-dark-mode)
 *
 * @package Shoppable_Interactive_Display
 * @version 1.0.11
 * Release Date: 03-11-2026
 * Author Credit: Author by OPIF
 * Design Credit: Design by - SAAD
 */

:root {
    --shoppable-accent: var(--opif-buy-bg, var(--maaz-primary, #004B5E));
    --shoppable-accent-dark: #00313E;
    --shoppable-text: #0F172A;
    --shoppable-muted: #64748B;
    --shoppable-divider: #E5E7EB;
    --shoppable-border: #CBD5E1;
    --shoppable-card-bg: #F8FAFC;
    --shoppable-btn-bg: #0F172A;
    --shoppable-btn-text: #FFFFFF;
    --shoppable-c-scale: 1;
}

/* ====================================================
   FULL-WIDTH & CONTAINER-SAFE CANVAS
   ==================================================== */
.shoppable-interactive-display-root {
    width: 100%;
    max-width: 1280px;
    margin: 28px auto;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--shoppable-text);
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.shoppable-interactive-display-root.is-full-width-centered .shoppable-col-stage {
    width: 100%;
    margin-inline: auto;
    text-align: center;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Zero Extra Gaps (Compact Snug Spacing) */
.shoppable-interactive-display-root.is-gap-compact {
    margin: 8px auto 14px;
    padding: 0;
}
.shoppable-interactive-display-root.is-gap-compact .shoppable-stage-head {
    margin-bottom: 8px;
}
.shoppable-interactive-display-root.is-gap-compact .shoppable-scrubber-bar {
    margin-top: 6px;
    padding-top: 4px;
}

.shoppable-stage-head {
    margin-bottom: 20px;
    text-align: var(--shoppable-title-align, center);
    padding-inline: 12px;
}

.shoppable-main-title {
    margin: 0 0 6px;
    font-size: calc(var(--shoppable-title-size, 34px) * var(--shoppable-c-scale, 1));
    font-weight: 850;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--shoppable-title-color, var(--shoppable-text));
    transition: color 0.25s ease;
}

.shoppable-sub-title {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--shoppable-sub-color, var(--shoppable-muted));
    transition: color 0.25s ease;
}

/* ====================================================
   3D ROUND SPHERE RUNWAY STAGE (Container-Responsive)
   ==================================================== */
.shoppable-runway-viewport {
    position: relative;
    width: 100%;
    height: calc(var(--shoppable-stage-height, 580px) * var(--shoppable-c-scale, 1));
    min-height: 340px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    perspective: 1100px;
    -webkit-perspective: 1100px;
    touch-action: pan-y pinch-zoom;
    user-select: none;
    -webkit-user-select: none;
}

/* Central 3D Track Anchor */
.shoppable-runway-track {
    position: relative;
    width: calc(320px * var(--shoppable-c-scale, 1));
    height: calc(520px * var(--shoppable-c-scale, 1));
    min-width: 190px;
    min-height: 310px;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* Model Card (Positioned Absolutely in 3D Space like a Revolving Sphere) */
.shoppable-model-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    box-sizing: border-box;
    transform-origin: center center;
    will-change: transform, opacity, filter;
    transition: transform 0.48s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.48s ease,
                filter 0.48s ease;
    border-radius: 20px;
    outline: none;
}

/* Floor Radial Shadow under Model's Feet */
.shoppable-model-card::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 10%;
    width: 80%;
    height: 22px;
    background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.38) 0%, rgba(15, 23, 42, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.shoppable-model-media {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    overflow: hidden;
    background: transparent;
}

.shoppable-model-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
    pointer-events: none;
    -webkit-mask-image: linear-gradient(180deg, #000 85%, rgba(0,0,0,0.7) 94%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 85%, rgba(0,0,0,0.7) 94%, transparent 100%);
}

.shoppable-model-noimg {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--shoppable-muted);
    font-size: 13px;
    font-weight: 700;
    border: 2px dashed var(--shoppable-border);
    border-radius: 18px;
    background: var(--shoppable-card-bg);
}

/* ====================================================
   3D SPHERICAL SLOT COORDINATES (Scales dynamically with --shoppable-c-scale)
   ==================================================== */
/* Center Active (Front of sphere — Clickable to open Product Page) */
.shoppable-model-card.is-slot-0,
.shoppable-model-card.is-active {
    transform: translate3d(0, 0, calc(85px * var(--shoppable-c-scale, 1))) rotateY(0deg) scale(1.08);
    opacity: 1;
    filter: none;
    z-index: 10;
    cursor: pointer;
    pointer-events: auto;
}
.shoppable-model-card.is-slot-0:hover,
.shoppable-model-card.is-active:hover {
    transform: translate3d(0, -4px, calc(92px * var(--shoppable-c-scale, 1))) rotateY(0deg) scale(1.10);
}
.shoppable-model-card.is-slot-0::after,
.shoppable-model-card.is-active::after {
    opacity: 1;
    transform: scale(1.05);
}

/* Slot +1: Near Right */
.shoppable-model-card.is-slot-pos-1,
.shoppable-model-card.is-next {
    transform: translate3d(calc(280px * var(--shoppable-c-scale, 1)), 0, calc(-35px * var(--shoppable-c-scale, 1))) rotateY(-22deg) scale(0.88);
    opacity: 0.72;
    filter: blur(0.3px);
    z-index: 7;
    pointer-events: auto;
}
.shoppable-model-card.is-slot-pos-1::after,
.shoppable-model-card.is-next::after {
    opacity: 0.55;
    transform: scale(0.85);
}

/* Slot -1: Near Left */
.shoppable-model-card.is-slot-neg-1,
.shoppable-model-card.is-prev {
    transform: translate3d(calc(-280px * var(--shoppable-c-scale, 1)), 0, calc(-35px * var(--shoppable-c-scale, 1))) rotateY(22deg) scale(0.88);
    opacity: 0.72;
    filter: blur(0.3px);
    z-index: 7;
    pointer-events: auto;
}
.shoppable-model-card.is-slot-neg-1::after,
.shoppable-model-card.is-prev::after {
    opacity: 0.55;
    transform: scale(0.85);
}

/* Slot +2: Far Right */
.shoppable-model-card.is-slot-pos-2,
.shoppable-model-card.is-far-right {
    transform: translate3d(calc(500px * var(--shoppable-c-scale, 1)), 0, calc(-110px * var(--shoppable-c-scale, 1))) rotateY(-36deg) scale(0.72);
    opacity: 0.40;
    filter: blur(1px);
    z-index: 4;
    pointer-events: auto;
}
.shoppable-model-card.is-slot-pos-2::after,
.shoppable-model-card.is-far-right::after {
    opacity: 0.30;
    transform: scale(0.70);
}

/* Slot -2: Far Left */
.shoppable-model-card.is-slot-neg-2,
.shoppable-model-card.is-far-left {
    transform: translate3d(calc(-500px * var(--shoppable-c-scale, 1)), 0, calc(-110px * var(--shoppable-c-scale, 1))) rotateY(36deg) scale(0.72);
    opacity: 0.40;
    filter: blur(1px);
    z-index: 4;
    pointer-events: auto;
}
.shoppable-model-card.is-slot-neg-2::after,
.shoppable-model-card.is-far-left::after {
    opacity: 0.30;
    transform: scale(0.70);
}

/* Behind / Hidden */
.shoppable-model-card.is-slot-hidden,
.shoppable-model-card.is-far {
    transform: translate3d(0, 0, -280px) scale(0.45);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

/* Interactive Hover on Side Cards */
.shoppable-model-card.is-slot-pos-1:hover,
.shoppable-model-card.is-next:hover {
    opacity: 0.95;
    filter: none;
    transform: translate3d(calc(280px * var(--shoppable-c-scale, 1)), 0, calc(-15px * var(--shoppable-c-scale, 1))) rotateY(-18deg) scale(0.92);
}
.shoppable-model-card.is-slot-neg-1:hover,
.shoppable-model-card.is-prev:hover {
    opacity: 0.95;
    filter: none;
    transform: translate3d(calc(-280px * var(--shoppable-c-scale, 1)), 0, calc(-15px * var(--shoppable-c-scale, 1))) rotateY(18deg) scale(0.92);
}

/* Guarantee VIEW badge and Tray modal are never shown even if cached HTML exists */
.shoppable-view-hotspot,
.shoppable-product-tray-modal {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ====================================================
   FLAT TIMELINE SCRUBBER (Centered on Floor)
   ==================================================== */
.shoppable-scrubber-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    max-width: 680px;
    margin: 16px auto 0;
    padding: 10px 12px 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    box-sizing: border-box;
}

/* Minimalist Arrow Buttons */
.shoppable-arrow-btn {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--shoppable-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: all 0.18s ease;
}

.shoppable-arrow-btn svg {
    width: 19px;
    height: 19px;
    display: block;
}

.shoppable-arrow-btn:hover {
    background: rgba(15, 23, 42, 0.08);
    transform: scale(1.1);
}

/* Play/Pause Toggle */
.shoppable-play-toggle {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--shoppable-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: all 0.18s ease;
}

.shoppable-play-toggle svg {
    width: 16px;
    height: 16px;
    display: block;
}

.shoppable-play-toggle:hover,
.shoppable-play-toggle.is-playing {
    background: rgba(15, 23, 42, 0.08);
}

/* Timeline Track */
.shoppable-slider-wrap {
    flex: 1 1 auto;
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px 0;
}

.shoppable-range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 2px;
    background: #D1D5DB;
    outline: none;
    margin: 0;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

/* Range Slider Thumb */
.shoppable-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #0F172A;
    border: 2.5px solid #FFFFFF;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    cursor: grab;
    transition: transform 0.15s ease;
}

.shoppable-range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

.shoppable-range-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #0F172A;
    border: 2.5px solid #FFFFFF;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    cursor: grab;
}

/* Discrete Number Ticks Along the Timeline */
.shoppable-slider-ticks {
    position: absolute;
    left: 4px;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 1;
}

.shoppable-tick {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    padding-top: 16px;
}

.shoppable-tick::before {
    content: "";
    position: absolute;
    top: -2px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #9CA3AF;
    transition: all 0.2s ease;
}

.shoppable-tick-num {
    font-size: 11px;
    font-weight: 700;
    color: #9CA3AF;
    letter-spacing: 0.04em;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.shoppable-tick.is-active::before {
    background: #0F172A;
    transform: scale(1.6);
}

.shoppable-tick.is-active .shoppable-tick-num {
    color: #0F172A;
    font-weight: 900;
}

/* Look Info Badge on Timeline */
.shoppable-look-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 800;
    color: #0F172A;
}

.shoppable-step-counter {
    color: #0F172A;
}

.shoppable-step-title {
    color: #64748B;
    font-weight: 600;
    transition: color 0.18s ease;
}

.shoppable-step-title:hover {
    color: var(--shoppable-accent);
}

/* Hide step title inside narrow containers so scrubber stays clean */
.shoppable-interactive-display-root.is-container-sm .shoppable-step-title {
    display: none;
}

/* ====================================================
   DARK MODE ADAPTATION (Matches Theme: html.opif-dark-mode)
   ==================================================== */
html.opif-dark-mode .shoppable-interactive-display-root,
html[data-opif-theme="dark"] .shoppable-interactive-display-root,
body.opif-dark-mode .shoppable-interactive-display-root,
body.dark-mode .shoppable-interactive-display-root {
    --shoppable-text: #F8FAFC;
    --shoppable-muted: #94A3B8;
    --shoppable-divider: rgba(255, 255, 255, 0.12);
    --shoppable-border: rgba(255, 255, 255, 0.18);
    --shoppable-card-bg: #1E293B;
    --shoppable-btn-bg: var(--opif-buy-bg, var(--maaz-primary, #004B5E));
}

html.opif-dark-mode .shoppable-main-title,
html[data-opif-theme="dark"] .shoppable-main-title {
    color: var(--shoppable-title-color, #F8FAFC) !important;
}

html.opif-dark-mode .shoppable-sub-title,
html[data-opif-theme="dark"] .shoppable-sub-title {
    color: var(--shoppable-sub-color, #94A3B8) !important;
}

html.opif-dark-mode .shoppable-arrow-btn,
html.opif-dark-mode .shoppable-play-toggle,
html[data-opif-theme="dark"] .shoppable-arrow-btn,
html[data-opif-theme="dark"] .shoppable-play-toggle {
    color: #F8FAFC !important;
}

html.opif-dark-mode .shoppable-arrow-btn:hover,
html.opif-dark-mode .shoppable-play-toggle:hover,
html.opif-dark-mode .shoppable-play-toggle.is-playing {
    background: rgba(255, 255, 255, 0.12) !important;
}

html.opif-dark-mode .shoppable-range-slider,
html[data-opif-theme="dark"] .shoppable-range-slider {
    background: rgba(255, 255, 255, 0.20) !important;
}

html.opif-dark-mode .shoppable-range-slider::-webkit-slider-thumb,
html[data-opif-theme="dark"] .shoppable-range-slider::-webkit-slider-thumb {
    background: #FFFFFF !important;
    border-color: #0F172A !important;
}

html.opif-dark-mode .shoppable-tick::before,
html[data-opif-theme="dark"] .shoppable-tick::before {
    background: #64748B !important;
}

html.opif-dark-mode .shoppable-tick.is-active::before,
html[data-opif-theme="dark"] .shoppable-tick.is-active::before {
    background: #FFFFFF !important;
}

html.opif-dark-mode .shoppable-tick-num,
html[data-opif-theme="dark"] .shoppable-tick-num {
    color: #64748B !important;
}

html.opif-dark-mode .shoppable-tick.is-active .shoppable-tick-num,
html[data-opif-theme="dark"] .shoppable-tick.is-active .shoppable-tick-num {
    color: #F8FAFC !important;
}

html.opif-dark-mode .shoppable-step-counter,
html[data-opif-theme="dark"] .shoppable-step-counter {
    color: #F8FAFC !important;
}

html.opif-dark-mode .shoppable-step-title,
html[data-opif-theme="dark"] .shoppable-step-title {
    color: #CBD5E1 !important;
}

/* ====================================================
   MOBILE & SMALL VIEWPORT FALLBACKS
   ==================================================== */
@media (max-width: 767px) {
    .shoppable-interactive-display-root {
        margin: 10px auto;
    }

    .shoppable-sub-title {
        font-size: 12px;
    }

    .shoppable-scrubber-bar {
        gap: 10px;
        padding: 8px 6px 0;
    }

    .shoppable-arrow-btn,
    .shoppable-play-toggle {
        width: 30px;
        height: 30px;
        flex: 0 0 30px;
    }

    .shoppable-step-title {
        display: none;
    }
}
