html,
body {
    margin: 0;
    background-color: #f3ead7;
    line-height: 1.6;
    /*separacion entre lineas*/
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;

    height: 100%;
    margin: 0;
    padding: 0;
}

#main-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

#container {
    max-width: 100rem;
    margin: 0 auto;
    flex: 1;
}

button {
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
}

h1 {
    margin-top: 2rem;
}

/* ////////////////////////////////////////////////////// */
/* Pagina de inicio */

/* Texto de la pagina de inicio */
.texto-inicio {
    margin: 1rem;
}

img {
    /*Imagen principal*/
    width: 100%;
    height: auto;
}

.top-img {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    /* centra horizontal */
    align-items: center;
    /* centra vertical */
}

.top-img h1 {
    position: absolute;
    top: 1rem; /* colocarlo a 1rem de arriba */
    color: white;
    font-size: 5rem;
    text-shadow: 0.25rem 0.25rem 0.25rem rgba(0, 0, 0, 0.6);
    margin: 0;
}

/* Fin pagina de inicio */
/* ////////////////////////////////////////////////////// */

/* ////////////////////////////////////////////////////// */
/* Pagina catalogo */
.catalogo {
    margin-bottom: 2rem;
    text-align: center;
}

/* Para moviles y dispositivos muy pequeños */
.grid-productos {
    display: grid;
    padding-left: 1.5rem;
    /* Estaba en 0.75 sin gap y con padding en prodcuto */
    padding-right: 1.5rem;
    gap: 1.5rem;
    justify-content: center;
    grid-template-columns: repeat(2, minmax(0rem, 1fr));

    line-height: 1rem;
}

/* Dispositivos normales */
@media (min-width: 30rem) {
    .grid-productos {
        grid-template-columns: repeat(auto-fit, minmax(11.25rem, 1fr));
    }
}

/* El maximo para que no se expanda infinitamente */
@media (min-width: 60rem) {
    .grid-productos {
        grid-template-columns: repeat(4, minmax(12.5rem, 1fr));
    }
}

.producto {
    /* padding: 0.75rem; */
    text-align: center;
    transition: transform 0.3s ease;
}

.producto img {
    width: 100%;
}

.producto:hover {
    transform: scale(1.05);
}

.producto p {
    font-weight: bold;
    margin: 0rem;
}

#botonFiltros {
    border: none;
    background-color: transparent;
    float: right;
    margin-right: 1.5rem;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
}

.overlay.active {
    display: block;
}

#desplegableFiltros {
    position: fixed;
    top: 0;
    right: 0;
    width: 25rem;
    height: 100vh;
    z-index: 11;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    font-size: 0.9rem;

    display: flex;
    flex-direction: column;
}

#desplegableFiltros.active {
    pointer-events: auto;
    opacity: 1;
    background-color: white;
}

#filtrosHeader {
    display: flex;
    align-items: center;
    justify-content: center;
    /* centra el título */
    position: relative;
    /* para posicionar el botón */
    padding: 0.5rem;
    font-size: 2rem;
    flex-shrink: 0;
}

.contenidoDesplegable {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Cuando se abre el desplegable quitar el scroll del body */
body.no-scroll {
    overflow: hidden;
}

#cerrarFiltros {
    position: absolute;
    right: 1rem;
    font-size: 1.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    /* top: 0.77rem; */
    top: 0.58rem;
}

.seccion {
    display: grid;
    grid-template-columns: 30% 70%;
    align-items: left;
    text-align: left;
    margin-left: 1rem;
    margin-bottom: 1rem;
}

.columna.derecha {
    margin-top: 1rem;
}

.boton {
    border: none;
    background-color: transparent;
    font-size: 0.93rem;
}

.boton.active {
    font-weight: bold;
}

.desplegable-footer {
    padding: 1.5rem;
    background: white;
}

.verResultados {
    background-color: transparent;
    border: none;
    font-size: 0.93rem;
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    flex-shrink: 0;
}

@media (max-width: 31.25rem) {
    #desplegableFiltros {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        height: 31.25rem;
        width: 100vw;
        opacity: 0;
        pointer-events: none;
    }

    #desplegableFiltros.active {
        pointer-events: auto;
        opacity: 1;
        background-color: white;
    }
}

/* Fin pagina catalogo */
/* ////////////////////////////////////////////////////// */

/* ////////////////////////////////////////////////////// */
/* Inicio pagina de producto */
.paginaProducto {
    /* top bottom 2.75rem y left right 1.5rem */
    margin: 4rem 1.5rem 2.75rem 1.5rem;
}

.galeria {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 50rem;
}

.imagen-principal img {
    width: 100%;
    object-fit: cover;
    border-radius: 0.75rem;
    overflow: hidden;
}

.miniaturas {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-block: 0.5rem;
    align-items: center;
    width: calc(100vw - 3rem);

    overflow-x: auto; /* activa el scroll horizontal */
    overflow-y: visible;
    white-space: nowrap; /* evita que haya mas lineas */
    -webkit-overflow-scrolling: touch; /* suave en móviles */
    scrollbar-width: none;
}

.miniaturas::-webkit-scrollbar {
    display: none; /* ocultar scrollbar*/
}

.miniatura {
    flex: 0 0 auto;
    width: 5rem;
    height: 5rem;
    object-fit: cover;
    border-radius: 0.5rem;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.3s;
}

.miniatura:hover {
    opacity: 1;
    transform: scale(1.05);
}

.miniatura.active {
    opacity: 1;
    border: 0.09rem solid black;
}

#detallesProducto h2,
#detallesProducto p {
    margin: 0.5rem 0rem;
    line-height: 1.2;
}

.informacion {
    white-space: pre-line;
}

.productName {
    display: flex;
    justify-content: space-between;
}

.botonAgregarFavoritos,
.botonQuitarFavoritos {
    font-size: 1.5rem;
    background-color: transparent;
    border: none;
    margin-top: 0.65rem;
    display: none;
}

.botonAgregarFavoritos.active,
.botonQuitarFavoritos.active {
    display: block;
}

/* --- Responsive --- */
@media (min-width: 50rem) {
    .producto-layout {
        display: flex;
        flex-direction: row; /* galeria + texto en fila */
        align-items: flex-start;
        justify-content: center;
        gap: 2rem; /* separación entre galería y texto */
        margin: 0 1rem;
    }

    .galeria {
        display: flex;
        flex: 0 0 60%;
        width: 100%;
        max-width: 100rem;
        
        flex-direction: row; /* imagen + miniaturas en fila */
    }

    .imagen-principal {
        flex: 1;
        order: 2;
    }

    .imagen-principal img {
        display: block;
        width: 100%;
        height: auto;
    }

    .miniaturas {
        flex: 0 0 6rem;
        order: 1;
        margin-top: 0rem;
        padding-block: 0rem;
        width: 100%;

        display: flex;
        flex-direction: column;
        overflow-y: auto; /* scroll vertical */
    }

    .info {
        justify-content: flex-start;
        text-align: start;
        flex: 0 0 40%; /* ocupa el espacio restante */
    }
}

/* Fin pagina de producto */
/* ////////////////////////////////////////////////////// */

/* ////////////////////////////////////////////////////// */
/* Inicio pagina contactos */
.contacto {
    text-decoration: underline;
}

.contactanos {
    width: 100vw;
    max-width: 100rem;
    text-align: center;
}

.field {
    position: relative;
    margin-bottom: 1.5rem;
}

.field__input {
    width: 80%;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 0.375rem;
    font-size: 1rem;
    background: none;
    outline: none;
}

.field__label {
    position: absolute;
    left: 10%;
    top: 1rem;
    color: rgba(0, 0, 0, 0.6);
    font-size: 1rem;
    pointer-events: none;
    transition: 0.3s ease;
}

/* Efecto de "flotar" cuando escribes o haces focus */
.field__input:focus + .field__label,
.field__input:not(:placeholder-shown) + .field__label,
.field__input:hover + .field__label, /* <-- agregado */
.text-area:focus + .field__label,
.text-area:not(:placeholder-shown) + .field__label,
.text-area:hover + .field__label { /* <-- agregado */
    top: -0rem;
    left: 9.5%;
    font-size: 0.75rem;
    color: #000;
}

.botonEnviar {
    width: 8rem;
    height: 3rem;
    border: none;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #000, #333);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0.25rem 0.375rem rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
}

.botonEnviar:hover {
    background: linear-gradient(135deg, #333, #000);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.botonEnviar:active {
    transform: translateY(0);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

/* Fin pagina contactanos */
/* ////////////////////////////////////////////////////// */


/* Secciones */

section {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

section.active {
    display: block;
    opacity: 1;
}

/* Fin secciones */


/* Estilo distintos menus */
.menu {
    display: flex;
    justify-content: center;
    width: 100;
}

.menu a:hover {
    font-weight: bold;
}

.menu a.active {
    font-weight: bold;
}

.boton.Usuario {
    font-size: 1.2rem;
    position: fixed;
    top: 0.7rem;
    right: 1rem;
    z-index: 2;
}

#desplegableUsuario {
    z-index: 1;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;

    width: auto;
    min-width: 8.5rem;
    height: 5rem;
    background-color: white;
    padding: 1rem;
    position: fixed;
    top: 0rem;
    right: 0rem;
    text-align: left;
    gap: 0.5rem;
}

#desplegableUsuario.active {
    display: flex;
}

#nombreUsuario {
    font-weight: 600;
    margin: 0;
    margin-top: -0.35rem;
    margin-left: 0.25rem;
    margin-right: 1.75rem;
}

#botonConfiguracion, 
#botonCerrarSesion {
    background-color: transparent;
    border: none;
    font-size: 1rem;
}

#botonConfiguracion:hover,
#botonCerrarSesion:hover {
    font-weight: bold;
}

#desplegableAccederCuenta {
    display: none;

    background-color: white;
    padding: 1rem;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    border-radius: 0.75rem;
}

#desplegableAccederCuenta.active {
    display: flex;
}

#desplegableRegistro {
    display: none;

    background-color: white;
    padding: 1rem;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    border-radius: 0.75rem;
}

#desplegableRegistro.active {
    display: flex;
}

.mensaje-error {
  display: none; /* oculto por defecto */
  color: #d32f2f;
  font-size: 0.9rem;
  margin-top: 0.3rem;
  background-color: #fdecea;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  border: 1px solid #f5c2c2;
}
.mensaje-error.active {
  display: block; /* visible cuando hay error */
}

.fieldCuenta {
    position: relative;
    margin-bottom: 1.5rem;
}

.field__input__Cuenta {
    width: 80%;
    padding: 1rem 1rem 0.5rem 1rem;
    border: 1px solid #ccc;
    border-radius: 0.375rem;
    font-size: 1rem;
    background: none;
    outline: none;
}

.field__label__Cuenta {
    position: absolute;
    left: 10%;
    top: 0.65rem;
    color: rgba(0, 0, 0, 0.6);
    font-size: 1rem;
    pointer-events: none;
    transition: 0.3s ease;
}

#mostrarContrasena,
#ocultarContrasena {
    position: absolute;
    border: none;
    background-color: transparent;
    transform: scale(1.25);
    right: 5%;
    top: 30%;
    display: none;
}

#mostrarContrasena.active,
#ocultarContrasena.active {
    display: block;
}

#mostrarContrasenaSignUp,
#ocultarContrasenaSignUp {
    position: absolute;
    border: none;
    background-color: transparent;
    transform: scale(1.25);
    right: 5%;
    top: 30%;
    display: none;
}

#mostrarContrasenaSignUp.active,
#ocultarContrasenaSignUp.active {
    display: block;
}

#mostrarRepeatContrasena,
#ocultarRepeatContrasena {
    position: absolute;
    border: none;
    background-color: transparent;
    transform: scale(1.25);
    right: 5%;
    top: 30%;
    display: none;
}

#mostrarRepeatContrasena.active,
#ocultarRepeatContrasena.active {
    display: block;
}

/* Efecto de "flotar" cuando escribes o haces focus */
.field__input__Cuenta:focus + .field__label__Cuenta,
.field__input__Cuenta:not(:placeholder-shown) + .field__label__Cuenta,
.field__input__Cuenta:hover + .field__label__Cuenta { 
    top: -0rem;
    left: 9.5%;
    font-size: 0.75rem;
    color: #000;
}

.form {
    margin-top: 0.5rem;
}

.fieldPassword {
    position: relative;
    margin-bottom: 1rem;
}

.fieldNombre {
    position: relative;
    margin-bottom: 1.5rem;
}

.fieldPasswordRegistration {
    position: relative;
    margin-bottom: 1.5rem;
}

.fieldPasswordConfirmation {
    position: relative;
    margin-bottom: 1rem;
}


.recuperarContraseña {
    background-color: transparent;
    border: none;
    margin-bottom: 1rem;
}

.recuperarContraseña:hover {
    font-weight: bold;
}

.botonSignIn,
.botonSignUp {
    width: 93%;
    height: 3rem;
    border: none;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #000, #333);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0.25rem 0.375rem rgba(0, 0, 0, 0.2);
}

.botonSignIn:hover,
.botonSignUp:hover {
    background: linear-gradient(135deg, #333, #000);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.botonSignIn:active,
.botonSignUp.active {
    transform: translateY(0);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.botonRegistrarse {
    background-color: transparent;
    border: none;
    margin-bottom: 1rem;
    margin-bottom: 0rem;
}

.botonRegistrarse:hover {
    font-weight: bold;
}

.botonInicioSesion {
    background-color: transparent;
    border: none;
    margin-bottom: 1rem;
    margin-bottom: 0rem;
}

.botonInicioSesion:hover {
    font-weight: bold;
}

/* Estilo inicial: oculto */
#signUpMessage{
    position: fixed;      /* fijo sobre la página */
    top: 1rem;           /* desde la parte superior */
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    background-color: blue;
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none; /* para que no interfiera con clicks */
    z-index: 1;
}

#signUpMessage.active {
    opacity: 1;
}

/* Estilo inicial: oculto */
#signInMessage{
    position: fixed;      /* fijo sobre la página */
    top: 1rem;           /* desde la parte superior */
    left: 50%;
    text-align: center;
    transform: translateX(-50%);
    background-color: blue;
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none; /* para que no interfiera con clicks */
    z-index: 1;
}

#signInMessage.active {
    opacity: 1;
}

/* //////////////////////////////////////////////////////////////////// */

.boton.Buscar {
    font-size: 1.2rem;
    position: fixed;
    top: 0.7rem;
    right: 2.75rem;
}

#desplegableBusqueda {
    position: fixed;
    width: calc(100% - 3rem);
    /* ancho responsive */
    max-width: 37.5rem;
    top: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f7f7f7;
    display: none;
    align-items: center;
    padding: 0.5rem;
    border-radius: 0.625rem;
    gap: 0.5rem;
    /* espacio entre input y botón */
    flex-direction: column;
    /* primero input+botón, debajo sugerencias */
}

#desplegableBusqueda.active {
    display: flex;
}

#busqueda {
    flex: 1;
    /* ocupa todo el ancho disponible */
    background-color: transparent;
    border: none;
    text-align: left;
    font-size: 1rem;
    padding: 0.5rem;
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
}

#busqueda:focus {
    outline: none;
}

.input-con-boton {
    display: flex;
    align-items: center;
    width: 100%;
}

.boton.Busqueda {
    font-size: 1.2rem;
    background: none;
    border: none;
    cursor: pointer;
    margin-top: 0.5rem;
}

#sugerencias {
    width: 100%;
    max-height: 12.5rem;
    overflow-y: auto;
    border-radius: 0.5rem;
}

.sugerencia {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #ddd;
}

.sugerencia:hover {
    background-color: #eee;
}

/* //////////////////////////////////////////////////////////////////// */
.paginaFavoritos {
    margin-bottom: 2rem;
    text-align: center;
}

.boton.Favoritos {
    font-size: 1.2rem;
    position: fixed;
    top: 0.7rem;
    right: 4.5rem;
}

/* Para moviles y dispositivos muy pequeños */
#gridFavoritos {
    display: grid;
    padding-left: 1.5rem;
    /* Estaba en 0.75 sin gap y con padding en prodcuto */
    padding-right: 1.5rem;
    gap: 1.5rem;
    justify-content: center;
    grid-template-columns: repeat(2, minmax(0rem, 1fr));
    
    line-height: 1rem;
}

/* Dispositivos normales */
@media (min-width: 30rem) {
    #gridFavoritos {
        grid-template-columns: repeat(auto-fit, minmax(11.25rem, 1fr));
    }
}

/* El maximo para que no se expanda infinitamente */
@media (min-width: 60rem) {
    #gridFavoritos {
        grid-template-columns: repeat(4, minmax(12.5rem, 1fr));
    }
}

/* //////////////////////////////////////////////////////////////////// */

.menuHamburguesa,
.hamburguesa,
.hamburguesaLinks,
.nombreHeader {
    display: none
}

@media (max-width: 36.625rem) {
    .menu {
        display: none
    }

    .menuHamburguesa,
    .hamburguesa {
        display: block;
        top: 0rem;
    }

    .hamburguesaLinks {
        display: flex;
        flex-direction: column;
        position: absolute;
        left: 0rem;
        top: 2rem;

        max-height: 0;
        /* Lo que esta fuera de este max-height 0 esta invisible por el overflow hidden */
        overflow: hidden;
        transform: translateY(-10px);
        transition: max-height 0.5s ease, opacity 0.3s ease, transform 0.3s ease;

        /* box-shadow: 0 0.2rem 0.5rem rgba(0,0,0,0.15); */
    }

    .hamburguesaLinks.active {
        max-height: 62.5rem;
        opacity: 1;
        transform: translateY(0);
    }

    .hamburguesaLinks a {
        font-weight: normal;
        text-decoration: none;
    }

    .hamburguesaLinks a:hover {
        font-weight: bold;
    }

    .hamburguesaLinks a.active {
        font-weight: bold;
    }

    .nombreHeader.active {
        display: block;
    }
}

.hamburguesaLinks.scrolled {
    background-color: #eec9b0;
}

/* Estilo menu hamburguesa */
.hamburguesa span {
    display: block;
    width: 1.5rem;
    height: 0.2rem;
    background-color: gray;
    margin: 0.3rem 0;
    border-radius: 1rem;
}

.hamburguesa {
    background-color: transparent;
    border: none;
    cursor: pointer;

    position: absolute;
    left: 0.7rem;
    z-index: 30;
}

/* estilo menú superior */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 1.6rem;
    background-color: transparent;
    z-index: 10;
    display: flex;
    justify-content: center;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

nav {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#navbar.scrolled {
    background-color: #eec9b0;
    box-shadow: 0 0.2rem 0.3rem rgba(0, 0, 0, 0.1);
}

/* links del menú */
nav a {
    margin: 0 1rem;
    text-decoration: none;
    color: black;
}

/* Fin estilo de menus */

/* Footer */
footer {
    /*background-color: #d0997a;*/
    background-color: #eec9b0;
    text-align: center;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

footer a {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

footer a:hover {
    text-decoration: underline;
}

footer a:visited {
    color: black;
}

.footerEmail {
    width: 80%;
    padding: 1rem;
    border: 1px solid black;
    border-radius: 0.375rem;
    font-size: 1rem;
    background: none;
    outline: none;
}

.footerEmail_Label {
    position: absolute;
    left: 10%;
    top: 1rem;
    color: rgba(0, 0, 0, 0.6);
    font-size: 1rem;
    pointer-events: none;
    transition: 0.3s ease;
}

/* Efecto de "flotar" cuando escribes o haces focus */
.footerEmail:focus+.footerEmail_Label,
.footerEmail:not(:placeholder-shown)+.footerEmail_Label {
    top: -0rem;
    left: 9.5%;
    font-size: 0.75rem;
    color: #000;
}

.newsletter-button {
    position: absolute;
    right: 10%;
    top: 0.3rem;
    border: none;
    width: 3rem;
    height: 3rem;
    cursor: pointer;
    transition: 0.2s;
    background-color: transparent;
}

.newsletter-button:hover .icon-arrow {
    color: white;
}

.icon-arrow {
    width: 1rem;
    height: 1rem;
    color: black;
}

#botonIrArriba {
    position: fixed;
    bottom: 1rem;
    right: 2rem;
    color: black;
    font-size: 2rem;
    display: none;
}

#botonIrArriba.scrolled {
    display: block;
}
