@charset "UTF-8";
/* 제품 상세 — 제품마다 시안이 따로 있고 틀은 모두 같다 (2026-09-18).
     PC 1920×4580 / 모바일 390×2266 — 노드 목록은 product-detail.php 머리 주석에.
   가로는 % 로 환산한다 (1920 기준).
     405 → 21.09375%   504 → 26.25%   67(판~글 간격) → 3.48958%   541 → 28.17708%

   ⚠️ **글은 흐름으로 쌓는다** (2026-09-18 전면 수정, 전역 규칙).
      전에는 영문 라벨·이름·리드·스펙·혜택·버튼이 전부 absolute + top 이었다.
      시안의 top 은 아래 '앞 요소와의 간격'으로 환산해 margin 에 들어가 있다.
   ⚠️ 시안마다 위쪽 글 자리가 조금씩 다르다 (영문 라벨 67 / 68 / 88).
      7개 중 5개가 쓰는 값(라벨 88 · 이름 116 · 리드 182)으로 맞췄다.
      스펙부터 아래(270 / 403 / 541)는 7개가 모두 같다.
   가운데 긴 상세 이미지는 별도 시안(739:218 · 926:698)에서 블록마다 잘라 넣었다 — 아래 .pd-detail.
   ============================================================ */

/* 판과 글이 나란히 선다. 판 윗끝 175(120+55), 글 윗끝 208(120+88),
   둘 다 아랫끝 705 에서 끝나고 섹션은 765 에서 끝난다.
   시안은 **판 504 + 간격 67 + 글 541 = 1112 짜리 덩어리를 가운데** 놓은 것이다(좌 405 / 우 403).
   ⚠️ 폭을 화면 비율(%)로 잡으면 좁은 화면에서 글 칸까지 같이 쪼그라든다 —
      1280 에서 글 칸이 361 이 되어 혜택 두 칸이 칸 밖으로 넘쳤다.
      그래서 덩어리를 가운데 두고, 모자라면 **사진이 먼저 줄고 글 칸은 400 까지만** 준다.
   왼쪽 padding 22 / 오른쪽 20 — 1920 에서 판이 시안과 같은 405 에 서게 하는 값이다. */
.pd-info {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 120px 20px 60px 22px;
    background: #fff;
}

/* ------------------------------------------------------------
   사진 — 여러 장을 가로로 넘긴다
   **회색 판째 뽑은 사진**이다 (PC 504×530 / 모바일 390×370 의 2배).
   제품마다 사진 크기·자리가 달라서(스킨은 가늘고 길게, 크림은 낮고 넓게)
   사진만 받아 여백으로 맞추면 제품마다 값이 달라진다 — 판째 받으면 시안 배치가 그대로 들어간다.
   판 색을 파일에 구워 넣던 작업(곱하기 합성)도 필요 없어졌다.
   ------------------------------------------------------------ */
.pd-gallery {
    position: relative;     /* 화살표의 기준 */
    flex: 0 1 504px;        /* 모자라면 사진이 먼저 준다 */
    min-width: 0;
    margin-top: 55px;
    aspect-ratio: 504 / 530;
    background: #f5f5f5;    /* 사진이 늦게 올 때 비는 자리 — 시안 판 색 */
}

.pd-gallery-track {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.pd-gallery-track::-webkit-scrollbar { display: none; }

.pd-slide {
    flex: 0 0 100%;
    height: 100%;
    scroll-snap-align: start;
}
.pd-slide picture { display: block; width: 100%; height: 100%; }
.pd-slide img { width: 100%; height: 100%; object-fit: cover; }

/* 화살표 — 시안 SVG 는 2px 선 두 개(#111835)라 파일 대신 CSS 로 그린다.
   변 20.5 짜리 정사각형의 두 변을 45° 돌리면 14.5×29 짜리 꺾쇠가 된다.
   (지금은 제품마다 사진이 한 장뿐이라 화살표가 안 나온다.) */
.pd-arrow {
    position: absolute;
    top: 50%;
    z-index: 1;
    width: 44px;            /* 손가락·마우스가 닿는 넓이는 선보다 넉넉하게 */
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    transform: translateY(-50%);
    cursor: pointer;
}
.pd-arrow::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20.5px;
    height: 20.5px;
    border-left: 2px solid #111835;
    border-bottom: 2px solid #111835;
    opacity: .85;
    transition: opacity .2s ease;
}
.pd-arrow--prev { left: 8px; }   /* 꺾쇠 끝이 판 안쪽 30 에 온다 */
.pd-arrow--next { right: 8px; }
.pd-arrow--prev::before { transform: translate(-50%, -50%) rotate(45deg); }
.pd-arrow--next::before { transform: translate(-50%, -50%) rotate(-135deg); }
.pd-arrow:hover::before { opacity: 1; }
/* 더 갈 데가 없는 쪽 (js/main.js 가 붙인다) */
.pd-arrow.is-off { cursor: default; }
.pd-arrow.is-off::before { opacity: .2; }

/* ------------------------------------------------------------
   오른쪽 글 — 흐름으로 쌓는다. 괄호 안은 시안 좌표(정보 블록 기준 y).
   ------------------------------------------------------------ */
.pd-text {
    flex: 0 1 541px;        /* 버튼 폭이 곧 글 칸 폭이다 */
    min-width: 400px;       /* 이보다 좁아지면 이름·스펙이 버티지 못한다 — 사진이 대신 준다 */
    margin-left: clamp(32px, 3.48958vw, 67px);   /* 976 - 909 = 67 */
    padding-top: 88px;
}

.pd-en   { font-size: 16px; line-height: 1.6; color: var(--muted); }                       /* 88 */
.pd-name { margin-top: 2.4px; font-size: 40px; font-weight: 700; line-height: 1.6; color: var(--ink); }  /* 116 */
/* 리드 — 두 줄 자리를 늘 비워 둔다. 한 줄(세트)이어도 스펙이 270 에 선다 (시안이 그렇다) */
.pd-lead {
    min-height: 57.6px;     /* 18 × 1.6 × 2줄 */
    margin-top: 2px;        /* 182 */
    font-size: 18px;
    font-weight: 500;
    line-height: 1.6;
    color: #000;            /* 2026-09-18 시안에서 파랑(#002d7a) → 검정 */
    word-break: keep-all;
}

/* 스펙 — 라벨과 값이 두 칸으로 선다. 값 왼끝 1147 = 976 + 171. 줄 간격 35 (270 / 305 / 340) */
.pd-spec {
    display: grid;
    grid-template-columns: 171px 1fr;
    row-gap: 6.2px;         /* 35 - 28.8 */
    margin-top: 30.4px;     /* 270 */
    font-size: 16px;
    line-height: 1.8;
}
.pd-spec dt { font-weight: 600; color: var(--body); }
.pd-spec dd { margin: 0; font-weight: 500; color: #000; }
.pd-tag { white-space: nowrap; }   /* 해시태그 하나는 안 쪼갠다 — 태그 사이에서만 접힌다 */

/* 상담신청·고객혜택 — 라벨 한 줄 + 항목 두 칸(2줄씩) + 주석 (403 / 406 / 473) */
.pd-benefit {
    display: grid;
    grid-template-columns: 171px 1fr;
    margin-top: 34.2px;     /* 403 */
    font-size: 16px;
}
.pd-benefit-label {
    font-weight: 600;
    line-height: 2.2;
    color: var(--body);
    white-space: nowrap;
}
/* 두 칸(1·2 / 3·4)은 다단(columns)으로 만든다 — 칸 폭이 모자라면(좁은 PC) 저절로
   한 칸 네 줄로 접힌다. 시안 폭(370)에서 둘째 칸이 1354 에 선다 ((370 - 47) / 2 + 47 = 207). */
.pd-benefit-items {
    columns: 2 160px;
    column-gap: 47px;
    margin-top: 3px;        /* 406 — 라벨(줄 간격 2.2)과 글자 가운데가 맞는다 */
    font-weight: 600;
    line-height: 1.8;
    color: #000;
}
.pd-benefit-items li { break-inside: avoid; white-space: nowrap; }
.pd-benefit-note {
    grid-column: 2;
    margin-top: 9.4px;      /* 473 */
    font-size: 14px;
    line-height: 1.8;
    color: #999;
}

/* 상담하기 — 사이트의 다른 버튼(알약)과 달리 시안이 모서리 8 짜리 넓은 버튼이다 */
.pd-cta {
    display: block;
    width: 100%;            /* 541 */
    height: 44px;
    margin-top: 42.8px;     /* 541 */
    border: 0;
    border-radius: 8px;
    background: var(--navy-btn);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--white);
    cursor: pointer;
    transition: opacity .2s ease;
}
.pd-cta:hover { opacity: .9; }

/* 상세 이미지 — 위 정보 블록과 같은 폭(1112)으로 가운데.
   좌 22 / 우 20 은 .pd-info 와 같은 값이다 — 그래서 어느 폭에서도 양끝이 정보 블록과 맞는다
   (1920 에서 405 ~ 1517). 위아래 간격은 시안에 없어 정했다: 버튼 아래 80 · 푸터 위 80. */
.pd-detail {
    padding: 20px 20px 80px 22px;   /* 위 20 + .pd-info 아래 60 = 버튼과 80 */
    background: #fff;
}
/* 폭은 위 덩어리와 **같은 식**이다 — 사진 504 + 간격 + 글 541. 간격이 화면을 따라 67 → 32 로
   줄어들기 때문에 1112 로 박으면 1280 에서 양끝이 11 씩 어긋났다. */
.pd-detail-inner { max-width: calc(1045px + clamp(32px, 3.48958vw, 67px)); margin: 0 auto; }
/* 블록끼리 틈 없이 붙어 한 장처럼 보여야 한다 — inline 이면 줄 간격만큼 틈이 생긴다 */
.pd-detail img { display: block; width: 100%; height: auto; }

@media (prefers-reduced-motion: reduce) {
    .pd-arrow::before,
    .pd-cta { transition: none; }
}

/* ============================================================
   모바일 (≤768) — 390 폭, 좌우 여백 20
   사진이 상단 전체 밴드로 올라가고 나머지가 아래에 한 줄로 쌓인다.
   괄호 안은 시안 좌표(프레임 기준 y, 에센셜 스킨 446:2735).
   리드가 길면 세 줄로 접히고 아래가 그만큼 내려간다 — 시안(밸런스 앰플)도 그렇다.
   ⚠️ 시안에 화살표도 점 표시도 없다 — 손으로 미는 것만 된다(2026-09-10 결정).
   ============================================================ */
@media (max-width: 768px) {
    .pd-info {
        display: block;
        padding: 60px 0 43px;   /* 위: GNB 60 / 아래: 버튼 1043 → 1086 */
    }

    .pd-gallery {
        width: 100%;
        margin: 0;
        aspect-ratio: 390 / 370;
    }

    .pd-arrow { display: none; }

    .pd-text {
        min-width: 0;
        margin: 0;
        padding: 21px 20px 0;   /* 판 아래끝 430 → 라벨 451 */
    }

    .pd-name { font-size: 36px; }                   /* 479 */
    .pd-lead { min-height: 0; margin-top: 16.4px; } /* 553 */

    .pd-spec {
        grid-template-columns: 100px 1fr;           /* 값 왼끝 120 */
        margin-top: 49.4px;                          /* 660 */
        margin-right: -16px;    /* 시안은 긴 해시태그(리파인 크림, 263)를 오른쪽 여백을 넘겨 382 까지 한 줄로 그렸다 — 글꼴 렌더 차이만큼 4 더 준다 */
    }
    .pd-spec dd { font-weight: 400; color: var(--body); }   /* 모바일 시안은 값이 Regular · #444 */

    /* 라벨 두 줄(상담신청 / 고객혜택) + 항목 한 칸 네 줄, 모두 줄 간격 2.2 (798) */
    .pd-benefit {
        grid-template-columns: 100px 1fr;
        margin-top: 39.2px;
    }
    .pd-benefit-label span { display: block; }
    .pd-benefit-items {
        columns: auto;          /* 한 칸 네 줄 */
        margin-top: 0;
        line-height: 2.2;
    }
    .pd-benefit-note {
        margin-top: 1.2px;      /* 940 */
        font-size: 11px;
        color: var(--body);     /* 모바일 시안은 #444 (PC 는 #999) */
    }

    .pd-cta {
        margin-top: 39.2px;     /* 999 */
        border-radius: 4px;     /* 모바일 시안은 4 */
    }

    /* 상세 이미지는 화면 폭 가득. 위 간격은 .pd-info 아래 43 이 그대로 맡는다 */
    .pd-detail { padding: 0 0 40px; }
    .pd-detail-inner { max-width: none; }
}
