/* 1. CONFIGURACIÓN GENERAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    background-color: #D4C0A1;
}
a{
    text-decoration: none;
    color: #5A4634;
}
h1{
    font-family: 'Playwrite AR', cursive;
    font-size: 2.8rem;
    color: #5A4634;
    font-weight: 300;
}
body {
    background-color: #FCFBF8; /* Un blanco roto / crema muy sutil */
    color: #333;
    font-family: 'Montserrat', sans-serif;
}

/* 2. EL ENCABEZADO (Flexbox para poner todo en una línea) */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 23px;
    background-color: #D4C0A1; /* Tono Crema cálido y elegante */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* El menú de navegación */
header nav ul {
    display: flex;
    list-style: none; /* Quita los puntitos de la lista */
    gap: 10px; /* Espacio entre "Nosotros" y "Tienda" */
}
/*Para el buscador*/
#input-buscador{
    border: 1px solid #C9A67A;
}
header nav ul li a {
    text-decoration: none; /* Quita el subrayado de los links */
    color: #5A4634;
    font-weight: 600;
}

/* El botón del carrito */
#abrir_carrito {
    padding: 10px 15px;
    background-color: #C9A67A;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
}
#abrir_carrito:hover {
    background-color: #B48D63;
}

/* 3. SECCIONES GENERALES */
section {
    padding: 40px;
    text-align: center;
}
#nosotros {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px;
}

#nosotros p {
    max-width: 800px;
    margin: 12px auto 0;
    line-height: 1.8;
}

/* 4. LA GRILLA DE PRODUCTOS */
.productos {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(260px, 320px));
    justify-content: center;
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto 0;
}

/* 5. CADA TARJETA DE PRODUCTO */
.tarjeta-producto {
    width: 100%;
    max-width: 320px;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05); /* Sombra suave */
    transition: transform 0.3s; /* Para un efecto al pasar el mouse */
}

.tarjeta-producto:hover {
    transform: translateY(-5px); /* Se levanta un poquito al pasar el mouse */
}

.tarjeta-producto img {
    width: 100%; /* La imagen ocupa todo el ancho de su tarjeta */
    border-radius: 5px;
    background-color: #eee; /* Fondo gris por si la imagen no carga */
    min-height: 200px;
}

.tarjeta-producto h3 {
    margin: 15px 0 10px;
    font-size: 1.1rem;
}
.colores-disponibles {
    font-size: 0.85rem;
    color: #5A4634;
    margin-bottom: 4px;
}

.contenedor-talles {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 10px 0;
}

.talle {
    min-width: 38px;
    padding: 5px 10px;

    border: 1px solid #D4C0A1;
    border-radius: 20px;

    background-color: #FDF6E3;
    color: #5A4634;

    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;

    cursor: pointer;

    transition:
        background-color 0.2s,
        color 0.2s,
        transform 0.2s;
}

.talle:hover {
    background-color: #E8DCCB;
}

.talle.activo {
    background-color: #D4C0A1;
    color: white;
    border-color: #D4C0A1;
    transform: scale(1.04);
}
.talle.sin-stock {
    border-color: #D5D0CA;
    background-color: #EEEAE5;
    color: #AAA39C;
    cursor: not-allowed;
    opacity: 0.55;
    text-decoration: line-through;
    transform: none;
}
.talle.sin-stock:hover {
    background-color: #EEEAE5;
    color: #AAA39C;
    transform: none;
}

.stock-disponible {
    color: #4F6F52;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}
/*Agotamiento de stock*/
.stock-disponible.agotado {
    color: #9B5555;
    font-weight: 700;
}
.btn-agregar:disabled {
    background-color: #BEB6AC;
    color: #F7F4EF;
    cursor: not-allowed;
    opacity: 0.75;
}
.btn-agregar:disabled:hover {
    background-color: #BEB6AC;
    transform: none;
}
.tarjeta-producto .precio {
    color: #7A5C45; /* Color Tomato (Rojo anaranjado vibrante) */
    font-weight: bold;
    font-size: 1.3rem;
    margin-bottom: 15px;
    border-top:1px solid #ececec;
    padding-top:10px;
}

.btn-agregar {
    width: 100%;
    padding: 10px;
    background-color: #C9A67A;
    color: white; /* Texto en blanco para que resalte y se lea perfecto */
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

.btn-agregar:hover {
    background-color: #B48D63;
}
/* ========================================
    PANEL DEL CARRITO
======================================== */

#carrito-lateral {
    position: fixed;
    top: 0;
    right: -400px;

    width: 370px;
    max-width: 100%;
    height: 100vh;

    display: flex;
    flex-direction: column;

    background-color: #FCFBF8;

    box-shadow: -8px 0 30px rgba(90, 70, 52, 0.18);

    transition: right 0.3s ease;
    z-index: 1000;
}

#carrito-lateral.abierto {
    right: 0;
}

/* Encabezado del carrito */

.carrito-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 20px;

    background-color: #D4C0A1;
    border-bottom: 1px solid #C9A67A;
}

.carrito-header h2 {
    margin: 0;

    color: #5A4634;

    font-size: 1.25rem;
    font-weight: 600;
}

#cerrar-carrito {
    width: 34px;
    height: 34px;

    display: flex;
    justify-content: center;
    align-items: center;

    border: none;
    border-radius: 50%;

    background-color: rgba(255, 255, 255, 0.6);
    color: #5A4634;

    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;

    transition:
        background-color 0.2s,
        transform 0.2s;
}

#cerrar-carrito:hover {
    background-color: #FCFBF8;
    transform: scale(1.08);
}

/* Lista del carrito */

#lista-carrito {
    flex-grow: 1;
    padding: 18px;
    overflow-y: auto;
}

.carrito-vacio {
    margin-top: 35px;

    color: #7A6858;

    text-align: center;
    font-size: 0.9rem;
}

/* Producto del carrito */

.item-carrito {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;

    margin-bottom: 14px;
    padding: 14px;

    border: 1px solid #E8DCCB;
    border-radius: 12px;

    background-color: white;

    box-shadow: 0 3px 10px rgba(90, 70, 52, 0.07);
}

.item-carrito-info {
    flex: 1;
    min-width: 0;
}

.item-carrito-nombre {
    margin-bottom: 9px;

    color: #5A4634;

    font-size: 0.9rem;
    font-weight: 600;
}

.item-carrito-resumen {
    text-align: right;
}

.item-carrito-subtotal {
    margin-bottom: 8px;

    color: #7A5C45;

    font-size: 0.95rem;
    font-weight: 700;
}

/* Cantidad */

.controles-cantidad {
    display: flex;
    align-items: center;
    gap: 7px;
}

.btn-sumar,
.btn-restar {
    width: 28px;
    height: 28px;
    padding: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    border: 1px solid #D4C0A1;
    border-radius: 50%;

    background-color: #FDF6E3;
    color: #5A4634;

    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;

    transition:
        background-color 0.2s,
        color 0.2s,
        transform 0.2s;
}

.btn-sumar:hover,
.btn-restar:hover {
    background-color: #D4C0A1;
    color: white;
    transform: scale(1.08);
}

.cantidad-producto {
    min-width: 20px;

    color: #5A4634;

    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Eliminar */

.btn-eliminar {
    margin: 0;
    padding: 5px 9px;

    border: 1px solid #C99090;
    border-radius: 15px;

    background-color: transparent;
    color: #9B5555;

    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;

    transition:
        background-color 0.2s,
        color 0.2s;
}

.btn-eliminar:hover {
    background-color: #9B5555;
    color: white;
}

/* Pie del carrito */

.carrito-footer {
    padding: 20px;

    border-top: 1px solid #D4C0A1;
    background-color: #FDF6E3;
}

.carrito-footer p {
    display: flex;
    justify-content: space-between;

    margin-bottom: 15px;

    color: #5A4634;

    font-size: 1.05rem;
    font-weight: 700;
}
#btn-vaciar {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #C99090;
    border-radius: 25px;
    background-color: transparent;
    color: #9B5555;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color 0.2s,
        color 0.2s;
}
#btn-vaciar:hover {
    background-color: #9B5555;
    color: white;
}

#btn-pagar {
    width: 100%;
    padding: 13px;

    border: none;
    border-radius: 25px;

    background-color: #C9A67A;
    color: white;

    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;

    transition:
        background-color 0.2s,
        transform 0.2s;
}

#btn-pagar:hover {
    background-color: #B48D63;
    transform: translateY(-1px);
}
/* --- GALERÍA DE PRODUCTO MULTI-COLOR --- */
.galeria-producto {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 12px;
}

.carrusel-imagenes {
    position: relative;
    width: 100%;
    height: 450px; /* Ajusta este alto para tus fotos de modelo */
    background-color: #eee;
}

/* Ocultamos todas las imágenes y solo mostramos la que tiene la clase 'activa' */
.slide-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Hace que la foto se adapte sin deformarse */
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    z-index: 1;
}

.slide-img.activa {
    opacity: 1;
    z-index: 2;
}

/* Contenedor de las burbujas de colores */
.selectores-color {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.75); /* Fondo semitransparente crema/blanco */
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(2px);
}

/* Burbuja individual de color */
.punto-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Efecto hover y estado activo */
.punto-color:hover, .punto-color.activo {
    transform: scale(1.3);
    box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #C9A67A; /* Borde tomato alrededor del color seleccionado */
}
.hero{
    width: 100%;
    height: min(70vh, 680px);
    background-image: url("../images/Banner.jpeg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    margin-bottom: 50px;
}
.contenedor-buscador {
    display: flex;
    align-items: center;
}

#input-buscador {
    width: 190px;
    padding: 9px 12px;
    border: 1px solid #C9A67A;
    border-right: none;
    border-radius: 20px 0 0 20px;
    background-color: #FCFBF8;
    color: #5A4634;
    font-family: 'Montserrat', sans-serif;
    outline: none;
}
#input-buscador:focus {
    border-color: #5A4634;
}
#input-buscador::placeholder {
    color: #9A8877;
}
#btn-buscar {
    padding: 9px 14px;
    border: 1px solid #C9A67A;
    border-radius: 0 20px 20px 0;
    background-color: #C9A67A;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}
#btn-buscar:hover {
    background-color: #B48D63;
}
#mensaje-sin-resultados {
    display: none;
    width: fit-content;
    max-width: 90%;
    margin: 30px auto;
    padding: 20px 30px;
    border: 1px solid #E8DCCB;
    border-radius: 10px;
    background-color: #FDF6E3;
    color: #5A4634;
    text-align: center;
    font-size: 0.95rem;
}

/* ========================================
FOOTER
======================================== */

.footer-principal {
    padding: 45px 40px 20px;
    background-color: #D4C0A1;
    color: #5A4634;
    border-top: 1px solid #C9A67A;
}
.footer-contenido {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
}
.footer-marca h3 {
    margin-bottom: 12px;
    font-family: 'Playwrite AR', cursive;
    font-size: 1.7rem;
    font-weight: 300;
}
.footer-marca p {
    width: 100%;
    max-width: 360px;
    font-size: 0.9rem;
    line-height: 1.8;
    text-wrap: pretty;
}
.footer-navegacion,
.footer-contacto {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
}
.footer-navegacion h4,
.footer-contacto h4 {
    margin-bottom: 5px;
    color: #5A4634;
    font-size: 0.95rem;
    font-weight: 700;
}

.footer-navegacion a,
.footer-contacto a {
    position: relative;
    color: #5A4634;
    font-size: 0.85rem;
    font-weight:500;
    transition:
        color 0.2s,
        transform 0.2s;
}

.footer-navegacion a:hover,
.footer-contacto a:hover {
    color: #7A5C45;
    transform: translateX(3px);
}

.footer-inferior {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    max-width: 1200px;
    margin: 35px auto 0;
    padding-top: 18px;
    border-top: 1px solid rgba(90, 70, 52,0.22);
    font-size: 0.75rem;
    color: #7A6858;
}
@media (max-width:768px){
    /* Encabezado móvil */
    header {
        flex-direction: column;
        gap: 12px;
        padding: 14px 16px;
    }
    header h1 {
        margin: 0;
        font-size: 2rem;
        line-height: 1.25;
        text-align: center;
    }
    header nav {
    width: 100%;
    }
    header nav ul {
        justify-content: center;
        gap: 24px;
        width: 100%;
    }
    header nav ul li a {
        font-size: 0.85rem;
    }
    body{
        font-size: 0.9rem;
    }
        .hero{
        height: 30vh;
        background-size: cover;
        margin-bottom: 5px;
    }
    .productos{
        grid-template-columns:
        repeat(2,1fr);
        gap:10px;
        max-width: 100%;
    }
    .carrusel-imagenes{
        height:200px;
    }
    .tarjeta-producto{
        max-width: none;
        padding:5px;
    }
    .tarjeta-producto h3{
        font-size:0.8rem;
    }
    .tarjeta-producto .precio{
        font-size:0.85rem;
    }
    .btn-agregar{
        font-size:0.75rem;
        padding:8px;
    }
    #nosotros{
        padding: 10px 15px;
    }

    #tienda{
        padding-top: 0;
    }
    #carrito-lateral {
    width: 100%;
    right: -100%;
    }
    #carrito-lateral.abierto {
        right: 0;
    }
    .carrito-header {
        padding: 16px;
    }
    #lista-carrito {
        padding: 12px;
    }
    .item-carrito {
        padding: 12px;
    }
    .carrito-footer {
        padding: 16px;
    }
    .contenedor-buscador {
        display: flex;
        justify-content: center;
        width: 100%;
        max-width: 340px;
        margin: 0 auto;
    }
    #input-buscador {
        flex: 1;
        min-width: 0;
        width: auto;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    #btn-buscar {
        flex-shrink: 0;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    .footer-principal {
    padding: 35px 20px 18px;
    }
    .footer-contenido {
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: center;
    }
    #abrir_carrito {
    width: 100%;
    max-width: 220px;
    padding: 9px 14px;
    font-size: 0.82rem;
    }

    .footer-marca p {
        max-width: 100%;
    }

    .footer-navegacion,
    .footer-contacto {
        align-items: center;
    }
    .footer-inferior {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        margin-top: 28px;
        text-align: center;
    }
}
@media (min-width: 769px) and (max-width: 1199px) {
    header {
        flex-wrap: wrap;
        gap: 15px 25px;
        padding: 18px 25px;
    }
    header h1 {
        font-size: 2.1rem;
    }
    .contenedor-buscador {
        order: 4;
        width: 100%;
        max-width: 420px;
        margin: 0 auto;
    }
    #input-buscador {
        flex: 1;
        width: auto;
        min-width: 0;
    }
}

/* ========================================
    ESCRITORIO GRANDE
======================================== */

@media (min-width: 1200px) {

    /* Banner */
    .hero {
        width: 100%;
        height: clamp(700px, 55vw, 980px);
        background-size: cover;
        background-position: center 20%;
        background-repeat: no-repeat;

        margin-bottom: 50px;
    }
    /* Presentación */
    #nosotros {
        max-width: 1000px;
        margin: 0 auto;
        padding: 45px 40px;
    }
    #nosotros p {
        max-width: 800px;
        margin: 12px auto 0;
        line-height: 1.8;
    }
    /* Catálogo */
    #tienda {
        padding-left: 40px;
        padding-right: 40px;
    }
    .productos {
        grid-template-columns:
            repeat(auto-fit, minmax(280px, 320px));
        justify-content: center;
        gap: 32px;
        width: 100%;
        max-width: 1200px;
        margin: 25px auto 0;
    }
    /* Tarjetas */
    .tarjeta-producto {
        width: 100%;
        max-width: 320px;
    }
    .carrusel-imagenes {
        height: 400px;
    }
    /* Header de escritorio */

    header {
        min-height: 110px;
        padding: 20px clamp(40px, 4vw, 90px);
        gap: clamp(25px, 3vw, 55px);
    }
    header h1 {
        flex-shrink: 0;

        font-size: clamp(2.7rem, 3vw, 4rem);
        line-height: 1.2;
    }
    /* Navegación */
    header nav {
        flex-shrink: 0;
    }
    header nav ul {
        gap: 24px;
    }
    header nav ul li a {
        font-size: clamp(1rem, 1vw, 1.15rem);
        font-weight: 600;
    }

    /* Buscador */

    .contenedor-buscador {
        display: flex;
        width: clamp(320px, 25vw, 470px);
    }

    #input-buscador {
        flex: 1;
        min-width: 0;
        width: auto;
        padding: 12px 17px;
        font-size: 0.95rem;
    }

    #btn-buscar {
        padding: 12px 19px;
        font-size: 0.9rem;
    }

    /* Botón del carrito */

    #abrir_carrito {
        flex-shrink: 0;
        padding: 12px 18px;
        font-size: 0.9rem;
    }
}