/* =========================================================
   KOLLEKCIÓ / SZŰRŐ MODUL
   ========================================================= */

.collection-browser {
    padding: 26px 0 50px;
    background: #fff;
}


/* =========================================================
   FELSŐ ESZKÖZTÁR
   ========================================================= */

.collection-toolbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 30px;

    padding: 0 0 22px;
    margin-bottom: 24px;

    border-bottom: 1px solid #ece8e5;
}


/* Szűrő elrejtése */

.filter-toggle {
    min-width: 185px;
    height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    padding: 0 16px;

    background: #fff;
    color: #555;

    border: 1px solid #d9d5d2;

    font-size: 11px;
    letter-spacing: .3px;

    cursor: pointer;

    transition:
        border-color .25s ease,
        color .25s ease,
        background-color .25s ease;
}

.filter-toggle:hover {
    color: var(--clamar);
    border-color: var(--clamar);
}

.filter-toggle span {
    font-size: 15px;
}


/* Termékszám */

.product-count {
    color: #666;
    font-size: 12px;
    letter-spacing: .4px;
}

.product-count strong {
    color: #333;
    font-weight: 500;
}


/* Rendezés */

.collection-sort {
    display: flex;
    align-items: center;
    gap: 14px;
}

.collection-sort label {
    color: #666;
    font-size: 11px;
    letter-spacing: .3px;
}

.collection-sort select {
    height: 42px;
    min-width: 145px;

    padding: 0 38px 0 16px;

    background: #fff;
    color: #555;

    border: 1px solid #d9d5d2;

    font-size: 11px;

    outline: none;
    cursor: pointer;
}


/* =========================================================
   FŐ ELRENDEZÉS
   ========================================================= */

.collection-layout {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}


/* =========================================================
   BAL OLDALI SZŰRŐ
   ========================================================= */

.collection-filter {
    width: 100%;

    transition:
        opacity .25s ease,
        transform .25s ease;
}


/* JS ezt az osztályt kapcsolja */

.collection-filter.filter-hidden {
    display: none;
}

.collection-layout:has(.collection-filter.filter-hidden) {
    grid-template-columns: 1fr;
}


/* =========================================================
   SZŰRŐCSOPORT
   ========================================================= */

.filter-group {
    padding: 0 0 24px;
    margin-bottom: 24px;

    border-bottom: 1px solid #e9e5e2;
}

.filter-group h3 {
    position: relative;

    margin: 0 0 17px;

    color: #333;

    font-size: 12px;
    font-weight: 500;
    letter-spacing: .7px;

    text-transform: uppercase;
}


/*
 * kis mínusz jel jobb oldalon
 */

.filter-group h3::after {
    content: "−";

    position: absolute;
    right: 0;
    top: -2px;

    color: #555;

    font-size: 16px;
    font-weight: 300;
}


/* =========================================================
   CHECKBOX
   ========================================================= */

.filter-option {
    position: relative;

    display: flex;
    align-items: center;
    gap: 10px;

    min-height: 28px;

    color: #666;

    font-size: 12px;

    cursor: pointer;

    transition: color .2s ease;
}

.filter-option:hover {
    color: #222;
}


/*
 * Eredeti checkbox elrejtése
 */

.filter-option input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}


/*
 * Saját checkbox
 */

.filter-option span {
    position: relative;

    display: flex;
    align-items: center;

    padding-left: 25px;
}


.filter-option span::before {
    content: "";

    position: absolute;

    left: 0;
    top: 50%;

    width: 13px;
    height: 13px;

    transform: translateY(-50%);

    background: #fff;

    border: 1px solid #bdb8b4;

    transition:
        background-color .2s ease,
        border-color .2s ease;
}


/*
 * pipa
 */

.filter-option span::after {
    content: "✓";

    position: absolute;

    left: 3px;
    top: 50%;

    transform: translateY(-55%) scale(.8);

    color: #fff;

    font-size: 10px;
    line-height: 1;

    opacity: 0;

    transition:
        opacity .2s ease,
        transform .2s ease;
}


/*
 * kijelölt
 */

.filter-option input:checked + span::before {
    background: var(--clamar);
    border-color: var(--clamar);
}

.filter-option input:checked + span::after {
    opacity: 1;

    transform:
        translateY(-55%)
        scale(1);
}


/* =========================================================
   SZŰRŐK TÖRLÉSE
   ========================================================= */

.filter-reset {
    width: 100%;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    background: #fff;

    color: var(--clamar);

    border: 1px solid var(--clamar);

    font-size: 11px;
    letter-spacing: .3px;

    cursor: pointer;

    transition:
        background-color .25s ease,
        color .25s ease;
}

.filter-reset:hover {
    background: var(--clamar);
    color: #fff;
}


/* =========================================================
   TERMÉKRÁCS
   ========================================================= */

.collection-products {
    min-width: 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px 14px;
}


/* =========================================================
   KOLLEKCIÓ KÉPEK – FINOMÍTOTT
   ========================================================= */

.collection-item {
    min-width: 0;
    position: relative;
}


/* kép kerete */

.collection-image {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;

    /*
     * Egységes katalógusarány
     */
    aspect-ratio: 3 / 4;

    overflow: hidden;

    background: #f7f5f3;

    border: 1px solid rgba(0,0,0,.035);

    transition:
        box-shadow .35s ease,
        transform .35s ease;
}


/* maga a kép */

.collection-image img {
    width: 100%;
    height: 100%;

    /*
     * FONTOS:
     * ne vágjuk le a ruhát / modellt
     */
    object-fit: contain;

    object-position: center center;

    padding: 0;

    transition:
        transform .5s cubic-bezier(.2,.6,.3,1),
        opacity .3s ease;
}


/* hover */

.collection-item:hover .collection-image {
    box-shadow:
        0 10px 28px rgba(0,0,0,.08);
}

.collection-item:hover .collection-image img {
    transform: scale(1.025);
}


/* =========================================================
   MÁRKANÉV A KÉP ALATT
   ========================================================= */

.collection-item-info {
    padding: 10px 4px 5px;

    text-align: center;
}


.collection-brand {
    display: block;

    color: #444;

    font-size: 11px;
    font-weight: 400;

    letter-spacing: .7px;

    text-transform: uppercase;
}


/* =========================================================
   FINOM HOVER VONAL
   ========================================================= */

.collection-item-info::after {
    content: "";

    display: block;

    width: 0;
    height: 1px;

    margin: 7px auto 0;

    background: var(--clamar);

    transition: width .3s ease;
}


.collection-item:hover .collection-item-info::after {
    width: 28px;
}

/* =========================================================
   TERMÉKINFORMÁCIÓ
   ========================================================= */

.collection-item-info {
    padding: 8px 4px 3px;

    text-align: center;
}

.collection-brand {
    display: block;

    color: #555;

    font-size: 11px;
    letter-spacing: .4px;

    text-transform: uppercase;
}


/* =========================================================
   NINCS TALÁLAT
   ========================================================= */

.collection-empty {
    padding: 55px 20px;

    text-align: center;

    color: #777;

    font-size: 14px;

    border: 1px solid #eee9e6;

    background: #faf9f8;
}


/* =========================================================
   TABLET
   ========================================================= */

@media(max-width: 1100px) {

    .collection-layout {
        grid-template-columns: 175px minmax(0, 1fr);
        gap: 22px;
    }

    .product-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }

}


/* =========================================================
   KISEBB TABLET
   ========================================================= */

@media(max-width: 850px) {

    .collection-toolbar {
        grid-template-columns: 1fr auto;
        gap: 14px;
    }

    .product-count {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .collection-layout {
        grid-template-columns: 160px minmax(0, 1fr);
        gap: 18px;
    }

    .product-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


/* =========================================================
   MOBIL
   ========================================================= */

@media(max-width: 640px) {

    .collection-browser {
        padding-top: 18px;
    }


    /* -----------------------------------------
       Toolbar
       ----------------------------------------- */

    .collection-toolbar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;

        margin-bottom: 18px;
        padding-bottom: 18px;
    }

    .filter-toggle {
        width: 100%;
        min-width: 0;
    }

    .collection-sort {
        width: 100%;
    }

    .collection-sort label {
        display: none;
    }

    .collection-sort select {
        width: 100%;
        min-width: 0;
    }

    .product-count {
        grid-column: 1 / -1;

        text-align: center;
    }


    /* -----------------------------------------
       Elrendezés
       ----------------------------------------- */

    .collection-layout {
        display: block;
    }


    /* -----------------------------------------
       Szűrőpanel
       ----------------------------------------- */

    .collection-filter {
        margin-bottom: 22px;
        padding: 18px;

        background: #faf9f8;

        border: 1px solid #ece8e5;
    }

    .collection-filter.filter-hidden {
        display: none;
    }


    /* -----------------------------------------
       Grid
       ----------------------------------------- */

    .product-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 14px 8px;
    }


    .collection-image {
        aspect-ratio: 3 / 4;
    }


    .collection-item-info {
        padding-top: 7px;
    }

    .collection-brand {
        font-size: 10px;
    }

}


/* =========================================================
   NAGYON KIS MOBIL
   ========================================================= */

@media(max-width: 390px) {

    .product-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .filter-toggle,
    .collection-sort select {
        font-size: 10px;
    }

}


/* =========================================================
   CLAMAR LIGHTBOX
   ========================================================= */

.clamar-lightbox {
    position: fixed;
    inset: 0;

    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity .3s ease,
        visibility .3s ease;
}

.clamar-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}


.clamar-lightbox__backdrop {
    position: absolute;
    inset: 0;

    background: rgba(18,18,18,.88);

    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}


.clamar-lightbox__content {
    position: relative;
    z-index: 2;

    width: min(1100px, calc(100% - 80px));
    height: min(86vh, 900px);

    display: flex;
    align-items: center;
    justify-content: center;
}


.clamar-lightbox__image-wrap {
    position: relative;

    max-width: 88%;
    max-height: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;

    animation: clamarLightboxIn .35s ease;
}


.clamar-lightbox__image-wrap img {
    display: block;

    max-width: 100%;
    max-height: calc(86vh - 60px);

    width: auto;
    height: auto;

    object-fit: contain;

    background: #f7f5f3;

    box-shadow:
        0 30px 80px rgba(0,0,0,.32);
}


.clamar-lightbox__caption {
    width: 100%;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding-top: 14px;

    color: rgba(255,255,255,.88);

    font-size: 12px;
    letter-spacing: .8px;

    text-transform: uppercase;
}


.clamar-lightbox__counter {
    color: rgba(255,255,255,.5);
}


/* bezárás */

.clamar-lightbox__close {
    position: absolute;

    top: 0;
    right: 0;

    width: 44px;
    height: 44px;

    border: 0;

    background: rgba(255,255,255,.08);

    color: #fff;

    border-radius: 50%;

    font-size: 30px;
    font-weight: 200;

    cursor: pointer;

    transition:
        background .25s ease,
        transform .25s ease;
}

.clamar-lightbox__close:hover {
    background: var(--clamar);

    transform: rotate(90deg);
}


/* navigáció */

.clamar-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid rgba(255,255,255,.35);
    border-radius: 50%;

    background: rgba(255,255,255,.04);

    cursor: pointer;

    transition:
        background .25s ease,
        border-color .25s ease;
}

.clamar-lightbox__nav::before {
    content: "";

    width: 9px;
    height: 9px;

    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
}

.clamar-lightbox__prev::before {
    transform: rotate(-135deg);
    margin-left: 4px;
}

.clamar-lightbox__next::before {
    transform: rotate(45deg);
    margin-right: 4px;
}

.clamar-lightbox__nav:hover {
    background: var(--clamar);
    border-color: var(--clamar);
}


.clamar-lightbox__prev {
    left: 0;
}

.clamar-lightbox__next {
    right: 0;
}


@keyframes clamarLightboxIn {

    from {
        opacity: 0;
        transform: translateY(10px) scale(.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}


/* mobil */

@media(max-width: 640px) {

    .clamar-lightbox__content {
        width: calc(100% - 24px);
        height: 92vh;
    }

    .clamar-lightbox__image-wrap {
        max-width: 100%;
    }

    .clamar-lightbox__image-wrap img {
        max-height: calc(92vh - 70px);
    }

    .clamar-lightbox__nav {
        width: 40px;
        height: 40px;

        font-size: 30px;

        background: rgba(0,0,0,.25);
    }

    .clamar-lightbox__prev {
        left: 8px;
    }

    .clamar-lightbox__next {
        right: 8px;
    }

    .clamar-lightbox__close {
        top: 8px;
        right: 8px;

        z-index: 5;
    }

}


.clamar-lightbox__image-wrap.is-changing img {
    opacity: 0;
    transform: scale(.985);
}

.clamar-lightbox__image-wrap img {
    transition:
        opacity .22s ease,
        transform .28s ease;
}