/* ===== SELECTORES UNIVERSALES ===== */
* {
    margin: 0;
    /* Quita los espacios externos por defecto */
    padding: 0;
    /* Quita los espacios internos por defecto */
    box-sizing: border-box;
    /* Hace que el tamaño de una caja incluya su borde y su relleno */
}

html {
    scroll-behavior: smooth;
    /* Hace que al hacer clic en un enlace del menú
       la página se desplace suavemente (no brinca de golpe) */
}

body {
    font-family: Arial, Helvetica, sans-serif;
    /* El tipo de letra */

    background-color: #f7f4ef;
    /* Color del fondo */

    color: #24201d;
    /* Color del texto */

    line-height: 1.6;
    /* El espacio entre líneas de texto */
}

a {
    text-decoration: none;
    /* Así quito la línea de los enlaces */

    color: inherit;
    /* Hereda el color del elemento padre */
}

button {
    font-family: inherit;

    cursor: pointer;
    /* Al pasar el mouse sobre el botón aparece la manita */
}

/* ===== ENCABEZADO ===== */
.encabezado {
    /* Barra superior */
    background-color: #201c1a;
    color: white;

    display: flex;
    /* Pone los elementos (logo, menú, carrito) en fila */

    align-items: center;
    /* Los alinea verticalmente al centro */

    justify-content: space-between;

    padding: 20px 7%;
    /* Separa el texto del borde */

    gap: 25px;
    /* Espacio entre los elementos */

    position: sticky;
    /* El menú se queda fijo */

    top: 0;

    z-index: 100;
    /* Orden del elemento para que quede arriba */
}

.logo {
    font-size: 22px;
    /* Tamaño de la letra */

    font-weight: bold;
    /* Para que las letras se vean en negritas o gruesas */

    letter-spacing: 1px;
    /* Qué tan separadas van las letras */

    white-space: nowrap;
    /* El texto no baja de línea, se queda ahí todo */
}

.logo span {
    color: #d6a85b;
}

.menu {
    display: flex;
    gap: 25px;
    align-items: center;
}

.menu a {
    font-size: 14px;
    color: #e8e2d9;

    transition: 0.3s;
    /* El cambio de estilo se ve SUAVE */
}

.menu a:hover {
    color: #d6a85b;
}

/* Ocultar la hamburguesa en escritorio */
.hamburguesa {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.hamburguesa span {
    width: 25px;
    height: 3px;
    background: #d6a85b;
    border-radius: 2px;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.boton-carrito {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #d6a85b;
    color: #201c1a;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: bold;
    transition: 0.3s;
}

.boton-carrito:hover {
    background-color: #f0c77c;
}

#contador {
    background-color: #201c1a;
    color: white;
    padding: 2px 7px;
    border-radius: 999px;

    margin-left: 5px;
    /* Mueve un espacio a la izquierda */
}

/* ===== HERO ===== */
.hero {
    position: relative;
    background-color: #29221e;
    color: white;

    min-height: 90vh;
    /* Mejor en móvil que height fijo */

    display: flex;

    align-items: center;
    justify-content: space-between;
    padding: 70px 10%;
    gap: 40px;

    overflow: hidden;
    /* Cuando no cabe en el espacio, esto lo controla */
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(32, 28, 26, 0.85), rgba(32, 28, 26, 0.35));
    z-index: 1;
}

.video-fondo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transform: scale(1.8);
}

.hero-contenido {
    position: relative;
    z-index: 2;
    max-width: 600px;
    /* El ancho de un elemento */
}

.etiqueta {
    color: #c79a58;
    font-size: 12px;
    font-weight: bold;

    letter-spacing: 2px;
    /* Separa o junta las letras de un objeto */
    margin-bottom: 15px;
}

.hero h1 {
    font-family: Garamond, serif;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.1;
    margin-bottom: 25px;
}

.hero p:not(.etiqueta) {
    color: #d8d0c6;
    max-width: 470px;
    margin-bottom: 30px;
}

.boton-principal {
    display: inline-block;
    background-color: #d6a85b;
    color: #201c1a;
    padding: 10px 17px;
    border-radius: 10px;
    font-weight: bold;
    transition: 0.3s;
}

.boton-principal:hover {
    background-color: #f0c77c;
    transform: translateY(-2px);
}

/* Botón de descuentos más pequeño */
.boton-descuento {
    font-size: 15px;
    padding: 10px 20px;
    margin-left: 10px;
}

.hero-instrumento {
    font-size: 230px;
    opacity: 0.9;
    transform: rotate(-8deg);
}

/* ===== SECCIONES ===== */
.seccion {
    padding: 90px 8%;
}

.seccion-alterna {
    background-color: #eee8df;
}

.titulo-seccion {
    text-align: center;
    margin-bottom: 45px;
}

.titulo-seccion h2 {
    font-family: Georgia, serif;
    font-size: 38px;
    margin-bottom: 10px;
}

.titulo-seccion>p:last-child {
    color: #756d65;
}

/* ===== PRODUCTOS ===== */
.productos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 1200px;
    margin: auto;
}

.producto {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(50, 40, 30, 0.06);
    /* Agrega la sombra o profundidad */
    transition: 0.3s;
}

.producto:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(50, 40, 30, 0.12);
}

.imagen-producto {
    height: 230px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.instrumento-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    transition: 0.3s;
}

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

/* Colores de fondo por instrumento */
.guitarra {
    background-color: #ead7c0;
}

.violin {
    background-color: #e3c2a4;
}

.ukulele {
    background-color: #f0dfbd;
}

.teclado {
    background-color: #d8d7e4;
}

.piano {
    background-color: #c9c8d5;
}

.sintetizador {
    background-color: #c9d7d5;
}

.bateria {
    background-color: #d8c2bd;
}

.cajon {
    background-color: #e5d1b8;
}

.bongos {
    background-color: #d7c6b0;
}

.informacion-producto {
    padding: 22px;
}

.categoria {
    color: #b17b32;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.informacion-producto h3 {
    font-family: Georgia, serif;
    font-size: 22px;
    margin: 8px 0;
}

.informacion-producto p {
    color: #77706a;
    font-size: 14px;
    min-height: 48px;
}

.precio-boton {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
}

.precio-boton strong {
    font-size: 18px;
    color: #29221e;
}

.precio-boton button {
    background-color: #29221e;
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 5px;
    transition: 0.3s;
}

.precio-boton button:hover {
    background-color: #b17b32;
}

/* ===== CONTACTO ===== */
.contacto {
    background-color: #d6a85b;
    padding: 55px 8%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
}

.contacto-texto {
    flex: 1;
    min-width: 260px;
}

.contacto h2 {
    font-family: Georgia, serif;
    font-size: 36px;
    margin-bottom: 8px;
}

.contacto .etiqueta {
    color: #5a3b1b;
    margin-bottom: 8px;
}

.contacto p:last-child {
    color: #5f4930;
}

/* ===== FORMULARIO DE CONTACTO ===== */
.formulario-contacto {
    flex: 1.2;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.campo {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.campo label {
    font-size: 13px;
    font-weight: bold;
    color: #5a3b1b;
}

.campo input,
.campo textarea {
    font-family: inherit;
    font-size: 14px;
    padding: 11px 14px;
    border: 1px solid rgba(90, 59, 27, 0.25);
    border-radius: 8px;
    background-color: #fdfaf5;
    color: #24201d;
    resize: vertical;
}

.campo input:focus,
.campo textarea:focus {
    outline: none;
    border-color: #5a3b1b;
    background-color: #fff;
}

.boton-enviar {
    background-color: #201c1a;
    color: white;
    border: none;
    padding: 13px 20px;
    border-radius: 8px;
    font-weight: bold;
    transition: 0.3s;
}

.boton-enviar:hover {
    background-color: #5a3b1b;
}

.mensaje-formulario {
    font-size: 14px;
    font-weight: bold;
    color: #2f5d3a;
    min-height: 20px;
}

/* ===== FOOTER ===== */
.footer {
    background-color: #201c1a;
    color: white;
    padding: 35px 8%;
    display: flex;
    justify-content: space-between;
    gap: 25px;
}

.footer h3 {
    color: #d6a85b;
    margin-bottom: 8px;
}

.footer p {
    color: #aaa19a;
    font-size: 14px;
}

.footer svg {
    width: 28px;
    height: 28px;
    margin-right: 8px;
}

/* ===== PÁGINA DE DESCUENTOS ===== */
.hero-descuentos {
    min-height: 60vh;
    background-color: #29221e;
}

.precios {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.precio-tachado {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    font-weight: normal;
}

.precio-oferta {
    font-size: 20px;
    color: #b17b32;
}

/* ===== CARRITO ===== */
#lista-carrito {
    max-width: 900px;
    margin: 0 auto;
}

.item-carrito {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: white;
    padding: 18px 22px;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 5px 20px rgba(50, 40, 30, 0.06);
}

.item-nombre {
    flex: 1;
    font-weight: bold;
}

.item-cantidad {
    color: #756d65;
}

.item-subtotal {
    color: #29221e;
    font-size: 17px;
}

.item-eliminar {
    background: #29221e;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 5px;
    transition: 0.3s;
}

.item-eliminar:hover {
    background: #b17b32;
}

.carrito-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 25px auto 0;
    padding: 20px 25px;
    background: #eee8df;
    border-radius: 12px;
    font-size: 20px;
}

.carrito-vacio {
    max-width: 900px;
    margin: 15px auto 25px;
    color: #756d65;
}

.boton-ver-productos {
    display: inline-block;
    padding: 15px 25px;
    background: #af7528;
    color: #fff;
    font-weight: bold;
    border-radius: 8px;
    transition: 0.3s;
}

.boton-ver-productos:hover {
    background: #d6a85b;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {

    .encabezado {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero {
        text-align: center;
        flex-direction: column;
        padding: 70px 8%;
    }

    .hero-contenido {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-instrumento {
        font-size: 130px;
    }

    .productos {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .hamburguesa {
        display: flex;
    }

    .enlaces-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #201c1a;
        padding: 15px 7%;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    }

    .enlaces-menu a {
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .enlaces-menu.abierto {
        display: flex;
    }
}

@media (max-width: 600px) {

    .menu {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .menu a {
        font-size: 12px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .productos {
        grid-template-columns: 1fr;
        /* Cuántas columnas tendrá */
    }

    .contacto,
    .footer {
        flex-direction: column;
        /* La dirección del contenedor */
        text-align: center;
    }

    .formulario-contacto {
        width: 100%;
    }

    .titulo-seccion h2 {
        font-size: 30px;
    }

    .imagen-producto {
        height: 220px;
    }

    .instrumento-img {
        padding: 15px;
    }

    .item-carrito {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}


/* =====================================
   FORMULARIO DE REGISTRO
   INSTRUMENT STUDY
===================================== */

/* Fondo oscuro */
.fondo-registro[hidden] {
    display: none !important;
}

.fondo-registro {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 9999;
}

/* Ventana del formulario */
.panel-registro {
    position: relative;
    background: #ffffff;
    color: #222;
    width: 100%;
    max-width: 430px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 35px;
    border-radius: 18px;
    box-sizing: border-box;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.3);
}

/* Título */
.panel-registro h2 {
    text-align: center;
    font-size: 26px;
    margin-bottom: 12px;
    color: #222;
}

/* Descripción */
.panel-registro p {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

/* Etiquetas */
.panel-registro label {
    display: block;
    margin: 12px 0 6px;
    font-size: 14px;
    font-weight: bold;
}

/* Campos del formulario */
.panel-registro input,
.panel-registro textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

/* Efecto al escribir */
.panel-registro input:focus,
.panel-registro textarea:focus {
    outline: none;
    border-color: #555;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
}

/* Botón de registro */
#boton-registro {
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    background: #242424;
    color: white;
    border: none;
    border-radius: 9px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

#boton-registro:hover {
    background: #555;
}

#cerrar-registro {
    position: absolute;
    right: 15px;
    top: 10px;
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #333;
}

/* Cambiar a iniciar sesión */
#cambiar-registro {
    display: block;
    margin: 16px auto 0;
    background: transparent;
    border: none;
    color: #333;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
}

/* Mensajes error */
#mensaje-registro {
    color: #b42318;
    text-align: center;
    font-size: 13px;
    margin-top: 12px;
}

/* Ocultar campos al iniciar */
#campo-nombre[hidden],
#campo-telefono[hidden],
#campo-direccion[hidden],
#campo-confirmacion[hidden] {
    display: none;
}

/* Adaptación para celulares */
@media (max-width: 480px) {
    .panel-registro {
        padding: 25px 20px;
        border-radius: 14px;
    }

    .panel-registro h2 {
        font-size: 22px;
    }
}
/* Pantalla inicial de acceso: la tienda no aparece detrás */
.fondo-registro { background: linear-gradient(135deg,#211b19 0%,#3c3027 60%,#73502a 100%); }
.fondo-registro[hidden] { display:none!important; }
.panel-registro { box-shadow:0 24px 70px rgba(0,0,0,.35); }
#mensaje-pedido { max-width:900px; margin:14px auto; color:#4c3823; font-weight:600; }
