:root {
    --light-blue: #eaf0f6;
    --text-color: #0c1e3e;
    --button-bg: #0c1e3e;
    --button-text: #ffffff;
}

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

body.home {
    font-family: 'Roboto', sans-serif;
    background-color: var(--light-blue);
    color: var(--text-color);
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.main-content {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: relative;
    padding: 2rem;
}

.text-section {
    text-align: center;
    z-index: 2;
    padding: 2rem 0;
}

.text-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    width: 300px;
    height: 300px;
    background: white;
    border-radius: 50%;
    z-index: -1;
}

h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.price {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.price span {
    text-decoration: underline;
    font-weight: bold;
}

.btn-shop-now {
    background-color: var(--button-bg);
    color: var(--button-text);
    text-decoration: none;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s;
}

.btn-shop-now:hover {
    background-color: #2c3e50;
}

.btn-shop-now .icon {
    width: 20px;
    height: 20px;
}

.image-section {
    width: 100%;
    text-align: center;
    margin-top: 1rem;
    z-index: 1;
    position: relative;
}

.image-container {
    position: relative;
    width: 100%;
    height: 300px; /* Altura fija para móvil */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Para que se corte la imagen como en el diseño */
    margin-top: 2rem;
}

.sofa-image {
    max-width: 90%;
    height: auto;
    transition: opacity 0.5s ease-in-out;
}

/* Ocultar imágenes con opacity 0 para que no interfieran con el layout */
.sofa-image[style*="opacity: 0"] {
    display: none !important;
}

.product-image {
    transition: opacity 0.5s ease-in-out;
    width: 100%;
    max-width: 90%;
    height: auto;
    object-fit: contain;
    position: static !important; /* Override JavaScript positioning */
    top: auto !important;
    left: auto !important;
    transform: none !important;
}

/* Ocultar imágenes con opacity 0 para que no interfieran con el layout */
.product-image[style*="opacity: 0"] {
    display: none !important;
}

.text-container {
    position: relative;
    width: 100%;
}

.product-text {
    transition: opacity 0.5s ease-in-out;
}

/* En móvil: ocultar elementos de texto con opacity 0 para que no ocupen espacio */
@media (max-width: 767px) {
    .product-text[style*="opacity: 0"] {
        display: none !important;
    }
}

/* En desktop: solo desactivar interacción de elementos de texto con opacity 0 */
@media (min-width: 768px) {
    .product-text[style*="opacity: 0"] {
        pointer-events: none !important;
    }
}

.text-section::before{
    opacity: 0;
}

/* ================================== */
/*        ESTILOS MÓVIL               */
/* ================================== */
@media (max-width: 767px) {
    .container {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    .content-wrapper {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 1rem 3rem;
        min-height: 100vh;
        max-width: inherit;
    }
    
    .text-section {
        order: 1;
        text-align: center;
        padding: 2rem 0 1rem 0;
        width: 100%;
    }
    
    .text-section::before {
        display: none;
    }
    
    .image-section {
        order: 2;
        width: 100%;
        margin-top: 0;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .image-container {
        height: 300px;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .product-image {
        position: static !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        width: 100% !important;
        height: auto !important;
        max-width: 100%;
        object-fit: contain;
    }
    
    .text-container {
        position: relative;
        width: 100%;
    }
    
    .product-text {
        position: static !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        text-align: center;
    }
    
    .product-text h1 {
        font-family: 'Montserrat', sans-serif;
        font-size: 1.5rem;
        line-height: normal;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .product-text .price {
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .product-text .btn-shop-now {
        text-align: center;
        display: inline-flex;
        margin: 0 auto;
    }
    
    .footer-nav {
        order: 3;
        position: relative;
        margin-top: auto;
        padding: 1rem;
    }
    
    .next-item {
        margin-bottom: 0;
    }
}

/* ================================== */
/*        ESTILOS DEL FOOTER          */
/* ================================== */

.footer-nav {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Alinea los elementos al final (abajo) */
    width: 100%;
    padding: 1rem 2rem;
    background-color: transparent;
    z-index: 2;
}

/* Contenedor de "NEXT" y la imagen */
.next-item {
    display: flex;
    align-items: center; /* Esto hace que ambos hijos (texto e imagen) tengan la misma altura */
    font-weight: bold;
    border-radius: 3px;
    overflow: hidden; /* Necesario para que el border-radius afecte a los hijos */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08); /* Sombra sutil como en el diseño */
    margin-bottom: 70px;
    height: 86px;
}

/* Caja de texto "NEXT" */
.next-item p {
    background-color: #ffffff;
    padding: 0.5rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 1.5px;
    font-size: 1rem;
}

/* Imagen del siguiente sofá */
.next-item img {
    width: 130px; /* Aumentamos el tamaño de la imagen */
    height: auto;
    display: block; /* Elimina espacios extra debajo de la imagen */
    padding: .2rem 1.5rem;
}

.more-info a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 1px solid var(--text-color);
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    font-style: normal;
}

/* ================================== */
/*          ESTILOS DESKTOP           */
/* ================================== */
@media (min-width: 768px) {
    
    .container::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 40%;
        height: 100%;
        background-image: url('https://rse.com.mx/wp-content/uploads/2025/10/back_texture.webp');
        background-size: cover;
        background-position: center;
        z-index: 0;
    }
    
    .content-wrapper {
        flex-direction: row;
        justify-content: space-between;
        max-width: 1200px;
        max-width: 80%;
        margin: 0 auto;
        padding: 0 2rem;
        height: 100vh;
    }

    .text-section {
        text-align: left;
        flex: 1;
        position: relative;
        z-index: 2;
    }

    .text-section::before {
       display: none;
    }

    h1 {
        font-size: 6rem;
        max-width: 40%;
        text-align: left;
    }
    
    .text-container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        height: 100vh;
        width: 100%;
    }
    
    .product-text {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        text-align: left;
        width: 100%;
        height: 100vh;
    }
    
    .product-text h1 {
        font-family: 'Montserrat', sans-serif;
        font-size: 3rem;
        max-width: 40%;
        text-align: left;
        margin-bottom: 1rem;
    }
    
    .product-text .price {
        text-align: left;
        margin-bottom: 1.5rem;
    }
    
    .product-text .btn-shop-now {
        text-align: left;
    }
    
    .image-section {
        flex: 1;
        position: absolute;
        top: 0;
        right: -10%;
        width: 75%;
        height: 100vh;
        display: flex
;
        align-items: center;
        justify-content: center;
        margin-top: 0;
        z-index: 1;
        margin-left: 40%;
    }
    
    .image-container {
        height: 100%;
        width: 100%;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .sofa-image {
        width: 140%;
        max-width: none;
        height: auto;
        position: relative; 
        left: -20%;
        right: auto;
        object-fit: contain;
    }
    
    /* Ocultar imágenes con opacity 0 en desktop para que no interfieran con el layout */
    .sofa-image[style*="opacity: 0"] {
        display: none !important;
    }
    
    .product-image {
        width: 140%;
        max-width: 80%;
        height: auto;
        position: relative; 
        left: -20%;
        right: auto;
        object-fit: contain;
    }
    
    /* Ocultar imágenes con opacity 0 en desktop para que no interfieran con el layout */
    .product-image[style*="opacity: 0"] {
        display: none !important;
    }
    
    /* Desactivar interacción de elementos de texto con opacity 0 en desktop */
    .product-text[style*="opacity: 0"] {
        pointer-events: none !important;
    }

    /* Posicionamiento absoluto del footer en Desktop */
    .footer-nav {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 1200px;
        margin: 0 auto;
        padding-left: 2rem;
        padding-right: 2rem;
        padding-top: 0;
        padding-bottom: 0;
    }
}