@charset "UTF-8";
/* 구매상담 팝업 + 개인정보처리방침 팝업 — **모든 페이지에서 쓴다.**
   GNB 의 '상담신청' 이 전 페이지에 있어서 팝업도 전 페이지에 있어야 한다.
   그래서 main.css 가 아니라 이 파일로 뺐고 header.php 가 항상 불러온다
   (2026-09-10). main.css 에 두면 메인 말고는 팝업이 모양 없이 뜬다.

   마크업은 includes/consult-pop.php — 떠다니는 '구매상담' 버튼도 거기 같이 있다.
   ============================================================ */

/* ============================================================
   화면을 따라다니는 구매상담 버튼 — 시안 183:3274(PC 140) / 218:4051(모바일 72)
   원·워드마크·글자를 직접 그린다. 이미지로 내보내면 그림자 여백이
   흰색으로 채워져 나와 배경이 하얗게 보인다.
   ============================================================ */
/* ⚠️ **크기가 화면 폭을 따라 줄어든다** (2026-09-15).
   전에는 140px 고정이라 1024(아이패드 가로)에서도 140 그대로 콘텐츠를 가렸고,
   768 에서 갑자기 72 로 반토막이 났다.
   1920 에서 시안 140, 800 에서 91 이 되도록 기울기를 잡았다 (4.375vw + 56px).
     2560 → 140 · 1920 → 140 · 1440 → 119 · 1280 → 112 · 1024 → 101 · 800 → 91
   오른쪽·아래 여백도 같은 비율(60/140)로 같이 줄인다 — 버튼만 작아지면 구석에서 붕 뜬다.
   안쪽 워드마크·글자도 전부 버튼 크기 대비 비율이다. 원만 줄면 글자가 삐져나온다.
   ⚠️ 구매상담 팝업이 이 버튼 바로 위에 붙는다 — 팝업 위치도 이 두 값을 쓴다.
   ⚠️ 메인 히어로 카피의 글자 크기 식이 이 버튼의 왼끝(W - 200)을 기준으로 잡혀 있다.
      버튼이 작아지면 여유가 늘어나는 쪽이라 깨지진 않지만, 키우면 같이 봐야 한다. */
:root {
    --fab: clamp(88px, 4.375vw + 56px, 140px);
    --fab-gap: calc(var(--fab) * 0.42857);   /* 60 / 140 */
}

.consult-fab {
    position: fixed;
    right: var(--fab-gap);
    bottom: var(--fab-gap);
    z-index: 150;
    display: block;
    width: var(--fab);
    height: var(--fab);
    border-radius: 50%;
    background: #355076;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
    color: var(--white);
    text-align: center;
    transition: transform .2s ease;
}
.consult-fab:hover { transform: translateY(-2px); }

.consult-fab-mark {
    position: absolute;
    top: 36.4286%;          /* 51 / 140 */
    left: 50%;
    width: 79.5064%;        /* 111.309 / 140 */
    height: auto;
    transform: translateX(-50%);
}

.consult-fab span {
    position: absolute;
    top: 54%;               /* 75.6 / 140 — 시안: 아래끝 103.05 */
    left: 0;
    width: 100%;
    font-size: calc(var(--fab) * 0.14);   /* 19.6 / 140 */
    font-weight: 600;
    line-height: 1.4;
}

@media (prefers-reduced-motion: reduce) {
    .consult-fab { transition: none; }
}

@media (max-width: 768px) {
    /* 모바일은 시안(218:4051) 값을 그대로 쓴다 — 비율이 PC 와 조금 달라서
       PC 식을 이어 쓰면 글자 자리가 몇 px 어긋난다. */
    .consult-fab {
        right: 10px;
        bottom: 20px;
        width: 72px;
        height: 72px;
    }
    .consult-fab-mark { top: 25px; width: 57.243px; }
    .consult-fab span { top: 36.8px; font-size: 12px; }   /* 시안: 아래끝 53.63 */
}

/* ------------------------------------------------------------
   화면 정중앙으로 뜨는 형태 (2026-09-10 기획 요청)
   GNB 와 메인 최하단의 '상담신청' 으로 열면 이 모양이 된다.
   오른쪽 아래 '구매상담' 버튼으로 열 때는 시안대로 말풍선이다.
   ------------------------------------------------------------ */
.consult-pop.is-center .consult-pop-dim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 155;
    background: rgba(0, 0, 0, .4);
}

.consult-pop.is-center .consult-pop-panel {
    top: 50%;
    right: auto;
    bottom: auto;
    left: 50%;
    max-width: calc(100% - 40px);
    max-height: calc(100% - 40px);
    transform: translate(-50%, -50%);
}

/* ============================================================
   개인정보처리방침 팝업 — 시안 183:3366 (352×473)
   ------------------------------------------------------------
   구매상담 팝업 안의 '자세히보기' 로 연다. **상담 팝업 위에 겹쳐 뜬다**
   (상담 팝업 z-index 160 → 이건 170). 화면 정중앙 고정이라
   PC·모바일이 같은 모양이고, 좁은 화면에서만 폭이 줄어든다.
   ============================================================ */
.privacy-pop[hidden] { display: none; }

.privacy-pop-dim {
    position: fixed;
    inset: 0;
    z-index: 170;
    background: rgba(0, 0, 0, .4);
}

.privacy-pop-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 171;
    width: 352px;
    max-width: calc(100% - 40px);   /* 352 보다 좁은 폰에서 잘리지 않게 */
    height: 473px;
    max-height: calc(100% - 40px);
    padding: 28px 24px 24px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
    transform: translate(-50%, -50%);
    /* 제목 · 본문 · 확인 세 덩어리. 본문만 남는 높이를 먹고 스크롤한다 */
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.privacy-pop-title {
    flex: none;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--ink);
}

/* 닫기 X — 햄버거·구매상담과 같은 판단으로 선 두 개를 CSS 로 그린다 */
.privacy-pop-close {
    position: absolute;
    top: 24px;
    right: 16px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}
.privacy-pop-close span,
.privacy-pop-close span::before {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 19.82px;
    height: 1.6px;
    background: var(--ink);
    content: "";
}
.privacy-pop-close span { transform: translate(-50%, -50%) rotate(45deg); }
.privacy-pop-close span::before { top: 0; left: 0; transform: rotate(-90deg); }

/* ⚠️ 시안은 본문 상자(304×301)보다 글이 길어 **잘려 있다.**
   동의를 받는 화면이라 다 읽히지 않으면 안 되므로 스크롤로 푼다. */
.privacy-pop-body {
    flex: 1 1 auto;
    margin: 20px 0;
    overflow-y: auto;
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    word-break: keep-all;
}
.privacy-pop-body p + p { margin-top: 1.5em; }

.privacy-pop-ok {
    flex: none;
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 8px;
    background: var(--navy-btn);
    font-family: inherit;
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    cursor: pointer;
}

/* ============================================================
   구매상담 팝업 — 시안 218:3693 (PC 310×405, 버튼 바로 위)
   모바일은 화면 폭을 꽉 채우는 바텀시트 (218:3763).
   ============================================================ */
.consult-pop[hidden] { display: none; }

.consult-pop-dim { display: none; }   /* PC 는 말풍선처럼 얹히므로 배경을 덮지 않는다 */

.consult-pop-panel {
    position: fixed;
    right: var(--fab-gap);                              /* 버튼과 오른쪽을 맞춘다 */
    bottom: calc(var(--fab-gap) + var(--fab) + 20px);   /* 버튼 + 아래여백 + 간격 20 */
    z-index: 160;
    width: 310px;
    height: 455px;                   /* 나이 칸이 생기며 405 → 455 (2026-09-14 시안 642:1215) */
    border-radius: 12px;
    background: #f4f4f4;
    box-shadow: 0 4px 8px rgba(60, 60, 60, .16);
}

.consult-pop-logo {
    position: absolute;
    top: 25px;
    left: 24px;
    width: 123.057px;
    height: auto;
    filter: invert(1);              /* 흰 워드마크뿐이라 뒤집어 검정으로 쓴다 */
}

.consult-pop-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}
.consult-pop-close span,
.consult-pop-close span::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 0;
    width: 20px;
    height: 1.6px;
    background: var(--ink);
}
.consult-pop-close span { transform: rotate(45deg); }
.consult-pop-close span::before { top: 0; transform: rotate(-90deg); }

.consult-pop-lead {
    position: absolute;
    top: 82px;
    left: 24px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--ink);
}

/* ---- 입력 ---- */
/* 칸 셋이 48 높이 + 8 간격으로 선다 (시안 169 / 225 / 281) */
.consult-field { position: absolute; left: 24px; width: 262px; }
.consult-field--name { top: 169px; }
.consult-field--age  { top: 225px; }
.consult-field--tel  { top: 281px; }

.consult-label { display: none; }   /* PC 시안에서는 라벨을 감춘다 */

.consult-form input[type="text"],
.consult-form input[type="tel"],
.consult-form select {
    width: 100%;
    height: 48px;
    padding: 0 10px;
    border: 0;
    border-radius: 4px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
}
.consult-form input::placeholder { color: #999; }

/* ---- 나이 드롭다운 ----
   ⚠️ 꺾쇠는 **CSS 로 그린다.** 아이콘 파일을 쓰면 CDN 업로드가 한 번 더 걸리고
      PC(16) / 모바일(24) 크기가 달라 두 장이 된다 — 햄버거·페이지 화살표와 같은 판단이다.
   ⚠️ `<select>` 에는 가상요소가 안 붙는다. 그래서 감싸는 <span> 에 그린다. */
.consult-select { position: relative; display: block; }

.consult-form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 38px;            /* 꺾쇠 자리를 비운다 */
    cursor: pointer;
}
/* 아무것도 안 고른 동안은 placeholder 처럼 흐리게.
   `:invalid` 로는 안 된다 — 선택 항목이라 required 가 없어서 늘 valid 다.
   js/main.js 가 `.is-empty` 를 붙였다 뗀다. */
.consult-form select.is-empty { color: #999; }

.consult-select::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 16px;                    /* 시안: 262 안에서 오른쪽 끝 246 */
    width: 8px;
    height: 8px;
    margin-top: -6px;               /* 꺾쇠는 아래로 치우쳐 보여서 조금 올린다 */
    border-right: 1.5px solid #999;
    border-bottom: 1.5px solid #999;
    transform: rotate(45deg);
    pointer-events: none;           /* 눌러도 select 가 열리게 */
}

/* 기본 포커스 테두리가 너무 세서 부드럽게 바꾼다 (키보드 사용자에겐 계속 보여야 한다) */
.consult-form input:focus,
.consult-agree input[type="checkbox"]:focus-visible,
.consult-submit:focus-visible,
.consult-pop-close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(22, 33, 49, .35);
}

/* ---- 동의 ---- */
.consult-agree {
    position: absolute;
    top: 343px;
    left: 24px;
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 13px;
    line-height: 1.5;
    letter-spacing: -0.26px;
    color: var(--body);
    white-space: nowrap;
}
.consult-agree input[type="checkbox"] {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 0 2px 0 0;
    position: relative;
    border: 1px solid #ddd;
    border-radius: 2px;
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}
.consult-agree input[type="checkbox"]:checked {
    border-color: var(--navy-btn);
    background: var(--navy-btn);
}
/* 체크 표시 — 선 두 개로 그린다 */
.consult-agree input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    width: 9px;
    height: 5px;
    margin: 4px 0 0 3px;
    border: 2px solid #fff;
    border-top: 0;
    border-right: 0;
    transform: rotate(-45deg);
}
.consult-agree label { cursor: pointer; }
/* '자세히보기' 는 페이지 이동이 아니라 팝업을 여는 것이라 <button> 이다.
   버튼 기본 모양을 지우고 글자만 남긴다. */
.consult-agree-more {
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    line-height: inherit;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
}

/* ---- 제출 ---- */
.consult-submit {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 262px;
    height: 48px;
    border: 0;
    border-radius: 8px;
    background: var(--navy-btn);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    cursor: pointer;
}

/* ============================================================
   구매상담 팝업 — 모바일 (바텀시트, 시안 218:3763)
   ============================================================ */
@media (max-width: 768px) {
    /* 시트라서 뒤 화면을 덮어 둔다 (시안에 없는 부분 — 지우려면 이 블록만 빼면 된다) */
    .consult-pop-dim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 155;
        background: rgba(0, 0, 0, .4);
    }

    .consult-pop-panel {
        right: auto;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 569px;              /* 나이 칸이 생기며 472 → 569 (시안 642:1535) */
        border-radius: 12px 12px 0 0;
        box-shadow: 0 -4px 8px rgba(60, 60, 60, .16);   /* 위로 드리운다 */
    }

    .consult-pop-logo { top: 26px; width: 130.954px; }
    /* 닫기 X 가 24 로 커진다 (시안 218:3936).
       ⚠️ 두 선의 top 이 다르다 — span 은 버튼 기준 가운데(11), `::before` 는
          span 기준 0 이다. 둘을 같이 잡으면 선이 겹쳐 **X 가 빗금 하나로 보인다.** */
    .consult-pop-close { top: 24px; right: 24px; width: 24px; height: 24px; }
    .consult-pop-close span { top: 11px; width: 24px; }
    .consult-pop-close span::before { width: 24px; }

    .consult-pop-lead { top: 88px; font-size: 16px; line-height: 1.6; }

    /* 모바일에서는 라벨이 보인다 */
    /* 라벨이 보여서 한 덩어리가 73(라벨 17 + 간격 8 + 입력 48), 덩어리 간격 20 */
    .consult-field { width: calc(100% - 48px); }   /* 390 화면에서 시안의 342 */
    .consult-field--name { top: 186px; }
    .consult-field--age  { top: 279px; }
    .consult-field--tel  { top: 372px; }
    .consult-label {
        display: block;
        margin-bottom: 8px;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.2;
        color: var(--ink);
    }

    .consult-agree { top: 461px; }

    /* 꺾쇠가 PC 보다 크다 (시안 24×24, 오른쪽 끝에서 14 안쪽) */
    .consult-select::after {
        right: 20px;
        width: 10px;
        height: 10px;
        margin-top: -7px;
    }
    .consult-agree input[type="checkbox"] { width: 20px; height: 20px; border-radius: 2.5px; }
    .consult-agree input[type="checkbox"]:checked::after { margin: 6px 0 0 5px; }

    /* 제출 버튼이 시트 아래 모서리를 꽉 채운다 */
    .consult-submit {
        left: 0;
        bottom: 0;
        width: 100%;
        height: 52px;
        border-radius: 0;
        font-size: 18px;
        transform: none;
    }

    /* 시트가 떠 있는 동안에는 버튼을 감춘다 — 겹친다 */
    body.is-consult-open .consult-fab { display: none; }
}
