/* 1. CONTAINER BASE */
#jumps-pc-container {
    position: relative !important;
    width: 100%;
    display: flex;
    flex-direction: column; /* Stack switcher below image on mobile */
}

/* 2. THE STAGE (Always Square/Standard) */
.jumps-pc-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #fff;
    overflow: hidden;
    order: 1; /* Keep image on top */
}

/* 3. THE SWITCHER: COMMON STYLES */
.jumps-pc-view-switcher {
    z-index: 9999;
    display: flex;
    gap: 4px;
    margin: 0;
    order: 2; /* Move below image in flex flow */
}

/* 4. BUTTON STYLING */
.jumps-view-btn {
    padding: 6px 8px;
    border: 1px solid #D5D5D5;
    color: #666;
    font-size: 14px;
    font-weight: normal;
    text-transform: capitalize;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: normal;
    line-height: 1em;
    min-height: 1em;
    background: #fff; /* Ensure background for mobile dock */
    transition: all 0.2s ease;
    margin-right:2px;
}

.jumps-view-btn:hover {
    background: #fafafa;
}

.jumps-view-btn.is-active {
    border: 1px solid #DB9035;
    color: #333;
}

/* 5. DESKTOP: Overlay Mode */
@media (min-width: 768px) {
    .jumps-pc-view-switcher {
        position: absolute;
        top: 15px;
        left: 15px;
        flex-direction: row; /* Horizontal overlay as per your current code */
    }
}

/* 6. MOBILE: Docked Toolbar Mode */
@media (max-width: 767px) {
    .jumps-pc-view-switcher {
        position: static;
        padding: 15px 10px;
        justify-content: center;
        background: #fff;
        border-bottom: 1px solid #eee;
        
        /* Enable Horizontal Swipe if many views exist */
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Hide scrollbar for mobile clean look */
    .jumps-pc-view-switcher::-webkit-scrollbar {
        display: none;
    }

    .jumps-view-btn {
        flex-shrink: 0;
    }
}

/* 7. COMPACT UI (Icons & Initials) */
.jumps-ui-compact .jumps-view-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; /* Circular */
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

.jumps-ui-compact .jumps-view-btn svg {
    width: 18px;
    height: 18px;
}

/* Layering logic */
.jumps-pc-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
    /* Only animate opacity changes when we are FADING IN */
    transition: opacity 0.02s ease-in-out;
}

/* When a layer is hidden, it should happen instantly */
.jumps-pc-layer[style*="opacity: 0"],
.jumps-pc-layer[style*="opacity:0"] {
    transition: none !important;
}
/* Hides the entire row for an attribute when every one of its values has
   been toggled off in the visibility matrix (see composer-viewer.js
   hideFullyHiddenRows()). Using a class (rather than inline styles) keeps
   this overridable by theme CSS if a store needs a different treatment. */
.jumps-pc-attr-row-hidden {
    display: none !important;
}

/* Stacked / Grid layouts: every view rendered at once, no switcher UI. */
.jumps-pc-multi-stage-item {
    margin-bottom: 6px;
}
.jumps-pc-view-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #666;
    margin-bottom: 4px;
    text-align: center;
}

.jumps-layout-stacked {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.jumps-layout-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}
