.salon-container, .salon-container * {
    box-sizing: border-box;
}

.salon-container {
    font-family: 'Fraunces', serif;
    max-width: 1600px;
    margin: 0 auto;
    background: #fff;
    position: relative;
    padding: 20px;
}

/* Main Layout */
.main-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    position: relative;
}

.kitchen-viewport {
    flex: 1;
    position: relative;
    background: #fdfdfd;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.kuhinja-canvas {
    width: 100%;
    height: auto;
    display: block;
    z-index: 5;
}

/* Sidebar Panel - Desktop (Next to kitchen) */
.side-panel {
    width: 350px !important;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    box-shadow: -5px 0 20px rgba(0,0,0,0.05); /* Shadow on left */
    display: none; /* Hidden by default */
    flex-direction: column;
    /* max-height: 800px; Removed to match container height */
    margin-right: 0;
    transition: all 0.3s ease;
}

.side-panel.open {
    display: flex;
}

/* Overlay is only for mobile now */
.panel-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1500;
    display: none;
    backdrop-filter: blur(4px);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.panel-header h2 {
    font-size: 25px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

@media only screen and (max-width: 768px) {
    .panel-header h2 {
        font-size: 20px;
    }
}

.close-panel {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #333;
    line-height: 0.5;
    padding: 10px;
    margin-right: -5px;
}

.panel-content {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
}

.selected-info { 
    font-size: 0.75rem; color: #666; margin-bottom: 20px; padding: 10px;
    background: #f9f9f9; border-radius: 4px; border-left: 3px solid #333;
}
.selected-info span { color: #000; font-weight: 600; }

/* Material Grid */
.options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.option-card {
    cursor: pointer;
    text-align: center;
}

.swatch {
    width: 85%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    margin: 0 auto 8px auto;
    transition: all 0.2s ease;
    background: #fff;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.swatch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.option-card.active .swatch {
    border-color: #000;
    border-width: 2px;
    transform: scale(1.1);
}

.swatch-label {
    font-size: 0.65rem;
    color: #444;
    font-weight: 500;
}

/* Hotspots */
.hotspot {
    position: absolute;
    z-index: 50;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: transform 0.2s;
}

.hotspot:hover { transform: translate(-50%, -50%) scale(1.2); }

.dot-inner {
    width: 18px;
    height: 18px;
    background: #fff;
    border: 2px solid #000;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    animation: pulse-dot-white 2s infinite;
}

@keyframes pulse-dot-white {
    0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* Visibility Toggle State */
.hotspot-container.hidden .hotspot {
    display: none !important;
}

/* Mobile Hotspot Resize */
@media (max-width: 768px) {
    .dot-inner {
        width: 14px;
        height: 14px;
        border-width: 1.5px;
    }
}

/* Loader */
.salon-loader {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.9);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
}

.progress-bar { width: 200px; height: 4px; background: #eee; border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: #333; transition: width 0.3s; }

/* Mobile */
@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
    }

    .side-panel {
        position: fixed;
        width: 85% !important;
        max-width: 400px !important;
        height: 100vh;
        top: 0;
        bottom: 0;
        right: 0;
        left: auto;
        margin: 0;
        transform: translateX(100%); /* Slide from right */
        border-radius: 20px 0 0 20px;
        display: flex; 
        z-index: 2000;
        transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        box-shadow: -5px 0 40px rgba(0,0,0,0.2);
        overflow: hidden;
    }
    
    .side-panel.open {
        transform: translateX(0);
        width: 85% !important;
        max-width: 400px !important;
        margin-bottom: 0 !important; 
    }

    .panel-content {
        -webkit-overflow-scrolling: touch; /* Momentum scrolling for iOS */
        padding-bottom: 40px; /* Give room at bottom */
    }

    .panel-overlay.active {
        display: none !important; 
    }
}
