/* ===== TIPOGRAFÍAS ===== */
body {
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    background-color: #fdf8f3; /* beige cálido */
    color: #3a2c2c;
    font-size: 1rem; /* base */
}

h2, h3 {
    font-family: 'Playfair Display', serif;
    color: #3a2c2c;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== HEADER ===== */
.header {
    background: #fff;
    border-bottom: 0.125rem solid #c5a572;
    display: flex;
    justify-content: space-between; /* logo izquierda, navbar derecha */
    align-items: center;
    padding: 0.5rem 2rem;
    flex-wrap: wrap; /* permite que navbar baje si no hay espacio */
    box-shadow: 0 0.125rem 0.3125rem rgba(0,0,0,0.05);
    height: auto; /* altura según contenido */
    z-index: 1000;
}

.header .logo {
    display: flex;
    align-items: center;
    flex: 0 0 auto; /* no se encoge */
    max-width: 20vw; /* tamaño proporcional al ancho de la pantalla */
}

.header .logo img {
    max-height: 6vh; /* altura proporcional al viewport */
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.header .logo img:hover {
    transform: scale(1.05);
}

.navbar {
    display: flex;
    flex: 1 1 auto; /* ocupa el espacio restante */
    justify-content: flex-end;
    min-width: 150px;
}

.navbar ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.navbar a {
    text-decoration: none;
    color: #3a2c2c;
    font-weight: 600;
    position: relative;
    transition: color 0.3s;
}

.navbar a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 0.125rem;
    bottom: -0.25rem;
    left: 0;
    background: #c5a572;
    transition: width 0.3s ease-in-out;
}

.navbar a:hover::after {
    width: 100%;
}

/* ===== DETALLE DE PRODUCTO ===== */
.detalle-producto {
    max-width: 900px;
    margin: 4rem auto;
    padding: 0 1.25rem;
}

.producto-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 0.3125rem 1rem rgba(0,0,0,0.1);
}

.producto-img {
    width: 100%;
    max-width: 400px;
    border-radius: 1rem;
    object-fit: cover;
    margin-bottom: 2rem;
    transition: transform 0.3s;
}

.producto-img:hover {
    transform: scale(1.05);
}

.producto-info .info {
    text-align: center;
    width: 100%;
}

.producto-info h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.producto-info .descripcion {
    font-size: 0.95rem;
    color: #777;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.producto-info ul {
    list-style: disc;
    padding-left: 1.5rem;
    text-align: left;
    color: #666;
    margin-bottom: 1rem;
}

.producto-info ul li {
    margin-bottom: 0.25rem;
}

/* --- Etiquetas de atributos --- */
.etiquetas {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.etiqueta {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    color: #555;
    background: #f3f3f3;
    padding: 0.3rem 0.7rem;
    border-radius: 1rem;
    border: 1px solid #ddd;
}

/* --- Input cantidad --- */
#cantidad {
    border: none;
    background: transparent;
    outline: none;
    color: #3a2c2c;
    font-size: 1rem;
    width: 60px;
    text-align: center;
}

/* --- Campo de nombre invisible --- */
#nombre {
    border: none;
    background: transparent;
    outline: none;
    color: #3a2c2c;
    font-size: 1rem;
    width: 100%;
    max-width: 250px;
    margin-top: 0.5rem;
    text-align: center;
}

/* --- Botón de pedido --- */
.btn-pedido {
    display: inline-block;
    background: #c5a572;
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 2rem;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-pedido:hover {
    background: #8c6b4f;
    color: #fff;
}

/* --- FOOTER --- */
.footer {
    background: #3a2c2c;
    color: #fdf8f3;
    text-align: center;
    padding: 2rem 1.25rem;
    margin-top: 3rem;
}

.footer a {
    color: #c5a572;
    text-decoration: none;
    margin: 0 0.625rem;
}

.footer a:hover {
    color: #fff;
}

.footer .redes {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer .redes .icono-red {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
    display: block;
    filter: brightness(0) invert(1);
    transition: transform 0.3s, filter 0.3s;
}

.footer .redes .icono-red:hover {
    transform: scale(1.2);
    filter: invert(70%) sepia(30%) saturate(300%) hue-rotate(20deg);
}

/* ===== RESPONSIVE ===== */

/* Tablet y desktop */
@media screen and (min-width: 768px) {
    .producto-info {
        flex-direction: row;
        align-items: flex-start;
        gap: 2rem;
    }

    .producto-img {
        margin-bottom: 0;
    }

    .producto-info .info {
        text-align: left;
    }
}

/* Móviles */
@media screen and (max-width: 767px) {
@media (max-width: 768px) {
    .header {
        flex-direction: column; /* logo arriba, navbar debajo */
        align-items: flex-start;
        padding: 1rem;
    }

    .header .logo {
        max-width: 40vw; /* tamaño proporcional en móviles */
        margin-bottom: 0.5rem;
    }

    .header .logo img {
        max-height: 6vh;
    }

    .navbar {
        width: 100%;
        flex: 1 1 auto;
        justify-content: flex-start; /* menu alineado a la izquierda */
    }

    .navbar ul {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .navbar a {
        display: block;
        width: 100%;
        padding: 0.5rem 0;
        text-align: left;
    }
}

    /* PRODUCTO */
    .producto-info {
        flex-direction: column;
        align-items: center;
        padding: 1rem;
    }

    .producto-img {
        max-width: 90%;
    }

    .producto-info .info {
        text-align: center;
    }

    /* FOOTER */
    .footer .redes {
        flex-direction: column;
        gap: 0.5rem;
    }
}
