/* 누구나 쉽게 끼우는 선반 — /product/shelf/
 * v2 (2026-10-07): 이 페이지 기준 새 설계. 모든 규칙은 .shelf-page 범위 안에서만 동작한다(테마 CSS와 충돌 방지).
 * 공장 섹션(어두움) ↔ 집 섹션(밝음) 대비로 「공장에서 손이 더 가는 만큼 → 집에서는 끼우기만」을 보여 준다.
 * 고치면 sub/shelf.php 의 $shelf_css_ver 를 올린다.
 */
.shelf-page {
    --sp-brown: #A5836A;
    --sp-brown-deep: #7A5C46;
    --sp-ink: #2A2420;
    --sp-text: #4A423C;
    --sp-muted: #8A8079;
    --sp-line: #E8E1DA;
    --sp-tint: #F7F3EE;
    --sp-dark: #221D19;
    --sp-dark-2: #2E2723;
    --sp-radius: 14px;
    color: var(--sp-text);
    font-size: 16px;
    line-height: 1.75;
    word-break: keep-all;
    overflow-wrap: break-word;
    padding-top: 90px; /* 테마 고정 헤더 높이만큼 */
    overflow-x: clip;
}
.shelf-page *, .shelf-page *::before, .shelf-page *::after { box-sizing: border-box; }
.shelf-page img { display: block; max-width: 100%; height: auto; }
.shelf-page figure { margin: 0; }
.shelf-page h1, .shelf-page h2, .shelf-page h3, .shelf-page p { margin: 0; }
.shelf-page ol, .shelf-page ul { margin: 0; padding: 0; list-style: none; }

.shelf-page .sp-inner { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.shelf-page .sp-inner--narrow { max-width: 820px; }
.shelf-page .sp-section { padding: 88px 0; }
.shelf-page .sp-section--tint { background: var(--sp-tint); }

.shelf-page .sp-h2 {
    font-size: clamp(24px, 3.4vw, 36px);
    line-height: 1.35;
    font-weight: 800;
    color: var(--sp-ink);
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}
.shelf-page .sp-lead { font-size: 17px; color: var(--sp-text); max-width: 760px; }
.shelf-page .sp-lead + .sp-lead { margin-top: 12px; }
.shelf-page .sp-kicker {
    display: inline-block;
    font-size: 14px; font-weight: 700; letter-spacing: 0.08em;
    color: var(--sp-brown);
    margin-bottom: 12px;
}
.shelf-page .sp-small { margin-top: 16px; font-size: 14px; color: var(--sp-muted); }
.shelf-page .sp-small a { color: var(--sp-brown); text-decoration: underline; }

/* ① 히어로 */
.shelf-page .sp-hero { padding: 56px 0 72px; background: linear-gradient(180deg, #FBF8F5 0%, #fff 100%); }
.shelf-page .sp-hero__grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.shelf-page .sp-eyebrow {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--sp-brown);
    border-radius: 999px;
    font-size: 14px; font-weight: 700; color: var(--sp-brown);
    margin-bottom: 24px;
}
.shelf-page .sp-hero__title {
    font-size: clamp(36px, 5.6vw, 64px);
    line-height: 1.18;
    font-weight: 800;
    color: var(--sp-ink);
    letter-spacing: -0.03em;
}
.shelf-page .sp-hero__title em { font-style: normal; color: var(--sp-brown); }
.shelf-page .sp-hero__sub { margin-top: 20px; font-size: 18px; color: var(--sp-text); }
.shelf-page .sp-hero__path { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; counter-reset: sp-path; }
.shelf-page .sp-hero__path li {
    counter-increment: sp-path;
    font-size: 14px; font-weight: 600; color: var(--sp-ink);
    background: #fff; border: 1px solid var(--sp-line); border-radius: 999px;
    padding: 6px 14px 6px 8px;
}
.shelf-page .sp-hero__path li::before {
    content: counter(sp-path);
    display: inline-grid; place-items: center;
    width: 20px; height: 20px; margin-right: 6px;
    border-radius: 50%; background: var(--sp-brown); color: #fff; font-size: 12px;
}
.shelf-page .sp-hero__media img {
    width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 24px 48px -24px rgba(42, 36, 32, 0.45);
}

/* ② 세 가지 */
.shelf-page .sp-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 12px; }
.shelf-page .sp-facts li {
    padding: 32px 28px;
    border: 1px solid var(--sp-line);
    border-radius: var(--sp-radius);
    background: #fff;
}
.shelf-page .sp-facts__num {
    display: block;
    font-size: 64px; line-height: 1; font-weight: 800; color: var(--sp-brown);
    letter-spacing: -0.04em; margin-bottom: 18px;
}
.shelf-page .sp-facts__num small { font-size: 20px; font-weight: 700; margin-left: 4px; letter-spacing: 0; }
.shelf-page .sp-facts strong { display: block; font-size: 19px; color: var(--sp-ink); margin-bottom: 8px; }
.shelf-page .sp-facts p { font-size: 15px; color: var(--sp-muted); line-height: 1.65; }

/* ③ 비교 */
.shelf-page .sp-compare {
    margin-top: 36px;
    border-radius: var(--sp-radius);
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--sp-line);
}
.shelf-page .sp-compare__row { display: grid; grid-template-columns: 0.8fr 1fr 1.15fr; }
.shelf-page .sp-compare__row + .sp-compare__row { border-top: 1px solid var(--sp-line); }
.shelf-page .sp-compare__row > span { padding: 18px 20px; font-size: 15px; line-height: 1.6; }
.shelf-page .sp-compare__row [role="rowheader"] { font-weight: 700; color: var(--sp-ink); background: #FBF9F7; }
.shelf-page .sp-compare__row [role="cell"] { color: var(--sp-muted); }
.shelf-page .sp-compare__row .is-ours { background: #FFF8F2; color: var(--sp-ink); font-weight: 600; }
.shelf-page .sp-compare__head > span { font-size: 14px; font-weight: 700; color: var(--sp-muted); padding-top: 16px; padding-bottom: 16px; }
.shelf-page .sp-compare__head .is-ours { background: var(--sp-brown); color: #fff; }

/* ③ 비교 영상 — 표 바로 위. 왼쪽 그림(나사) · 오른쪽 실사(디알코디), 열 순서는 표와 같다 */
.shelf-page .sp-compare-video { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.shelf-page .sp-compare-video figure { border-radius: var(--sp-radius); overflow: hidden; background: #fff; border: 1px solid var(--sp-line); }
.shelf-page .sp-compare-video figure.is-ours { border-color: var(--sp-brown); }
.shelf-page .sp-compare-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #E5E2E1; }
.shelf-page .sp-compare-video figcaption { padding: 12px 16px; font-size: 14px; font-weight: 700; color: var(--sp-muted); line-height: 1.4; }
.shelf-page .sp-compare-video figcaption small { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; }
.shelf-page .sp-compare-video figure.is-ours figcaption { background: var(--sp-brown); color: #fff; }
.shelf-page .sp-compare-video figure.is-ours figcaption small { color: #FFF1E6; }

/* ④ 공장 (어두움) */
.shelf-page .sp-factory { background: var(--sp-dark); color: #D9D1CA; }
.shelf-page .sp-factory .sp-h2 { color: #fff; }
.shelf-page .sp-factory .sp-lead { color: #CFC6BF; }
.shelf-page .sp-factory .sp-kicker { color: #D4B49A; }
.shelf-page .sp-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 44px; counter-reset: none; }
.shelf-page .sp-step { background: var(--sp-dark-2); border-radius: var(--sp-radius); overflow: hidden; padding-bottom: 24px; }
.shelf-page .sp-step figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; } /* 4:3으로 자르면 재단기 전경의 직원·KS 부분이 잘려 다른 기계로 보인다(2026-10-07) */
.shelf-page .sp-step__no {
    display: block; margin: 20px 22px 6px;
    font-size: 13px; font-weight: 800; letter-spacing: 0.12em; color: #D4B49A;
}
.shelf-page .sp-step h3 { margin: 0 22px 10px; font-size: 18px; line-height: 1.4; color: #fff; }
.shelf-page .sp-step p { margin: 0 22px; font-size: 14.5px; line-height: 1.7; color: #BFB5AD; }

.shelf-page .sp-structure { margin: 56px auto 0; max-width: 760px; }
.shelf-page .sp-structure__img { position: relative; border-radius: var(--sp-radius); overflow: hidden; }
.shelf-page .sp-structure__img img { width: 100%; }
.shelf-page .sp-dot {
    position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px;
    border: 3px solid #FF5A3C; border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 90, 60, 0.25);
}
.shelf-page .sp-tag {
    position: absolute; padding: 4px 10px; border-radius: 6px;
    background: #FF5A3C; color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap;
}
.shelf-page .sp-structure figcaption { margin-top: 14px; font-size: 14px; color: #BFB5AD; text-align: center; }

.shelf-page .sp-bridge {
    margin-top: 72px; text-align: center;
    font-size: clamp(22px, 3vw, 30px); font-weight: 800; color: #fff; letter-spacing: -0.02em;
}
.shelf-page .sp-bridge::after {
    content: ""; display: block; width: 2px; height: 56px; margin: 20px auto 0;
    background: linear-gradient(#D4B49A, transparent);
}

/* ⑤ 집 (밝음) */
.shelf-page .sp-home { background: #fff; }
.shelf-page .sp-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 40px; }
.shelf-page .sp-gallery figure { position: relative; border-radius: var(--sp-radius); overflow: hidden; background: #EEE; }
.shelf-page .sp-gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.shelf-page .sp-gallery figcaption {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 36px 18px 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.62));
    color: #fff; font-size: 16px; font-weight: 700;
}
.shelf-page .sp-gallery figcaption b {
    display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 8px;
    border-radius: 50%; background: var(--sp-brown); font-size: 13px;
}
.shelf-page .sp-note {
    margin-top: 28px; padding: 24px 28px;
    border-left: 4px solid var(--sp-brown); background: var(--sp-tint); border-radius: 0 var(--sp-radius) var(--sp-radius) 0;
}
.shelf-page .sp-note h3 { font-size: 17px; color: var(--sp-ink); margin-bottom: 6px; }
.shelf-page .sp-note p { font-size: 15.5px; }

/* ⑥ 이사 (결론) */
.shelf-page .sp-move { background: linear-gradient(180deg, #FFF8F2 0%, #F7EDE3 100%); }
.shelf-page .sp-move .sp-h2 { font-size: clamp(26px, 3.8vw, 40px); }
.shelf-page .sp-move__flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 44px; counter-reset: sp-move; }
.shelf-page .sp-move__flow li { position: relative; counter-increment: sp-move; }
.shelf-page .sp-move__flow li:not(:last-child)::after {
    content: "→"; position: absolute; top: calc(33% - 16px); right: -24px;
    width: 20px; text-align: center; font-size: 22px; font-weight: 800; color: var(--sp-brown);
}
.shelf-page .sp-move__flow img {
    width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
    border-radius: var(--sp-radius);
    box-shadow: 0 16px 32px -20px rgba(122, 92, 70, 0.6);
}
.shelf-page .sp-move__flow h3 { margin-top: 18px; font-size: 19px; color: var(--sp-ink); }
.shelf-page .sp-move__flow h3::before {
    content: counter(sp-move, decimal-leading-zero);
    display: block; font-size: 13px; letter-spacing: 0.12em; color: var(--sp-brown); margin-bottom: 4px;
}
.shelf-page .sp-move__flow p { margin-top: 6px; font-size: 15px; color: var(--sp-muted); }
.shelf-page .sp-move__pair { margin-top: 40px; font-size: 15px; color: var(--sp-text); }
.shelf-page .sp-move__pair a { color: var(--sp-brown-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ⑦ 디자인 등록 */
.shelf-page .sp-design { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: center; }
.shelf-page .sp-badge {
    display: inline-block; margin-bottom: 18px; padding: 6px 14px; border-radius: 999px;
    background: var(--sp-brown); color: #fff; font-size: 14px; font-weight: 700;
}
.shelf-page .sp-design__imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.shelf-page .sp-design__imgs img {
    width: 100%; aspect-ratio: 1 / 1; object-fit: contain;
    background: #fff; border: 1px solid var(--sp-line); border-radius: var(--sp-radius); padding: 16px;
}

/* 중간 CTA */
.shelf-page .sp-midcta { padding: 48px 0; text-align: center; border-top: 1px solid var(--sp-line); border-bottom: 1px solid var(--sp-line); }
.shelf-page .sp-midcta p { font-size: 20px; font-weight: 700; color: var(--sp-ink); margin-bottom: 18px; }

/* 버튼 */
.shelf-page .sp-btn {
    display: inline-block; padding: 16px 36px; border-radius: 999px;
    background: var(--sp-brown); color: #fff; font-size: 17px; font-weight: 700; text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}
.shelf-page .sp-btn:hover { background: var(--sp-brown-deep); transform: translateY(-1px); }
.shelf-page .sp-btn--line { background: transparent; color: var(--sp-brown-deep); border: 2px solid var(--sp-brown); padding: 12px 30px; }
.shelf-page .sp-btn--line:hover { background: var(--sp-brown); color: #fff; }

/* 영상 */
.shelf-page .sp-video { position: relative; margin-top: 28px; aspect-ratio: 16 / 9; border-radius: var(--sp-radius); overflow: hidden; background: #000; }
.shelf-page .sp-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ⑨ 짝 카드 + CTA */
.shelf-page .sp-end { padding-top: 72px; }
.shelf-page .sp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 820px; margin: 0 auto; }
.shelf-page .sp-pair__card {
    display: block; padding: 22px 24px; border: 1px solid var(--sp-line); border-radius: var(--sp-radius);
    text-decoration: none; color: inherit; background: #fff; transition: border-color 0.2s;
}
.shelf-page a.sp-pair__card:hover { border-color: var(--sp-brown); }
.shelf-page .sp-pair__card strong { display: block; font-size: 18px; color: var(--sp-ink); }
.shelf-page .sp-pair__card span { display: block; margin-top: 4px; font-size: 14px; color: var(--sp-muted); }
.shelf-page .sp-pair__card em { display: block; margin-top: 8px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--sp-brown); }
.shelf-page .sp-pair__card.is-current { border: 2px solid var(--sp-brown); background: #FFF8F2; }

.shelf-page .sp-cta {
    margin: 48px auto 0; max-width: 820px; padding: 56px 32px; text-align: center;
    border-radius: 24px; background: var(--sp-dark); color: #CFC6BF;
}
.shelf-page .sp-cta h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; color: #fff; margin-bottom: 12px; letter-spacing: -0.02em; }
.shelf-page .sp-cta p { font-size: 16px; margin-bottom: 28px; }
.shelf-page .sp-cta .sp-cta__contact { margin: 20px 0 0; font-size: 14px; }
.shelf-page .sp-cta__contact a { color: #E8D3C2; text-decoration: none; font-weight: 700; }

/* 태블릿 */
@media (max-width: 1024px) {
    .shelf-page .sp-steps { grid-template-columns: repeat(2, 1fr); }
}

/* 모바일 */
@media (max-width: 768px) {
    .shelf-page { padding-top: 64px; font-size: 15px; }
    .shelf-page .sp-section { padding: 64px 0; }
    .shelf-page .sp-hero { padding: 32px 0 48px; }
    .shelf-page .sp-hero__grid,
    .shelf-page .sp-design { grid-template-columns: 1fr; gap: 32px; }
    .shelf-page .sp-hero__media { order: -1; }
    .shelf-page .sp-hero__sub { font-size: 16px; }
    .shelf-page .sp-lead { font-size: 16px; }
    .shelf-page .sp-facts { grid-template-columns: 1fr; gap: 12px; }
    .shelf-page .sp-facts li { display: grid; grid-template-columns: 96px 1fr; column-gap: 16px; padding: 22px 20px; align-items: start; }
    .shelf-page .sp-facts__num { grid-row: span 2; font-size: 44px; margin: 0; }
    .shelf-page .sp-facts__num small { font-size: 15px; }
    .shelf-page .sp-facts strong { font-size: 17px; margin-bottom: 4px; }
    .shelf-page .sp-compare__row { grid-template-columns: 1fr 1fr; }
    .shelf-page .sp-compare__row [role="rowheader"] { grid-column: 1 / -1; padding: 12px 16px 6px; background: #FBF9F7; font-size: 14px; }
    .shelf-page .sp-compare__head > span:first-child { display: none; }
    .shelf-page .sp-compare__row > span { padding: 12px 16px; font-size: 14px; }
    .shelf-page .sp-compare-video { grid-template-columns: 1fr; gap: 12px; margin-top: 24px; }
    .shelf-page .sp-steps { grid-template-columns: 1fr; gap: 16px; margin-top: 32px; }
    .shelf-page .sp-gallery { grid-template-columns: 1fr; gap: 12px; margin-top: 28px; }
    .shelf-page .sp-gallery figcaption { font-size: 15px; }
    .shelf-page .sp-tag { font-size: 11px; padding: 3px 7px; }
    .shelf-page .sp-dot { width: 24px; height: 24px; margin: -12px 0 0 -12px; border-width: 2px; }
    .shelf-page .sp-move__flow { grid-template-columns: 1fr; gap: 28px; }
    .shelf-page .sp-move__flow li:not(:last-child)::after { content: "↓"; top: auto; bottom: -26px; right: auto; left: 50%; margin-left: -10px; }
    .shelf-page .sp-pair { grid-template-columns: 1fr; }
    .shelf-page .sp-cta { padding: 40px 20px; border-radius: 18px; }
    .shelf-page .sp-midcta p { font-size: 17px; }
}
