/* =============================================================
   이벤트 페이지 스타일
   - 목록 (이벤트 카드, 탭)
   - 상세 페이지
   - 모바일 반응형
   ============================================================= */

/* -------------------------------------------------------------
   탭 UI
   ------------------------------------------------------------- */


/* -------------------------------------------------------------
   이벤트 목록 그리드
   ------------------------------------------------------------- */


/* -------------------------------------------------------------
   이벤트 카드
   ------------------------------------------------------------- */
.event-card {
    border-radius: 12px;
    overflow: hidden;
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.event-card:hover {
    transform: translateY(-2px);
}

/* 종료된 이벤트 - 흑백 처리 */
.event-card--ended .event-card__thumb img {
    filter: grayscale(60%);
    opacity: 0.8;
}

/* 카드 썸네일 (16:9 비율) */
.event-card__thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--color-bg-light);
}

.event-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.event-card:hover .event-card__thumb img {
    transform: scale(1.03);
}

/* 카드 정보 영역 */
.event-card__info {
    padding: 12px 14px 14px;
}


.event-card__period {
    font-size: 12px;
    color: var(--color-text-light);
}

/* -------------------------------------------------------------
   상태 배지
   ------------------------------------------------------------- */
.event-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.event-badge--ongoing {
    background: var(--color-primary);
    color: #fff;
}

.event-badge--ended {
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
}

/* -------------------------------------------------------------
   로딩 스피너
   ------------------------------------------------------------- */


/* -------------------------------------------------------------
   빈 상태
   ------------------------------------------------------------- */
.event-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-light);
    font-size: 15px;
}

/* -------------------------------------------------------------
   상세 페이지
   ------------------------------------------------------------- */


/* 상세 썸네일 (16:9 비율) */
.event-detail__thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: var(--color-bg-light);
    margin-bottom: 20px;
}

.event-detail__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 상세 헤더 */
.event-detail__header {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border-light);
    margin-bottom: 24px;
}


.event-detail__period {
    font-size: 13px;
    color: var(--color-text-light);
}

/* 상세 내용 (HTML 렌더링) */


.event-detail__content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* 간단 설명 (일반 텍스트, 줄바꿈 유지) */
.event-detail__summary {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-light);
    white-space: pre-line;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

/* 상세 본문: 에디터 HTML 이 레이아웃을 넘치지 않도록 */


.event-detail__content table {
    max-width: 100%;
    display: block;
    overflow-x: auto;
}

.event-detail__content iframe,
.event-detail__content video {
    max-width: 100%;
}

/* 이벤트 대상 상품 (카드 스타일은 common.css .product-card / .product-grid 재사용) */
.event-detail__products {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border-light);
    margin-bottom: 24px;
}


.event-detail__products-count {
    color: var(--color-primary);
    margin-left: 4px;
}

.event-detail__products .product-card {
    cursor: pointer;
}

/* 상세 영역 최대폭 720px → 데스크톱에서도 3열로 제한 */


/* 상세 하단 버튼 영역 */
.event-detail__footer {
    margin-bottom: 24px;
}

/* -------------------------------------------------------------
   모바일 반응형 (최대 480px)
   ------------------------------------------------------------- */
/* 목록: 1열로 변경 */
.event-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}


.event-card__title {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
    text-overflow: ellipsis;
    font-size: 13px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-detail__title {
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 8px;
    line-height: 1.4;
    font-size: 17px;
}

.event-detail__content {
    min-height: 200px;
    line-height: 1.8;
    color: var(--color-text);
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border-light);
    margin-bottom: 24px;
    overflow-wrap: anywhere;
    font-size: 14px;
}

.event-detail__products-title {
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 16px;
    font-size: 16px;
}

/* -------------------------------------------------------------
   태블릿 반응형 (768px 이하)
   ------------------------------------------------------------- */
.event-detail {
    margin: 0 auto;
    max-width: 100%;
}
