/* =================================================== */
/* ================== FUENTES ======================= */
/* =================================================== */
@font-face {
    font-family: 'Eastman Grotesque Alt Bold';
    src: url('../fuentes/Eastman-Grotesque-Alt-Bold-trial.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* =================================================== */
/* ================== ESTILOS BASE ================== */
/* =================================================== */
body, html {
    font-family: 'Eastman Grotesque Alt Bold', Arial, Helvetica, sans-serif !important;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Fondo del área principal */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../imagenes/composicion-creativa-del-interior-elegante-y-acogedor-de-la-sala-de-estar-con-espacio-de-copia-pared-verde-sofa-de-eucalipto-alfombra-mesa-de-cafe-plantas-libros-y-decoracion-moderna-suelos-de-parquet.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: -1;
    opacity: 0.7;
}

/* =================================================== */
/* =============== BARRA LATERAL ==================== */
/* =================================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    background-color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow-y: auto;
}

/* Logo */
.logo-container {
    width: 60%;
    margin-bottom: 30px;
    text-align: center;
}

.logo-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
}

/* Botones de navegación */
.nav-central {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.nav-btn {
    display: block;
    width: 80%;
    padding: 14px 20px;
    text-align: center;
    background-color: #7e7e7e;
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1rem;
    transition: background 0.3s;
}

.nav-btn:hover {
    background-color: #5a5a5a;
}

/* Área de usuario */
.user-menu-container {
    margin-top: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 15px;
}

.cart-icon, .login-icon {
    margin-bottom: 15px;
}

.cart-icon img, .login-icon img {
    width: 45px;
    height: 45px;
    transition: transform 0.3s;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.cart-icon img:hover, .login-icon img:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15));
}

.user-name {
    font-weight: bold;
    color: #333;
    padding: 10px 15px;
    border-radius: 6px;
    transition: background-color 0.3s;
    font-size: 18px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    text-align: center;
    width: 80%;
    font-family: 'OpenSauceOne-Regular', Arial, sans-serif;
}

.user-name:hover {
    background-color: #e9ecef;
    color: #7e7e7e;
}

.dropdown-menu {
    display: flex;
    flex-direction: column;
    width: 80%;
    gap: 10px;
    margin-top: 10px;
}

.logout-btn {
    color: #333;
    text-decoration: none;
    padding: 12px 15px;
    text-align: center;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-size: 16px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

.logout-btn:hover {
    background-color: #7e7e7e;
    color: white;
    transform: translateX(5px);
}

/*Contacto */
.contact-container {
    margin-top: 20px;
    padding: 10px;
    border-top: 1px solid #ccc;
    text-align: center;
    font-size: 14px;
    font-family: 'OpenSauceOne-Regular', Arial, sans-serif;
}

.contact-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
}

.contact-item {
    margin: 4px 0;
}

.contact-item a {
    color: inherit;
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* =================================================== */
/* =============== HEADER MOBILE ==================== */
/* =================================================== */
.header-mobile {
    display: none;
    background: #f4f4f4;
    padding: 10px 20px;
    align-items: center;
    justify-content: space-between;
    flex-direction: column;
}

.menu-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.hamburger {
    display: none;
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
}

/* Menú móvil - MODIFICADO */
.menu-mobile {
    display: none;
    flex-direction: column;
    background: #f4f4f4;
    padding: 15px;
    gap: 10px;
    width: 100%;
    align-items: center;
    animation: slideDown 0.3s ease forwards;
}

.menu-mobile.active {
    display: flex;
}

/* Estilos para el contenedor de usuario */
.user-menu-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

/* Estilos para el estado de usuario logueado */
.user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.user-name {
    margin: 10px 0;
    text-align: center;
    font-family: 'OpenSauceOne-Regular', Arial, sans-serif;
}

.dropdown-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.logout-btn {
    text-align: center;
    width: 100%;
    max-width: 250px;
    padding: 10px 15px;
    margin: 5px 0;
    background-color: #fff;
    border-radius: 5px;
}

.cart-icon, .login-icon {
    display: flex;
    justify-content: center;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media query para mostrar el header en móvil */
@media (max-width: 768px) {
    .header-mobile {
        display: flex;
    }
    
    .hamburger {
        display: block;
    }
    
    .sidebar {
        display: none;
    }
    
    body::before {
        left: 0;
    }
}

/* =================================================== */
/* ============= DECORADOR VIRTUAL ================== */
/* =================================================== */
.decorador-container {
    margin-left: 280px;
    padding: 25px 20px 25px 15px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-family: 'OpenSauceOne-Regular', Arial, sans-serif;
    width: calc(100% - 280px);
    box-sizing: border-box;
    max-width: 100%;
}

/* Header con banner */
.decorador-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
    color: #333;
    width: 100%;
    text-align: left;
    padding: 0;
    margin-left: 0;
    max-width: 100%;
}

.selector-banner-top {
    flex: 0 0 auto;
}

.selector-banner-top img {
    width: 260px;
    height: 50px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 2px solid #fff;
    object-fit: cover;
    transition: all 0.3s ease;
}

.selector-banner-top img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.header-text {
    flex: 1;
    margin-top: 0;
    padding-top: 0;
}

.decorador-header h1 {
    font-family: 'Eastman Grotesque Alt Bold', Arial, Helvetica, sans-serif !important;
    margin: 0 0 8px 0;
    font-size: 1.8rem;
    color: #333;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    line-height: 1.2;
}

.decorador-header p {
    font-family: 'OpenSauceOne-Regular', Arial, sans-serif;
    font-size: 14px;
    margin: 0;
    color: #666;
    line-height: 1.3;
}

/* Contenido principal */
.decorador-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    max-width: 100%;
    align-items: flex-start;
    box-sizing: border-box;
}

/* Fila superior: Imagen seleccionada y Selector de habitaciones LADO A LADO */
.top-row {
    display: flex;
    gap: 15px;
    align-items: stretch;
    width: 100%;
    justify-content: space-between;
    max-width: 100%;
    box-sizing: border-box;
}

/* Contenedor de imagen seleccionada - IZQUIERDA (FONDO TRANSPARENTE) */
.imagen-container {
    flex: 1;
    min-width: 360px;
    max-width: 460px;
    background-color: rgba(255, 255, 255, 0.20); /* Transparente */
    border-radius: 6px;
    padding: 8px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    height: auto;
    box-sizing: border-box;
    min-height: 354px;
    backdrop-filter: blur(5px); /* Efecto de desenfoque para mejor legibilidad */
}

/* Canvas */
#room-canvas {
    width: 100%;
    max-width: 100%;
    height: 340px;
    border-radius: 4px;
    display: block;
    background: #f8f8f8;
    object-fit: contain;
}

#room-image {
    display: none;
}

/* Contenedor del selector de habitaciones - DERECHA (FONDO TRANSPARENTE) */
.room-selector-container {
    flex: 0 0 300px;
    background-color: rgba(255, 255, 255, 0.20); /* Transparente */
    border-radius: 6px;
    padding: 10px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    height: auto;
    margin-top: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 354px;
    backdrop-filter: blur(5px); /* Efecto de desenfoque */
}

/* Selector de habitación */
.room-selector {
    margin-bottom: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.room-selector h3 {
    font-family: 'Eastman Grotesque Alt Bold', Arial, Helvetica, sans-serif !important;
    margin-bottom: 8px;
    color: #333;
    font-size: 1rem;
    flex-shrink: 0;
}

.room-thumbnails {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 8px;
    justify-content: center;
    overflow-y: auto;
    padding: 4px;
    flex: 1;
    max-height: none;
    min-height: 220px;
}

.room-thumb {
    width: 65px;
    height: 45px;
    border-radius: 3px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s;
    object-fit: cover;
    border: 1px solid transparent;
}

.room-thumb:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.room-thumb.active {
    opacity: 1;
    border-color: #5a5a5a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transform: translateY(-1px);
}

/* Selector de colores a todo lo ancho - DEBAJO (FONDO TRANSPARENTE) */
.color-selector-fullwidth {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.20); /* Transparente */
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    margin-top: 0;
    box-sizing: border-box;
    max-width: 100%;
    backdrop-filter: blur(5px); /* Efecto de desenfoque */
}

.color-selector h3 {
    font-family: 'Eastman Grotesque Alt Bold', Arial, Helvetica, sans-serif !important;
    margin-bottom: 8px;
    color: #333;
    font-size: 1rem;
}

.category-filter {
    margin-bottom: 8px;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
    justify-content: center;
}

.category-btn {
    padding: 4px 8px;
    background-color: rgba(126, 126, 126, 0.9); /* Semi-transparente */
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.3s;
    backdrop-filter: blur(2px);
}

.category-btn:hover, .category-btn.active {
    background-color: rgba(90, 90, 90, 0.9); /* Semi-transparente */
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
    max-height: 90px;
    overflow-y: auto;
    padding: 5px;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.5); /* Fondo semi-transparente para la paleta */
    border-radius: 4px;
}

.color-item {
    width: 30px;
    height: 30px;
    border-radius: 3px;
    cursor: pointer;
    border: 1px solid rgba(238, 238, 238, 0.7); /* Borde semi-transparente */
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.color-item:hover {
    transform: scale(1.08);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border-color: rgba(170, 170, 170, 0.9); /* Borde más visible al hover */
}

.color-item.selected {
    border: 2px solid rgba(51, 51, 51, 0.9); /* Borde más opaco cuando está seleccionado */
    box-shadow: 0 0 0 1px rgba(0,0,0,0.3);
}

/* Información de color */
.color-info {
    margin-top: 10px;
    padding: 8px;
    background-color: rgba(249, 249, 249, 0.8); /* Semi-transparente */
    border-radius: 4px;
    font-size: 0.8rem;
    text-align: center;
    border-left: 2px solid rgba(126, 126, 126, 0.7); /* Semi-transparente */
}

/* Eliminar el controls-container antiguo */
.controls-container {
    display: none !important;
}


/* =================================================== */
/* ============= BOTÓN DE WHATSAPP ================== */
/* =================================================== */
.whatsapp-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.whatsapp-btn img {
    width: 60px;
    height: 60px;
    display: block;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

/* =================================================== */
/* =============== RESPONSIVIDAD ==================== */
/* =================================================== */
@media (max-width: 1200px) {
    .decorador-content {
        max-width: 100%;
    }
    
    .top-row {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .imagen-container {
        min-width: 90%;
        max-width: 100%;
        margin-left: 0;
    }
    
    .room-selector-container {
        flex: 0 0 auto;
        min-width: 90%;
        max-width: 600px;
    }
}

@media (max-width: 992px) {
    body, html { 
        padding-left: 0;
        padding-top: 0;
    }
    
    .sidebar {
        display: none;
    }
    
    .header-mobile {
        display: flex;
    }
    
    .hamburger {
        display: block;
    }
    
    body::before { 
        left: 0;
        top: 0;
    }
    
    .decorador-container {
        margin-left: 0;
        padding: 20px 15px;
        margin-top: 70px;
        width: 100%;
        align-items: center;
    }
    
    .decorador-content {
        align-items: center;
    }
    
    .nav-btn { 
        padding: 12px 18px; 
        font-size: 0.9rem; 
    }

    .menu-mobile {
        padding: 10px 15px;
        gap: 8px;
    }
    
    .menu-mobile .nav-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
        border-radius: 20px;
        text-align: center;
    }
    
    .user-menu-container {
        margin-top: 5px;
        display: flex;
        justify-content: center;
    }
    
    .user-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .cart-icon, .login-icon {
        width: 28px;
        height: 28px;
    }
    
    .cart-icon img, .login-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    .user-name {
        font-size: 0.9rem;
        margin: 5px 0;
    }
    
    .dropdown-menu {
        display: flex;
        flex-direction: column;
        gap: 5px;
        width: 100%;
        max-width: 200px;
    }
    
    .logout-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
        text-align: center;
        background-color: #7e7e7e;
        color: white;
        border-radius: 15px;
        text-decoration: none;
    }
    
    .room-thumb {
        width: 70px;
        height: 55px;
    }
    
    .category-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .decorador-container {
        padding: 15px 10px;
    }
    
    .decorador-content {
        gap: 20px;
    }
    
    .top-row {
        gap: 15px;
    }
    
    .imagen-container {
        min-width: 95%;
        padding: 10px;
    }
    
    .room-selector-container {
        min-width: 95%;
        padding: 15px;
    }
    
    .room-thumb {
        width: 65px;
        height: 50px;
    }
    
    .color-palette {
        max-height: 120px;
    }
    
    .decorador-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        align-items: center;
    }
    
    .selector-banner-top img {
        width: 300px;
        height: 80px;
        border-radius: 12px;
        object-fit: cover;
    }
    
    .header-text {
        text-align: center;
    }
    
    .decorador-header h1 {
        font-size: 2rem;
    }
    
    .decorador-header p {
        font-size: 16px;
    }
    
    #room-canvas {
        min-height: 300px;
    }
    
    .color-selector-fullwidth {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .decorador-header h1 {
        font-size: 1.5rem;
    }
    
    .room-selector h3, .color-selector h3 {
        font-size: 1.1rem;
    }
    
    .room-thumb {
        width: 60px;
        height: 45px;
    }
    
    .color-item {
        width: 35px;
        height: 35px;
    }
    
    .category-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .whatsapp-btn img {
        width: 50px;
        height: 50px;
    }
    
    .decorador-container {
        margin-top: 60px;
    }
    
    .color-palette {
        max-height: 100px;
    }
    
    .selector-banner-top img {
        width: 350px;
        height: 70px;
        border-radius: 10px;
        object-fit: cover;
    }
    
    .decorador-header h1 {
        font-size: 1.8rem;
    }
    
    .decorador-header p {
        font-size: 15px;
    }
    
    .imagen-container {
        min-width: 98%;
        padding: 8px;
    }
    
    #room-canvas {
        min-height: 250px;
    }
}

/* Para pantallas muy pequeñas */
@media (max-width: 400px) {
    .selector-banner-top img {
        width: 160px;
        height: 60px;
        border-radius: 8px;
    }
}

/* Para pantallas muy grandes */
@media (min-width: 1400px) {
    .decorador-container {
        padding: 40px 30px 40px 20px;
    }

    .imagen-container {
        min-width: 600px;
        max-width: 700px;
    }

    .room-selector-container {
        flex: 0 0 350px;
    }

    .room-thumb {
        width: 90px;
        height: 70px;
    }

    .color-item {
        width: 45px;
        height: 45px;
    }
}

@media (min-width: 1800px) {
    .decorador-container {
        max-width: none;
    }

    .decorador-header h1 {
        font-size: 2.5rem;
    }

    .room-selector h3, .color-selector h3 {
        font-size: 1.5rem;
    }

    .imagen-container {
        min-width: 700px;
        max-width: 800px;
    }

    .room-thumb {
        width: 100px;
        height: 80px;
    }

    .color-item {
        width: 50px;
        height: 50px;
    }

    .whatsapp-btn img {
        width: 70px;
        height: 70px;
    }
}

/* MEJORAS PARA PALETA DE COLORES */
.color-palette {
    max-height: 280px !important;
    overflow-y: auto;
    padding: 10px;
    justify-content: center;
}

.color-palette::-webkit-scrollbar {
    width: 8px;
}

.color-palette::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.color-palette::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.color-palette::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.color-selector .category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    justify-content: center;
}

.color-selector .category-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .color-palette {
        max-height: 220px !important;
    }
    
    .color-item {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 576px) {
    .color-palette {
        max-height: 180px !important;
    }
    
    .color-item {
        width: 30px;
        height: 30px;
    }
    
    .color-selector .category-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
}