/* Interactive Inspiration Light & Room Simulator Styling */

.bihome-simulator-container {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 30px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    overflow: hidden;
    box-shadow: 0 15px 45px rgba(12, 64, 105, 0.04);
}

.bihome-simulator-board {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fdfbf9;
    min-width: 0;
}

.bihome-simulator-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/11; /* Slightly taller than 3/2 to make left column match right sidebar height without scrollbars */
    overflow: hidden;
    background: #FAF8F5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bihome-simulator-img-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
    margin: auto;
}

.bihome-simulator-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Atmosphere Overlays */
.bihome-atmosphere-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 2;
}

.dusk-overlay {
    background: linear-gradient(135deg, rgba(245, 130, 48, 0.2) 0%, rgba(20, 24, 60, 0.5) 100%);
    mix-blend-mode: multiply;
}

.night-overlay {
    background: rgba(12, 20, 48, 0.65);
    mix-blend-mode: multiply;
}

/* Brightness adjustments when dimming */
.bihome-simulator-board[data-active-atmosphere="dusk"] .bihome-simulator-bg {
    filter: brightness(0.85) contrast(1.05) saturate(1.1);
}

.bihome-simulator-board[data-active-atmosphere="night"] .bihome-simulator-bg {
    filter: brightness(0.55) contrast(1.1) saturate(0.85);
}

.bihome-simulator-board[data-active-atmosphere="dusk"] .dusk-overlay {
    opacity: 1;
}

.bihome-simulator-board[data-active-atmosphere="night"] .night-overlay {
    opacity: 1;
}

/* Light Glow Halos & Glows */
.bihome-light-halo,
.bihome-light-glows {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.bihome-simulator-board[data-active-atmosphere="dusk"] .bihome-light-halo,
.bihome-simulator-board[data-active-atmosphere="dusk"] .bihome-light-glows {
    opacity: 0.55;
}

.bihome-simulator-board[data-active-atmosphere="night"] .bihome-light-halo,
.bihome-simulator-board[data-active-atmosphere="night"] .bihome-light-glows {
    opacity: 1;
}

/* Realistic Volumetric Light Cone */
.light-beam-cone {
    position: absolute;
    width: 440px;
    height: 480px;
    transform: translate(-50%, -10px);
    background: linear-gradient(to bottom, rgba(255, 215, 120, 0.22) 0%, rgba(255, 185, 70, 0.06) 45%, transparent 100%);
    clip-path: polygon(50% 0%, -15% 100%, 115% 100%);
    filter: blur(24px);
    mix-blend-mode: screen;
    pointer-events: none;
}

/* Warm Bulb/Glass Glow */
.light-bulb-glow {
    position: absolute;
    width: 240px;
    height: 240px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(255, 225, 110, 0.7) 25%, rgba(255, 180, 50, 0.2) 55%, transparent 75%);
    filter: blur(10px);
    mix-blend-mode: screen;
    pointer-events: none;
}


/* Smart Controller display */
.bihome-smart-controller {
    background: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 18px 30px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    z-index: 4;
}

.controller-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.controller-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-sans);
}

.atmosphere-toggles {
    display: flex;
    gap: 8px;
}

.atmosphere-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-sans);
    display: flex;
    align-items: center;
    gap: 6px;
}

.atmosphere-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.atmosphere-btn.active {
    background: var(--color-coral);
    border-color: var(--color-coral);
    color: #fff;
    box-shadow: 0 4px 12px rgba(204, 104, 92, 0.3);
}

/* Room Selector Carousel */
.room-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.room-carousel-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px;
    width: 100%;
}

.room-carousel-track::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.room-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    white-space: nowrap;
}

.room-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.room-card.active {
    background: rgba(204, 104, 92, 0.15);
    border-color: var(--color-coral);
    box-shadow: 0 0 10px rgba(204, 104, 92, 0.4);
}

.room-card-name {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 1;
}

.room-card.active .room-card-name {
    color: #fff;
}

/* Nav arrows */
.room-carousel-nav {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: all 0.3s ease;
    flex-shrink: 0;
    user-select: none;
}

.room-carousel-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
}

.room-carousel-nav:focus {
    outline: none;
}

/* Hotspot Pins */
.bihome-hotspots-container {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: auto;
}

.bihome-hotspot-pin {
    position: absolute;
    width: 22px;
    height: 22px;
    background: var(--color-coral);
    border: 2px solid #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bihome-hotspot-pin::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--color-coral);
    animation: hotspot-pulse 2s infinite;
}

.bihome-hotspot-pin:hover, .bihome-hotspot-pin.active {
    background: #fff;
    border-color: var(--color-coral);
    transform: translate(-50%, -50%) scale(1.25);
    box-shadow: 0 8px 25px rgba(204, 104, 92, 0.5);
}

.bihome-hotspot-pin.active::after {
    animation: hotspot-pulse-fast 1s infinite;
    border-color: #fff;
}

@keyframes hotspot-pulse {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}

@keyframes hotspot-pulse-fast {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* Sidebar Product Panel */
.bihome-simulator-sidebar {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    background: #fff;
    height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
}

.sidebar-header {
    margin-bottom: 15px;
    border-bottom: 1px solid #f0eee9;
    padding-bottom: 12px;
}

.sidebar-header h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--color-navy);
    font-family: var(--font-sans);
}

.sidebar-header p {
    margin: 0;
    font-size: 13px;
    color: var(--color-muted);
}

.product-insight-card {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 280px;
}

.product-insight-empty-state {
    text-align: center;
    padding: 30px 20px;
    background: #fdfbf9;
    border: 1px dashed #e8e4de;
    border-radius: 12px;
}

.empty-state-icon {
    font-size: 40px;
    margin-bottom: 15px;
    animation: floating-light 3s ease-in-out infinite;
}

@keyframes floating-light {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.product-insight-empty-state h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-navy);
}

.product-insight-empty-state p {
    margin: 0;
    font-size: 12.5px;
    color: var(--color-muted);
    line-height: 1.6;
}

.product-insight-content {
    animation: slideUpInsight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpInsight {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-insight-media {
    width: 100%;
    aspect-ratio: 1/1;
    background: #fdfbf9;
    border: 1px solid #e8e4de;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
}

.product-insight-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    padding: 20px;
}

.product-insight-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-insight-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-coral);
    font-family: var(--font-sans);
}

.product-insight-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-navy);
    font-family: var(--font-sans);
    line-height: 1.35;
}

.product-insight-desc {
    margin: 2px 0 8px 0;
    font-size: 13px;
    color: var(--color-muted);
    line-height: 1.6;
}

.product-insight-cta {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--color-navy);
    color: #fff !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(12, 64, 105, 0.15);
}

.product-insight-cta:hover {
    background: var(--color-coral);
    box-shadow: 0 6px 20px rgba(204, 104, 92, 0.3);
}

/* Tablet & Mobile responsive layout */
@media (max-width: 991px) {
    .bihome-simulator-container {
        grid-template-columns: 1fr;
    }
    .bihome-simulator-sidebar {
        border-top: 1px solid var(--color-border);
    }
    .product-insight-card {
        min-height: auto;
    }
    .product-insight-content {
        display: flex !important;
        gap: 20px;
        align-items: center;
    }
    .product-insight-media {
        width: 150px;
        margin-bottom: 0;
    }
    .product-insight-info {
        flex-grow: 1;
    }
}

@media (max-width: 575px) {
    .bihome-smart-controller {
        grid-template-columns: 1fr;
        gap: 15px;
        align-items: stretch;
    }
    .product-insight-content {
        flex-direction: column;
        align-items: stretch;
    }
    .product-insight-media {
        width: 100%;
    }
}

/* Color swatches for simulator sidebar */
.simulator-color-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid #e8e4de;
    display: inline-block;
    cursor: help;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.simulator-color-circle:hover {
    transform: scale(1.18);
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    border-color: var(--color-navy);
}
