/* Mobile First Base Styles */
        :root {
            --primary-color: #0066CC;
            --text-color: #333;
            --bg-color: #f8f9fa;
            --border-radius: 12px;
            --shadow: 0 4px 12px rgba(0,0,0,0.08);
            --progress-bar-color: #0066CC;
            --progress-bar-height: 2px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        html,body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            color: var(--text-color);
            background: transparent;
            overflow-x: hidden;
            height: 100%;
            width: 100vw;
            overflow-y: hidden;
            overflow: hidden;
        }

        .main-container {
            width: 100vw;
            height: 100%;
            position: relative;
            overflow: hidden;
            background: transparent;
            touch-action: none;
            -webkit-touch-callout: none;
            user-select: none;
            -webkit-user-select: none;
            -ms-user-select: none;
            -moz-user-select: none;
        }

        .model-viewer-wrapper {
            position: relative;
            height: 100%;
            width: 100%;
            overflow: hidden;
        }

        /* Logo */
        .logo-wrapper {
            position: absolute;
            top: 10px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 1000;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: all 0.3s ease;
        }

        .logo-wrapper img {
            height: 24px;
            width: auto;
            cursor: pointer;
        }

        /* Hostinger Logo */
        .hostinger-logo-wrapper {
            display: none; /* Hidden by default / on mobile */
            position: absolute;
            z-index: 1000;
        }

        .hostinger-logo-wrapper img {
            width: 50px; /* Adjust as needed */
            height: auto;
            display: block;
            bottom:0px;
            right:0px;
        }

        /* Configurator */
        .configurator {
        position: fixed;
            left: 0;
            right: 0;
            overflow-y: auto;
            background: rgba(255,255,255,0.9);
            backdrop-filter: blur(10px);
            border-top-left-radius: 15px;
            border-top-right-radius: 15px;
            box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
            z-index: 10;
            padding: 11px;
            bottom: 0;
            padding-bottom: calc(env(safe-area-inset-bottom, 0px));
        }

        .config-header {
            display: flex;
            align-items: center;
            gap: 8px;
        
        }

        .price-container {
            text-align: right;
        }

        .ar-button-container {
            margin-left: auto;
            display: flex;
            align-items: center;
            gap: 3px;
            cursor: pointer;
            background-color: var(--primary-color);
            color: white;
            padding: 8px 12px;
            border-radius: var(--border-radius);
            font-size: 12px;
            font-weight: 500;
            transition: background-color 0.2s ease;
        }

        .ar-button-container:hover {
            background-color: #3a5edb;
        }

        .product-title-text {
            font-size: 14px;
        }

        .model-name {
            font-size: 14px;
            color: #666;
            font-weight: 500;
        }

        .product-price {
            font-size: 14px;
            font-weight: 400;
            color: #666;
        }

        .config-tabs {
            display: flex;
            justify-content: center;
            margin-bottom: 10px;
            border-bottom: 1px solid #eee;
            overflow-x: auto;
            scrollbar-width: none;
        }

        .config-tabs::-webkit-scrollbar {
            display: none;
        }

        .config-tab {
            padding: 8px 12px;
            font-size: 12px;
            font-weight: 500;
            color: #666;
        border: none;
            background: transparent;
            cursor: pointer;
            white-space: nowrap;
            position: relative;
        }

        .config-tab.active {
            color: var(--primary-color);
            font-weight: 600;
        }

        .config-tab.active::after {
            content: '';
            position: absolute;
            bottom: -1px;
            left: 0;
            right: 0;
            height: 2px;
            background: var(--primary-color);
        }

        .config-panels {
            margin-bottom: 5px;
            min-height: 75px;
        }

        .config-panel {
            display: none;
        }

        .config-panel.active {
            display: block;
        }

        .panel-title {
            display: none; /* Hide panel titles in mobile mode */
        }

        .options-slider {
            display: flex;
            gap: 12px;
            overflow-x: auto;
          
            scrollbar-width: none;
            -ms-overflow-style: none;
        justify-content: center;
        }

        .options-slider::-webkit-scrollbar {
            display: none;
        }

        .model-option {
            flex-shrink: 0;
            text-align: center;
        cursor: pointer;
            transition: all 0.2s ease;
        }

        .model-option.selected {
            opacity: 1;
        }

        .model-option img {
            width: 60px;
            height: auto;
            border-radius: 8px;
            border: 2px solid #ddd;
            transition: all 0.2s ease;
            object-fit: cover;
            object-position: center;
        }

        .model-option.selected img {
            border-color: var(--primary-color);
            box-shadow: 0 0 8px rgba(0, 102, 204, 0.3);
        }

        .model-option.disabled-option {
            pointer-events: none;
            opacity: 0.5;
        }

        .option-name {
            font-size: 10px;
            margin-top: 4px;
            color: #666;
            font-weight: 600;
        }

        .color-option {
            width: 40px;
            height: 40px;
            border-radius: 8px;
            border: 2px solid #ddd;
            cursor: pointer;
            flex-shrink: 0;
            position: relative;
            background-size: cover;
            background-position: center;
            transition: all 0.2s ease;
        }

        .color-option.selected {
            border-color: var(--primary-color);
            transform: scale(1.1);
            box-shadow: 0 0 8px rgba(0, 102, 204, 0.3);
        }

        .color-option:hover {
            transform: scale(1.05);
            border-color: #999;
        }

        .color-name {
            position: absolute;
            bottom: -20px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 8px;
            color: #666;
            white-space: nowrap;
        }

        .color-with-name {
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            flex-shrink: 0;
        }

        /* Model Viewer */
        model-viewer {
            width: 100%;
            height: 100%;
            background: #f8f8f8;
            --poster-color: #f8f8f8;
        position: absolute;
            top: 0;
            left: 0;
            bottom: 0;
            right: 0;
            outline: none;
            --progress-bar-color: #0066CC;
            --progress-bar-height: 2px;
        }

        .Hotspot {
            background: #74747470;
            border-radius: 15px;
            border: 0;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
            box-sizing: border-box;
            cursor: pointer;
            height: 15px;
            padding: 8px;
            position: relative;
            transition: opacity 0.3s;
            width: 15px;
        }
        
        .Hotspot:not([data-visible]) {
            background: transparent;
            border: 4px solid #fff;
            box-shadow: none;
            height: 15px;
            pointer-events: none;
            width: 15px;
        }
        
        .Hotspot:focus {
            border: 4px solid #b38a5e; /* Assuming this color comes from eski.css --primary-color */
            height: 15px;
            outline: none;
            width: 15px;
        }
        
        .Hotspot > * {
            opacity: 1;
            transform: translateY(-50%);
        }
        
        .HotspotAnnotation{
            background: white; /* Added from eski.css .HotspotAnnotation, though it was not explicitly defined, it's common */
            border-radius: 4px;
            box-shadow: 0 2px 4px rgba(223, 223, 223, 0.25); /* from eski.css */
            color: #b38a5e; /* Assuming this color comes from eski.css --primary-color */
            display: block;
            font-family: Futura, Helvetica Neue, sans-serif;
            font-size: 11px;
            font-weight: 700;
            left: calc(100% + 1em);
            max-width: 128px;
            overflow-wrap: break-word;
            padding: 0.5em 1em;
            position: absolute;
            top: 50%;
            width: max-content;
        }
        
        .Hotspot:not([data-visible]) > * {
            opacity: 0;
            pointer-events: none;
            transform: translateY(calc(-50% + 4px));
            transition: transform 0.3s, opacity 0.3s;
        }

        .main-container.hide-hotspots .Hotspot { /* Style for hiding hotspots */
            display: none !important;
        }


        model-viewer::part(ar-button) {
            display: none;
        }

        /* QR Modal */
        .qr-modal {
        display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            z-index: 10000;
        justify-content: center;
        align-items: center;
            backdrop-filter: blur(5px);
        }

        .qr-modal.active {
            display: flex;
        }

        .modal-content {
            background: white;
            padding: 25px;
            border-radius: 20px;
            position: relative;
            max-width: 400px;
            width: 90%;
            text-align: center;
            box-shadow: 0 10px 25px rgba(0,0,0,0.2);
            animation: modalFadeIn 0.3s ease;
        }

        @keyframes modalFadeIn {
            from { opacity: 0; transform: scale(0.95); }
            to { opacity: 1; transform: scale(1); }
        }

        .close-button {
            position: absolute;
            top: 15px;
            right: 15px;
            background: none;
            border: none;
        cursor: pointer;
            padding: 8px;
            border-radius: 50%;
            transition: all 0.2s ease;
        }

        .close-button:hover {
            background: rgba(0,0,0,0.1);
        }

        .modal-title {
            margin: 0 0 25px 0;
            color: #333;
            font-size: 20px;
            font-weight: 600;
        }

        .qr-container {
            margin: 25px 0;
            display: flex;
            justify-content: center;
            background: #f8f8f8;
            padding: 20px;
            border-radius: 15px;
        }

        .info-box {
            display: flex;
            align-items: start;
            gap: 12px;
            background: #f5f5f5;
            padding: 18px;
            border-radius: 12px;
            margin-top: 25px;
        }

        .info-box p {
            margin: 0;
            text-align: left;
            font-size: 14px;
            line-height: 1.5;
            color: #555;
        }

        /* Desktop Styles */
        @media (min-width: 769px) {
            body {
                overflow-y: hidden;
                background-color: var(--bg-color);
            }

            /* Desktop layout using flex - side by side */
            .main-container.desktop-layout {
                display: flex;
                height: 100vh;
            }

            .main-container.desktop-layout .model-viewer-wrapper {
                flex: 3; /* Takes 3/4 width (75%) - left side */
                position: relative;
                height: 100%;
            }

            .main-container.desktop-layout model-viewer {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
            }

            /* Logo positioned over model viewer */
            .main-container.desktop-layout .logo-wrapper {
                position: absolute;
                top: 20px;
                left: 20px;
                background: rgba(255, 255, 255, 0.9);
                backdrop-filter: blur(5px);
                padding: 8px 12px;
                border-radius: 8px;
                z-index: 1000;
                transform: none; /* Reset mobile transform */
            }

            .main-container.desktop-layout .logo-wrapper img {
                height: 40px; /* Slightly larger desktop logo */
            }

            /* Desktop Configurator - right side flex item */
            .main-container.desktop-layout .configurator {
                flex: 1; /* Takes 1/3 width (33.3%) - right side */
                position: relative;
                width: auto;
                height: 100vh;
                overflow-y: auto;
                border-left: 1px solid #eee;
                border-radius: 0;
                padding: 20px;
                z-index: 5;
                box-shadow: -4px 0 20px rgba(0,0,0,0.05);
                background: white;
                backdrop-filter: none;
                bottom: auto;
                left: auto;
                right: auto;
                transform: none;
                
                /* Flexbox to organize content */
                display: flex;
                flex-direction: column;
            }

            /* Hide tab navigation on desktop */
            .main-container.desktop-layout .config-tabs {
                display: none;
            }

            /* Config panels order and flex */
            .main-container.desktop-layout .config-panels {
                margin-bottom: 0;
                min-height: auto;
                order: 1; /* Panels come first */
                flex-grow: 1;
            }

            /* Config header at bottom */
            .main-container.desktop-layout .config-header {
                order: 2; /* Header comes after panels */
                padding-top: 15px;
                border-top: 1px solid #eee;
                gap: 10px;
                margin-bottom: 0;
            }

            /* Show all panels on desktop */
            .main-container.desktop-layout .config-panel {
                display: block !important;
                margin-bottom: 5px;
                padding-bottom: 5px;
                border-bottom: 1px solid #eee;
                background: white;
                border: none;
                border-radius: 0;
            }

            .main-container.desktop-layout .config-panel:last-child {
                border-bottom: none;
            }

            /* Panel titles with console.html style arrows */
            .main-container.desktop-layout .panel-title {
                display: flex;
                align-items: center;
                justify-content: space-between;
                font-size: 14px;
                font-weight: 600;
                margin: 0;
                margin-bottom: 15px;
                padding: 0;
                padding-bottom: 6px;
                border-bottom: none;
                cursor: pointer;
                width: 100%;
                background: transparent;
                border-radius: 0;
                transition: none;
            }

            .main-container.desktop-layout .panel-title:hover {
                background: transparent;
            }

            /* Console.html style dropdown arrows */
            .main-container.desktop-layout .panel-title::after {
                content: '';
                width: 10px;
                height: 10px;
                border-right: 2px solid var(--primary-color);
                border-bottom: 2px solid var(--primary-color);
                transform: rotate(45deg);
                transition: transform 0.3s ease;
                display: inline-block;
                margin-right: 10px;
                margin-left: auto;
            }

            .main-container.desktop-layout .panel-title.expanded::after {
                transform: rotate(-135deg);
            }

            /* Panel content hidden by default */
            .main-container.desktop-layout .config-panel .options-slider {
                display: none;
                max-height: none;
                overflow: visible;
                transition: none;
                padding: 0;
                margin: 0;
            }

            /* Show panel content when expanded */
            .main-container.desktop-layout .config-panel.expanded .options-slider {
                display: flex;
                flex-wrap: wrap;
                justify-content: flex-start;
                gap: 6px;
                padding: 6px 0;
            }

            /* Desktop specific sizing */
            .main-container.desktop-layout .model-option {
                min-width: 90px;
                padding: 8px;
            }

            .main-container.desktop-layout .model-option img {
                width: 80px;
                height: auto;
                margin-bottom: 8px;
            }

            .main-container.desktop-layout .option-name {
                font-size: 12px;
            }

            .main-container.desktop-layout .color-option {
                width: 48px;
                height: 48px;
                margin: 6px;
                border: 2px solid #e0e0e0;
            }

            /* Header elements sizing */
            .main-container.desktop-layout .model-name {
                font-size: 18px;
                font-weight: 600;
            }

            .main-container.desktop-layout .product-price {
                font-size: 22px;
                font-weight: 700;
            }

            .main-container.desktop-layout .ar-button-container {
                font-size: 18px;
            }

            /* Desktop specific positioning for Hostinger Logo */
            .main-container.desktop-layout .model-viewer-wrapper .hostinger-logo-wrapper {
                display: block; /* Show on desktop */
                bottom: 5px;
                right: 10px;
            }
        }

        /* Styles for Dimensions Toggle Button */
        .dimensions-toggle-btn {
            background: transparent;
            border: none;
            cursor: pointer;
            padding: 2px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #333; /* Icon color */
        }

        #toggleDimensionsBtn svg {
            transform: rotate(90deg);
        }

        .dimensions-toggle-btn:hover {
            color: var(--primary-color);
        }
        .dimensions-toggle-btn.active {
            background-color: var(--primary-color);
            color: white;
        }

        /* Hide hotspot toggle and play tour buttons on mobile */
        @media (max-width: 768px) {
            #toggleHotspotsBtn,
            #playHotspotTourBtn {
                display: none !important;
            }
        }

        /* Styles from the example for dimensions */
        .dot {
            display: none;
        }

        .dim {
            border-radius: 4px;
            border: none;
            box-sizing: border-box;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
            color: rgba(0, 0, 0, 0.8);
            display: block;
            font-family: Futura, Helvetica Neue, sans-serif;
            font-size: 1em;
            font-weight: 700;
            max-width: 128px;
            overflow-wrap: break-word;
            padding: 0.5em 1em;
            position: absolute;
            width: max-content;
            height: max-content;
            transform: translate3d(-50%, -50%, 0);
            pointer-events: none;
            --min-hotspot-opacity: 0;
            background-color: white; /* Added for better visibility */
            z-index: 1; /* Ensure dims are above model but below UI */
        }

        @media only screen and (max-width: 800px) {
            .dim {
                font-size: 3vw;
            }
        }

        .dimensionLineContainer {
            pointer-events: none;
            display: block;
            position: absolute; /* Ensure it overlays the viewer */
            top: 0;
            left: 0;
            z-index: 0; /* Behind hotspots but in front of model */
        }

        .dimensionLine {
            stroke: #16a5e6; /* Blue color for dimension lines */
            stroke-width: 2;
            stroke-dasharray: 2;
        }

        .hide {
            display: none !important; /* Added important for specificity */
        }

        /* This keeps child nodes hidden while the element loads */
        :not(:defined)>* {
            display: none;
    } 