/* ==========================================
   AJUSTES GENERALES
========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    color: #171717;
    background-color: #f7f7f5;

    font-family: "Inclusive Sans", sans-serif;
    font-weight: 300;

    overflow-x: hidden;
}

body.viewer-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    color: inherit;
    font: inherit;

    background: none;
    border: none;

    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}


/* ==========================================
   PÁGINA
========================================== */

.product-page {
    position: relative;

    width: 100%;
    min-height: 100vh;

    padding:
        55px
        clamp(45px, 6vw, 100px)
        150px;
}


/* ==========================================
   PUNTOS DECORATIVOS
========================================== */

.decorative-dot {
    position: absolute;

    z-index: 5;

    width: 15px;
    height: 15px;

    background-color: #c8c2b9;
    border-radius: 50%;

    pointer-events: none;
}

.dot-top-left {
    top: 35px;
    left: 30px;
}

.dot-top-center {
    top: 35px;
    left: 50%;

    transform: translateX(-50%);
}

.dot-top-right {
    top: 35px;
    right: 30px;
}

.dot-left-one {
    top: 33%;
    left: 30px;
}

.dot-right-one {
    top: 33%;
    right: 30px;
}

.dot-left-two {
    top: 58%;
    left: 30px;
}

.dot-right-two {
    top: 58%;
    right: 30px;
}

.dot-left-three {
    top: 82%;
    left: 30px;
}

.dot-right-three {
    top: 82%;
    right: 30px;
}


/* ==========================================
   FLECHA
========================================== */

.back-button {
    position: absolute;

    top: 45px;
    left: 60px;

    z-index: 10;

    width: 48px;
    height: 48px;

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

    font-family: "Inclusive Sans", sans-serif;
    font-size: 48px;
    font-weight: 300;
    line-height: 1;

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.back-button:hover {
    opacity: 0.55;
    transform: translateX(-5px);
}


/* ==========================================
   MENÚ
========================================== */

.main-menu {
    position: absolute;

    top: 60px;
    right: 60px;

    z-index: 10;

    display: flex;
    flex-direction: column;
    align-items: flex-end;

    gap: 2px;
}

.main-menu a {
    font-family: "Inclusive Sans", sans-serif;
    font-size: 20px;
    font-weight: 300;
    line-height: 1;

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.main-menu a:hover {
    opacity: 0.55;
    transform: translateX(-3px);
}

.main-menu .active {
    color: #9a3d3d;
}


/* ==========================================
   TÍTULO
========================================== */

.product-header {
    width: min(1170px, 88%);

    margin:
        130px
        auto
        85px;
}

.product-header h1 {
    font-family: "Cormorant Garamond", serif;
    font-size: 96px;
    font-weight: 600;
    line-height: 0.9;

    text-align: center;
}


/* ==========================================
   GALERÍA DE PRODUCTO
========================================== */

.product-gallery {
    width: min(1170px, 88%);

    margin: 0 auto;

    display: grid;

    grid-template-columns:
        minmax(0, 623px)
        minmax(0, 351px);

    grid-template-areas:
        "foto1 foto2"
        "foto3 foto4"
        "foto5 foto4"
        "foto5 foto6"
        "foto7 foto6";

    justify-content: space-between;
    align-items: start;

    column-gap: clamp(70px, 10vw, 170px);
    row-gap: 70px;
}


/* ==========================================
   FOTOGRAFÍAS
========================================== */

.product-photo {
    position: relative;

    margin: 0;

    overflow: hidden;

    background-color: #c6c6c6;

    cursor: zoom-in;
}

.product-photo img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.35s ease;
}

.product-photo:hover img {
    transform: scale(1.025);
}


/* Imagen 1 — 623 × 811 */

.photo-1 {
    grid-area: foto1;

    width: min(100%, 623px);
    aspect-ratio: 623 / 811;
}


/* Imagen 2 — 351 × 450 */

.photo-2 {
    grid-area: foto2;

    width: min(100%, 351px);
    aspect-ratio: 351 / 450;

    justify-self: end;
}


/* Imagen 3 — 523 × 320 */

.photo-3 {
    grid-area: foto3;

    width: min(100%, 523px);
    aspect-ratio: 523 / 320;

    justify-self: start;
}


/* Imagen 4 — 351 × 450 */

.photo-4 {
    grid-area: foto4;

    width: min(100%, 351px);
    aspect-ratio: 351 / 450;

    justify-self: end;
}


/* Imagen 5 — 523 × 320 */

.photo-5 {
    grid-area: foto5;

    width: min(100%, 523px);
    aspect-ratio: 523 / 320;

    justify-self: start;
}


/* Imagen 6 — 351 × 450 */

.photo-6 {
    grid-area: foto6;

    width: min(100%, 351px);
    aspect-ratio: 351 / 450;

    justify-self: end;
}


/* Imagen 7 — 431 × 580 */

.photo-7 {
    grid-area: foto7;

    width: min(100%, 431px);
    aspect-ratio: 431 / 580;

    justify-self: start;
}


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

.site-footer {
    position: relative;
    z-index: 3;

    width: min(1400px, calc(100% - 120px));

    margin: 40px auto 0;
    padding: 48px 0 55px;

    display: grid;
    grid-template-columns: 1fr 1fr 1fr;

    align-items: start;

    background: transparent;

    border-top: 1px solid rgba(23, 23, 23, 0.18);

    color: #111111;
}


/* IZQUIERDA */

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 58px;
}

.footer-brand > a:first-child {
    font-family: "Inclusive Sans", sans-serif;
    font-size: 20px;
    font-weight: 300;

    color: #111111;
}

.footer-brand i {
    font-size: 18px;
    color: #111111;
}


/* CENTRO */

.footer-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 18px;

    justify-self: center;
}

.footer-menu a {
    font-family: "Inclusive Sans", sans-serif;
    font-size: 15px;
    font-weight: 300;

    color: #111111;
}


/* DERECHA */

.footer-contact {
    justify-self: center;
    align-self: start;
}

.footer-contact a {
    font-family: "Inclusive Sans", sans-serif;
    font-size: 15px;
    font-weight: 300;

    color: #111111;
}


/* HOVER */

.footer-brand a,
.footer-menu a,
.footer-contact a {
    transition: opacity 0.3s ease;
}

.footer-brand a:hover,
.footer-menu a:hover,
.footer-contact a:hover {
    opacity: 0.55;
}


/* ==========================================
   VISOR EDITORIAL
========================================== */

.gallery-viewer {
    position: fixed;
    inset: 0;

    z-index: 2000;

    width: 100%;
    height: 100vh;

    overflow: hidden;

    color: #171717;
    background-color: #f7f7f5;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.35s ease,
        visibility 0.35s ease;
}

.gallery-viewer.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* Puntos del visor */

.viewer-dot {
    position: fixed;

    z-index: 2002;

    width: 15px;
    height: 15px;

    background-color: #c8c2b9;
    border-radius: 50%;

    pointer-events: none;
}

.viewer-dot-top-left {
    top: 35px;
    left: 30px;
}

.viewer-dot-top-center {
    top: 35px;
    left: 50%;

    transform: translateX(-50%);
}

.viewer-dot-top-right {
    top: 35px;
    right: 30px;
}

.viewer-dot-left-center {
    top: 55%;
    left: 30px;
}

.viewer-dot-right-center {
    top: 55%;
    right: 30px;
}

.viewer-dot-bottom-left {
    bottom: 30px;
    left: 30px;
}

.viewer-dot-bottom-right {
    right: 30px;
    bottom: 30px;
}


/* Flecha del visor */

.viewer-back {
    position: fixed;

    top: 45px;
    left: 60px;

    z-index: 2003;

    width: 48px;
    height: 48px;

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

    font-size: 48px;
    font-weight: 300;
    line-height: 1;

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.viewer-back:hover {
    opacity: 0.55;
    transform: translateX(-5px);
}


/* Menú del visor */

.viewer-menu {
    position: fixed;

    top: 60px;
    right: 60px;

    z-index: 2003;

    display: flex;
    flex-direction: column;
    align-items: flex-end;

    gap: 2px;
}

.viewer-menu a {
    font-family: "Inclusive Sans", sans-serif;
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
}

.viewer-menu a:hover {
    opacity: 0.55;
}

.viewer-menu .active {
    color: #9a3d3d;
}


/* Distribución del visor */

.viewer-layout {
    width: min(1120px, 78%);
    height: 100vh;

    margin: 0 auto;
    padding: 125px 0 70px;

    display: grid;
    grid-template-columns:
        minmax(350px, 600px)
        minmax(190px, 300px);

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

    column-gap: clamp(80px, 10vw, 170px);
}


/* Imagen principal */

.viewer-current {
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.viewer-main-image {
    width: 100%;
    max-height: 72vh;

    object-fit: contain;

    opacity: 0;
    transform: translateY(12px);

    transition:
        opacity 0.35s ease,
        transform 0.35s ease;
}

.gallery-viewer.is-open .viewer-main-image {
    opacity: 1;
    transform: translateY(0);
}


/* Contador */

.viewer-counter {
    margin-top: 22px;

    font-family: "Cormorant Garamond", serif;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.08em;
}


/* Siguiente imagen */

.viewer-preview {
    width: 100%;
}

.viewer-next-label {
    margin-bottom: 13px;

    font-family: "Cormorant Garamond", serif;
    font-size: 18px;
    font-weight: 500;
}

.viewer-next {
    width: 100%;

    opacity: 0;
    transform: translateX(18px);

    transition:
        opacity 0.4s ease 0.1s,
        transform 0.4s ease 0.1s;
}

.gallery-viewer.is-open .viewer-next {
    opacity: 1;
    transform: translateX(0);
}

.viewer-next img {
    width: 100%;
    max-height: 48vh;

    object-fit: contain;

    transition: opacity 0.3s ease;
}

.viewer-next:hover img {
    opacity: 0.7;
}


/* Botón cerrar */

.viewer-close {
    position: fixed;

    right: 60px;
    bottom: 42px;

    z-index: 2003;

    width: 48px;
    height: 48px;

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

    font-family: "Inclusive Sans", sans-serif;
    font-size: 42px;
    font-weight: 300;

    transition: transform 0.3s ease;
}

.viewer-close:hover {
    transform: rotate(90deg);
}


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

@media (max-width: 1000px) {

    .product-gallery {
        width: 84%;

        grid-template-columns:
            minmax(0, 1.4fr)
            minmax(0, 0.8fr);

        column-gap: 55px;
        row-gap: 55px;
    }

    .product-header h1 {
        font-size: 82px;
    }

    .viewer-layout {
        width: 78%;

        grid-template-columns:
            minmax(280px, 1fr)
            minmax(170px, 220px);

        column-gap: 50px;
    }

}


/* ==========================================
   CELULAR
========================================== */

@media (max-width: 720px) {

    .product-page {
        padding:
            35px
            24px
            100px;
    }

    .back-button {
        top: 35px;
        left: 24px;

        font-size: 40px;
    }

    .main-menu {
        top: 45px;
        right: 24px;
    }

    .main-menu a {
        font-size: 16px;
    }

    .product-header {
        width: 100%;

        margin:
            145px
            auto
            65px;
    }

    .product-header h1 {
        font-size: 68px;
    }

    .product-gallery {
        width: 100%;

        display: flex;
        flex-direction: column;

        gap: 40px;
    }

    .product-photo,
    .photo-1,
    .photo-2,
    .photo-3,
    .photo-4,
    .photo-5,
    .photo-6,
    .photo-7 {
        width: min(100%, 520px);

        margin: 0 auto;
    }

    .dot-left-one,
    .dot-right-one,
    .dot-left-two,
    .dot-right-two,
    .dot-left-three,
    .dot-right-three {
        display: none;
    }

    .site-footer {
        width: calc(100% - 48px);

        margin-top: 95px;

        grid-template-columns: 1fr 1fr;

        gap: 40px;
    }

    .footer-menu {
        display: none;
    }

    /* Visor móvil */

    .viewer-menu {
        top: 45px;
        right: 24px;
    }

    .viewer-menu a {
        font-size: 16px;
    }

    .viewer-back {
        top: 35px;
        left: 24px;

        font-size: 40px;
    }

    .viewer-layout {
        width: 72%;
        height: 100vh;

        padding: 140px 0 75px;

        display: flex;
        flex-direction: column;
        justify-content: center;

        gap: 30px;
    }

    .viewer-current {
        align-items: center;
    }

    .viewer-main-image {
        max-height: 55vh;
    }

    .viewer-counter {
        align-self: flex-end;
    }

    .viewer-preview {
        width: min(180px, 60%);

        align-self: flex-end;
    }

    .viewer-next img {
        max-height: 22vh;
    }

    .viewer-close {
        right: 24px;
        bottom: 24px;
    }

}


/* ==========================================
   PANTALLAS PEQUEÑAS
========================================== */

@media (max-width: 420px) {

    .main-menu a,
    .viewer-menu a {
        font-size: 14px;
    }

    .product-header h1 {
        font-size: 56px;
    }

    .viewer-layout {
        width: 70%;
    }

}