.kalanda-configurator-wrapper {
    position: relative;
    width: 100%;
    height: 85vh;
    min-height: 600px;
    background: #ffffff; /* PURE WHITE */
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* THE FIX: Occupy only left space on desktop to center the bag correctly */
.config-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% - 400px);
    height: 100%;
    z-index: 1;
    background: #ffffff; /* PURE WHITE */
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.kalanda-configurator-wrapper.sidebar-collapsed .config-canvas {
    width: 100%;
}

.config-ui-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    display: flex;
    justify-content: flex-end;
}

.sidebar-toggle {
    position: absolute;
    right: 400px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px; /* Increased width to fix icon clipping */
    height: 64px;
    background: #ffffff; /* PURE WHITE */
    color: #000000;      /* BLACK ICON */
    border: 1px solid #f0f0f0;
    border-right: none;
    border-radius: 12px 0 0 12px;
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000; 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 15px rgba(0,0,0,0.08);
}

.sidebar-toggle:hover {
    background: #fafafa;
    width: 65px;
}

.sidebar-toggle svg {
    transition: transform 0.4s ease;
    width: 18px;
    height: 18px;
    display: block;
}

.kalanda-configurator-wrapper.sidebar-collapsed .sidebar-toggle {
    right: 0;
}

.kalanda-configurator-wrapper.sidebar-collapsed .sidebar-toggle svg {
    transform: rotate(180deg);
}

.kalanda-configurator-wrapper.sidebar-collapsed .config-sidebar {
    transform: translateX(100%);
}

.config-sidebar {
    position: relative;
    width: 400px;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    box-shadow: -10px 0 30px rgba(0,0,0,0.03);
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    padding: 40px;
    box-sizing: border-box;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99;
}

.config-header h2 {
    font-size: 22px;
    font-weight: 300;
    letter-spacing: 3px;
    margin: 0 0 8px 0;
    color: #000;
}

.config-header p {
    font-size: 12px;
    color: #888;
    margin-bottom: 35px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.config-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

.config-steps .step {
    font-size: 11px;
    color: #bbb;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 2px solid transparent;
    padding-left: 15px;
}

.config-steps .step.active {
    color: #000;
    font-weight: 600;
    border-left: 2px solid #000;
}

.config-panels {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.config-panels .panel {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.config-panels .panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

.panel-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 25px;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scrollable-options {
    max-height: 350px;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: #eee transparent;
}

.scrollable-options::-webkit-scrollbar { width: 4px; }
.scrollable-options::-webkit-scrollbar-thumb { background: #eee; border-radius: 10px; }

.option-btn {
    background: #fff;
    border: 1px solid #f0f0f0;
    padding: 18px;
    text-align: left;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.5px;
}

.option-btn:hover { border-color: #ccc; }
.option-btn.active {
    border-color: #000;
    background: #fafafa;
}

.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 5px; /* Added padding to prevent cropping when buttons scale up */
}

.color-btn {
    width: 42px;
    height: 42px;
    flex-shrink: 0; /* Prevents stretching in flex container */
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
    background-size: cover;
    padding: 0;
}

.color-btn.active {
    border: 2px solid #000;
    transform: scale(1.1);
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 1px solid #eee;
    font-size: 13px;
    background: #fdfdfd;
}

.config-footer {
    margin-top: auto;
    padding-top: 30px;
}

.hand-assembled-note {
    font-size: 10px;
    color: #aaa;
    text-align: center;
    margin-bottom: 20px;
    font-style: italic;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-btn {
    flex: 1;
    padding: 15px;
    font-size: 11px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #000;
    text-transform: uppercase;
}

.action-btn.outline { background: transparent; color: #000; }
.action-btn.solid { background: #000; color: #fff; }
.action-btn.solid:hover { background: #333; }

.config-3d-controls {
    position: absolute;
    bottom: 40px;
    left: 40px;
    pointer-events: auto;
    display: flex;
    gap: 15px;
    flex-direction: row;
}

.line-btn {
    background: #fff;
    border: 1px solid #eee;
    color: #000;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.line-btn svg {
    width: 32px;
    height: 32px;
}

.config-loader {
    position: absolute;
    left: 0;
    top: 0;
    width: calc(100% - 400px);
    height: 100%;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    gap: 25px;
    pointer-events: none;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.kalanda-configurator-wrapper.sidebar-collapsed .config-loader {
    width: 100%;
}

.loader-content {
    text-align: center;
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.config-loader span {
    font-size: 11px;
    letter-spacing: 3px;
    font-weight: 400;
    color: #000;
    text-transform: uppercase;
}

.loader-progress-container {
    width: 100%;
    height: 1px;
    background: #f0f0f0;
    position: relative;
}

.loader-progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: #000;
    transition: width 0.4s cubic-bezier(0.1, 0, 0.1, 1);
}

.loader-percentage {
    font-size: 10px;
    color: #999;
    font-weight: 300;
    letter-spacing: 1px;
}

@media (max-width: 1024px) {
    .config-canvas { width: calc(100% - 300px); }
    .config-sidebar { width: 300px; padding: 25px; }
}

@media (max-width: 768px) {
    .kalanda-configurator-wrapper { height: auto; display: flex; flex-direction: column; }
    .config-canvas { position: relative; width: 100%; height: 450px; order: 1; }
    .config-ui-container { position: relative; width: 100%; height: auto; order: 2; pointer-events: auto; display: block; }
    .config-sidebar { position: relative; width: 100%; height: auto; box-shadow: none; padding: 30px 20px; transform: none !important; }
    .config-loader { width: 100%; left: 0; top: 0; height: 450px; }
    .sidebar-toggle { display: none; }
    .config-3d-controls { bottom: auto; top: 20px; left: 20px; }
}
