@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap');

/* ======================================================
   RESET
====================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

/* ======================================================
   BASE
====================================================== */

body {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    color: rgba(0, 0, 0, 0.85);
    background: #fff;
}

/* ======================================================
   LINKS
====================================================== */

a {
    color: rgba(0, 0, 0, 0.85);
    text-decoration: none;
}

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

.header {
    position: relative;
    width: 100%;
    height: 50px;
    margin-top: 55px;

    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.header__logo img {
    height: 120px;
    display: block;
}

.header__menu-left,
.header__menu-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9pt;
    font-weight: 500;
}

.header__menu-left { left: 25px; }
.header__menu-right { right: 25px; text-align: right; }

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ======================================================
   MAIN
====================================================== */

main {
    width: 100%;
    padding: 6rem 0;
}

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

.garments-header {
    text-align: center;
    margin-bottom: 5rem;
}

.garments-header h1 {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.garments-header p {
    font-size: 0.8rem;
    max-width: 630px;
    margin: 1rem auto 0;
    line-height: 1.5;
}

/* ======================================================
   GARMENTS GRID
====================================================== */

.garments-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6rem 4rem;
}

/* ======================================================
   GARMENT CARD
====================================================== */

.garment {
    text-align: center;
}

/* ======================================================
   GARMENT IMAGE — GRID ONLY
====================================================== */

.garment-image {
    width: 100%;
    aspect-ratio: 3 / 4;

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

    background: #f5f5f3;
    padding: 2rem;
    overflow: hidden;
}

/* 🔒 GRID IMAGE RULES — NEVER TOUCH LIGHTBOX */
.garments-grid .garment-image img {
    width: auto;
    height: 120%;
    max-width: 120%;
    max-height: 120%;

    object-fit: contain;
    transform: scale(var(--scale, 1));
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.garment:hover .garment-image img {
    opacity: 0.75;
}

/* ======================================================
   GARMENT TEXT
====================================================== */

.garment-title {
    margin-top: 1.2rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.garment-meta {
    margin-top: 0.3rem;
    font-size: 0.65rem;
    opacity: 0.7;
}

/* ======================================================
   LIGHTBOX — HARD RESET (FINAL)
====================================================== */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);

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

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 9999;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-image-wrapper {
    width: 50vw;
    height: 90vh;

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

    overflow: hidden;
}

/* 🚨 THIS IS THE FIX */
.lightbox-image-wrapper img {
    width: 120%;
    height: 120%;

    object-fit: contain;

    transform: scale(1);
    transform-origin: center center;

    transition: transform 0.2s ease;
    cursor: zoom-in;

    user-select: none;
    -webkit-user-drag: none;
}

/* ======================================================
   LIGHTBOX NAV
====================================================== */

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    background: none;
    border: none;
    font-size: 2.5rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 1rem;
    z-index: 10001;
}

.lightbox-arrow.prev { left: 30px; }
.lightbox-arrow.next { right: 30px; }

/* ======================================================
   LIGHTBOX ZOOM BUTTONS
====================================================== */

.lightbox-zoom {
    position: absolute;
    bottom: 30px;
    right: 30px;
    display: flex;
    gap: 12px;
    z-index: 10001;
}

.lightbox-zoom button {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.9);
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    cursor: pointer;
}

/* ======================================================
   RESPONSIVE
====================================================== */

@media (max-width: 1024px) {
    .garments-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        height: 100px;
        margin-top: 30px;
    }

    .header__logo img {
        height: 80px;
    }

    .garments-grid {
        grid-template-columns: 1fr;
        padding: 0 2rem;
    }
}
