/* ===========================
   GLOBAL STYLES
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #1a1a1a;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===========================
   HEADER
   =========================== */
#header {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 100;
    border-bottom: 3px solid #00A878;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
}

#logo-container {
    flex: 0 0 auto;
}

#logo-container img {
    height: 50px;
    width: auto;
}

#header-title {
    flex: 1;
    text-align: center;
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: 0.5px;
}

.header-spacer {
    flex: 0 0 auto;
    width: 150px; /* Same width as logo to keep title centered */
}

/* ===========================
   MAIN LAYOUT
   =========================== */
#main-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ===========================
   VIEWER CONTAINER (LEFT)
   =========================== */
#viewer-container {
    flex: 1;
    background-color: #e5e5e5;
    position: relative;
}

#rooom-viewer-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ===========================
   CONFIG SIDEBAR (RIGHT)
   =========================== */
#config-sidebar {
    width: 520px;
    background: #f8f8f8;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ===========================
   SECTIONS NAVIGATION (TABS)
   =========================== */
#sections-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.section-btn {
    flex: 1;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    transition: all 0.2s ease;
}

.section-btn:hover {
    background: #f5f5f5;
    border-color: #00A878;
}

.section-btn.active {
    background: #00A878;
    color: white;
    border-color: #00A878;
}

/* ===========================
   COLOR OPTIONS (GRID)
   =========================== */
.options-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.color-option:hover {
    background-color: #f9f9f9;
}

.color-option.selected {
    background-color: #e6f7f2;
}

.color-sphere {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid transparent;
    transition: border-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.color-option.selected .color-sphere {
    border-color: #00A878;
    transform: scale(1.1);
}

.color-name {
    font-size: 0.65rem;
    font-weight: 500;
    color: #666;
    text-align: center;
    line-height: 1.2;
}

.color-ral {
    font-size: 0.6rem;
    font-weight: 400;
    color: #999;
    text-align: center;
}

.color-option.selected .color-name {
    color: #1a1a1a;
    font-weight: 600;
}

.color-option.selected .color-ral {
    color: #666;
}

/* ===========================
   COMPONENT/ACCESSORY OPTIONS (LIST)
   =========================== */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.list-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.list-option:hover {
    background: #f9f9f9;
    border-color: #00A878;
}

.list-option.selected {
    background: #e6f7f2;
    border-color: #00A878;
}

.option-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid #ccc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    background: #fff;
}

.list-option.selected .option-checkbox {
    border-color: #00A878;
}

.option-checkbox::after {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #00A878;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.list-option.selected .option-checkbox::after {
    opacity: 1;
}


.design-section {
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.design-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.design-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.75rem;
}

.option-info {
    flex: 1;
}

.option-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.option-description {
    font-size: 0.75rem;
    color: #666;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
    #config-sidebar {
        width: 400px;
    }

    .options-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    #main-layout {
        flex-direction: column;
    }

    #config-sidebar {
        width: 100%;
        max-height: 50vh;
    }

    #viewer-container {
        height: 50vh;
    }

    #header-title {
        font-size: 1.25rem;
    }

    .header-spacer {
        display: none;
    }

    #header {
        padding: 0.75rem 1rem;
    }

    .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #sections-nav {
        flex-wrap: wrap;
    }

    .section-btn {
        font-size: 12px;
        padding: 10px 12px;
    }
}
