/* ==================== Reset ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* 모바일 버튼 pulse 애니메이션 */
@keyframes btn-pulse {
    0%   { filter: brightness(1)   drop-shadow(0 0  0px rgba(240,80,120,0)); transform: scale(1); }
    50%  { filter: brightness(1.12) drop-shadow(0 0 12px rgba(240,80,120,0.55)); transform: scale(1.04); }
    100% { filter: brightness(1)   drop-shadow(0 0  0px rgba(240,80,120,0)); transform: scale(1); }
}


body {
    background-color: #ffdcf1; /* bg.png 양쪽 여백 색상 (1920px 초과 시) */
    overflow-x: hidden;
}

@media (min-width: 1920px) {
    body {
        background-image: url('./assets/bg_2560.webp');
        background-repeat: repeat-y;
        background-position: top center;
        background-size: 2560px auto;
    }
    .event-wrapper {
        box-shadow: none !important;
        background-color: transparent !important;
        max-width: 2560px;
    }
    .bg-img {
        visibility: hidden;
    }
    .event-footer {
        background-color: #ffdcf1 !important;
        width: 100vw;
        position: relative;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ==================== 이벤트 래퍼 ==================== */
/*
 * 기준 캔버스: 1920 × 5335 px
 * bg.png가 100% 너비로 펼쳐지며, 모든 요소는 bg 기준 % 좌표로 배치
 */
.event-wrapper {
    position: relative;
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    box-shadow: 0 0 0 9999px #f9c8e0;
    /* footer 영역까지 bg 연장 */
    background-color: #ffdcf1;
}

/* PC: bg-img가 wrapper 높이 기준 — 반드시 block 유지 */
.bg-img {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    pointer-events: none;
}

/* 요소 레이어: bg-img 위에 겹침, 높이는 wrapper(=bg-img) 기준 */
.event-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
}

/* ==================== 공통 요소 ==================== */
.ev {
    position: absolute;
    pointer-events: none;
}

.ev img {
    display: block;
    width: 100%;
    height: auto;
}

/* 클릭 가능한 버튼 요소 */
.ev-btn {
    pointer-events: all;
    cursor: pointer;
    text-decoration: none;
}

.ev-btn img {
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.ev-btn:hover img {
    transform: translateY(-3px) scale(1.02);
    opacity: 0.90;
}

.ev-btn:active img {
    transform: translateY(0) scale(0.98);
    opacity: 0.85;
}

/* ==================== 각 요소 위치 (기준: 1920×5335 px 캔버스) ==================== */
/*
 * top%  = element_top_px  / 5335 * 100
 * left% = element_left_px / 1920 * 100
 * width%= element_width_px/ 1920 * 100
 */

/* 좌상단 로고: 한우자조금관리위원회 (237×25 → 캔버스 표시크기 약 280px, top=25, left=25) */
.ev-logo01 {
    top: 0.87%;
    left: 2.30%;
    width: 13.58%;
}

/* 우상단 로고: 한우유명한곳 (120×55 → 캔버스 표시크기 약 170px, top=20, left=1675) */
.ev-logo02 {
    top: 0.57%;
    left: 91.24%;
    width: 6.85%;
}

/* KV: 메인 타이틀 (934×557, top=30, left=555) */
.ev-title {
    top: 1.86%;
    left: 28.91%;
    width: 46.65%;
}
/* 타이틀 입장 애니메이션 */
.ev-title img {
    animation: title-entrance 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes title-entrance {
    from { transform: translateY(50px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* KV: 통역 시작하기 핑크 버튼 (456×158, top=648, left=720) */
.ev-btn01 {
    top: 12.85%;
    left: 37.50%;
    width: 23.75%;
}

/* KV 하단 좌: 온라인 한우장터 소형 버튼 (387×153, top=825, left=531) */
.ev-btn02-sm {
    top: 16.30%;
    left: 27.66%;
    width: 20.16%;
}

/* KV 하단 우: 한우 할인행사 소형 버튼 (387×153, top=816, left=990) */
.ev-btn03-sm {
    top: 16.30%;
    left: 51.56%;
    width: 20.16%;
}

/* Event 02: 타이틀 (811×234, top=1130, left=555) */
.ev-title02 {
    top: 22.18%;
    left: 28.91%;
    width: 42.24%;
}

/* Event 02: 대형 녹색 버튼 (706×158, top=1368, left=607) */
.ev-btn02-all {
    top: 26.94%;
    left: 31.61%;
    width: 36.77%;
}

/* Event 02: 상품 카드 그리드 (원본 ev-con02 영역과 동일) */
.ev-con02-grid {
    top: 30.54%;
    left: 24.84%;
    width: 56.56%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.8%;          /* 원본 이미지 카드 간격 */
    pointer-events: all;
}

/* 개별 상품 카드 */
.sale-card {
    position: relative;
    display: block;
    text-decoration: none;
    cursor: pointer;
    overflow: visible;  /* 캐릭터가 카드 밖으로 나오도록 */
}

/* 카드 기본 이미지 */
.sale-card .card-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sale-card:hover .card-img {
    transform: translateY(-6px);
}

/* 캐릭터 (기본 배치, hover 시 살짝 위로) */
.sale-card .card-cha {
    position: absolute;
    bottom: 0%;
    right: 0%;
    width: 32%;
    height: auto;
    transition: transform 0.3s ease;
    pointer-events: none;
    z-index: 10;

}

.sale-card:hover .card-cha {
    transform: translateY(-8px);
}

/* Event 03: 타이틀 (530×315, top=2721, left=693) */
.ev-title03 {
    top: 52.00%;
    left: 36.09%;
    width: 27.60%;
}

/* Event 03: 대형 퍼플 버튼 (456×158, top=3039, left=732) */
.ev-btn03-all {
    top: 58.26%;
    left: 38.13%;
    width: 23.75%;
}

/* Event 03: 매장 목록 (1030×1100, top=3248, left=485) */
.ev-mall03 {
    top: 61.88%;
    left: 25.26%;
    width: 53.65%;
}

/* ==================== Sticky GNB ==================== */
@media (max-width: 1000px) {
    #sec-ev03 { top: 38% !important; }
}

.sec-anchor {
    position: absolute;
    left: 0;
    display: block;
    width: 0; height: 0;
    pointer-events: none;
}

.sticky-gnb {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    z-index: 9000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}
.sticky-gnb.is-sticky {
    position: fixed;
    top: 0;
    pointer-events: auto;
    opacity: 1;
}

@media (max-width: 1000px) {
    .sticky-gnb {
        position: fixed;
        top: -100px;
        opacity: 0;
        pointer-events: none;
        transition: top 0.2s, opacity 0.2s;
    }
    .sticky-gnb.is-sticky {
        top: 0;
        opacity: 1;
        pointer-events: auto;
    }
}

.gnb-inner {
    display: flex;
    justify-content: center;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.gnb-tab {
    display: block;
    flex: 0 0 auto;
    cursor: pointer;
    position: relative;
}
.gnb-tab img {
    display: block;
    width: 316px;
    height: auto;
}
.gnb-tab .gnb-over  { display: none; }
.gnb-tab .gnb-normal { display: block; }

.gnb-tab.active .gnb-normal { display: none; }
.gnb-tab.active .gnb-over   { display: block; }
.gnb-tab:hover .gnb-normal  { display: none; }
.gnb-tab:hover .gnb-over    { display: block; }

/* 모바일: 탭 이미지 균등 분할 */
@media (max-width: 1000px) {
    .gnb-tab img { width: 33.33vw; }
}

/* ==================== Step01 팝업 ==================== */
.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 10000;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: 50px 0 20px;
}
.popup-overlay.active {
    display: flex;
}

@media (max-width: 1000px) {
    .popup-container {
        width: 96vw;
        max-width: 96vw;
    }
    .popup-close-btn {
        top: 6px;
        right: 6px;
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
}

.popup-container {
    position: relative;
    width: 700px;
    max-width: 92vw;
}

.popup-close-btn {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #f48;
    color: #f48;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}
.popup-close-btn:hover {
    background: #f48;
    color: #fff;
}

.popup-bg {
    position: relative;
}
.popup-bg > img,
.popup-bg picture img {
    display: block;
    width: 100%;
    height: auto;
}

/* Q1~Q4 그리드: bg 이미지 위 절대 배치 */
.popup-quiz-grid {
    position: absolute;
    top: 31%;
    left: 4%;
    width: 92%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2%;
}

@media (max-width: 1000px) {
    .popup-quiz-grid { top: 34%; }
}

.quiz-item {
    cursor: pointer;
    border-radius: 32px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
    position: relative;
}
.quiz-item img {
    display: block;
    width: 100%;
    height: auto;
}
.quiz-item:hover {
    transform: translateY(-3px);
    border-color: #f48aaa;
}
.quiz-item.selected {
    border-color: #f02070;
    /*box-shadow: 0 0 0 3px rgba(240, 32, 112, 0.25);*/
}
/* 선택 체크 표시 */
.quiz-item.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    left: 10px;
    width: 28px;
    height: 28px;
    background: #f02070;
    color: #fff;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 28px;
    text-align: center;
}

/* 하단 버튼 */
.popup-btn-wrap {
    position: absolute;
    bottom: 1%;
    left: 50%;
    transform: translateX(-50%);
    width: 97%;
}
.popup-next-btn {
    display: block;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
}
.popup-next-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.popup-next-btn .btn-normal { display: block; width: 100%; height: auto; }
.popup-next-btn .btn-hover  { display: none;  width: 100%; height: auto; }
/* 선택 완료(active 클래스) 시 over 이미지로 전환 */
.popup-next-btn.active .btn-normal { display: none; }
.popup-next-btn.active .btn-hover  { display: block; }

/* ==================== Step02 팝업 ==================== */
/* 타이틀 이미지: bg(700×900) 기준 약 17% 위치, 가운데 정렬 */
.s2-title {
    position: absolute;
    top: 12%;
    left: 50%;
    transform: translateX(-50%);
    width: 45%;
    text-align: center;
}


@media (max-width: 1000px) {
    .s2-title  { top: 17%; }

}

.s2-title img {
    display: block;
    width: 100%;
    height: auto;
}

/* 결과 이미지: 타이틀 바로 아래 */
.s2-result {
    position: absolute;
    top: 19%;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
}

@media (max-width: 1000px) {

    .s2-result { top: 22%; }

}

.s2-result img {
    display: block;
    width: 100%;
    height: auto;
}

/* 세일 배너 */
.s2-sale {
    position: absolute;
    top: 76%;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
}


@media (max-width: 1000px) {

    .s2-sale   { top: 74%; }
}


.s2-sale img {
    display: block;
    width: 100%;
    height: auto;
}

/* 하단 버튼 행: 이전(좌) + 응모(우) */
.s2-btn-row {
    position: absolute;
    bottom: 1%;
    left: 2%;
    width: 96%;
    display: flex;
    gap: 2%;
    align-items: center;
}
.s2-pre-btn {
    flex: 0 0 26%;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.s2-pre-btn img {
    display: block;
    width: 100%;
    height: auto;
}
.s2-next-btn {
    flex: 1;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.s2-next-btn img {
    display: block;
    width: 100%;
    height: auto;
}
.s2-pre-btn:hover { opacity: 0.85; }
.s2-next-btn:hover { opacity: 0.85; }

/* ==================== Step03 팝업 ==================== */
/* 입력 필드 공통: bg(700×900) 기준 절대 배치 */
.s3-field {
    position: absolute;
    left: 28%;
    width: 61%;
}
.s3-field input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    height: 70px;
    line-height: 70px;
    padding: 0 16px;
    border: 2px solid #e0c8d0;
    border-radius: 10px;
    font-size: 20px;
    font-family: inherit;
    color: #333;
    background: rgba(255,255,255,0.92);
    outline: none;
    transition: border-color 0.2s;
}
.s3-field input:focus {
    border-color: #f02070;
}
.s3-field input::placeholder {
    color: #bbb;
    font-size: 20px;
}

/* 이름 입력: top 약 36% */
.s3-name-field  { top: 39.2%; }

@media (max-width: 1000px) {
    .s3-name-field  { top: 43.2%; }
}

/* 연락처 입력: top 약 44% */
.s3-phone-field { top: 48.3%; }
@media (max-width: 1000px) {
    .s3-phone-field { top: 50.8%; }
}

/* 개인정보 동의 */
.s3-consent {
    position: absolute;
    top: 59.99%;
    left: 12%;
    width: 70%;
}
.s3-consent label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.05em;
    color: #555;
}
.s3-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #f02070;
    cursor: pointer;
}
.s3-consent em {
    font-style: normal;
    color: #f02070;
}

/* 에러 메시지 */
.s3-error {
    position: absolute;
    top: 57%;
    left: 8%;
    width: 84%;
    font-size: 13px;
    color: #e00;
    min-height: 18px;
    text-align: center;
}

/* 이벤트 유의사항 */
.ev-notice {
    top: 79.74%;
    left: 25.26%;
    width: 49.48%;
}

.notice-box { display: none; }

.notice-box {
    background: linear-gradient(160deg, rgba(210, 240, 255, 0.85) 0%, rgba(255, 220, 235, 0.85) 100%);
    border-radius: 16px;
    padding: 28px 32px;
    backdrop-filter: blur(6px);
}

.notice-title {
    font-size: clamp(13px, 1.1vw, 18px);
    font-weight: 700;
    color: #333;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notice-icon {
    color: #f5a623;
    font-style: normal;
}

.notice-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.notice-list li {
    font-size: clamp(11px, 0.85vw, 14px);
    color: #555;
    line-height: 1.6;
    padding-left: 12px;
    position: relative;
    word-break: keep-all;
}

.notice-list li::before {
    content: '·';
    position: absolute;
    left: 0;
    font-weight: 700;
}
.notice-list li:nth-child(1)::before  { color: #42b8f0; }
.notice-list li:nth-child(2)::before  { color: #4aaae8; }
.notice-list li:nth-child(3)::before  { color: #5a96e0; }
.notice-list li:nth-child(4)::before  { color: #7088dc; }
.notice-list li:nth-child(5)::before  { color: #9080d4; }
.notice-list li:nth-child(6)::before  { color: #b880c8; }
.notice-list li:nth-child(7)::before  { color: #d97ab8; }
.notice-list li:nth-child(8)::before  { color: #ee6fa0; }
.notice-list li:nth-child(9)::before  { color: #f06292; }

/* ==================== 모바일 반응형 (≤768px) ==================== */
@media (max-width: 1000px) {

    /* bg-img 숨기고 CSS background로 전환
       모바일 전용 bg 준비 시: url('./assets/bg_mo.png') 로 교체 */
    .event-wrapper {
        background: url('./assets/m_bg.webp') top center / 100% auto repeat-y;
        max-width: 100%;
        box-shadow: none;
    }

    /* 모바일: bg-img 숨기고 CSS background로 높이 확보 */
    .bg-img { display: none; }

    /* event-layer → flex wrap 흐름으로 전환 */
    .event-layer {
        position: static;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-start;
        padding: 14vw 0 12vw;
        gap: 3.5vw 2%;
    }

    /* 기본 ev: static 흐름 */
    .ev {
        position: static !important;
        width: 85%;
    }

    /* ── 로고: 좌우 상단 고정 (event-wrapper 기준 absolute) ── */
    .ev-logo01 {
        position: absolute !important;
        top: 3.8vw; left: 4%;
        width: 34%;
    }
    .ev-logo02 {
        position: absolute !important;
        top: 2.2vw; left: auto; right: 3%;
        width: 15%;
    }

    /* ── KV ── */
    .ev-title  { width: 92%; }
    .ev-btn01  { width: 87%; animation: btn-pulse 1.6s ease-in-out infinite; }

    /* 소형 아웃라인 버튼 2개: 나란히 한 줄 */
    .ev-btn02-sm,
    .ev-btn03-sm { width: 45% !important; flex-shrink: 0; margin-top: 10vw;}

    /* ── Event 02 ── */
    .ev-title02    { width: 86%; margin-top: 18vw; }
    .ev-btn02-all  { width: 88%; }

    /* 상품 카드: 1열 전환 */
    /* 카드: 가로 슬라이드 (스크롤) */
    .ev-con02-grid {
        position: static !important;
        width: 100vw !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 3vw !important;
        overflow-x: auto;
        overflow-y: visible;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 4vw;       /* snap 기준점 */
        -webkit-overflow-scrolling: touch;
        padding: 0 4vw 10vw !important; /* 좌우 여백 컨테이너에서 처리 */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .ev-con02-grid::-webkit-scrollbar { display: none; }

    .ev-con02-grid .sale-card {
        flex: 0 0 78vw !important;
        scroll-snap-align: start;
    }

    /* ── Event 03 ── */
    .ev-title03   { width: 68%; margin-top: 18vw;}
    .ev-btn03-all { width: 60%; }
    .ev-mall03    { width: 90%; }

    /* ── 유의사항 ── */
    .ev-notice { width: 90%; margin-top: 18vw; }
}

/* ==================== Footer ==================== */
.event-footer {
    background: transparent;
    padding: 28px 40px;
}

.footer-inner {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.footer-logo {
    width: 90px;
    height: auto;
    flex-shrink: 0;
    opacity: 0.9;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.footer-info p {
    font-size: clamp(13px, 0.9vw, 16px);
    color: rgba(80, 50, 60, 0.85);
    line-height: 1.6;
    word-break: keep-all;
    letter-spacing: -0.06em;
}

.footer-copy {
    margin-top: 4px;
    color: rgba(80, 50, 60, 0.55) !important;
    font-size: clamp(10px, 0.65vw, 12px) !important;
}

/* 모바일 Footer */
@media (max-width: 1000px) {
    .event-footer { padding: 20px 24px; }

    .footer-inner {
        gap: 10px;
    }

    .footer-logo { width: 70px; }

    .footer-info p { font-size: 13px; }
}

/* ==================== 팝업 모바일 반응형 ==================== */
@media (max-width: 1000px) {
    /* 팝업 컨테이너: 화면 가득 활용 */
    .popup-container {
        max-width: 96vw;
    }

    /* 닫기 버튼: 팝업 안으로 */
    .popup-close-btn {
        top: -43px;
        right: 6px;
        width: 36px;
        height: 36px;
        font-size: 15px;
    }

    /* Step03 입력 필드: vw 기준으로 스케일 */
    .s3-field input {
        height: 8vw;
        line-height: 10vw;
        font-size: 3.8vw;
        padding: 0 3vw;
        border-radius: 2vw;
    }
    .s3-field input::placeholder {
        font-size: 3.8vw;
    }

    /* 개인정보 동의 텍스트 */
    .s3-consent {
        top: 58.8%;
    }
    .s3-consent label {
        font-size: 3vw;
        gap: 2vw;
    }
    .s3-consent input[type="checkbox"] {
        width: 4vw;
        height: 4vw;
    }

    /* 에러 메시지 */
    .s3-error {
        font-size: 3vw;
        top: 64%;
    }

    /* Step02/03 하단 버튼행 */
    .s2-btn-row {
        gap: 2%;
    }


}
