/* ============================================================
   COSMETICS.PI - 공통 스타일 (모든 페이지 공유)
   각 페이지 <head> 에 아래 한 줄만 넣으면 됩니다.
   <link rel="stylesheet" href="/css/common.css">
   ============================================================ */

:root {
    --bg-white: #ffffff;
    --bg-black: #0c0c0e;
    --accent-gold: #c5a059;
    --text-dark: #121212;
    --text-dim: #52525b;
    --border-color: #e5e7eb;
    --font-main: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    background-color: var(--bg-black);
    color: var(--text-dark);
    font-family: var(--font-main) !important;
    font-size: 16px !important;
    line-height: 1.7;
    overflow-x: hidden;
    letter-spacing: -0.3px;
    -webkit-font-smoothing: antialiased;
    width: 100vw;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-main) !important; font-weight: 700 !important; }
p, span, a, button, input, select, textarea, label { font-family: var(--font-main) !important; font-size: 14.5px; color: var(--text-dim); }

/* ------------------------------------------------------------
   레이아웃 컨테이너
   ------------------------------------------------------------ */
#mainpage {
    position: relative;
    width: 100%;
    height: 100%;
}

#subpage {
    display: none;
    width: 100vw;
    background: var(--bg-white);
    min-height: 100vh;
}

.chapter-section {
    position: relative;
    /* 모든 챕터를 상단 히어로와 같은 높이로 맞춥니다.
       모바일 브라우저는 주소창이 숨고 나타날 때마다 100vh 가 바뀝니다.
       그러면 이미지가 커졌다 작아지며 화면이 튑니다.
       dvh 는 그 변화를 감안한 높이라 흔들리지 않습니다. */
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100vw;
    overflow: hidden;
    box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.6);
}

.chapter-section:nth-child(1) { box-shadow: none; }

/* ------------------------------------------------------------
   챕터 / 히어로 미디어
   ------------------------------------------------------------ */
.chapter-ad-container, .hero-media-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    background-color: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chapter-ad-container img.active-bg,
.hero-media-container .slideshow-img,
.k-slideshow-img,
.skincare-slideshow-img,
.styling-slideshow-img,
.brandmall-slideshow-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-width: 100%;
    min-height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    /* 이미지 하단에 브랜드 글자가 들어 있어 아래쪽을 기준으로 맞춥니다 */
    object-position: center bottom;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    transition: opacity 1.2s ease-in-out, visibility 1.2s ease-in-out;
}

.hero-media-container .slideshow-img.active,
.k-slideshow-img.active,
.skincare-slideshow-img.active,
.styling-slideshow-img.active,
.brandmall-slideshow-img.active,
img.active-bg {
    opacity: 0.85 !important;
    visibility: visible !important;
    z-index: 2 !important;
}

/* 히어로 슬로건 오버레이 (index.html 에서 사용) */
.hero-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 90%;
    max-width: 1000px;
    text-align: center;
    pointer-events: none;
    padding: 0 20px;
}

.brand-signature-tag {
    display: inline-block;
    color: #ffffff !important;
    font-size: clamp(13px, 1.6vw, 18px) !important;
    font-weight: 300;
    letter-spacing: 1px;
    line-height: 1.8;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.65);
    transition: opacity 0.4s ease;
}

/* ------------------------------------------------------------
   챕터 성별 네비게이션
   ------------------------------------------------------------ */
.chapter-gender-nav {
    position: absolute;
    top: 88%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 60px;
    background: transparent;
    padding: 0;
    border: none;
}

.chapter-gender-link, .mobile-gender-link {
    position: relative;
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: var(--font-main);
    cursor: pointer;
    text-transform: uppercase;
    text-decoration: none;
    text-shadow: none !important;
    padding-bottom: 6px;
}

.chapter-gender-link { font-size: 22px; font-weight: 300 !important; letter-spacing: 4px; }
.mobile-gender-link { font-size: 20px; font-weight: 300 !important; letter-spacing: 4px; }

.chapter-gender-link::before, .mobile-gender-link::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-color: #ffffff;
    opacity: 1 !important;
    z-index: 1;
}

.chapter-gender-link::after, .mobile-gender-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-color: #000000;
    z-index: 2;
    transform: scaleX(0);
    transform-origin: left;
    will-change: transform;
}

@keyframes swipeBlackOnce {
    0%    { transform: scaleX(0); transform-origin: left; }
    50%   { transform: scaleX(1); transform-origin: left; }
    50.1% { transform-origin: right; }
    100%  { transform: scaleX(0); transform-origin: right; }
}

@media (hover: hover) and (pointer: fine) {
    .chapter-gender-link:hover::after, .mobile-gender-link:hover::after {
        animation: swipeBlackOnce 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
}

@media (hover: none) and (pointer: coarse) {
    .chapter-gender-link:active::after, .mobile-gender-link:active::after {
        animation: swipeBlackOnce 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
}

/* ------------------------------------------------------------
   모바일 전용 챕터
   ------------------------------------------------------------ */
.mobile-only-chapter { display: none !important; }

@media (max-width: 768px) {
    #kBeautyMediaViewer, #skincareMediaViewer, #stylingMediaContainer, #brandmallMediaViewer {
        display: none !important;
    }

    /* 모바일에서는 한 챕터가 WOMEN · MEN 두 장으로 나뉩니다.
       부모 높이가 화면 한 장으로 묶여 있으면 MEN 이 잘려 보이지 않습니다. */
    .chapter-section:has(.mobile-only-chapter),
    .chapter-section.has-gender-split {
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

    .mobile-only-chapter {
        display: flex !important;
        flex-direction: column;
        width: 100%;
    }

    .mobile-full-box {
        position: relative;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
        cursor: pointer;
    }

    .mobile-chapter-img {
        position: absolute;
        top: 0; left: 0; width: 100%; height: 100%;
        object-fit: cover; object-position: center bottom;
        opacity: 0.85;
    }

    .mobile-chapter-overlay {
        position: absolute;
        top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0, 0, 0, 0.25);
        z-index: 3;
    }

    .mobile-gender-btn-container {
        position: absolute;
        top: 88%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
        text-align: center;
        pointer-events: none;
    }

    .chapter-section .expo-text-overlay { display: none !important; }
    .mobile-only-chapter .expo-text-overlay { display: flex !important; }
}

/* ------------------------------------------------------------
   커뮤니티 하트
   ------------------------------------------------------------ */
@keyframes rotateHeart360 {
    0%   { transform: rotateY(0deg) scale(1); }
    50%  { transform: rotateY(180deg) scale(1.15); }
    100% { transform: rotateY(360deg) scale(1); }
}

.community-heart-container {
    position: absolute;
    /* Community 글자는 이미지 안에 그려져 있어 코드로 옮길 수 없습니다.
       그래서 하트 쪽을 글자 위로 올려 맞춥니다.

       top 은 퍼센트로 둡니다. 글자가 이미지와 같이 커지고 작아지므로
       픽셀로 잡으면 큰 화면에서 어긋납니다.
       위치를 바꾸려면 아래 top 숫자만 조절하세요. 값이 작을수록 위입니다. */
    top: 14%; left: 51.5%;
    transform: translateX(-50%);
    z-index: 10; pointer-events: none;
}

/* 모바일은 지금 자리가 맞습니다 */
@media (max-width: 768px) {
    .community-heart-container {
        top: 21.5%;
        left: 56.5%;
    }
}

.rotating-red-heart {
    display: inline-block;
    color: #ff2a46;
    font-size: 16px;
    animation: rotateHeart360 2.2s infinite linear;
    transform-style: preserve-3d;
    filter: none !important;
}

/* ------------------------------------------------------------
   EXPO / BRAND MALL 타이포그래피
   ------------------------------------------------------------ */
.expo-text-overlay, .brandmall-text-overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10; pointer-events: none;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center; width: 90%; max-width: 1200px; padding: 0 20px;
}

.expo-typography {
    display: flex; flex-direction: column; align-items: center; line-height: 1.2; width: 100%;
}

.expo-word {
    font-family: 'Cinzel', serif;
    font-size: clamp(26px, 4vw, 55px);
    font-weight: 500; color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    letter-spacing: 3px; margin: 6px 0;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.6);
}

.expo-cosmetics {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(32px, 5vw, 70px);
    font-weight: 300; color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    letter-spacing: 4px; position: relative;
    display: inline-block; margin: 8px 0;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.7);
}

/* 챕터 제목을 사진 아래쪽, WOMEN · MEN 버튼 바로 위에 둡니다.
   위쪽 가운데에 두면 사진 속 인물 얼굴을 가렸습니다.
   버튼 줄은 화면 높이의 88% 자리(가운데 기준)에 있어, 그보다 조금 위에서 끝나게 맞춥니다. */
.brandmall-text-overlay.chapter-title-low {
    top: auto !important; bottom: calc(12% + 38px);
    transform: translateX(-50%);
}
/* 제목 뒤를 둥글게 살짝 어둡게 해 밝은 사진에서도 흰 글씨가 묻히지 않게 합니다 (경계선 없이 퍼짐) */
.chapter-title-low::before {
    content: ''; position: absolute; inset: -50px -15%; z-index: -1; pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.26) 0%, rgba(0,0,0,0.12) 40%, rgba(0,0,0,0.04) 60%, rgba(0,0,0,0) 75%);
}
@media (max-width: 768px) {
    .brandmall-text-overlay.chapter-title-low { bottom: calc(12% + 34px); }
    .chapter-title-low .expo-word { margin: 2px 0 !important; }
    .chapter-title-low .expo-cosmetics { margin: 4px 0 !important; }
}

/* 챕터 이름 아래 한 줄 설명 (AI SKINCARE · TOTAL STYLING · BRAND MALL) */
.chapter-desc {
    font-size: clamp(13px, 1.25vw, 16px); font-weight: 400; color: #ffffff !important;
    letter-spacing: 0.5px; line-height: 1.6; margin-top: 10px; max-width: 560px;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.75); word-break: keep-all;
}
@media (max-width: 768px) { .chapter-desc { font-size: 12.5px; max-width: 300px; margin-top: 8px; } }

.expo-cosmetics .reg-mark {
    font-size: clamp(10px, 1.2vw, 16px);
    position: absolute; top: 5%; right: -18px;
    color: #ffffff; -webkit-text-fill-color: #ffffff; font-weight: 400;
}

/* ------------------------------------------------------------
   서브페이지 배너 / 타이틀
   ------------------------------------------------------------ */
.subpage-banner-container {
    position: relative; width: 100%; height: 88vh; height: 88dvh; background-color: #000;
    overflow: hidden; display: flex; align-items: center; justify-content: center;
}

.subpage-banner-img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: 0; visibility: hidden;
    transition: opacity 1.2s ease-in-out, visibility 1.2s ease-in-out; z-index: 1;
}

.subpage-banner-img.active { opacity: 0.85; visibility: visible; z-index: 2; }

@media (max-width: 768px) { .subpage-banner-container { height: 78vh; height: 78dvh; } }

/* ------------------------------------------------------------
   서브페이지 표준 제목 블록
   모든 서브페이지가 아래 순서를 지킵니다.
   상단 광고 배너 → 제목 → 소제목 → 골드 라인 → 카테고리 바 → 상품
   ------------------------------------------------------------ */
.page-title-banner {
    /* 100vw 는 스크롤바 폭만큼 넘쳐서 제목이 잘립니다. 100% 로 둡니다. */
    width: 100%;
    max-width: 100%;
    background-color: var(--bg-white);
    padding: 48px 5% 38px 5%;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    overflow-wrap: break-word;
}

.page-title-banner h1 {
    color: var(--text-dark);
    font-family: 'Cinzel', serif;
    font-size: clamp(20px, 3.2vw, 38px);
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 10px;
    /* 제목이 길면 줄바꿈해서 항상 화면 안에 들어오게 합니다 */
    white-space: normal;
    overflow-wrap: break-word;
    max-width: 100%;
}

.page-title-banner .sub-category-label {
    display: block;
    color: var(--accent-gold);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .page-title-banner { padding: 34px 5% 28px 5%; }
    .page-title-banner h1 { letter-spacing: 1.5px; font-size: clamp(18px, 5vw, 26px); }
    .page-title-banner .sub-category-label { font-size: 12px; letter-spacing: 2px; }
}

.subpage-brand-title-box {
    text-align: center; padding: 35px 20px; min-height: 130px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--bg-white); border-bottom: 1px solid var(--border-color); width: 100%;
}

.subpage-brand-title-box h2 {
    font-size: clamp(26px, 4vw, 50px); letter-spacing: 3.5px; color: var(--text-dark);
    text-transform: uppercase; font-weight: 700; margin-bottom: 6px;
}

.subpage-brand-title-box p {
    color: var(--accent-gold); font-size: clamp(12px, 1.4vw, 15px);
    letter-spacing: 2px; font-weight: 600; text-transform: uppercase;
}

/* ------------------------------------------------------------
   카테고리 바
   ------------------------------------------------------------ */
.k-category-wrapper {
    background: #0c0c0e;
    padding: 16px 5%;
    width: 100%;
}

.k-main-categories {
    display: flex;
    justify-content: center;
    gap: 45px;
    flex-wrap: wrap;
}

.k-main-cat-btn {
    position: relative;
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: var(--font-main);
    font-weight: 300;
    font-size: 18px;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    padding-bottom: 6px;
    transition: color 0.3s;
}

.k-main-cat-btn::before {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 1px;
    background-color: rgba(255, 255, 255, 0.3);
}

.k-main-cat-btn::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 1px;
    background-color: var(--accent-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.k-main-cat-btn.active, .k-main-cat-btn:hover { color: var(--accent-gold); }
.k-main-cat-btn.active::after, .k-main-cat-btn:hover::after { transform: scaleX(1); }

.k-sub-categories-bar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 14px 5%;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    min-height: 50px;
    align-items: center;
}

.k-sub-cat-btn {
    background: none;
    border: none;
    color: #121212;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.3s;
}

.k-sub-cat-btn.active, .k-sub-cat-btn:hover { color: var(--accent-gold); }

@media (max-width: 768px) {
    .k-category-wrapper {
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
        padding: 14px 15px;
    }
    .k-main-categories {
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 25px;
    }
    .k-sub-categories-bar {
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
        padding: 12px 15px;
        gap: 20px;
    }
}
















/* ------------------------------------------------------------
   헤더
   ------------------------------------------------------------ */
header {
    position: fixed; top: 0; left: 0; width: 100vw; z-index: 5000;
    display: flex; justify-content: space-between; align-items: center; padding: 0 3%;
    background: transparent !important; height: 90px; pointer-events: auto; transition: all 0.3s ease;
}

.header-left-group { display: flex; align-items: center; gap: 14px; z-index: 10; justify-content: flex-start; }

.menu-toggle-btn { background: transparent; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; width: 30px; height: 22px; padding: 0; transition: color 0.3s; }
.header-quick-icon { background: transparent; border: none; color: #ffffff; font-size: 16px; cursor: pointer; transition: color 0.3s; padding: 0; display: inline-flex; align-items: center; justify-content: center; height: 22px; }

.thin-hamburger {
    display: flex; flex-direction: column; justify-content: space-between; width: 22px; height: 16px; cursor: pointer;
}

.thin-hamburger span {
    display: block; width: 100%; height: 2px; background-color: #ffffff; transition: background-color 0.3s ease;
}

header.light-theme .thin-hamburger span { background-color: #121212 !important; }

.logo-group { display: flex; flex-direction: column; cursor: pointer; align-items: center; text-align: center; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 10; }
.header-logo-img { height: 38px; max-width: 220px; object-fit: contain; filter: brightness(0) invert(1); transition: filter 0.3s ease; }

.header-actions { display: flex; align-items: center; gap: 18px; z-index: 10; justify-content: flex-end; }
.header-icon-btn { background: transparent !important; border: none !important; padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: opacity 0.3s; height: 22px; }
.header-icon-btn:hover { opacity: 0.7; }

.header-icon-img { width: 22px; height: 22px; background-size: contain; background-repeat: no-repeat; background-position: center; filter: brightness(0) invert(1); transition: filter 0.3s ease; }
.icon-user-img { background-image: url('/images/icon/my.png'); }
.icon-house-img { background-image: url('/images/icon/house.png'); width: 22px; height: 22px; }
.icon-wallet-img { background-image: url('/images/icon/wallet.png'); }
.icon-bag-img { background-image: url('/images/icon/shopping-bag.png'); }

header.light-theme .menu-toggle-btn { color: #121212 !important; }
header.light-theme .header-quick-icon { color: #121212 !important; }
header.light-theme .header-logo-img { filter: brightness(0) !important; }
header.light-theme .header-icon-img { filter: brightness(0) !important; }

@media (min-width: 769px) {
    .header-actions { display: flex !important; }
    .header-quick-icon { display: inline-flex !important; }
}

@media (max-width: 768px) {
    .header-actions { display: none !important; }
    .header-quick-icon { display: none !important; }
}

/* ------------------------------------------------------------
   스크롤 탑 버튼
   ------------------------------------------------------------ */
.scroll-to-top {
    position: fixed; bottom: 40px; right: 40px; z-index: 4000; color: #ffffff; background: none; border: none;
    cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.4s ease;
    display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px;
}

.scroll-to-top.show { opacity: 1; visibility: visible; }
.scroll-arrow-shape { width: 16px; height: 16px; border-top: 1.5px solid #ffffff; border-left: 1.5px solid #ffffff; transform: rotate(45deg); transition: transform 0.3s ease; }
.scroll-underline { width: 24px; height: 1.5px; background: #ffffff; transform: scaleX(0); transform-origin: right; transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1); }
.scroll-to-top:hover .scroll-underline { transform: scaleX(1); transform-origin: left; }
.scroll-to-top:hover .scroll-arrow-shape { transform: rotate(45deg) translate(-3px, -3px); }

/* ------------------------------------------------------------
   사이드 드로어
   ------------------------------------------------------------ */
.side-menu-drawer {
    position: fixed; top: 0; left: -100%; width: 340px; height: 100vh; height: 100dvh; background: #ffffff; z-index: 8000;
    transition: left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
    display: flex; flex-direction: column; padding: 40px 30px; overflow-y: auto;
    border-radius: 0px !important;
}

.side-menu-drawer.show { left: 0; }

.drawer-close-btn {
    background: none; border: none; width: 30px; height: 36px; cursor: pointer; color: #121212;
    align-self: flex-end; margin-bottom: 20px; display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 300;
}

.drawer-quick-icons-box { display: none; }

@media (max-width: 768px) {
    .drawer-quick-icons-box {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0 !important;
        padding: 0 16px 32px 16px !important;
        margin-bottom: 22px !important;
        border-bottom: 1px solid var(--border-color) !important;
        background: transparent !important;
        border-radius: 0px !important;
    }
    .drawer-quick-icons-box button { background: none; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 8px; }
    .drawer-quick-icons-box .drawer-icon-img { filter: brightness(0) !important; width: 26px; height: 26px; background-size: contain; background-repeat: no-repeat; background-position: center; }
}

.drawer-menu-list { display: flex; flex-direction: column; gap: 12px; }

.drawer-menu-item {
    position: relative;
    border-bottom: none !important;
    padding: 14px 0;
}

.drawer-menu-title {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: 16.5px;
    font-weight: 400 !important;
    color: #121212 !important;
    text-decoration: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: var(--font-main);
    padding-bottom: 6px;
}

.drawer-menu-title i.drawer-arrow-icon {
    font-size: 13px !important;
    color: #121212 !important;
    font-weight: 900 !important;
    transition: transform 0.3s ease, color 0.3s ease;
    margin-left: 15px;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.drawer-sub-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, margin-top 0.3s ease;
    display: flex;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 12px;
    padding-left: 0 !important;
}

.drawer-menu-item.open .drawer-sub-list { max-height: 140px; margin-top: 14px; }
.drawer-menu-item.open .drawer-menu-title i.drawer-arrow-icon { transform: rotate(90deg); color: var(--accent-gold); }

.drawer-sub-item {
    position: relative;
    font-size: 14.5px;
    color: #121212;
    text-decoration: none;
    font-weight: 400 !important;
    cursor: pointer;
    padding-bottom: 4px;
    display: inline-block;
    transition: color 0.2s;
}

.drawer-sub-item::before {
    content: '';
    position: absolute;
    left: -50%;
    bottom: 0;
    width: 200%;
    height: 1px;
    background-color: transparent;
    z-index: 1;
}

.drawer-sub-item::after {
    content: '';
    position: absolute;
    left: -50%;
    bottom: 0;
    width: 200%;
    height: 1px;
    background-color: #121212;
    z-index: 2;
    transform: scaleX(0);
    transform-origin: left;
    will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
    .drawer-sub-item:hover::after { animation: swipeBlackOnce 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
}

@media (hover: none) and (pointer: coarse) {
    .drawer-sub-item:active::after { animation: swipeBlackOnce 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
}

.drawer-sub-item:hover { color: var(--accent-gold); }

.drawer-backdrop { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; height: 100dvh; background: rgba(0,0,0,0.5); z-index: 7500; backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.3s; }
.drawer-backdrop.show { display: block; opacity: 1; }

/* ------------------------------------------------------------
   모달
   ------------------------------------------------------------ */
/* 팝업은 보고 있던 화면 위에 카드만 띄웁니다.
   예전에는 이랬습니다.
     background: rgba(0,0,0,.45)  뒤를 어둡게 덮어 회색 판처럼 보임
     align-items: flex-start      위에 붙어 아래가 통째로 빔
     overflow-y: auto             막 자체가 스크롤되어, 끝에 닿으면
                                  그 힘이 뒤 페이지로 넘어감
   셋 다 고칩니다. 스크롤은 카드 안쪽에서만 일어납니다. */
.modal-overlay {
    display: none !important;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%; height: 100dvh;
    background: transparent;
    z-index: 9000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
    overscroll-behavior: contain;
}
.modal-overlay.show { display: flex !important; }

/* 카드가 화면보다 길면 카드 안쪽이 스크롤됩니다 */
.modal-overlay > * {
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: auto;
}

.modal-card { background-color: #ffffff !important; color: var(--text-dark) !important; padding: 40px 35px; border-radius: 0px !important; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35); position: relative; width: 100%; max-width: 480px; border: 1px solid var(--border-color); }
.modal-card.policy-modal-card { max-width: 650px !important; max-height: 85vh !important; display: flex !important; flex-direction: column !important; }

.modal-close-btn { position: absolute; top: 22px; right: 22px; background: #f3f4f6; border: none; width: 34px; height: 34px; border-radius: 0px !important; font-size: 15px; cursor: pointer; color: var(--text-dark); display: flex; align-items: center; justify-content: center; }

.modal-btn-primary, .modal-btn-gold { width: 100%; border: none; padding: 14px; border-radius: 0px !important; font-weight: 700; cursor: pointer; font-size: 14px; }
.modal-btn-primary { background: var(--text-dark); color: #fff; }
.modal-btn-gold { background: var(--accent-gold); color: #fff; margin-bottom: 12px; }

.modal-btn-plain { background: #f3f4f6; color: var(--text-dark); border: none; padding: 10px 24px; border-radius: 0px !important; font-weight: 700; cursor: pointer; font-size: 13px; }

.policy-content-box {
    font-size: 13.5px; color: #4b5563; line-height: 1.8; overflow-y: auto; flex: 1; padding-right: 12px;
    margin-top: 15px; margin-bottom: 20px; background: #fafafa; padding: 20px; border-radius: 0px !important;
    border: 1px solid var(--border-color); text-align: left;
}

.policy-content-box h4 { font-size: 14.5px; color: var(--text-dark); margin-top: 16px; margin-bottom: 6px; font-weight: 700; }
.policy-content-box h4:first-child { margin-top: 0; }
.policy-content-box p { font-size: 13.5px; color: #52525b; margin-bottom: 12px; }

/* ------------------------------------------------------------
   쇼핑백 모달
   ------------------------------------------------------------ */
.shopping-bag-modal-content {
    background-color: var(--bg-white) !important;
    color: var(--text-dark) !important;
    padding: 40px !important;
    position: relative !important;
    margin: 30px auto !important;
    width: 92% !important;
    max-width: 850px !important;
    min-height: 650px !important;
    height: auto !important;
    overflow-y: visible !important;
    border-radius: 0px !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25) !important;
    z-index: 9999 !important;
}

@media (max-width: 768px) {
    /* 예전에는 모바일에서 배경막을 흰색으로 칠하고 위아래로 늘렸습니다.
       그래서 뒤가 안 보이고 흰 판이 화면을 덮은 것처럼 보였습니다. */
    .modal-overlay {
        padding: 10px !important;
        align-items: center !important;
        overflow: hidden !important;
        background: transparent !important;
    }
    .modal-overlay > * {
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
    }
    .shopping-bag-modal-content {
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        margin: auto !important;
        padding: 24px 16px 28px 16px !important;
        border: 1px solid var(--border-color) !important;
        box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35) !important;
    }
}

/* 팝업이 떠 있는 동안 뒤 페이지를 그 자리에 고정합니다.
   overflow: hidden 만으로는 모바일에서 안 막힙니다. */
body.modal-locked {
    position: fixed;
    left: 0; right: 0;
    width: 100%;
    overflow: hidden;
}

.bag-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #fafafa;
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
    border-radius: 0px !important;
    transition: border-color 0.2s ease;
}

.bag-item-card:hover { border-color: var(--accent-gold); }
.bag-item-info { display: flex; align-items: center; gap: 16px; flex: 1; }
.bag-item-thumb { width: 70px; height: 70px; object-fit: cover; border: 1px solid var(--border-color); }
.bag-item-details h5 { font-size: 14.5px; font-weight: 700; color: var(--text-dark); margin-bottom: 4px; }
.bag-item-details p { font-size: 12.5px; color: var(--text-dim); }
.bag-item-price { font-size: 15px; font-weight: 700; color: var(--accent-gold); margin-right: 20px; }
.bag-item-remove { background: none; border: none; color: #a1a1aa; cursor: pointer; font-size: 16px; padding: 6px; transition: color 0.2s; }
.bag-item-remove:hover { color: #ef4444; }

.mypage-tabs { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 8px !important; border-bottom: 1px solid var(--border-color) !important; margin-bottom: 20px !important; padding-bottom: 14px !important; width: 100% !important; }
.mypage-tab-btn { background: #f3f4f6 !important; border: 1px solid var(--border-color) !important; border-radius: 0px !important; font-size: 13px !important; font-weight: 600 !important; color: var(--text-dim) !important; padding: 10px 4px !important; text-align: center !important; width: 100% !important; cursor: pointer; }
.mypage-tab-btn.active { background: var(--text-dark) !important; color: #ffffff !important; font-weight: 700 !important; }
.mypage-section { display: none; }
.mypage-section.active { display: block; }

/* ------------------------------------------------------------
   푸터
   ------------------------------------------------------------ */
.gold-line-divider { width: 35px; height: 1.5px; background-color: var(--accent-gold); margin-top: 8px; }

.footer-section-wrapper {
    position: relative;
    z-index: 100;
    padding-top: 60px;
    background-color: var(--bg-black);
    color: #ffffff;
    width: 100vw;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    border-top: 1px solid #282832;
}

/* 로고를 화면 높이의 38% 자리에 띄워 두면, 창 높이가 낮은 PC 에서 아래 문구와 겹쳤습니다.
   모바일처럼 글 흐름 안에 두고, 남는 위쪽 공간의 가운데에 오게 합니다. 겹칠 일이 없습니다. */
.footer-ci-logo {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: auto;
    flex-shrink: 0;
    max-height: 30vh;
    width: 280px;
    height: 280px;
    background: url('/logos/ci.png') no-repeat center center;
    background-size: contain;
    z-index: 0;
    pointer-events: none;
}

footer {
    position: relative;
    z-index: 1;
    background: transparent;
    color: #ffffff !important;
    padding: 40px 20px 80px 20px;
    font-size: 13px;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .footer-section-wrapper {
        justify-content: space-between;
        padding-top: 80px;
    }
    .footer-ci-logo {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        width: 140px;
        height: 140px;
        margin: auto;
    }
    .bottom-showcase-slogan {
        font-size: 13px;
        padding: 0 10px;
    }
    footer { padding-top: 40px; }
}

.business-container { max-width: 1200px; margin: 35px auto 25px auto; display: flex; justify-content: center; align-items: center; gap: 20px; flex-wrap: wrap; text-align: center; width: 100%; }

.btn-gold-center {
    background: transparent !important;
    border: 1px solid var(--accent-gold) !important;
    color: var(--accent-gold) !important;
    padding: 12px 35px;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    font-size: 13px;
    border-radius: 0px !important;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.footer-policy-links { display: flex; justify-content: center; align-items: center; gap: 20px; margin-bottom: 18px; font-size: 12px; flex-wrap: wrap; }
.footer-policy-links a { color: #ffffff !important; text-decoration: none; transition: color 0.2s; cursor: pointer; }
.footer-policy-links a:hover { color: var(--accent-gold); }
.footer-policy-links span { color: #52525b; }

.bottom-showcase-slogan {
    color: #ffffff !important;
    font-size: 14.5px;
    font-weight: 400;
    opacity: 1 !important;
    letter-spacing: 1px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .footer-policy-links { flex-direction: column; gap: 10px; }
    .footer-policy-links span { display: none !important; }
}


/* ============================================================
   작은 화면 공통 보정 — 모든 페이지에 함께 적용됩니다
   (페이지별 배치는 각 HTML 의 media query 에서 따로 잡습니다)
   ============================================================ */

/* 1) 가로로 밀리는 문제
   100vw 는 세로 스크롤바 폭까지 포함해서 화면보다 넓어집니다.
   그만큼 오른쪽으로 밀려 가로 스크롤이 생깁니다. */
html, body { width: 100% !important; max-width: 100%; overflow-x: hidden; }

/* 2) 휴대폰에서 입력할 때 화면이 확대되는 문제
   입력창 글자가 16px 보다 작으면 일부 모바일 브라우저가 자동으로 확대합니다. */
@media (max-width: 768px) {
    input, select, textarea { font-size: 16px !important; }
}

/* 3) 손가락으로 누를 수 있는 최소 크기
   모바일 화면 접근성 기준은 44px 안팎을 권합니다. */
@media (pointer: coarse) {
    button, .btn-line, .btn-primary, .chip-btn, a.btn-line {
        min-height: 44px;
    }
    .card-act-btn, .modal-close-btn, .ad-close, .close-x {
        min-width: 40px; min-height: 40px;
    }
}

/* 4) 아주 좁은 화면 (소형 휴대폰 · 접은 폴더블) */
@media (max-width: 420px) {
    p, span, a, button, input, select, textarea, label { font-size: 13.5px; }

    /* 헤더 로고가 잘리지 않도록 */
    .header-logo img, .header-logo svg { max-width: 60vw; }

    /* 모달이 화면을 넘지 않도록 */
    .modal-card { padding: 22px !important; max-height: 88vh; overflow-y: auto; }

    /* 서브페이지 제목 */
    .subpage-brand-title-box { padding: 42px 16px 34px 16px; }
    .subpage-brand-title-box h2 { font-size: 24px; letter-spacing: 2px; }
    .subpage-brand-title-box p { font-size: 10px; letter-spacing: 1.4px; }

    /* 푸터 */
    .footer-policy-links { font-size: 12px; }
}

/* 5) 긴 영문 주소나 상품명이 칸을 밀어내지 않도록 */
.expo-site-cell, .expo-card-site, .feed-text, .rp-text, .record-text {
    overflow-wrap: anywhere;
}

/* 6) 문단 줄바꿈 · 띄어쓰기
   한글 낱말이 줄 끝에서 중간에 잘리지 않게 하고(keep-all),
   띄어쓰기 없는 긴 영문 · 주소만 필요할 때 끊습니다.
   제목은 줄 길이를 고르게, 문단은 마지막 줄에 한 글자만 남지 않게 합니다. */
body { word-break: keep-all; overflow-wrap: break-word; }
h1, h2, h3, h4, .panel-title, .modal-card h3 { text-wrap: balance; }
p, li, dd, .panel-desc, .modal-card p { text-wrap: pretty; }
input, textarea, select, pre, code { word-break: normal; }
/* 함께 붙어 있어야 하는 말 묶음 — 줄이 바뀌어도 가운데서 안 끊깁니다 */
.nb, .nw { white-space: nowrap; }
/* 위의 span 공통 색 · 크기가 묶음에 덮이지 않도록 감싼 글을 그대로 따릅니다 */
.nb, .nw, .seg { color: inherit !important; font-size: inherit !important; font-weight: inherit; letter-spacing: inherit; }
b.nb, strong.nb { font-weight: 700; }
.seg { display: inline-block; }
