/* ============================================
   WATCH BUILDER — MODDYS LIGHT THEME
   Exact matching of minimalist light aesthetic
   ============================================ */

:root {
    --color-bg-white: #FFFFFF;
    --color-bg-sidebar: #F4F4F4;
    --color-text-dark: #000000;
    --color-text-muted: #666666;
    --color-border: #E5E5E5;
    --color-border-hover: #AAAAAA;

    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;

    --ease-premium: cubic-bezier(0.2, 0.0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-white);
    color: var(--color-text-dark);
    min-height: 100vh;
    display: flex;
    overflow: hidden;
}

/* ============================================
   LAYOUT
   ============================================ */

.page-container {
    display: flex;
    flex-direction: row-reverse;
    /* Options on Left, Viewer on Right */
    width: 100%;
    height: 100vh;
    padding-top: 100px;
}

/* ============================================
   WATCH VIEWER (Right Side)
   ============================================ */

.viewer-section {
    flex: 1.8;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-white);
    padding: 40px;
}

.watch-container {
    position: relative;
    width: 100%;
    max-width: 1430px;
    aspect-ratio: 1;
    margin: 0 auto;
    z-index: 1;
    /* Completely removed all drop shadows for the crisp flat look */
    transition: transform 0.5s var(--ease-premium);
}

.watch-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Part Name Label (Hidden or Minimal) */
.part-name-display {
    position: absolute;
    bottom: 50px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-text-dark);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
    z-index: 10;
}

.part-name-display.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   OPTIONS PANEL — Moddys Light Sidebar (Left)
   ============================================ */

.options-section {
    flex: 1.2;
    background: var(--color-bg-sidebar);
    border-right: 1px solid var(--color-border);
    /* Border now on the right */
    display: flex;
    flex-direction: column;
    padding: 0;
    height: 100vh;
    overflow-y: auto;
    position: relative;
}

/* HEADER */
.options-header {
    background: var(--color-bg-sidebar);
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 35px 40px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.options-section h1 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-text-dark);
    letter-spacing: 0.05em;
    margin: 0;
    line-height: 1.2;
    text-transform: uppercase;
}

/* Price & Currency */
.price-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.price-display {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-text-dark);
    background: transparent;
    padding: 0;
    border: none;
    text-align: right;
    min-width: auto;
}

.currency-select {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    padding: 0;
    text-align: right;
    outline: none;
    transition: all 0.3s ease;
}

.currency-select:hover {
    color: var(--color-text-dark);
}

.currency-select option {
    background: var(--color-bg-white);
    color: var(--color-text-dark);
}

/* Action Buttons */
.header-buttons {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--color-border);
    background: transparent;
    border-radius: 4px;
    /* Slight rounding for modern feel */
    color: var(--color-text-dark);
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease-premium);
}

.action-btn:hover {
    background: #EAEAEA;
    border-color: #CCCCCC;
}

.cart-btn {
    background: var(--color-text-dark);
    color: var(--color-bg-white);
    border-color: var(--color-text-dark);
}

.cart-btn:hover {
    background: #333333;
    border-color: #333333;
    color: var(--color-bg-white);
}

/* ============================================
   OPTIONS LIST — Moddys Light Style
   ============================================ */

.dynamic-options-container {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-group h2 {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--color-text-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin: 0;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--color-border);
}

/* Option Buttons Wrapped */
.option-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    /* NEW: Let buttons stack to avoid horizontal scroll */
    padding-bottom: 10px;
}

.option-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 10px 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    min-height: 48px;
    text-align: center;

    /* Removed fixed flex boundaries so they wrap naturally */
    flex: 0 0 auto;
    min-width: 90px;
    max-width: 140px;
}

/* Hide the inner thumbnail images on desktop (the desktop layout uses text pills) */
.option-btn img {
    display: none;
}

.option-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--color-text-dark);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
}

/* Hover */
.option-btn:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: var(--color-border-hover);
}

/* Active / Selected */
.option-btn.active {
    background: var(--color-bg-white);
    border: 1px solid var(--color-text-dark);
}

.option-btn.active .option-label {
    color: var(--color-text-dark);
    font-weight: 700;
}

/* ============================================
   SCROLLBAR
   ============================================ */

.options-section::-webkit-scrollbar {
    width: 6px;
}

.options-section::-webkit-scrollbar-track {
    background: var(--color-bg-sidebar);
}

.options-section::-webkit-scrollbar-thumb {
    background: #CCCCCC;
    border-radius: 3px;
}

.options-section::-webkit-scrollbar-thumb:hover {
    background: #AAAAAA;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .page-container {
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
    }

    .viewer-section {
        flex: 1 1 auto;
        height: 100%;
        padding: 20px;
    }

    .watch-container {
        max-width: 500px;
        margin-bottom: 25vh;
    }

    .options-section {
        flex: 0 0 auto;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 40vh;
        border-right: none;
        border-top: 1px solid var(--color-border);
        border-radius: 0;
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
        z-index: 100;
        transition: height 0.3s ease;
    }

    .options-header {
        position: sticky;
        top: 0;
        background: var(--color-bg-sidebar);
        padding: 15px 25px;
        gap: 10px;
    }

    .header-top h1 {
        font-size: 1.1rem;
    }

    .price-display {
        font-size: 1.4rem;
    }

    .dynamic-options-container {
        padding: 25px;
        gap: 30px;
    }
}

/* ============================================
   MOBILE RESPONSIVENESS (Expanded for close-up view)
   ============================================ */
@media (max-width: 768px) {
    .page-container {
        display: flex;
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
        padding-top: 60px;
        /* Reduced top padding to move everything UP */
    }

    /* Viewer Section: Massive focus on mobile */
    .viewer-section {
        flex: 0 0 50vh !important;
        /* Huge preview height */
        padding: 0px;
        background: var(--color-bg-white);
        z-index: 5;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .watch-container {
        width: 100%;
        max-width: 500px;
        /* Allows it to bleed nice and close */
        height: 100%;
        margin-bottom: 0;
        /* Remove gap */
        /* Center perfectly and heavily zoom in */
        transform: scale(2.6);
    }

    .part-name-display {
        bottom: 10px;
        font-size: 0.9rem;
    }

    /* Options Section (Bottom Menu) */
    .options-section {
        flex: 1 !important;
        height: auto !important;
        border-radius: 0;
        /* Moddys has stark flat edges */
        border-top: 1px solid var(--color-border);
        overflow-y: auto;
        padding-bottom: 90px;
        /* Clear space for sticky footer */
        background: var(--color-bg-sidebar);
    }

    /* Sticky Bottom Footer mimicking Moddys Next Bar */
    .options-header {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        top: auto;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        background: var(--color-bg-white);
        padding: 12px 20px;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.06);
        z-index: 1000;
        border-bottom: none;
        border-top: 1px solid var(--color-border);
    }

    .options-header h1 {
        display: none;
        /* Hide large title to save space on mobile footer */
    }

    .header-top {
        margin: 0;
        align-items: center;
    }

    .price-display {
        font-size: 1.3rem;
        /* Make price act as the footer text */
    }

    .header-buttons {
        gap: 8px;
        margin: 0;
    }

    /* Hide extra actions on mobile to keep footer clean */
    .action-btn.download-btn,
    .action-btn.reset-btn {
        display: none !important;
    }

    .cart-btn {
        padding: 12px 24px;
        font-size: 0.8rem;
        margin: 0;
    }

    .dynamic-options-container {
        padding: 15px 20px;
        gap: 15px;
        /* Tighter spacing */
    }

    .option-group h2 {
        text-align: center;
        border-bottom: none;
        padding-bottom: 0px;
        font-size: 1rem;
    }

    .option-btn {
        min-width: 80px;
        padding: 8px 4px;
        border-radius: 50px;
        /* Pill shape */
    }

    .option-label {
        font-size: 0.65rem;
    }
}

/* ============================================
   SELECTION SUMMARY PANEL
   ============================================ */

.selection-summary {
    margin: 0 40px 40px;
    padding: 25px 30px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-white);
    border-radius: 8px;
}

@media (max-width: 768px) {
    .selection-summary {
        margin: 0 20px 40px;
        padding: 20px;
        /* Add bottom margin on mobile to clear the sticky footer */
        margin-bottom: 100px;
    }
}

.selection-summary h3 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--color-text-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

.selection-summary ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.selection-summary li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.selection-summary .summary-category {
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-weight: 500;
}

.selection-summary .summary-value {
    color: var(--color-text-dark);
    font-weight: 600;
}

.selection-summary .summary-value.none {
    color: #999;
    font-weight: 400;
    font-style: italic;
}