        :root {
            --bg-color: #F8F9FA;
            --surface-color: #FFFFFF;
            --primary-text: #111111;
            --secondary-text: #666666;
            --border-color: #E5E5E5;
            --active-border: #111111;
            --accent-color: #111111;
            --price-bg: #111111;
            --price-text: #FFFFFF;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background-color: var(--bg-color);
            color: var(--primary-text);
            height: 100vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }

        .navbar {
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 40px;
            flex-shrink: 0;
            z-index: 10;
        }

        .logo {
            font-weight: 700;
            font-size: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .logo-icon {
            width: 24px;
            height: 24px;
            background: #000;
            border-radius: 6px;
        }

        .nav-right {
            font-size: 14px;
            font-weight: 500;
            border: 1px solid var(--border-color);
            padding: 4px 12px;
            border-radius: 20px;
            color: var(--secondary-text);
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .history-controls {
            display: flex;
            align-items: center;
            gap: 4px;
            padding-right: 12px;
            border-right: 1px solid var(--border-color);
        }

        .history-btn {
            background: none;
            border: none;
            padding: 6px;
            border-radius: 6px;
            cursor: pointer;
            color: var(--secondary-text);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }

        .history-btn:hover {
            background: #f0f0f0;
            color: var(--primary-text);
        }

        .history-btn:active {
            background: #e5e5e5;
            transform: scale(0.95);
        }

        .history-btn:disabled {
            opacity: 0.3;
            cursor: not-allowed;
            filter: grayscale(1);
        }

        .nav-label {
            white-space: nowrap;
        }

        .main-container {
            display: flex;
            flex: 1;
            height: calc(100vh - 60px);
            overflow: hidden;
        }

        .preview-section {
            flex: 1;
            background: var(--bg-color);
            position: relative;
            display: flex;
            flex-direction: column;
            padding: 60px;
        }

        .product-header {
            margin-bottom: auto;
            z-index: 1;
        }

        .badge {
            display: inline-block;
            background: #0044FF;
            color: white;
            font-size: 12px;
            font-weight: 600;
            padding: 4px 10px;
            border-radius: 4px;
            margin-bottom: 12px;
        }

        .product-title {
            font-size: 48px;
            font-weight: 700;
            line-height: 1.1;
            margin-bottom: 12px;
            letter-spacing: -0.02em;
        }

        .product-subtitle {
            font-size: 16px;
            color: var(--secondary-text);
            max-width: 400px;
            line-height: 1.5;
        }

        .preview-stage {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            min-height: 400px;
        }

        .wheel-container {
            position: relative;
            width: 500px;
            height: 500px;
            transition: transform 0.5s ease;
        }

        .wheel-layer {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            max-width: 100%;
            max-height: 100%;
            transition: opacity 0.4s ease;
        }

        .preview-section iframe {
            /* position: absolute; */
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: none;
            z-index: 0;
            /* pointer-events: none; */
        }


        .config-panel {
            background: var(--surface-color);
            border-left: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            z-index: 10;
            overflow: hidden;
        }

        .config-header {
            padding: 32px;
            background: #f8f9fa;
            border-bottom: 1px solid var(--border-color);
        }

        .config-header h2 {
            font-size: 22px;
            font-weight: 700;
            margin-bottom: 4px;
            color: var(--primary-text);
        }

        .config-header h3 {
            font-size: 20px;
            font-weight: 600;
            margin-top: 20px;
        }

        .config-header p {
            color: var(--secondary-text);
            font-size: 13px;
        }

        .config-sub-header {
            font-size: 13px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--secondary-text);
            padding: 8px 12px;
            background: #eee;
            border-radius: 6px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .config-sub-header::before {
            content: '';
            display: inline-block;
            width: 3px;
            height: 14px;
            background: var(--accent-color);
            border-radius: 2px;
        }

        .option-group-wrapper {
            background: #fff;
            border: 1px solid var(--border-color);
            border-radius: 16px;
            margin-bottom: 24px;
            overflow: hidden;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
        }

        .option-group-wrapper .option-group {
            border-bottom: 1px solid #f0f0f0;
            margin-bottom: 0;
            padding: 20px;
            background: none;
            border-radius: 0;
        }

        .option-group-wrapper .option-group:last-child {
            border-bottom: none;
        }

        .config-content {
            flex: 1;
            overflow-y: auto;
            padding: 15px;
            background-color: #e8e9eb;
        }

        .config-content::-webkit-scrollbar {
            width: 8px;
        }

        .config-content::-webkit-scrollbar-track {
            background: #d1d5db;
            border-radius: 10px;
        }

        .config-content::-webkit-scrollbar-thumb {
            background: #11182794;
            border-radius: 10px;
        }

        .config-content::-webkit-scrollbar-thumb:hover {
            background: #0000008c;
        }

        .section-label {
            font-size: 18px;
            font-weight: 800;
            color: #000000;
            margin-bottom: 14px;
            display: block;
        }

        /* Progress Bar & Wizard Step Navigation */
        .progress-bar-container {
            display: flex;
            gap: 6px;
            width: 100%;
            margin-top: 15px;
            margin-bottom: 8px;
        }

        .progress-segment {
            flex: 1;
            height: 4px;
            background-color: #E5E5E5;
            border-radius: 2px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .progress-segment.active {
            background-color: #111111;
        }

        .progress-segment.completed {
            background-color: #0044FF;
        }

        .step-label-nav {
            font-size: 12px;
            font-weight: 700;
            color: #0044FF;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-top: 6px;
        }

        .wizard-nav-controls {
            display: flex;
            gap: 12px;
            margin-bottom: 16px;
            width: 100%;
        }

        .wizard-btn {
            flex: 1;
            padding: 14px 20px;
            font-size: 14px;
            font-weight: 600;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid var(--border-color);
        }

        .wizard-btn.prev-btn {
            background-color: #FFFFFF;
            color: #111111;
            border: 1px solid #E5E5E5;
        }

        .wizard-btn.prev-btn:hover {
            background-color: #F3F4F6;
            border-color: #D1D5DB;
        }

        .wizard-btn.next-btn {
            background-color: #111111;
            color: #FFFFFF;
            border: none;
        }

        .wizard-btn.next-btn:hover {
            background-color: #222222;
        }

        /* Locked Add to Cart Style */
        #add-to-cart-btn:disabled {
            background-color: #D1D5DB !important;
            color: #9CA3AF !important;
            cursor: not-allowed !important;
            transform: none !important;
            box-shadow: none !important;
            border: 1px solid #E5E5E5 !important;
        }
        
        #add-to-cart-btn:disabled:hover {
            background-color: #D1D5DB !important;
            color: #9CA3AF !important;
            box-shadow: none !important;
            transform: none !important;
        }

        .option-group {
            margin-bottom: 15px;
            background-color: #FFFFFF;
            border-radius: 20px;
            padding: 18px;
        }

        .card-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .option-card {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 16px 20px;
            border: 1px solid var(--border-color);
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            background: #fff;
        }

        .option-card:hover {
            border-color: #bbb;
        }

        .option-card.active {
            border-color: #0044FF;
            background: #eef5ff;
            box-shadow: 0 0 0 1px #0044FF;
        }

        .card-info {
            display: flex;
            flex-direction: column;
        }

        .card-title {
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .card-desc {
            font-size: 12px;
            color: var(--secondary-text);
        }

        .card-price {
            font-size: 13px;
            font-weight: 500;
        }

        .color-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
        }

        .color-option {
            border-radius: 12px;
            border: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            padding: 12px;
            transition: all 0.2s;
            background-color: white;
        }

        .color-option.active {
            border-color: #0044FF;
            background: #eef5ff;
            box-shadow: 0 0 0 1px #0044FF;
        }

        .color-dot {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            margin-bottom: 8px;
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

        .color-name {
            font-size: 11px;
            font-weight: 500;
            color: var(--secondary-text);
        }

        .toggle-row {
            display: flex;
            gap: 12px;
        }

        .toggle-card {
            flex: 1;
            padding: 14px;
            border: 1px solid var(--border-color);
            border-radius: 12px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: space-between;
            background-color: white;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .toggle-card:hover {
            border-color: #bbb;
        }

        .toggle-card.active {
            border-color: #0044FF;
            background: #eef5ff;
            box-shadow: 0 0 0 1px #0044FF;
        }

        .toggle-label {
            font-size: 14px;
            font-weight: 600;
        }

        .toggle-price {
            font-size: 13px;
            color: var(--accent-color);
            font-weight: 700;
        }

        select,
        input[type="text"],
        input[type="file"] {
            width: 100%;
            padding: 12px 16px;
            border: 1px solid var(--border-color);
            border-radius: 12px;
            background: white;
            font-size: 14px;
            color: var(--primary-text);
        }

        select {
            background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23666666" d="M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z"/></svg>');
            background-position: right 16px center;
            background-repeat: no-repeat;
            background-size: 12px;
        }

        .helper-text {
            font-size: 12px;
            color: var(--secondary-text);
            margin-top: 8px;
            display: block;
        }

        .disclaimer {
            font-size: 12px;
            color: #dc2626;
            margin-top: 12px;
            line-height: 1.4;
            display: none;
        }

        #stitching-sub-options {
            margin-top: 16px;
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 8px;
        }

        #stripe-sub-options {
            margin-top: 16px;
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }



        /* Sub-options UI Improvements */
        .sub-options-container {
            background: #f1f2f4;
            border-radius: 16px;
            padding: 20px;
            margin-top: 12px;
            border: 1px solid var(--border-color);
            animation: slideDown 0.3s ease-out;
        }

        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .sub-step-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 12px;
        }

        .sub-step-label {
            font-size: 13px;
            font-weight: 850;
            color: #000000;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .selected-indicator {
            font-size: 11px;
            color: var(--primary-text);
            font-weight: 600;
            background: #fff;
            padding: 2px 10px;
            border-radius: 10px;
            border: 1px solid var(--border-color);
        }

        .sub-options-divider {
            height: 1px;
            background: var(--border-color);
            margin: 16px 0;
        }

        /* Agreement Checkbox UI Improvements */
        .agreement-group {
            background-color: #f8fbff;
            border: 1px solid #cce0ff;
            border-radius: 12px;
            padding: 16px;
            margin-top: 24px;
            transition: all 0.2s ease;
        }

        .agreement-group:hover {
            border-color: #0044FF;
            box-shadow: 0 4px 12px rgba(0, 68, 255, 0.05);
        }

        .agreement-label {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            cursor: pointer;
        }

        .agreement-checkbox {
            width: 20px;
            height: 20px;
            flex-shrink: 0;
            margin-top: 2px;
            cursor: pointer;
            accent-color: #0044FF;
            transition: outline 0.2s ease;
        }

        .agreement-text {
            font-size: 14px;
            color: var(--primary-text);
            font-weight: 500;
            line-height: 1.5;
        }

        .agreement-link {
            color: #0044FF;
            text-decoration: underline;
            text-underline-offset: 3px;
            font-weight: 600;
            transition: color 0.2s;
        }

        .agreement-link:hover {
            color: #002db3;
        }

        /* ///////////////////////////////////////////// */

        @media (max-width: 768px) {
            body {
                height: 100vh;
                overflow: hidden;
            }

            .preview-section iframe {
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 50%;
                border: none;
                z-index: 0;
            }

            .navbar {
                padding: 0 16px;
                height: 50px;
            }

            .logo {
                font-size: 16px; /* Further reduced */
                gap: 6px;
            }

            .logo-icon {
                width: 20px;
                height: 20px;
            }

            .nav-right {
                padding: 4px 8px;
                gap: 6px;
                font-size: 11px;
                border-radius: 12px;
            }

            .nav-label {
                display: none; /* Hide label to make room for buttons */
            }

            .history-controls {
                padding-right: 8px;
            }

            .history-btn {
                padding: 4px;
            }

            .history-btn svg {
                width: 14px;
                height: 14px;
            }

            .main-container {
                flex-direction: column;
                height: calc(100vh - 50px);
            }

            .preview-section {
                height: 38vh; /* Slightly more height for the preview */
                padding: 0;
                flex: none;
                display: flex;
                align-items: center;
                justify-content: center;
                overflow: hidden;
            }

            .wheel-container {
                transform: scale(0.6); /* Reduced scale to fit within 38vh */
                margin-top: -10px;
            }

            .config-panel {
                width: 100%;
                height: 62vh; /* Adjusted to complement 38vh preview */
                margin: 0;
                border-radius: 20px 20px 0 0; /* Slightly smaller radius */
                border-left: none;
                border-top: 1px solid var(--border-color);
                box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05);
                flex: 1;
                display: flex;
                flex-direction: column;
            }

            .config-header {
                padding: 16px 16px 8px; /* Reduced padding */
                border-bottom: 1px solid rgba(0, 0, 0, 0.05);
            }

            .config-header h2 {
                font-size: 18px;
            }

            .config-header p {
                font-size: 12px;
            }

            .config-content {
                padding: 10px;
                padding-bottom: calc(20px + env(safe-area-inset-bottom));
                -webkit-overflow-scrolling: touch;
            }

            .option-group {
                padding: 12px;
                margin-bottom: 10px;
                border-radius: 14px;
            }

            .section-label {
                font-size: 14px;
                margin-bottom: 8px;
            }

            .toggle-row {
                gap: 8px;
            }

            .toggle-card {
                padding: 10px 12px;
                border-radius: 10px;
            }

            .toggle-label {
                font-size: 13px;
            }

            .toggle-price {
                font-size: 12px;
            }

            .color-grid {
                grid-template-columns: repeat(3, 1fr);
                gap: 8px;
            }

            .color-option {
                padding: 10px 4px;
                border-radius: 10px;
            }

            .color-dot {
                width: 20px;
                height: 20px;
                margin-bottom: 4px;
            }

            .color-name {
                font-size: 10px;
                text-align: center;
                width: 100%;
            }

            .option-card {
                padding: 10px 14px;
                border-radius: 10px;
                margin-bottom: 8px;
            }

            .card-title {
                font-size: 13px;
            }

            .card-desc {
                font-size: 11px;
            }

            .config-sub-header {
                font-size: 16px !important;
                margin: 12px 0 8px !important;
                padding: 0 8px !important;
            }
            
            .config-footer {
                padding: 12px 16px; /* Reduced padding */
            }

            #add-to-cart-btn {
                padding: 14px; /* Reduced padding */
                font-size: 15px; /* Slightly smaller font */
                border-radius: 12px;
            }

            .cart-helper-text {
                display: none; /* Removed as per user request */
            }

            /* Extra small screens fix */
            @media (max-width: 400px) {
                .navbar {
                    height: 44px;
                    padding: 0 12px;
                }
                .preview-section {
                    height: 32vh;
                }
                .wheel-container {
                    transform: scale(0.65); /* Made wheel larger for better visibility */
                    margin-top: -5px;
                }
                .config-panel {
                    height: calc(100vh - 44px - 32vh);
                    border-radius: 16px 16px 0 0;
                }
                .config-header {
                    padding: 12px 16px 6px;
                }
                .config-header h2 {
                    font-size: 18px;
                }
                .config-header p {
                    font-size: 11px;
                }
                .option-group {
                    padding: 10px;
                    margin-bottom: 8px;
                }
                .option-card {
                    padding: 8px 12px;
                    margin-bottom: 6px;
                }
                .config-footer {
                    padding: 8px 12px;
                }
                #add-to-cart-btn {
                    padding: 12px;
                    font-size: 14px;
                }
                .config-sub-header {
                    font-size: 15px !important;
                    margin: 8px 0 6px !important;
                }
                .toggle-card {
                    padding: 8px 10px;
                }
                .toggle-label {
                    font-size: 12px;
                }
            }
        }

        /* /////////////////// */

        /* Config Footer & Add to Cart Button Styles */
        .config-footer {
            padding: 20px;
            background: #FFFFFF;
            border-top: 1px solid var(--border-color);
            z-index: 20;
            flex-shrink: 0;
            box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.03);
        }

        .add-to-cart-section {
            margin-bottom: 0 !important;
            padding: 0 !important;
            background: transparent !important;
        }

        #add-to-cart-btn {
            width: 100%;
            padding: 18px;
            background: #000000;
            color: #ffffff;
            border: none;
            border-radius: 14px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            letter-spacing: 0.5px;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        #add-to-cart-btn:hover {
            background: #222222;
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
        }

        #add-to-cart-btn:active {
            transform: translateY(0);
        }

        .cart-helper-text {
            font-size: 11px;
            color: #999;
            text-align: center;
            margin-top: 10px;
            font-weight: 500;
        }

        .config-content {
            flex: 1;
            overflow-y: auto;
        }