/* Normalización básica */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Variables de diseño */
:root {
    /* Colores principales */
    --color-primario: #0b0b0c;
    /* Bordó profundo */
    --color-secundario: #F8F6F4;
    /* Fondo claro */
    --color-acento: #7f1f1f;
    /* Rojo intenso */
    --color-negro: #181818;
    /* Negro profundo */
    --color-card: #efc355;
    --color-card-shadow: rgba(171, 171, 171, 0.1);
    --color-gris: #bdbdbd;
    --color-gris-oscuro: #333;
    --color-footer: #181818;
    --color-blanco: #fff;
    --color-texto: #181818;
    --color-texto-claro: #e9e9e9;


    /* Fuentes */
    --fuente-base: 'El Messiri', 'Georgia', sans-serif;
    --fuente-secundaria: 'Libre Baskerville', serif;
    --font-size-xxxs: 0.6rem;
    --font-size-xxs: 0.875rem;
    --font-size-xs: 1rem;
    --font-size-sm: 1.25rem;
    --font-size-md: 1.5rem;
    --font-size-lg: 1.75rem;
    --font-size-xl: 2.5rem;
    --font-size-xxl: 3.5rem;
    --font-size-xxxl: 5rem;


    /* Espaciados */
    --espaciado-xs: 0.5rem;
    --espaciado-sm: 1rem;
    --espaciado-md: 2vw;
    --espaciado-lg: 3vw;
    --espaciado-xl: 4vw;

    /* Bordes */
    --radio-card: 0.75rem;
    --shadow-card: 0 2px 8px var(--color-card-shadow);
}


/*
 <weight>: Use a value from 400 to 700
 <uniquifier>: Use a unique and descriptive class name

.libre-baskerville-<uniquifier> {
  font-family: "Libre Baskerville", serif;
  font-optical-sizing: auto;
  font-weight: <weight>;
  font-style: normal;
}
  
} */

/* .el-messiri-<uniquifier> {
  font-family: "El Messiri", sans-serif;
  font-optical-sizing: auto;
  font-weight: <weight>;
  font-style: normal;
} */


.libre-baskerville {
    font-family: "Libre Baskerville", serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
}

.el-messiri {
    font-family: "El Messiri", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}



.overley {
    background: linear-gradient(rgba(0, 0, 0, 0.947) 100%), url('imagenes/fondo.PNG');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

}


/* Body y estructura */
body {
    font-family: var(--fuente-base);
    /* Fondo: overlay gradient encima de la imagen hero */
    background: linear-gradient(180deg, #000000b8 42%, #00000095 84%),
        url('imagenes/hero.PNG');
    /* background: linear-gradient(180deg, #000000b8 10%, #00000040 100%), url('imagenes/hero.PNG'); */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--color-texto-claro);
    line-height: 1.6;
    min-height: 100vh;
}

/* 
main.contenido-fijo {
    // Este padding se ajustará con JS 
    // padding-top: 0; 
}
 */


/* Normalización de encabezados */
h2,
h3 {
    font-family: var(--fuente-base);
    text-transform: uppercase;
    color: var(--color-card);
    font-weight: 700;

}

.texto-adornado {
    position: absolute;
    padding: 0 5vw 0vw 5vw;
    bottom: 1vh;
    left: 0;
    width: 100%;
    transition: all 0.5s ease-out;
    animation: fadeInPage 1s ease-out;
}

.texto-adornado h3 {
    font-size: var(--font-size-xxxs);
    color: #b4a6a6c4;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);

}

.texto-adornado.fade-out {
    opacity: 0;
    pointer-events: none;
    /* Evita que el texto invisible interfiera con otros elementos */
}


h1 {
    color: var(--color-texto-claro);
    font-size: var(--font-size-lg);
    margin-bottom: var(--espaciado-sm);
}

h2 {
    font-size: var(--font-size-md);
    margin-bottom: var(--espaciado-xs);
}

h3 {
    font-size: var(--font-size-sm);
    margin-bottom: var(--espaciado-xs);
}

section {
    padding: var(--espaciado-md) var(--espaciado-lg);
    text-align: center;
}

/* Botones */
button {
    background: var(--color-primario);
    color: var(--color-blanco);
    border: none;
    padding: var(--espaciado-xs) var(--espaciado-md);
    font-size: var(--font-size-sm);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-weight: 600;
}

button:hover,
.botones-navegacion button:hover {
    background: var(--color-acento);
    color: var(--color-primario);
}

/* Barra de navegación */
.barra-navegacion {
    width: 100%;
    background: rgba(0, 0, 0, 0);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--espaciado-xs) var(--espaciado-sm);
    transition: box-shadow 0.2s;
    position: relative;
}

/* .barra-fija {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 1000;
    box-shadow: 0 2px 8px var(--color-card-shadow);
} */

.logo {
    display: flex;
    align-items: center;
    gap: var(--espaciado-xs);
    color: var(--color-blanco);
    font-weight: bold;
    font-size: var(--font-size-sm);
    margin-bottom: var(--espaciado-xs);

}

.logo img {
    width: 10.5rem;
    height: 10.5rem;

    border-radius: 50%;
}

.botones-navegacion {
    display: flex;
    gap: var(--espaciado-xs);
}

.botones-navegacion button {
    background: var(--color-blanco);
    color: var(--color-primario);
    border: none;
    padding: var(--espaciado-xs) var(--espaciado-sm);
    border-radius: 0.5rem;
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-weight: 600;

}

/* Hero y Carrusel */
.seccion-hero {
    background-color: transparent;
    /* height: 500px; */
    color: var(--color-blanco);
    padding: 5vw var(--espaciado-sm) var(--espaciado-md) var(--espaciado-sm);
    text-align: center;
    position: relative;
    top: 0;
    left: 0;
    min-height: calc(100vh - 33vh);

}

.contenedor-hero h1 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--espaciado-xs);

    max-width: 80vw;
    margin-left: auto;
    margin-right: auto;
}

.contenedor-hero p {
    font-family: var(--fuente-base);
    font-size: var(--font-size-xs);
    margin-bottom: var(--espaciado-sm);
    color: var(--color-card);
    max-width: 70vw;
    margin-left: auto;
    margin-right: auto;
}

.carrusel-imagenes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--espaciado-xs);
    position: relative;
}

.carrusel-imagen {
    width: 90vw;
    max-width: 22rem;
    height: 10rem;
    overflow: hidden;
    border-radius: var(--radio-card);
    box-shadow: var(--shadow-card);
    background: var(--color-card);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carrusel-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carrusel-anterior,
.carrusel-siguiente {
    background: var(--color-primario);
    color: var(--color-blanco);
    border: none;
    font-size: var(--font-size-lg);
    padding: 0.3rem 1rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 1;
}

.carrusel-anterior:hover,
.carrusel-siguiente:hover {
    background: var(--color-acento);
    color: var(--color-primario);
}


.posicion-fixed {
    position: fixed;

    bottom: 12vh;
    right: 1%;
    z-index: 1000;
    background-color: #2cc748;
    border-radius: 50%;
    box-shadow: -7px 7px 20px rgba(0, 0, 0, 1.2);
    /*     border-style: solid;
    border-color: #000000; */
}

.posicion-fixed .fixed-icon {
    width: 60px;
    height: 60px;
    padding: 5px;


}



/* Sección de Presentación */

.seccion-presentacion {
    padding-top: 15vh;
    padding-bottom: 10vw;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.818) 0%,
            rgba(0, 0, 0, 0.6) 50%,
            rgba(0, 0, 0, 0.2) 80%,
            transparent 100%);
    /*   box-shadow: 0px -60px 65px rgba(0, 0, 0, 0.60); */
}

.seccion-presentacion h2,
.seccion-presentacion p {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.seccion-presentacion .is-visible {
    opacity: 1;
    transform: translateY(0);
}

.seccion-presentacion h2 {
    font-family: 'Libre Baskerville', serif;
    font-size: var(--font-size-md);

    margin-bottom: var(--espaciado-xl);
    color: var(--color-card);
}

.seccion-presentacion p {

    font-size: var(--font-size-sm);
    max-width: 70vw;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
}


.cta-button {
    display: inline-block;
    background-color: var(--color-acento);
    color: var(--color-blanco);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
    margin-top: 1rem;
}


.cta-button:hover {
    background-color: var(--color-card);
    color: var(--color-primario);
}

/* Cards productos y ofertas */
.seccion-productos {
    background-color: rgba(0, 0, 0, 0.837);
}

.contenedor-tarjetas,
.contenedor-ofertas {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
    justify-items: center;
    align-items: center;
    width: 100%;

    padding: var(--espaciado-md);

}

.tarjeta-producto,
.oferta-producto {
    background: var(--color-card);
    border-radius: var(--radio-card);
    box-shadow: 0 2px 12px var(--color-card-shadow);
    padding: 1.2rem 1rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    height: 100%;
    max-width: 25rem;
}

.tarjeta-producto img,
.oferta-producto img {
    width: 100%;
    height: 15rem;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.tarjeta-producto h3,
.oferta-producto h3 {
    margin: var(--espaciado-xs) 0 var(--espaciado-lg);
    font-size: 1.1rem;
    color: var(--color-acento);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.tarjeta-producto p {
    color: var(--color-negro);
    font-size: 0.95rem;
}

.precios {
    margin-bottom: 0.5rem;
}

.precio-descuento {
    color: var(--color-primario);
    font-size: 1.2rem;
    font-weight: bold;
    margin-right: 0.7rem;
}

.precio-real {
    color: var(--color-gris-oscuro);
    font-size: 1rem;
    /* Por defecto dejamos el estilo neutro; se especifica por sección abajo */
    text-decoration: none;
}

/* En la sección de ofertas queremos mostrar el precio real tachado (precio anterior) */
.seccion-ofertas .precio-real {
    text-decoration: line-through;
    color: var(--color-gris-oscuro);
}

/* En la sección de productos mostramos el precio real como precio principal (sin tachado) */
.seccion-productos .precio-real {
    text-decoration: none;
    color: var(--color-primario);
    font-weight: 700;
}

.tarjeta-producto:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 6px 24px var(--color-card-shadow);
    border-color: var(--color-acento);
}

.oferta-producto:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 4px 16px var(--color-card-shadow);
}

/* Ofertas */
.seccion-ofertas {
    background: #FFF8E1;
}

.contenedor-ofertas {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
    justify-items: center;
}

@media (min-width: 600px) {
    .contenedor-ofertas {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 900px) {
    .contenedor-ofertas {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

@media (min-width: 1200px) {
    .contenedor-ofertas {
        grid-template-columns: repeat(4, 1fr);
        gap: 2.5rem;
    }
}

/* Footer */
footer {
    background: var(--color-footer);
    color: var(--color-blanco);
    text-align: center;
    padding: var(--espaciado-xs) 0;
    font-size: var(--font-size-xs);
    position: relative;
    bottom: 0;
    width: 100%;
}

/* Redes sociales */
.seccion-redes {
    padding: 2rem 1rem;
    text-align: center;
    background-color: #050504;
}

.contenedor-redes {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.icono-red {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    /*  border-radius: 8px; */
    transition: transform 0.3s ease;
}

.icono-red:hover {
    transform: translateY(-5px);
}

.icono-red svg {
    width: 40px;
    height: 40px;
}

.seccion-contacto {
    background-color: #050504;

    /*  padding: var(--espaciado-md) var(--espaciado-lg);
    text-align: center;
    color: var(--color-blanco); */
}


@media(min-width: 500px) {
    .seccion-hero {
        padding: var(--espaciado-md) var(--espaciado-md) var(--espaciado-lg) var(--espaciado-md);
    }

    .contenedor-hero h1 {
        font-size: var(--font-size-xl);
        margin-bottom: var(--espaciado-xs);

        max-width: 70vw;
        margin-left: auto;
        margin-right: auto;
    }

    .contenedor-hero h2 {
        font-size: var(--font-size-lg);
    }

    .contenedor-hero p {
        font-size: var(--font-size-sm);
    }

    .seccion-presentacion h2 {
        font-family: 'Libre Baskerville', serif;
        font-size: var(--font-size-lg);

        margin-bottom: var(--espaciado-xl);
        color: var(--color-card);
    }
}

/* Desktop */
@media (min-width: 768px) {
    h1 {
        font-size: var(--font-size-xxl);
    }

    h2 {
        font-size: var(--font-size-xl);
    }

    .barra-navegacion {
        /*  flex-direction: row; */
        justify-content: space-between;
        padding: var(--espaciado-xs) var(--espaciado-lg);
    }

    .logo {
        margin-bottom: 0;
        font-size: var(--font-size-md);
    }

    .botones-navegacion {
        gap: var(--espaciado-md);
    }

    .seccion-hero {
        padding: var(--espaciado-md) var(--espaciado-md) var(--espaciado-lg) var(--espaciado-md);
    }

    .contenedor-hero h1 {
        font-size: var(--font-size-xl);
        margin-bottom: var(--espaciado-xs);

        max-width: 70vw;
        margin-left: auto;
        margin-right: auto;
    }

    .contenedor-hero h2 {
        font-size: var(--font-size-lg);
    }

    .texto-adornado h3 {
        font-size: var(--font-size-xs);
        color: #b4a6a6c4;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    }

    .contenedor-hero p {
        font-size: var(--font-size-md);
    }

    .seccion-presentacion h2 {
        font-family: 'Libre Baskerville', serif;
        font-size: var(--font-size-xl);

        margin-bottom: var(--espaciado-md);
        color: var(--color-card);
    }

    .seccion-presentacion p {

        font-size: var(--font-size-lg);

    }

    .carrusel-imagen {
        width: 25rem;
        height: 13rem;
    }

    .contenedor-tarjetas,
    .contenedor-ofertas {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .tarjeta-producto,
    .oferta-producto {

        max-width: 22rem;
    }

    .tarjeta-producto img,
    .oferta-producto img {
        height: 15rem;
    }

    .oferta-producto img {
        height: 10rem;
    }

    .tarjeta-producto h3,
    .oferta-producto h3 {
        font-size: var(--font-size-md);
    }

    .precio-descuento {
        font-size: var(--font-size-lg);
    }

    .precio-real {
        font-size: var(--font-size-md);
    }
}

@media (min-width: 900px) {

    .seccion-hero {
        padding: var(--espaciado-lg) var(--espaciado-md) var(--espaciado-lg) var(--espaciado-md);
    }

    .contenedor-hero h1 {
        font-size: var(--font-size-xxl);
        margin-bottom: var(--espaciado-xs);

        max-width: 70vw;
        margin-left: auto;
        margin-right: auto;
    }

    .contenedor-tarjetas,
    .contenedor-ofertas {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }

    .tarjeta-producto,
    .oferta-producto {

        max-width: 25rem;
    }
}

@media (min-width: 1200px) {

    .contenedor-tarjetas,
    .contenedor-ofertas {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
}

@media (max-width: 600px) {

    .contenedor-redes {
        gap: var(--espaciado-sm);
    }

    .icono-red svg {
        width: 32px;
        height: 32px;

    }

}

/* Animación de entrada (Fade In) al cargar la página */
@keyframes fadeInPage {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media query de altura: Reduce el logo y fuentes en pantallas con poca altura */
@media (max-height: 500px) {
    .logo img {
        width: 30vh;
        height: 30vh;
    }

    .seccion-hero {
        padding: 2vh var(--espaciado-md) var(--espaciado-lg) var(--espaciado-md);
    }

    .contenedor-hero h1 {
        font-size: var(--font-size-xl);
    }

}