/* ========================================
   SWITCH Configurator - Step 2 Styles
   Consolidated & Cleaned Version
   ======================================== */

/* --- CSS Variables Reference ---
   --switch-primary: #C9A961 (gold)
   --switch-border: #e0e0e0
   --switch-heading-font: "Playfair Display", serif
   --switch-success: #4A7C59
*/

/* ========================================
   1. MAIN LAYOUT
   ======================================== */

.switch-step2-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 992px) {
    .switch-step2-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        align-items: start;
        overflow: visible;
    }

    .switch-step2-details {
        order: 1;
        overflow: hidden;
    }

    .switch-step2-visualizer {
        order: 2;
        position: sticky;
        top: 20px;
        overflow: hidden;
    }
}

@media (max-width: 991px) {
    .switch-step2-layout {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .switch-step2-visualizer {
        order: 1;
        width: 100%;
        margin-bottom: 20px;
        overflow: hidden;
    }

    .switch-step2-details {
        order: 2;
        width: 100%;
    }
}

/* ========================================
   2. VISUALIZER COMPONENT
   ======================================== */

.switch-visualizer-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    padding: 18px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .switch-visualizer-container {
        max-width: 100%;
        padding: 12px;
        margin: 0;
        width: 100%;
    }
}

.switch-visualizer-stage {
    position: relative;
    width: 100%;
    padding-bottom: 70%;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    touch-action: manipulation;
    /* Fix for double-tap on mobile */
}

.switch-visualizer-bg,
.switch-visualizer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transition: all 0.3s ease;
}

.switch-visualizer-bg {
    z-index: 1;
}

.switch-visualizer-overlay {
    z-index: 2;
}

/* ========================================
   3. VISUALIZER NAME & MOTTO OVERLAY
   ======================================== */

.switch-visualizer-name {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    width: auto;
    max-width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
    text-align: center;
    font-family: var(--switch-heading-font);
    font-size: 24px;
    color: #999;
    z-index: 5;
    pointer-events: none;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.switch-visualizer-name.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .switch-visualizer-name {
        font-size: 16px;
        bottom: 35px;
        padding: 0 10px;
    }
}

.switch-visualizer-motto {
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    width: auto;
    max-width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
    text-align: center;
    font-size: 13px;
    font-style: italic;
    color: #666;
    z-index: 5;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    line-height: 1.4;
    max-height: 2.8em;
}

.switch-visualizer-motto.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .switch-visualizer-motto {
        font-size: 11px;
        bottom: 8px;
        padding: 0 8px;
        -webkit-line-clamp: 1;
        line-clamp: 1;
        max-height: 1.4em;
        white-space: nowrap;
    }
}

/* ========================================
   4. VISUALIZER CAROUSEL
   ======================================== */

.switch-visualizer-carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    position: relative;
    z-index: 10;
    width: 100%;
    overflow: hidden;
}

.switch-visualizer-carousel {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    position: relative;
    height: 100px;
    display: flex;
    align-items: center;
}

.switch-vis-track {
    display: flex;
    gap: 8px;
    transition: transform 0.3s ease;
}

.switch-vis-item {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    overflow: hidden;
    background: #fff;
    transition: all 0.2s ease;
    opacity: 0.6;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.switch-vis-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.switch-vis-item.active {
    border-color: var(--switch-primary);
    opacity: 1;
    transform: scale(1.05);
}

/* Vybraný PIN (přidaný do výběru) */
.switch-vis-item.selected {
    opacity: 1;
}

.switch-vis-item.selected::before {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: var(--switch-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    z-index: 5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.switch-vis-item.active.selected {
    border-color: var(--switch-success, #4A7C59);
}

@media (max-width: 768px) {
    .switch-vis-item {
        width: 56px;
        height: 56px;
    }
}

/* Arrows */
.switch-vis-arrow {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.switch-vis-arrow:hover {
    background: var(--switch-primary);
    color: #fff;
    border-color: var(--switch-primary);
}

@media (max-width: 768px) {
    .switch-vis-arrow {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}

/* ========================================
   5. PIN DETAILS SECTION
   ======================================== */

.switch-pin-details-container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--switch-border);
    margin-bottom: 24px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.switch-pin-details-placeholder {
    text-align: center;
    color: #888;
    font-style: italic;
}

.switch-pin-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #333;
}

/* Hide title in left panel */
.switch-pin-details .switch-pin-title {
    display: none;
}

.switch-pin-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.switch-pin-tag {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    background: #f0f0f0;
    color: #666;
}

/* Popis jako báseň/citát */
.switch-pin-desc {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    font-weight: 400;
    margin-bottom: 20px;
    font-style: italic;
    text-align: center;
    padding: 0 10px;
}

.switch-pin-desc::before {
    content: "„";
    font-size: 24px;
    color: #ccc;
    line-height: 0;
    vertical-align: -0.3em;
    margin-right: 4px;
}

.switch-pin-desc::after {
    content: "“";
    font-size: 24px;
    color: #ccc;
    line-height: 0;
    vertical-align: -0.3em;
    margin-left: 4px;
}

/* Stock Info */
.switch-pin-stock-info {
    margin-top: 12px;
    margin-bottom: 16px;
    text-align: right;
    min-height: 28px;
    /* Reserve space to prevent layout shift */
}

.switch-pin-stock-info .switch-stock-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.3px;
    background: #f8f8f8;
    color: #999;
    border: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.switch-pin-stock-info .switch-stock-status.onbackorder,
.switch-pin-stock-info .switch-stock-status.outofstock {
    background: #fafafa;
    color: #aaa;
    border: 1px solid #f5f5f5;
}

/* Price Row */
.switch-pin-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.switch-pin-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--switch-primary);
}

.switch-btn-add-pin {
    padding: 10px 24px;
    font-size: 14px;
    border-radius: 8px;
}

/* ========================================
   6. TECHNICAL INFO ICON & TOOLTIP
   ======================================== */

.switch-tech-info {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.switch-tech-info.visible {
    opacity: 1;
    pointer-events: auto;
}

.switch-tech-info:not(:hover) .switch-tech-icon {
    opacity: 0.7;
}

.switch-tech-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.switch-tech-icon svg {
    width: 16px;
    height: 16px;
}

.switch-tech-icon:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.5);
    color: #999;
    border-color: rgba(0, 0, 0, 0.08);
}

.switch-tech-tooltip {
    position: absolute;
    top: 42px;
    right: 0;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.switch-tech-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 10px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    transform: rotate(45deg);
}

.switch-tech-info:hover .switch-tech-tooltip,
.switch-tech-info.active .switch-tech-tooltip,
.switch-tech-info.locked .switch-tech-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.switch-tech-specs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.switch-tech-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.switch-tech-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.switch-tech-label {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.switch-tech-value {
    font-size: 13px;
    font-weight: 500;
    color: #000;
    text-align: right;
}

@media (max-width: 768px) {
    .switch-tech-info {
        top: 10px;
        right: 10px;
    }

    .switch-tech-icon {
        width: 44px;
        height: 44px;
    }

    .switch-tech-icon svg {
        width: 20px;
        height: 20px;
    }

    .switch-tech-tooltip {
        min-width: 200px;
        padding: 12px;
    }
}

/* ========================================
   7. GALLERY ICON
   ======================================== */

.switch-gallery-info {
    position: absolute;
    top: 12px;
    right: 52px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.switch-gallery-info.visible {
    opacity: 1;
    pointer-events: auto;
}

.switch-gallery-info:not(:hover) .switch-gallery-icon {
    opacity: 0.7;
}

.switch-gallery-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.switch-gallery-icon svg {
    width: 16px;
    height: 16px;
}

.switch-gallery-icon:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.5);
    color: #999;
    border-color: rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
    .switch-gallery-info {
        top: 10px;
        right: 60px;
    }

    .switch-gallery-icon {
        width: 44px;
        height: 44px;
    }

    .switch-gallery-icon svg {
        width: 20px;
        height: 20px;
    }
}

/* ========================================
   8. IMAGE LIGHTBOX
   ======================================== */

.switch-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.switch-lightbox.visible {
    opacity: 1;
}

.switch-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.switch-lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.switch-lightbox-caption {
    color: white;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.switch-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.switch-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.switch-lightbox-prev,
.switch-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 0, 0, 0.1);
    color: #333;
    font-size: 36px;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.switch-lightbox-prev {
    left: 30px;
}

.switch-lightbox-next {
    right: 30px;
}

.switch-lightbox-prev:hover,
.switch-lightbox-next:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.switch-lightbox-counter {
    color: white;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
    .switch-lightbox-close {
        top: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        background: rgba(0, 0, 0, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.3);
        z-index: 100000;
    }

    .switch-lightbox-caption {
        font-size: 16px;
    }

    .switch-lightbox-prev,
    .switch-lightbox-next {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }

    .switch-lightbox-prev {
        left: 15px;
    }

    .switch-lightbox-next {
        right: 15px;
    }
}

/* ========================================
   9. TOGGLE SWITCH (iOS Style)
   ======================================== */

.switch-toggle-ios {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

.switch-toggle-ios input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider-ios {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.switch-slider-ios:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

input:checked+.switch-slider-ios {
    background-color: var(--switch-primary);
}

input:focus+.switch-slider-ios {
    box-shadow: 0 0 1px var(--switch-primary);
}

input:checked+.switch-slider-ios:before {
    transform: translateX(16px);
}

/* ========================================
   10. STYLING SECTION
   ======================================== */

.switch-detail-styling {
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.switch-styling-separator {
    height: 1px;
    background-color: #e0e0e0;
    margin: 0 auto 15px auto;
    width: 60%;
}

.switch-styling-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-style: italic;
    color: #b5b5b5;
    font-family: "Playfair Display", serif;
}

.switch-styling-icon {
    font-size: 1.2em;
}

.switch-styling-text {
    font-size: 0.9em;
    line-height: 1.4;
}

/* ========================================
   11. DEBUG CONTROLS
   ======================================== */

.switch-debug-controls {
    margin-top: 20px;
    padding: 15px;
    background: #f0f0f0;
    border-radius: 8px;
    font-size: 12px;
}

.switch-debug-controls label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.switch-debug-controls input {
    flex: 1;
}

/* ========================================
   12. STEP 1 GALLERY ICON
   ======================================== */

.switch-base-gallery-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 20;
    opacity: 0;
    transform: translateY(5px);
    pointer-events: auto;
}

.switch-base-card:hover .switch-base-gallery-icon {
    opacity: 1;
    transform: translateY(0);
}

.switch-base-gallery-icon:hover {
    background: white;
    color: #333;
    transform: scale(1.1) translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .switch-base-gallery-icon {
        opacity: 1;
        transform: translateY(0);
        width: 36px;
        height: 36px;
        bottom: 8px;
        right: 8px;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
}

/* ========================================
   13. SUMMARY BUTTONS LAYOUT
   ======================================== */

.switch-summary-totals .switch-buttons {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 12px;
    margin-top: 24px;
    align-items: center;
}

.switch-summary-totals .switch-btn-reset {
    grid-column: 1 / -1;
    order: -1;
    justify-self: start;
    margin-bottom: 8px;
    color: #999;
    font-size: 13px;
    padding: 0;
    background: none;
    border: none;
}

.switch-summary-totals .switch-btn-reset:hover {
    color: #666;
    background: none;
    text-decoration: underline;
}

.switch-summary-totals .switch-btn-secondary,
.switch-summary-totals .switch-btn-primary {
    width: 100%;
    justify-content: center;
}

@media (max-width: 480px) {
    .switch-summary-totals .switch-buttons {
        grid-template-columns: 1fr;
    }

    .switch-summary-totals .switch-btn-reset {
        order: 3;
        justify-self: center;
        margin-top: 12px;
        margin-bottom: 0;
    }
}

/* ========================================
   14. MOBILE STEP BAR CENTERING
   ======================================== */

@media (max-width: 768px) {
    /* KOMPAKTNÍ UKAZATEL POSTUPU
       Na mobilu je svislý prostor nad karuselem vzácný - kolečka s popisky
       zabírala ~120 px a vytlačovala produkt pod okraj obrazovky.
       Místo nich tři segmenty pruhu + název právě aktivního kroku (~35 px).
       Markup zůstává stejný, mění se jen vzhled: z kolečka je segment.
       Barvy se dědí z existujících stavů .active / .completed. */
    .switch-progress {
        width: 100%;
        overflow: hidden;
        margin-bottom: 20px !important;
    }

    .switch-progress-steps {
        display: flex;
        justify-content: flex-start !important;
        align-items: flex-start;
        gap: 6px;
        width: 100%;
        padding: 0;
        box-sizing: border-box;
    }

    /* Spojovací čárky nejsou potřeba - postup nesou samotné segmenty */
    .switch-step-line {
        display: none !important;
    }

    .switch-step {
        flex: 1 1 0 !important;
        min-width: 0;
        gap: 0;
        align-items: flex-start;
    }

    /* Z kolečka s číslicí je segment pruhu. font-size:0 skryje číslo,
       ale zachová prvek i jeho stavové barvy. */
    .switch-step-number {
        width: 100% !important;
        height: 4px !important;
        border-radius: 2px !important;
        font-size: 0 !important;
        color: transparent !important;
        margin-bottom: 7px;
    }

    /* Popisek jen u aktivního kroku - ostatní by se na šířku nevešly */
    .switch-step-label {
        font-size: 12px;
        font-weight: 600;
        display: none;
    }

    .switch-step.active .switch-step-label {
        display: block;
    }

    .switch-steps {
        justify-content: center;
        text-align: center;
    }
}

/* ========================================
   15. MAIN CONTAINER OVERFLOW
   ======================================== */

.switch-configurator {
    max-width: 100%;
}

@media (min-width: 992px) {
    .switch-configurator {
        overflow-x: hidden;
    }
}

@media (max-width: 991px) {
    .switch-configurator {
        overflow-x: clip;
        padding: 10px;
    }
}

.switch-panel {
    width: 100%;
    max-width: 100%;
}

.switch-content {
    width: 100%;
    max-width: 100%;
}

@media (min-width: 992px) {

    .switch-panel,
    .switch-content {
        overflow: hidden;
    }
}

/* ========================================
   16. STICKY SIDEBAR BOX
   ======================================== */

/* Mobile - Fixed at bottom */
@media (max-width: 991px) {
    .switch-sidebar-box.switch-collapsible {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 16px 16px 0 0 !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15) !important;
        z-index: 1000 !important;
        background: white !important;
    }

    .switch-sidebar-box.switch-collapsible[data-state="hidden"] {
        transform: translateY(100%);
        opacity: 0;
        pointer-events: none;
    }

    .switch-sidebar-box.switch-collapsible[data-state="collapsed"] {
        transform: translateY(0);
        opacity: 1;
        /* Spodní rezerva kvůli adresnímu řádku / gesture baru - viz rozbalený stav */
        padding: 12px 16px max(12px, env(safe-area-inset-bottom, 0px)) !important;
        max-height: 70px;
    }

    .switch-sidebar-box.switch-collapsible[data-state="expanded"] {
        transform: translateY(0);
        opacity: 1;
        padding: 16px !important;
        /* vh na mobilu = výška BEZ lišty prohlížeče, takže panel přeteče pod ni.
           dvh se přizpůsobuje vysunuté i zasunuté liště; vh zůstává jako fallback
           pro starší prohlížeče. */
        max-height: 60vh;
        max-height: 60dvh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        /* Spodní okraj si řeší připnutá lišta tlačítek níže */
        padding-bottom: 0 !important;
    }

    /* Tlačítka připnutá ke spodní hraně panelu.
       Obsah (obrázek, cena, velikost, popis) je běžně vyšší než 60dvh, takže
       hlavní akce končila pod vnitřním zlomem a uživatel by musel scrollovat
       uvnitř panelu, aniž by to bylo poznat. Sticky ji drží vždy na očích. */
    .switch-sidebar-box.switch-collapsible[data-state="expanded"] .switch-buttons,
    .switch-sidebar-box.switch-collapsible[data-state="expanded"] .switch-buttons-step1 {
        position: sticky;
        bottom: 0;
        z-index: 2;
        margin-top: 12px;
        margin-bottom: 0;
        padding-top: 12px;
        /* env() kvůli gesture baru / výřezu */
        padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
        background: white;
        /* Jemný stín naznačí, že obsah pokračuje pod lištou */
        box-shadow: 0 -10px 12px -10px rgba(0, 0, 0, 0.18);
    }

    .switch-panel[data-panel="1"],
    .switch-panel[data-panel="2"] {
        padding-bottom: 90px !important;
    }
}

/* Desktop - Sticky */
@media (min-width: 992px) {
    .switch-sidebar-box.switch-collapsible {
        position: sticky;
        bottom: 20px;
        top: auto;
    }

    /* Kompaktnější margins */
    .switch-panel[data-panel="1"] .switch-sidebar-box,
    .switch-panel[data-panel="2"] .switch-sidebar-box {
        margin-top: 16px !important;
    }

    .switch-sidebar-box.switch-collapsible[data-state="expanded"] {
        padding: 14px 18px !important;
    }

    /* Horizontální layout */
    .switch-collapsible-content {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 20px;
        margin-top: 10px !important;
    }

    .switch-collapsible-content .switch-selected-item {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .switch-collapsible-content .switch-selected-item img,
    .switch-collapsible-content .switch-selected-base-item img {
        width: 50px;
        height: 50px;
        object-fit: cover;
        border-radius: 8px;
        flex-shrink: 0;
    }

    .switch-collapsible-content .switch-selected-item .switch-selected-info {
        flex: 1;
        min-width: 0;
    }

    .switch-collapsible-content .switch-selected-name,
    .switch-collapsible-content .switch-selected-base-item strong {
        font-size: 13px;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .switch-collapsible-content .switch-selected-price {
        font-size: 14px;
        color: var(--switch-primary);
        font-weight: 600;
    }

    .switch-collapsible-content .switch-selected-meta {
        font-size: 11px;
    }

    .switch-collapsible-content .switch-selected-description {
        flex: 2;
        font-size: 12px;
        line-height: 1.4;
        color: #666;
        border-left: 1px solid var(--switch-border);
        padding-left: 15px;
        margin: 0;
    }

    .switch-collapsible-content .switch-buttons-step1 {
        display: flex;
        flex-direction: row;
        gap: 10px;
        flex-shrink: 0;
    }

    .switch-collapsible-content .switch-btn-primary,
    .switch-collapsible-content .switch-btn-secondary,
    .switch-buttons-step1 .switch-btn-primary,
    .switch-buttons-step1 .switch-btn-secondary {
        padding: 10px 18px;
        font-size: 14px;
        white-space: nowrap;
    }

    .switch-collapsible-content .switch-size-selector {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
    }

    .switch-collapsible-content .switch-size-selector label {
        font-size: 12px;
        margin: 0;
    }

    .switch-collapsible-content .switch-size-selector select {
        padding: 6px 10px;
        font-size: 13px;
    }

    .switch-collapsible-header {
        padding: 0;
        gap: 10px;
    }

    .switch-collapsible-title h4 {
        font-size: 13px;
    }
}

/* Collapsed state */
.switch-sidebar-box.switch-collapsible[data-state="collapsed"] {
    padding: 10px 16px;
}

.switch-collapsible[data-state="collapsed"] .switch-collapsible-header {
    gap: 12px;
}

/* ========================================
   17. AUTO-COLLAPSE PROGRESS BAR
   ======================================== */

.switch-collapse-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--switch-primary);
    opacity: 0.6;
    transition: width linear;
    border-radius: 0 0 8px 8px;
}

.switch-sidebar-box:hover .switch-collapse-progress {
    opacity: 0.3;
}

/* ========================================
   18. DOUBLE-TAP FEEDBACK
   ======================================== */

.switch-visualizer-stage {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.switch-vis-item.switch-double-tap-feedback {
    animation: doubleTapPulse 0.3s ease-out;
}

.switch-visualizer-stage.switch-double-tap-feedback {
    animation: doubleTapFlash 0.3s ease-out;
}

@keyframes doubleTapPulse {
    0% {
        transform: scale(1.05);
        box-shadow: 0 0 0 0 rgba(201, 169, 97, 0.7);
    }

    50% {
        transform: scale(1.15);
        box-shadow: 0 0 0 8px rgba(201, 169, 97, 0);
    }

    100% {
        transform: scale(1.05);
        box-shadow: 0 0 0 0 rgba(201, 169, 97, 0);
    }
}

@keyframes doubleTapFlash {
    0% {
        box-shadow: inset 0 0 0 0 rgba(201, 169, 97, 0);
    }

    50% {
        box-shadow: inset 0 0 30px 10px rgba(201, 169, 97, 0.3);
    }

    100% {
        box-shadow: inset 0 0 0 0 rgba(201, 169, 97, 0);
    }
}

/* Added indicator */
.switch-vis-item.added::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: var(--switch-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: checkmarkPop 0.3s ease-out;
    pointer-events: none;
}

@keyframes checkmarkPop {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Double-tap hint tooltip */
.switch-double-tap-hint {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-align: center;
    max-width: 280px;
}

.switch-double-tap-hint.visible {
    opacity: 1;
}

.switch-double-tap-hint::before {
    content: '👆👆';
    display: block;
    font-size: 20px;
    margin-bottom: 4px;
}

@media (min-width: 992px) {
    .switch-double-tap-hint {
        display: none;
    }
}

/* ========================================
   19. VISUALIZER FEEDBACK BADGE
   ======================================== */

.switch-visualizer-badge {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 12px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    pointer-events: none;
}

.switch-visualizer-badge.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.switch-badge-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.switch-visualizer-badge.added .switch-badge-main {
    color: var(--switch-success, #4A7C59);
}

.switch-visualizer-badge.removed .switch-badge-main {
    color: #c0392b;
}

.switch-badge-main svg {
    flex-shrink: 0;
}

.switch-badge-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #666;
    font-weight: 400;
}

.switch-badge-hint.success {
    color: var(--switch-primary, #C9A961);
    font-weight: 600;
}

.switch-badge-hint.warning {
    color: #c0392b;
    font-weight: 600;
}

@media (max-width: 768px) {
    .switch-visualizer-badge {
        top: 10px;
        padding: 10px 16px;
        border-radius: 10px;
    }

    .switch-badge-main {
        font-size: 13px;
    }

    .switch-badge-hint {
        font-size: 11px;
    }
}

/* ========================================
   20. SHARE BUTTON
   ======================================== */

.switch-share-info {
    position: absolute;
    top: 100px;
    right: 20px;
    z-index: 10;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.switch-share-info:hover {
    transform: scale(1.1);
}

.switch-share-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: #333;
}

.switch-share-tooltip {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    margin-right: 10px;
}

.switch-share-tooltip.visible {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ========================================
   9. FULLSCREEN MODE
   ======================================== */

.switch-fullscreen-info {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 100;
    /* Higher than other controls */
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.switch-fullscreen-info.visible {
    opacity: 1;
    pointer-events: auto;
}

.switch-fullscreen-info:not(:hover) .switch-fullscreen-icon {
    opacity: 0.7;
}

.switch-fullscreen-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.switch-fullscreen-icon:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.5);
    color: #000;
    border-color: rgba(0, 0, 0, 0.08);
}

.switch-visualizer-container.fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    background: #fff !important;
    border-radius: 0 !important;
    padding: 20px !important;
    margin: 0 !important;
    transform: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    overflow-y: auto;
    box-sizing: border-box !important;
}

/* Adjust layout in fullscreen */
.switch-visualizer-container.fullscreen .switch-visualizer-stage {
    flex: 1;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 80vh !important;
    padding-bottom: 0 !important;
    margin: 0 auto 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    aspect-ratio: auto;
}

.switch-visualizer-container.fullscreen .switch-visualizer-bg,
.switch-visualizer-container.fullscreen .switch-visualizer-overlay {
    position: absolute !important;
    height: 100% !important;
    width: 100% !important;
    object-fit: contain;
    top: 0 !important;
    left: 0 !important;
}

.switch-visualizer-container.fullscreen .switch-visualizer-carousel-wrapper {
    margin-top: auto;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Mobile adjustments for fullscreen */
@media (max-width: 768px) {
    .switch-visualizer-container.fullscreen {
        padding: 10px;
    }

    .switch-visualizer-container.fullscreen .switch-visualizer-stage {
        max-height: 70vh;
    }

    .switch-fullscreen-info {
        top: 10px;
        left: 10px;
    }

    .switch-fullscreen-icon {
        width: 44px;
        /* Larger touch target */
        height: 44px;
        background: rgba(255, 255, 255, 0.5);
        /* More contrast on mobile */
    }
}

/* ========================================
   10. ICON LABELS (Tooltips)
   ======================================== */

.switch-icon-label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: #333;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 100;
}

/* Specific positions */
.switch-fullscreen-info .switch-icon-label {
    left: 100%;
    margin-left: 10px;
}

.switch-gallery-info .switch-icon-label {
    right: 100%;
    margin-right: 10px;
    transform: translateY(-50%) translateX(-10px);
}

/* Show on hover of parent */
.switch-fullscreen-info:hover .switch-icon-label {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* Ensure gallery info is hoverable like others */
.switch-gallery-info:hover .switch-icon-label {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.switch-share-info .switch-icon-label {
    right: 100%;
    margin-right: 10px;
    transform: translateY(-50%) translateX(-10px);
}

.switch-share-info:hover .switch-icon-label {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* Hide labels on mobile to prevent clutter */
@media (max-width: 768px) {
    .switch-icon-label {
        display: none;
    }
}

/* ========================================
   HELP TOUR
   ======================================== */

/* Help Icon - similar to fullscreen icon */
.switch-help-info {
    position: absolute;
    top: 12px;
    left: 60px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    z-index: 15;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.switch-visualizer-stage:hover .switch-help-info,
.switch-help-info.visible {
    opacity: 1;
}

.switch-help-info:not(:hover) .switch-help-icon {
    opacity: 0.7;
}

.switch-help-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.switch-help-icon:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.5);
    color: #000;
    border-color: rgba(0, 0, 0, 0.08);
}

.switch-help-icon svg {
    width: 16px;
    height: 16px;
}

/* Pulsing animation for first-time users */
.switch-help-icon.pulse {
    animation: helpPulse 2s infinite;
}

@keyframes helpPulse {

    0%,
    100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    50% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15),
            0 0 0 8px rgba(201, 169, 97, 0.2);
    }
}

/* Tour Overlay */
.switch-tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    pointer-events: auto;
}

/* Force show icons when tour is active */
body.switch-tour-active .switch-fullscreen-info,
body.switch-tour-active .switch-tech-info,
body.switch-tour-active .switch-gallery-info,
body.switch-tour-active .switch-help-info {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Spotlight - creates the "hole" effect */
.switch-tour-spotlight {
    position: absolute;
    border: 3px solid var(--switch-primary, #C9A961);
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

/* Tooltip */
.switch-tour-tooltip {
    position: absolute;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    max-width: 320px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100001;
}

.switch-tour-tooltip::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
}

.switch-tour-tooltip.arrow-top::before {
    top: -6px;
    left: 24px;
}

.switch-tour-tooltip.arrow-bottom::before {
    bottom: -6px;
    left: 24px;
}

.switch-tour-tooltip.arrow-left::before {
    left: -6px;
    top: 24px;
}

.switch-tour-tooltip.arrow-right::before {
    right: -6px;
    top: 24px;
}

.switch-tour-content {
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    margin-bottom: 16px;
}

.switch-tour-content strong {
    color: var(--switch-primary, #C9A961);
}

.switch-tour-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.switch-tour-progress {
    font-size: 12px;
    color: #999;
    font-weight: 500;
}

.switch-tour-buttons {
    display: flex;
    gap: 8px;
}

.switch-tour-skip {
    background: transparent;
    border: none;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    padding: 8px 12px;
    transition: color 0.2s;
}

.switch-tour-skip:hover {
    color: #555;
}

.switch-tour-next {
    background: var(--switch-primary, #C9A961) !important;
    border: none !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.switch-tour-next:hover {
    background: #a8893a !important;
    transform: translateY(-1px);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .switch-help-info {
        left: 52px;
        top: 8px;
    }

    .switch-help-icon {
        width: 36px;
        height: 36px;
    }

    .switch-tour-tooltip {
        max-width: calc(100vw - 40px);
        padding: 16px;
    }

    .switch-tour-content {
        font-size: 14px;
    }
}

/* ============================================
   VISUALIZER LOADER
   Překryv nad vizualizérem po dobu načítání PINů.
   Bez něj je při prvním načtení kroku 2 plocha prázdná
   a nedá se poznat, že se něco děje.
   ============================================ */

.switch-visualizer-loader {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: inherit;
    animation: switch-loader-in 0.18s ease-out;
}

.switch-visualizer-loader[hidden] {
    display: none;
}

.switch-visualizer-loader__spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--switch-primary, #b8860b);
    border-radius: 50%;
    animation: switch-loader-spin 0.8s linear infinite;
}

/* Nadpis kroku 2. Stejný princip jako u základů - nadpis nad obsahem
   by na mobilu ubíral svislé místo, tady se ukáže jen po dobu načítání. */
.switch-visualizer-loader__title {
    font-family: var(--switch-heading-font, Georgia, serif);
    font-size: 28px;
    line-height: 1.2;
    color: var(--switch-text, #1A2A3A);
}

@media (max-width: 768px) {
    .switch-visualizer-loader__title {
        font-size: 24px;
    }
}

@keyframes switch-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes switch-loader-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Respektovat nastavení systému - bez animace pro citlivé uživatele */
@media (prefers-reduced-motion: reduce) {
    .switch-visualizer-loader {
        animation: none;
    }

    .switch-visualizer-loader__spinner {
        animation-duration: 2s;
    }
}