* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    min-height: 100vh;
    margin: 0;

    display: flex;
    flex-direction: column;

    background: #fff;
    color: #000;
    font-family: "Inter", sans-serif;
}

main {
    flex: 1 0 auto;
}


/* =========================
   HEADER
   ========================= */

.site-header {
    position: relative;

    width: 100%;
    height: 86px;
    padding: 0 24px;

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

    background: #000;
    color: #fff;
}

.site-title {
    color: #fff;
    text-decoration: none;

    font-family: "Inter", sans-serif;
    font-size: 58px;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.site-nav a,
.nav-dropdown-button {
    color: #fff;
    text-decoration: none;

    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.site-nav a:hover,
.site-title:hover,
.nav-dropdown-button:hover {
    color: #ff0000;
}


/* =========================
   MOBILE MENU
   ========================= */

.mobile-menu-button {
    display: none;

    width: 32px;
    height: 32px;

    margin: 0;
    padding: 4px 0;

    border: 0;
    background: transparent;

    flex-direction: column;
    justify-content: space-between;

    cursor: pointer;
}

.mobile-menu-button span {
    display: block;

    width: 100%;
    height: 2px;

    background: #fff;
}

.mobile-menu {
    display: none;
}


/* =========================
   MOBILE INSTAGRAM
   ========================= */

.mobile-instagram {
    display: none;
}


/* =========================
   MOBILE PUBLICACIONES
   ========================= */

.mobile-publicaciones {
    display: flex;
    flex-direction: column;
}

.mobile-publicaciones-button {
    display: block;

    width: 100%;

    margin: 0;
    padding: 10px 16px;

    border: 0;
    background: transparent;

    color: #fff;

    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-align: left;

    cursor: pointer;
}

.mobile-publicaciones-button:hover {
    color: #ff0000;
}

.mobile-categorias {
    display: none;
    flex-direction: column;

    padding: 0 0 6px 16px;
}

.mobile-categorias.abierto {
    display: flex;
}

.mobile-categorias a {
    display: block;

    padding: 7px 16px;

    color: #fff;
    text-decoration: none;

    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.mobile-categorias a:hover {
    color: #ff0000;
}


/* =========================
   PUBLICACIONES DROPDOWN DESKTOP
   ========================= */

.nav-publicaciones {
    position: relative;
}

.nav-dropdown-button {
    margin: 0;
    padding: 0;

    border: 0;
    background: none;

    cursor: pointer;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 16px);
    right: 0;
    z-index: 10;

    min-width: 150px;

    display: none;
    flex-direction: column;

    padding: 12px 0;

    background: #000;
    border: 1px solid #fff;
}

.nav-dropdown.abierto {
    display: flex;
}

.nav-dropdown a {
    display: block;

    padding: 8px 16px;

    color: #fff;
    white-space: nowrap;
}

.nav-dropdown a:hover {
    color: #ff0000;
}


/* =========================
   PRODUCT GRID
   ========================= */

.publicaciones {
    width: 100%;
    padding: 24px;
}

.grid {
    width: 100%;

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 40px 24px;
}


/* =========================
   PRODUCT
   ========================= */

.producto {
    min-width: 0;
}

.producto a {
    display: block;
    color: #000;
    text-decoration: none;
}

.producto-imagen {
    width: 100%;
    aspect-ratio: 1 / 1;

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

    background: #fff;

    overflow: hidden;
}

.producto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.producto-imagen span {
    color: #000;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.producto h2 {
    margin: 12px 0 0;

    color: #000;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.producto p {
    margin: 5px 0 0;

    color: #000;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
}

.producto a:hover h2,
.producto a:hover p {
    color: #ff0000;
}


/* =========================
   PRODUCT DETAIL
   ========================= */

.producto-detalle {
    width: 100%;
    padding: 24px;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
}


/* =========================
   GALLERY
   ========================= */

.producto-galeria {
    width: 100%;

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

.galeria-imagen {
    position: relative;

    width: 100%;
    height: calc(100vh - 180px);

    min-height: 240px;

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

    background: #fff;

    overflow: hidden;
}

.galeria-imagen > img {
    width: auto;
    height: auto;

    max-width: 100%;
    max-height: 100%;

    display: block;

    object-fit: contain;
}

.galeria-placeholder {
    width: 100%;
    height: 100%;

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

    color: #000;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
}


/* =========================
   GALLERY ARROWS
   ========================= */

.galeria-flecha {
    position: absolute;
    top: 50%;
    z-index: 2;

    width: 32px;
    height: 32px;

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

    transform: translateY(-50%);

    padding: 0;

    border: 0;
    background: rgba(255, 255, 255, 0.9);

    color: #000;

    font-family: "Inter", sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;

    cursor: pointer;
}

.galeria-flecha-izquierda {
    left: 0;
}

.galeria-flecha-derecha {
    right: 0;
}

.galeria-flecha:hover {
    background: #ff0000;
    color: #fff;
}


/* =========================
   PRODUCT INFO
   ========================= */

.producto-info {
    width: 100%;
    padding-top: 0;
}

.producto-info h1 {
    margin: 0;

    color: #000;

    font-size: 32px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.producto-precio {
    margin: 10px 0 0;

    color: #000;

    font-size: 18px;
    font-weight: 400;
    line-height: 1.2;
}

.producto-descripcion {
    max-width: 520px;
    margin-top: 36px;

    color: #000;

    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

.producto-descripcion p {
    margin: 0;
}


/* =========================
   INFORMATION PAGES
   ========================= */

.pagina-informacion {
    width: 100%;
    padding: 24px;
}

.pagina-informacion h1 {
    margin: 0;

    color: #000;

    font-size: 32px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.pagina-contenido {
    max-width: 700px;
    margin-top: 36px;

    color: #000;

    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}


/* =========================
   ABOUT
   ========================= */

.about-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
}

.about-texto {
    min-width: 0;
}

.about-imagen {
    width: 100%;
    height: calc(100vh - 134px);
    overflow: hidden;
}

.about-imagen img {
    width: 100%;
    height: 100%;
    display: block;

    object-fit: contain;
    object-position: center;
}


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

.site-footer {
    width: 100%;
    height: 172px;

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

    background: #000;
}

.footer-instagram {
    display: none;

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

    width: 24px;
    height: 24px;

    color: #fff;
    text-decoration: none;
}

.footer-instagram svg {
    width: 22px;
    height: 22px;

    display: block;
}

.footer-instagram:hover {
    color: #ff0000;
}


/* =========================
   TABLET / MOBILE
   ========================= */

@media (max-width: 700px) {

    .site-header {
        height: 80px;
        padding: 0 16px;

        justify-content: flex-start;
        gap: 14px;
    }

    .mobile-menu-button {
        display: flex;
        flex: 0 0 auto;
    }

    .site-title {
        font-size: 34px;
        font-weight: 700;
        letter-spacing: 0.01em;
    }

    .site-nav {
        display: none;
    }

    .mobile-instagram {
        display: flex;
        align-items: center;
        justify-content: center;

        width: 22px;
        height: 22px;

        margin-left: auto;

        color: #fff;
        text-decoration: none;
    }

    .mobile-instagram svg {
        width: 20px;
        height: 20px;
        display: block;
    }

    .mobile-instagram:hover {
        color: #ff0000;
    }

    .mobile-menu {
        position: absolute;
        top: 80px;
        left: 16px;
        z-index: 20;

        width: 210px;

        display: none;
        flex-direction: column;

        padding: 12px 0;

        background: #000;
        border: 1px solid #fff;
    }

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

    .mobile-menu > a {
        display: block;

        padding: 10px 16px;

        color: #fff;
        text-decoration: none;

        font-family: "Inter", sans-serif;
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 0.01em;
    }

    .mobile-menu > a:hover {
        color: #ff0000;
    }

    .publicaciones {
        padding: 16px;
    }

    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px 12px;
    }

    .producto h2 {
        font-size: 14px;
    }

    .producto p {
        font-size: 12px;
    }


    /* PRODUCT DETAIL */

    .producto-detalle {
        padding: 16px;

        grid-template-columns: 1fr;
        gap: 32px;
    }

    .producto-info h1 {
        font-size: 26px;
    }

    .producto-precio {
        font-size: 15px;
    }

    .producto-descripcion {
        margin-top: 28px;

        font-size: 14px;
        line-height: 1.5;
    }


    /* GALLERY */

    .galeria-imagen {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;

        min-height: 0;

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

    .galeria-imagen > img {
        width: auto !important;
        height: 100% !important;

        max-width: 100% !important;
        max-height: 100% !important;

        display: block;
        object-fit: contain;
    }


    /* GALLERY ARROWS */

    .galeria-flecha {
        width: 30px;
        height: 30px;

        font-size: 18px;
    }

    .galeria-flecha-izquierda {
        left: 0;
    }

    .galeria-flecha-derecha {
        right: 0;
    }


    /* INFORMATION PAGES */

    .pagina-informacion {
        padding: 16px;
    }

    .pagina-informacion h1 {
        font-size: 26px;
    }

    .pagina-contenido {
        margin-top: 28px;

        font-size: 14px;
        line-height: 1.5;
    }


    /* ABOUT */

    .about-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about-imagen {
        height: auto;
    }

    .about-imagen img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }


    /* FOOTER */

    .site-footer {
        height: 160px;
    }

    .footer-instagram {
        display: flex;
    }
}
@media (max-width: 700px) {
    .producto-galeria {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .producto-galeria .galeria-imagen {
        width: 100%;
        flex: 0 0 auto;
    }

    .producto-galeria .galeria-contador {
        display: block;
        position: static;
        width: 100%;
        flex: 0 0 auto;
        box-sizing: border-box;
        text-align: center;
        margin: 10px 0 0;
    }
}

/* Animación suave de entrada del catálogo */
@keyframes chacal-aparecer {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.producto {
    animation: chacal-aparecer 450ms ease-out both;
}

.producto:nth-child(4n+1) {
    animation-delay: 0ms;
}

.producto:nth-child(4n+2) {
    animation-delay: 65ms;
}

.producto:nth-child(4n+3) {
    animation-delay: 130ms;
}

.producto:nth-child(4n+4) {
    animation-delay: 195ms;
}

/* En móvil, el efecto se alterna entre las dos columnas */
@media (max-width: 700px) {
    .producto:nth-child(odd) {
        animation-delay: 0ms;
    }

    .producto:nth-child(even) {
        animation-delay: 90ms;
    }
}

/* Respetar la preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .producto {
        animation: none;
    }
}
