/* ==========================================================================
   [TRLD-696] PC 이벤트 페이지 (기획전 통합)
   event/event_list/event_list.htm 에서만 로드한다.
   main.css(dist/scss) 의 .fb__event__* 는 메인 화면도 재사용하므로
   목록 카드 변경은 --grid3 하위에만 건다.
   ========================================================================== */

/* --------------------------------------------------------------------------
   상단 배너 (WMS 통합배너 EVENT / EVENT_TOP, 개수 제한 없음)
   [배너높이] 띠 높이 269 고정 = 위 30 + 배너 209 + 아래 30 (배너 0~N장 모두 동일).
   [TRLD-722] 한 화면 3장으로 바꾸며 배너를 줄이고 위·아래 여백 30 은 유지 (285 -> 269, 베스트·동네혜택 285 와 다름).
   배너 1장 400 x 209 (목록 카드와 같은 크기, 리스트 이미지 비율 1.91), 점(페이지 표시)은 배너와 겹치지 않게 아래 여백 30 가운데에 표시한다.
   1280 컨테이너 밖으로 전체 폭. 100vw 는 세로 스크롤바 폭을 포함해 가로 스크롤이 생기므로
   eventList.js 가 넣어 주는 스크롤바 폭(--event-sbw)을 뺀다.
   창이 1280 보다 좁으면 컨테이너 폭(100%)을 유지한다.
   -------------------------------------------------------------------------- */
.fb__event__visual {
    overflow: hidden;
    position: relative;
    isolation: isolate;
    width: calc(100vw - var(--event-sbw, 0px));
    min-width: 100%;
    margin-left: min(0px, calc(50% - 50vw + var(--event-sbw, 0px) / 2));
    box-sizing: border-box;
    height: 269px; /* 위 30 + 배너 209 + 아래 30 */
    padding: 30px 0;
    background: url("../images/shop/bg_best.jpg") no-repeat center center;
    background-size: cover;
}

/* 흐린 검정 막 한 장이 배경과 좌우 배너를 함께 덮는다.
   가운데 3장 자리만 마스크로 뚫어 그 배너만 위에 떠 보이게 한다. (2장 is-double, 1장 is-single 은 그 장수만큼)
   (막이 슬라이드 밖에 있어 배너가 넘어가도 자리는 고정, 좌우 배너는 배경과 같은 농도) */
.fb__event__visual:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
    -webkit-mask: linear-gradient(#000 0 0), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1230 209'%3E%3Crect width='400' height='209' rx='8'/%3E%3Crect x='415' width='400' height='209' rx='8'/%3E%3Crect x='830' width='400' height='209' rx='8'/%3E%3C/svg%3E") 50% 30px / 1230px 209px no-repeat;
    -webkit-mask-composite: xor;
            mask: linear-gradient(#000 0 0), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1230 209'%3E%3Crect width='400' height='209' rx='8'/%3E%3Crect x='415' width='400' height='209' rx='8'/%3E%3Crect x='830' width='400' height='209' rx='8'/%3E%3C/svg%3E") 50% 30px / 1230px 209px no-repeat;
            mask-composite: exclude;
}

.fb__event__visual .event-visual__inner {
    position: relative;
    width: 1230px; /* 400 x 3 + 15 x 2. Swiper 가 이 폭으로 슬라이드 폭(400)을 계산한다 */
    margin: 0 auto;
}

/* 좌우 이전·다음 배너 일부 노출. 바깥 띠(.fb__event__visual)가 잘라 준다 */
.fb__event__visual .event-visual__slider.swiper-container {
    overflow: visible;
}

.fb__event__visual .swiper-slide {
    position: relative;
    width: 400px;
}

.fb__event__visual .swiper-slide a {
    display: block;
}

.fb__event__visual .event-visual__image {
    overflow: hidden;
    position: relative;
    width: 400px;
    height: 209px;
    margin: 0;
    border-radius: 8px;
    background: #f5f5f5;
}

/* 리스트 이미지는 업로드 크기 강제가 없어 fit-cover 로 맞춘다 */
.fb__event__visual .event-visual__image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
       object-fit: cover;
}

/* [TRLD-696] 좌우(가운데 3장 외) 배너만 추가로 어둡게 (업체 요청 10-06, B안).
   배경 막(:after 0.3)은 그대로 두고 배너 위에 0.75 를 더 얹는다 -> 좌우 배너 체감 약 82% (10-07 0.5 -> 0.65 -> 0.75, 더 어둡게).
   가운데 = Swiper 의 active 와 그 뒤 2장 (loop 복제 슬라이드도 DOM 순서가 이어져 인접 선택자로 맞는다).
   슬라이더가 없는 is-static(3장 이하)은 좌우 배너가 없어 해당 없음 */
.fb__event__visual .event-visual__image::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.fb__event__visual:not(.is-static) .swiper-slide .event-visual__image::after {
    opacity: 1;
}

.fb__event__visual:not(.is-static) .swiper-slide-active .event-visual__image::after,
.fb__event__visual:not(.is-static) .swiper-slide-active + .swiper-slide .event-visual__image::after,
.fb__event__visual:not(.is-static) .swiper-slide-active + .swiper-slide + .swiper-slide .event-visual__image::after {
    opacity: 0;
}

/* 이전/다음: 배너 좌우 끝에 걸치게 */
.fb__event__visual .fb__common__controller.roundTypeS {
    top: 50%;
    z-index: 3; /* 막(:after) 위 */
    width: calc(100% + 40px);
}

.fb__event__visual .fb__common__controller.roundTypeS .controller__btn {
    margin-top: -20px;
}

/* 점 = 배너 수 (1장씩 이동). [배너높이] 배너와 겹치지 않게 띠 아래 여백(30px) 가운데에 표시 (10-07) */
.fb__event__visual .fb__pagination.swiper-pagination {
    position: absolute;
    z-index: 3; /* 막(:after) 위 */
    top: auto;
    bottom: 11px; /* (아래 여백 30 - 점 8) / 2 */
    left: 0;
    width: 100%;
    height: 8px;
    margin-top: 0;
    font-size: 0;
    line-height: 0;
    text-align: center;
    -webkit-transform: none;
            transform: none;
}

.fb__event__visual .fb__pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    margin: 0 4px !important;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    vertical-align: top;
    transition: width 0.2s;
}

.fb__event__visual .fb__pagination .swiper-pagination-bullet-active {
    width: 24px;
    background: #fff;
}

/* 3장 이하면 슬라이더 미생성 (eventList.js initTopBanner). [배너높이] 띠 높이 고정이라 별도 여백 없음 */
/* 가운데 정렬, 막은 1장(is-single)·2장(is-double) 이면 그 장수 자리만 뚫는다 (3장은 기본 막) */
.fb__event__visual.is-static .swiper-wrapper {
    justify-content: center;
}

.fb__event__visual.is-single:after {
    -webkit-mask: linear-gradient(#000 0 0), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 209'%3E%3Crect width='400' height='209' rx='8'/%3E%3C/svg%3E") 50% 30px / 400px 209px no-repeat;
    -webkit-mask-composite: xor;
            mask: linear-gradient(#000 0 0), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 209'%3E%3Crect width='400' height='209' rx='8'/%3E%3C/svg%3E") 50% 30px / 400px 209px no-repeat;
            mask-composite: exclude;
}

.fb__event__visual.is-double:after {
    -webkit-mask: linear-gradient(#000 0 0), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 815 209'%3E%3Crect width='400' height='209' rx='8'/%3E%3Crect x='415' width='400' height='209' rx='8'/%3E%3C/svg%3E") 50% 30px / 815px 209px no-repeat;
    -webkit-mask-composite: xor;
            mask: linear-gradient(#000 0 0), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 815 209'%3E%3Crect width='400' height='209' rx='8'/%3E%3Crect x='415' width='400' height='209' rx='8'/%3E%3C/svg%3E") 50% 30px / 815px 209px no-repeat;
            mask-composite: exclude;
}

.fb__event__visual.is-static .swiper-slide + .swiper-slide {
    margin-left: 15px;
}

.fb__event__visual.is-static .fb__common__controller,
.fb__event__visual.is-static .fb__pagination {
    display: none;
}

/* 노출 건이 없으면 배너 자리 높이만큼 띠를 유지하고 가운데에 'EVENT / 이벤트' 글자.
   배너가 없으므로 어두운 막은 씌우지 않는다 (/shop/best 상단과 같은 배경) */
.fb__event__visual.is-empty:after {
    display: none;
}

.fb__event__visual .event-visual__empty {
    position: relative;
    z-index: 3; /* 막(:after) 위 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 209px; /* 배너 자리 높이 */
    color: #fff;
    text-align: center;
}

/* 글씨는 /shop/best 상단(best_list.htm .best-main__hero__title / __subtitle)과 동일 */
.fb__event__visual .event-visual__empty__title {
    margin: 0;
    font-size: 60px;
    font-weight: 700;
}

.fb__event__visual .event-visual__empty__subtitle {
    margin: 0;
    padding-left: 25px;
    font-size: 25px;
    font-weight: 300;
    letter-spacing: 25px;
}

/* --------------------------------------------------------------------------
   탭 5개
   -------------------------------------------------------------------------- */
.fb__event__nav .nav__tab {
    width: 20%;
}

/* [TRLD-696] 선택 탭 아래 줄 제거 (업체 요청 10-06).
   main.css 는 탭 영역 전체 아래 줄(.fb__event__nav border-bottom)을 선택 탭의 흰 아래 테두리로 덮어 가리는데,
   화면 배율·확대/축소(80·90·110·150%…)에서는 1px 이 소수 픽셀로 반올림되며 어긋나 회색 줄이 남는다.
   덮지 않고 영역 줄 자체를 없앤다. 줄은 선택 안 된 탭이 각자 그리는 아래 테두리(#111)로 유지된다 */
.fb__event__nav {
    border-bottom: 0;
}

/* --------------------------------------------------------------------------
   [TRLD-667-2] 정렬 필터: 목록 우상단 드롭다운. 모양은 사이트 공통 select (상품 목록 정렬과 동일)
   -------------------------------------------------------------------------- */
.fb__event__sort {
    display: flex;
    justify-content: flex-end;
    /* 간격은 /shop/best 카테고리 select 와 같게: 탭과 12px, 목록과 15px (업체 요청 10-07).
       목록 영역(.fb__event__wrap)의 main.css margin-top 48px 를 그대로 두고 -36px 로 당긴다
       → 필터가 숨는 종료 탭은 기존 간격(48px) 그대로 */
    margin: -36px 0 15px;
}

.fb__event__sort.is-hidden {
    display: none;
}

.fb__event__sort .fb__event__sort__select {
    min-width: 140px;
}

/* --------------------------------------------------------------------------
   목록 카드 3열 400 x 209 (메인 eventListType3 과 같은 배치)
   -------------------------------------------------------------------------- */
.fb__event__box.fb__event__box--grid3 .fb__event__list {
    width: 400px;
    margin: 40px 0 0 40px;
}

.fb__event__box.fb__event__box--grid3 .fb__event__list:nth-child(-n + 3) {
    margin-top: 0;
}

.fb__event__box.fb__event__box--grid3 .fb__event__list:nth-child(3n + 1) {
    margin-left: 0;
}

.fb__event__box.fb__event__box--grid3 .fb__event__image {
    width: 400px;
    height: 209px;
}

.fb__event__box.fb__event__box--grid3 .fb__event__info {
    padding: 16px 0 0;
}

.fb__event__box.fb__event__box--grid3 .fb__event__name {
    max-width: 400px;
    letter-spacing: -0.36px;
    font-size: 18px;
    line-height: 26px;
    font-weight: 700;
}

/* 설명이 없는 카드도 높이를 맞추도록 min-height 유지 */
.fb__event__box.fb__event__box--grid3 .fb__event__desc {
    max-width: 400px;
    min-height: 20px;
    margin-top: 4px;
    letter-spacing: -0.3px;
    font-size: 15px;
    line-height: 20px;
    font-weight: 400;
}

.fb__event__box.fb__event__box--grid3 .fb__event__date {
    margin-top: 8px;
    color: #999;
    letter-spacing: -0.28px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
}
