/* =========================================================
   DISCOVER
========================================================= */

.discover-page {
    width: 100%;
    padding: 90px 0 140px;
}


/* =========================================================
   INTRO
========================================================= */

.discover-intro {
    width: min(1400px, calc(100% - 80px));
    margin: 0 auto 80px;
}

.discover-intro-label {
    margin-bottom: 14px;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: #999;
}

.discover-intro h1 {
    margin: 0;

    font-size: clamp(42px, 5vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.055em;
    font-weight: 800;
    color: #111;
}

.discover-intro p {
    margin: 22px 0 0;

    font-size: 16px;
    line-height: 1.6;
    color: #888;
}


/* =========================================================
   SECTION
========================================================= */

.discover-section {
    width: min(1400px, calc(100% - 80px));
    margin: 0 auto;
}


/* =========================================================
   FILTER
========================================================= */

.discover-filter {
    display: flex;
    align-items: center;
    gap: 34px;

    margin-bottom: 28px;

    border-bottom: 1px solid #e8e8e8;
}

.discover-filter-button {
    position: relative;

    padding: 0 0 17px;

    border: 0;
    background: none;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;

    color: #aaa;

    cursor: pointer;
}

.discover-filter-button::after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;

    height: 2px;

    background: transparent;
}

.discover-filter-button.active {
    color: #111;
}

.discover-filter-button.active::after {
    background: #111;
}


/* =========================================================
   GALLERY
========================================================= */

.discover-gallery {
    display: grid;
	position: relative;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 12px;
}


/* =========================================================
   ITEM
========================================================= */

.discover-item {
    display: block;

    min-width: 0;

    text-decoration: none;
    color: inherit;
}

.discover-image {
    position: relative;

    width: 100%;

    overflow: hidden;

    background: #f4f4f4;

    aspect-ratio: 1 / 1;
}

.discover-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.5s cubic-bezier(.2,.7,.2,1);
}


/* =========================================================
   OVERLAY
========================================================= */

.discover-overlay {
    position: absolute;

    inset: 0;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    padding: 24px;

    background:
        linear-gradient(
            to top,
            rgba(0,0,0,.65),
            rgba(0,0,0,0) 55%
        );

    opacity: 0;

    transition: opacity .3s ease;

    color: #fff;
}

.discover-item:hover .discover-overlay {
    opacity: 1;
}

.discover-item:hover .discover-image img {
    transform: scale(1.035);
}


/* =========================================================
   MODEL INFO
========================================================= */

.discover-model {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.discover-model strong {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.discover-model span {
    font-size: 12px;
    color: rgba(255,255,255,.72);
}


/* =========================================================
   ARROW
========================================================= */

.discover-arrow {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    border: 1px solid rgba(255,255,255,.45);
    border-radius: 50%;

    font-size: 18px;
}


/* =========================================================
   MORE
========================================================= */

.discover-more-wrap {
    display: flex;
    justify-content: center;

    margin-top: 50px;
}

.discover-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;

    min-width: 150px;
    height: 48px;

    padding: 0 24px;

    border: 1px solid #ddd;
    border-radius: 999px;

    background: #fff;

    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;

    cursor: pointer;

    transition:
        background .25s ease,
        color .25s ease,
        border-color .25s ease;
}

.discover-more i {
    font-style: normal;

    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0;
}

.discover-more:hover {
    background: #111;
    border-color: #111;
    color: #fff;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .discover-page {
        padding: 55px 0 90px;
    }

    .discover-intro {
        width: calc(100% - 32px);
        margin-bottom: 45px;
    }

    .discover-intro h1 {
        font-size: 38px;
    }

    .discover-intro p {
        margin-top: 15px;
        font-size: 14px;
    }

    .discover-section {
        width: calc(100% - 32px);
    }

    .discover-filter {
        gap: 25px;
        margin-bottom: 16px;
    }

    .discover-filter-button {
        font-size: 12px;
        padding-bottom: 13px;
    }

    .discover-gallery {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 4px;
    }

    .discover-image {
        aspect-ratio: 1 / 1;
    }

    /*
     * 모바일은 hover가 없으므로
     * overlay를 기본적으로 숨김
     */

    .discover-overlay {
        display: none;
    }

    .discover-more-wrap {
        margin-top: 35px;
    }

}


/* =========================================================
   DISCOVER MODAL
========================================================= */

body.discover-modal-open {
    overflow: hidden;
}


/* =========================================================
   MODAL WRAP
========================================================= */

.discover-modal {
    position: fixed;
    z-index: 9999;

    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;

    visibility: hidden;
    opacity: 0;

    pointer-events: none;

    transition:
        opacity .3s ease,
        visibility .3s ease;
}


.discover-modal.is-open {
    visibility: visible;
    opacity: 1;

    pointer-events: auto;
}


/* =========================================================
   DIM
========================================================= */

.discover-modal-dim {
    position: absolute;

    inset: 0;

    background: rgba(0, 0, 0, .72);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}


/* =========================================================
   MODAL BOX
========================================================= */

.discover-modal-box {
    display: flex;

    width: min(980px, calc(100vw - 80px));
    height: min(720px, calc(100vh - 80px));

    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);

    overflow: hidden;

    border-radius: 18px;
}

.discover-modal.is-open .discover-modal-box {
    transform: translateY(0) scale(1);
}


/* =========================================================
   CLOSE
========================================================= */

.discover-modal-close {
    position: absolute;
    z-index: 5;

    top: 18px;
    right: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: rgba(255,255,255,.92);

    color: #111;

    font-family: Arial, sans-serif;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;

    box-shadow:
        0 4px 16px rgba(0,0,0,.12);

    transition:
        background .2s ease,
        transform .2s ease;
}


.discover-modal-close:hover {
    background: #111;
    color: #fff;

    transform: rotate(90deg);
}


/* =========================================================
   IMAGE
========================================================= */

.discover-modal-image {
    flex: 0 0 58%;

    width: 58%;
    min-width: 0;
    max-width: 58%;

    height: 100%;

    overflow: hidden;
}

.discover-modal-image img {
    display: block;

    width: 100%;
    height: 100%;

    min-width: 0;
    max-width: 100%;

    object-fit: cover;
}

/* =========================================================
   DISCOVER MODAL INFO
========================================================= */

.discover-modal-info {
    flex: 1 1 42%;

    width: 42%;
    min-width: 0;
    max-width: 42%;

    height: 100%;
    min-height: 0;

    display: flex;
    flex-direction: column;

    padding: 60px 46px 46px;
	background:#fff;
    overflow-y: auto;
    overflow-x: hidden;

    box-sizing: border-box;
}


/* 모델 기본 정보 */
.discover-modal-label {
    flex: 0 0 auto;
}

.discover-modal-model-name {
    flex: 0 0 auto;
    margin-top: 18px;
}

.discover-modal-model-slug {
    flex: 0 0 auto;
    margin-top: 8px;
}


/* =========================================================
   통계
========================================================= */

.discover-modal-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;

    width: 100%;

    margin-top: 80px;
    padding-top: 22px;
    padding-bottom: 22px;

    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;

    flex: 0 0 auto;
}


.discover-modal-stat {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.discover-modal-stat + .discover-modal-stat {
    padding-left: 24px;
    border-left: 1px solid #e5e5e5;
}


.discover-modal-stat-label {
    font-size: 10px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: .16em;
    color: #999;
}


.discover-modal-stat-value {
    font-size: 26px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -.03em;
    color: #111;
}


/* =========================================================
   상세보기
========================================================= */

.discover-modal-detail {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: fit-content;
    min-width: 170px;
    height: 52px;

    margin-top: 28px;

    padding: 0 24px;

    border-radius: 26px;

    background: #111;
    color: #fff;

    font-size: 13px;
    font-weight: 600;

    text-decoration: none;

    flex: 0 0 auto;

    transition: opacity .2s ease;
}

.discover-modal-detail:hover {
    opacity: .8;
}


/* =========================================================
   META
========================================================= */

.discover-modal-meta {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 1px;

    margin-top: auto;
    margin-bottom: 28px;

    border-top: 1px solid #e8e8e8;
    border-bottom: 1px solid #e8e8e8;

    background: #e8e8e8;
}


.discover-modal-meta-item {
    display: flex;
    flex-direction: column;

    gap: 8px;

    padding: 20px 0;

    background: #fff;
}


.discover-modal-meta-item + .discover-modal-meta-item {
    padding-left: 24px;
}


.discover-modal-meta-item span {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .16em;

    color: #aaa;
}


.discover-modal-meta-item strong {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.03em;

    color: #111;
}


/* =========================================================
   DETAIL BUTTON
========================================================= */

.discover-modal-detail {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    height: 58px;

    padding: 0 22px;

    border-radius: 10px;

    background: #111;

    color: #fff;

    text-decoration: none;

    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;

    transition:
        background .2s ease,
        transform .2s ease;
}


.discover-modal-detail span {
    font-size: 20px;
    font-weight: 400;

    transition:
        transform .2s ease;
}


.discover-modal-detail:hover {
    background: #2a2a2a;

    transform: translateY(-2px);
}


.discover-modal-detail:hover span {
    transform: translate(3px, -3px);
}


/* =========================================================
   DISCOVER ITEM
========================================================= */

/*
 * button으로 바꿨기 때문에
 * 브라우저 기본 버튼 스타일 제거
 */

.discover-item {
    display: block;

    width: 100%;

    padding: 0;

    border: 0;

    background: none;

    font: inherit;

    text-align: left;

    cursor: pointer;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .discover-modal {
        align-items: flex-end;

        padding: 0;
    }


    .discover-modal-box {
        display: flex;
        flex-direction: column;

        width: 100%;
        max-height: calc(100vh - 20px);

        border-radius: 20px 20px 0 0;

        transform:
            translateY(30px);
    }


    .discover-modal.is-open .discover-modal-box {
        transform:
            translateY(0);
    }


.discover-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;

    z-index: 20;
}



    .discover-modal-image {
        width: 100%;
        height: min(58vh, 520px);

        min-height: 0;

        flex-shrink: 0;
    }


    .discover-modal-info {
        flex: 1;

        min-height: 0;

        padding: 28px 22px 22px;

        overflow-y: auto;
    }


    .discover-modal-label {
        margin-bottom: 10px;

        font-size: 9px;
    }


    .discover-modal-info h2 {
        font-size: 32px;
    }


    .discover-modal-slug {
        margin-top: 7px;

        font-size: 12px;
    }


    .discover-modal-meta {
        margin-top: 28px;
        margin-bottom: 18px;
    }


    .discover-modal-meta-item {
        padding: 16px 0;
    }


    .discover-modal-meta-item + .discover-modal-meta-item {
        padding-left: 18px;
    }


    .discover-modal-meta-item strong {
        font-size: 20px;
    }


    .discover-modal-detail {
        height: 54px;
    }

}

/* =========================================================
   DISCOVER LOADING
========================================================= */

.discover-loading {
    position: absolute;

    inset: 0;

    z-index: 20;

    display: none;

    align-items: center;
    justify-content: center;

    flex-direction: column;

    gap: 12px;

    background: rgba(255, 255, 255, .78);

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}


.discover-loading.is-loading {
    display: flex;
}


.discover-loading-spinner {
    width: 28px;
    height: 28px;

    border: 2px solid #e5e5e5;
    border-top-color: #111;

    border-radius: 50%;

    animation:
        discoverLoadingRotate .7s linear infinite;
}


.discover-loading span {
    font-size: 9px;
    font-weight: 700;

    letter-spacing: .16em;

    color: #888;

    text-transform: uppercase;
}


@keyframes discoverLoadingRotate {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }

}


/* =========================================================
   DISCOVER MODAL - PC
========================================================= */

.discover-modal-box {
    display: flex;
    width: min(980px, calc(100vw - 80px));
    height: min(720px, calc(100vh - 80px));
    max-height: calc(100vh - 80px);
    overflow: hidden;
}


/* =========================================================
   이미지 영역
========================================================= */

.discover-modal-image-wrap {
    flex: 0 0 58%;
    height: 100%;
    overflow: hidden;
}

.discover-modal-image-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* =========================================================
   정보 영역
========================================================= */

.discover-modal-content {
    position: relative;

    flex: 1;
    min-width: 0;
    min-height: 0;

    display: flex;
    flex-direction: column;

    padding: 64px 48px 48px;

    overflow-y: auto;
}


/* =========================================================
   모델 기본 정보
========================================================= */

.discover-modal-label {
    flex: 0 0 auto;
}

.discover-modal-model-name {
    flex: 0 0 auto;
}

.discover-modal-model-slug {
    flex: 0 0 auto;
}


/* =========================================================
   RANK / VOTES
========================================================= */
.discover-modal-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;

    width: 100%;
    max-width: 100%;

    margin-top: 80px;

    padding-top: 22px;
    padding-bottom: 22px;

    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;

    box-sizing: border-box;
}



.discover-modal-stat {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 10px;
}


.discover-modal-stat + .discover-modal-stat {
    padding-left: 24px;

    border-left: 1px solid #e5e5e5;
}



.discover-modal-stat-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .16em;
    color: #999;
    text-transform: uppercase;
}


.discover-modal-stat-value {
    min-width: 0;

    font-size: 26px;
    line-height: 1;

    font-weight: 700;

    white-space: nowrap;
}

/* =========================================================
   자세히 보기 버튼
========================================================= */

.discover-modal-detail {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: fit-content;
    max-width: 100%;

    margin-top: 28px;

    flex: 0 0 auto;
}

.discover-modal-detail:hover {
    opacity: .85;
}


/* =========================================================
   닫기 버튼
========================================================= */

.discover-modal-close {
    position: absolute;

    top: 20px;
    right: 20px;

    z-index: 10;

    width: 44px;
    height: 44px;

    border: 0;
    border-radius: 50%;

    background: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}


/* =========================================================
   PC 화면이 조금 작을 때
========================================================= */

@media (max-height: 800px) and (min-width: 769px) {

    .discover-modal-box {
        height: calc(100vh - 40px);
        max-height: calc(100vh - 40px);
    }

    .discover-modal-content {
        padding: 52px 36px 32px;
    }

    .discover-modal-stats {
        margin-bottom: 24px;
        padding-top: 22px;
    }

    .discover-modal-stat-value {
        font-size: 24px;
    }

}

/* =========================================================
   MOBILE MODAL
========================================================= */

@media (max-width: 768px) {

    .discover-modal-box {
        display: flex;
        flex-direction: column;

        width: calc(100vw - 32px);
        max-width: calc(100vw - 32px);

        height: calc(100dvh - 32px);
        max-height: calc(100dvh - 32px);

        overflow: hidden;

        border-radius: 16px;

        box-sizing: border-box;
    }


    /* =====================================================
       IMAGE
    ===================================================== */

    .discover-modal-image,
    .discover-modal-image-wrap {

        flex: 0 0 auto;

        width: 100%;
        max-width: 100%;
        min-width: 0;

        /*
         * 카드 높이 안에서 이미지가 너무 커지지 않도록
         */
        height: 42dvh;
        max-height: 420px;
        min-height: 240px;

        overflow: hidden;

        box-sizing: border-box;
    }


    .discover-modal-image img,
    .discover-modal-image-wrap img {

        display: block;

        width: 100%;
        max-width: 100%;
        min-width: 0;

        height: 100%;

        object-fit: cover;
    }


    /* =====================================================
       INFO
    ===================================================== */

    .discover-modal-info {

        flex: 1 1 0;

        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 0;

        padding: 28px 24px 24px;

        overflow-x: hidden;
        overflow-y: auto;

        box-sizing: border-box;
    }


    /* =====================================================
       MODEL INFO
    ===================================================== */

    .discover-modal-model-name {
        margin-top: 14px;
    }

    .discover-modal-model-slug {
        margin-top: 6px;
    }


    /* =====================================================
       STATS
    ===================================================== */

    .discover-modal-stats {

        width: 100%;
        max-width: 100%;

        margin-top: 32px;

        padding-top: 18px;
        padding-bottom: 18px;

        box-sizing: border-box;
    }


    .discover-modal-stat {
        min-width: 0;
    }


    .discover-modal-stat + .discover-modal-stat {
        padding-left: 20px;
    }


    .discover-modal-stat-value {
        font-size: 22px;
    }


    /* =====================================================
       DETAIL BUTTON
    ===================================================== */

    .discover-modal-detail {

        width: 100%;
        max-width: 100%;

        height: 48px;

        margin-top: 20px;

        box-sizing: border-box;
    }


    /* =====================================================
       CLOSE
    ===================================================== */

    .discover-modal-close {

        top: 10px;
        right: 10px;

        width: 40px;
        height: 40px;
    }

}