/* ============================================
   Mobile Menu Overlay (JS-toggled, any screen)
   ============================================ */
.mobile-menu {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 9999;
    background: #fff;
    overflow-y: auto;
}
.mobile-menu.active {
    display: block;
}
.mobile-menu-inner {
    padding: 116px 20px 20px;
    min-height: 100%;
}
.mobile-menu-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}
.mobile-menu-close {
    background: none;
    border: none;
    font-size: 26px;
    color: #763B13;
    cursor: pointer;
    padding: 4px 10px;
    line-height: 1;
}

/* Mobile GNB */
.mobile-gnb {
    border-top: 2px solid #EFBF39;
}
.mobile-gnb > li {
    border-bottom: 1px solid #f0e8d8;
}
.mobile-gnb > li > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 10px;
    font-size: 17px;
    font-weight: 500;
    color: #333;
}
.mobile-gnb > li > a::after {
    content: '›';
    font-size: 20px;
    color: #aaa;
    transition: transform 0.2s;
}
.mobile-gnb > li.open > a::after {
    transform: rotate(90deg);
}

/* Mobile LNB (sub menu) — show/hide controlled by jQuery slideDown/slideUp */
.mobile-lnb {
    display: none;
    background: #faf7f3;
    border-top: 1px solid #f0e8d8;
}
.mobile-lnb li a {
    display: block;
    padding: 13px 25px;
    font-size: 15px;
    color: #474747;
    border-bottom: 1px solid #eee;
}
.mobile-lnb li:last-child a {
    border-bottom: none;
}

/* Mobile Utility Links */
.mobile-util {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 2px solid #EFBF39;
}
.mobile-util li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 10px;
    font-size: 15px;
    color: #474747;
    border-bottom: 1px solid #f0e8d8;
}
.mobile-util li:last-child a {
    border-bottom: none;
}
.mobile-util li a img {
    display: none;
}


/* ============================================
   [1] Tablet & Mobile (max-width: 1023px)
   ============================================ */
@media screen and (max-width: 1023px) {
    .container {
        padding: 0 24px;
    }

    /* --- Header: compact single row --- */
    header {
        position: relative;
        display: flex; align-items: center; justify-content: space-between;
        height: 116px; padding: 0 20px;
        z-index: 10000; background: #fff;
    }

    /* Hide GNB nav */
    header nav,
    .nav-indicator {
        display: none !important;
    }

    /* topset: right flex item */
    header .topset {
        position: static;
        margin: 0;
        max-width: none;
        width: auto;
    }
    header .topset .top1 {
        margin-left: 0;
        gap: 0;
    }
    /* Hide 찜상품 */
    header .topset .top1 li:last-child {
        display: none;
    }
    /* Hide top2 */
    header .topset .top2 {
        display: none;
    }
    /* Hide cart text, keep icon */
    .cart-text {
        display: none;
    }

    /* Logo: absolutely centered in header */
    header h1 {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
    }
    header h1 img {
        width: 65px;
        margin: 0 auto;
        display: block;
    }

    /* Hamburger button: left flex item */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        order: -1;
        width: 28px;
        height: 20px;
        cursor: pointer;
    }
    .hamburger span {
        display: block;
        width: 100%;
        height: 3px;
        background: #763B13;
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    /* Hamburger → X when active */
    .hamburger.active span:nth-child(1) {
        transform: translateY(8.5px) rotate(45deg);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8.5px) rotate(-45deg);
    }

    /* Hero */
    .hero { margin-top: 0; height: 350px; overflow: hidden; }
    .hero .swiper,
    .hero .swiper-wrapper,
    .hero .swiper-slide { height: 100%; }
    /* 페이지네이션 위치 재조정 (데스크톱 590px 값 리셋) */
    .swiper-horizontal > .swiper-pagination-bullets,
    .swiper-pagination-bullets.swiper-pagination-horizontal,
    .swiper-pagination-custom,
    .swiper-pagination-fraction {
        bottom: 14px !important;
    }
    .hero .textbox {
        top: 10%;
        right: 7%;
        align-items: end;
        width: 90%;
        text-align: center;
    }
    .hero .textbox h2 { font-size: 33px; }
    .hero .textbox p { font-size: 12px; }
    .hero .textbox p.date {
        font-size: 11px;
    }
    .hero .textbox .btn_go a { padding: 12px; font-size: 16px; }

    /* Section 1: 첫 번째 content만 노출 */
    section .section1 h2 { text-align: center; }
    section .section1 .contentBox { flex-direction: column; align-items: center; gap: 40px; }
    section .section1 .content { width: 90%; }
    section .section1 .contentBox .content:nth-child(n+2) { display: none; }
    section .section1 .content .list li a span:first-child {
        font-weight: 500;
    }
    

    /* Section 2: 2×2 그리드 */
    section .section2 .container .contentBox {
        flex-direction: row; justify-content: center;
        flex-wrap: wrap; gap: 10px;
    }
    section .section2 .container .contentBox > a {
        width: calc(50% - 8px);
    }
    section .section2 .container .contentBox > a img {
        width: 100%;
        height: auto;
    }
    section .section2 .container .contentBox > a .textbox {
        max-width: 100%;
        height: auto;
    }
    section .section2 .container .contentBox > a.mobile-only {
        display: block;
    }
    /* section_bg 숨김 */
    section .section2 .section_bg { display: none; }

    /* Section 3: banner-link 세로 나열 */
    section .section3 .banner-links {
        flex-direction: column;
        align-items: stretch;
    }
    section .section3 .banner-link {
        flex: none;
        width: 100%;
    }

    /* Section 4: 모바일 그리드
        Row 1: img1  | text1
        Row 2: text3 (full width)
        Row 3: img2  | text2
        Row 4: text4 | img3
        Row 5: img4  | text5
    */
    section .section4 .review-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        grid-template-areas:
            "img1  text1"
            "text3 text3"
            "img2  text2"
            "text4 img3"
            "img4  text5";
        gap: 14px;
    }
    section .section4 .review-item.sec4_img2,
    section .section4 .review-item.sec4_img3,
    section .section4 .review-item.sec4_img4 {
        max-height: none;
    }
    section .section4 .review-item.review-text {
        padding: 20px 16px;
    }
    section .section4 .review-item.review-text h3 {
        font-size: 15px;
        margin-bottom: 10px;
    }
    section .section4 .review-item.review-text .reviewer {
        font-size: 13px;
    }
    section .section4 .review-item.review-text p {
        font-size: 13px;
    }

    footer .footer-content {
        flex-direction: column; gap: 28px;
    }
    footer .footer-logo {
        margin: 0 auto;
    }
    footer .footer-info {
        display: flex; flex-direction: column; align-items: center;
    }
        footer .footer-info p {
            width: 78.6vw;
        }
}


/* ============================================
   [2] Mobile only (max-width: 767px)
   ============================================ */
@media screen and (max-width: 767px) {
    .hero .textbox h2 { font-size: 28px; }
    section .section2 .contentBox img { width: 100%; }
}
