/* ============================================================
   원단 안내 페이지 (fabric-guide.html)
   - 색상은 전부 css/tokens.css · css/style.css 의 변수만 사용한다(하드코딩 금지).
   - 표는 모바일에서 price-guide.css 와 동일한 "카드 재배열" 패턴을 쓴다.
     (thead 숨김 + td::before { content: attr(data-label) })
   ============================================================ */

.fabric-guide-page {
    background: var(--surface-page);
}

/* ─── 히어로 ─────────────────────────────────────────────── */
.fabric-hero {
    position: relative;
    min-height: 250px;
    overflow: hidden;
    background: var(--stiz-black);
    color: var(--stiz-white);
}

.fabric-hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
}

.fabric-hero__content {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 250px;
    align-items: end;
    padding-block: 104px 34px;
}

.fabric-hero__content h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 950;
    line-height: 1.02;
    letter-spacing: 0;
}

.fabric-hero__content p {
    max-width: 660px;
    margin: 16px 0 0;
    color: color-mix(in srgb, var(--stiz-white) 72%, transparent);
    font-size: 15px;
    line-height: 1.7;
}

/* ─── 바로가기 칩 줄 ─────────────────────────────────────── */
.fabric-jump {
    position: sticky;
    top: 0;
    z-index: 5;
    border-bottom: 1px solid var(--border);
    background: var(--stiz-white);
}

.fabric-jump__row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-block: 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.fabric-jump__row::-webkit-scrollbar {
    display: none;
}

.fabric-jump__row .stiz-chip {
    flex: 0 0 auto;
    text-decoration: none;
}

/* ─── 섹션 공통 ──────────────────────────────────────────── */
.fabric-guide-page h2 {
    margin: 6px 0 0;
    color: var(--stiz-black);
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 900;
    letter-spacing: 0;
}

.fabric-guide-page h3 {
    margin: 0;
    color: var(--stiz-black);
    font-size: 16px;
    font-weight: 850;
}

.fabric-section-note {
    max-width: 760px;
    margin: 12px 0 24px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

.fabric-bullet-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fabric-bullet-list li {
    position: relative;
    padding-left: 14px;
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.65;
}

.fabric-bullet-list li::before {
    position: absolute;
    left: 0;
    color: var(--gray-400);
    content: '·';
    font-weight: 900;
}

.fabric-bullet-list strong {
    color: var(--stiz-black);
}

/* ─── 비교표 ─────────────────────────────────────────────── */
.fabric-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--stiz-white);
}

.fabric-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
    font-size: 13.5px;
}

.fabric-table--grade {
    min-width: 520px;
}

.fabric-table th {
    border-bottom: 1px solid var(--border);
    background: var(--surface-muted);
    padding: 14px 16px;
    color: var(--gray-500);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-align: left;
    white-space: nowrap;
}

.fabric-table td {
    border-bottom: 1px solid var(--border);
    padding: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    vertical-align: top;
}

.fabric-table tbody tr:last-child td {
    border-bottom: 0;
}

.fabric-name {
    display: block;
    color: var(--stiz-black);
    font-size: 15px;
    font-weight: 900;
}

.fabric-name-en {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.fabric-material {
    color: var(--stiz-black);
    font-weight: 800;
    white-space: nowrap;
}

.fabric-wash-tag {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--surface-muted);
    padding: 3px 9px;
    color: var(--text-secondary);
    font-size: 10.5px;
    font-weight: 800;
    text-decoration: none;
}

.fabric-wash-tag:hover {
    border-color: var(--stiz-black);
    color: var(--stiz-black);
}

/* ─── 용도로 고르기 ──────────────────────────────────────── */
.fabric-purpose-section {
    background: var(--surface-muted);
}

.fabric-purpose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.fabric-purpose-card {
    display: grid;
    gap: 10px;
    align-content: start;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--stiz-white);
    padding: 22px;
}

.fabric-purpose-card .material-symbols-outlined {
    color: var(--stiz-blue);
    font-size: 26px;
}

.fabric-purpose-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.7;
}

.fabric-purpose-card strong {
    color: var(--stiz-black);
    font-weight: 850;
}

.fabric-purpose-extra {
    border-top: 1px dashed var(--border);
    padding-top: 10px;
    font-size: 12.5px !important;
}

/* ─── 등급과 원단 ────────────────────────────────────────── */
.fabric-grade-extra {
    display: grid;
    gap: 14px;
    justify-items: start;
    margin-top: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--surface-muted);
    padding: 22px;
}

/* ─── 세탁·관리 ──────────────────────────────────────────── */
.fabric-wash-section {
    background: var(--surface-muted);
}

.fabric-wash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    align-items: start;
}

.fabric-wash-card {
    display: grid;
    gap: 12px;
    align-content: start;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--stiz-white);
    padding: 22px;
    scroll-margin-top: 80px;
}

.fabric-wash-card__head {
    display: flex;
    gap: 10px;
    align-items: center;
}

.fabric-wash-badge {
    display: inline-flex;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--stiz-black);
    color: var(--text-on-dark);
    font-size: 12px;
    font-weight: 900;
}

.fabric-wash-targets {
    margin: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    color: var(--stiz-blue);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.6;
}

/* ─── 예전 이름 ──────────────────────────────────────────── */
.fabric-alias-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fabric-alias-list li {
    display: flex;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--stiz-white);
    padding: 16px 18px;
}

.fabric-alias-list .material-symbols-outlined {
    color: var(--gray-400);
    font-size: 18px;
}

.fabric-alias-old {
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: line-through;
}

.fabric-alias-new {
    color: var(--stiz-black);
    font-size: 13.5px;
    font-weight: 850;
}

/* ─── CTA ────────────────────────────────────────────────── */
.fabric-cta-section {
    background: var(--stiz-black);
    color: var(--text-on-dark);
}

.fabric-cta {
    display: grid;
    /* 버튼 글자가 줄바꿈되지 않도록 버튼 열에 최소 너비를 보장한다 */
    grid-template-columns: minmax(0, 1fr) minmax(230px, auto);
    gap: 24px;
    align-items: center;
}

.fabric-cta h2 {
    color: var(--text-on-dark);
}

.fabric-cta__copy p {
    margin: 12px 0 0;
    color: color-mix(in srgb, var(--stiz-white) 74%, transparent);
    font-size: 14px;
    line-height: 1.7;
}

.fabric-cta__note {
    font-size: 12.5px !important;
}

.fabric-cta__actions {
    display: grid;
    gap: 10px;
    justify-items: stretch;
}

.fabric-cta__actions .stiz-btn {
    justify-content: center;
    white-space: nowrap;
}

/* 검은 배경 위에 놓이는 기본 버튼은 흰 테두리로 보이게 한다 */
.fabric-cta__actions .stiz-btn:not(.blue):not(.black) {
    border: 1px solid color-mix(in srgb, var(--stiz-white) 40%, transparent);
    background: transparent;
    color: var(--text-on-dark);
}

/* 검은 섹션 위라 '검정 버튼'은 그대로 두면 배경에 묻는다 → 흰 버튼으로 뒤집는다 */
.fabric-cta__actions .stiz-btn.black {
    border: 1px solid var(--stiz-white);
    background: var(--stiz-white);
    color: var(--stiz-black);
}

.fabric-cta__actions .stiz-btn.black:hover {
    background: color-mix(in srgb, var(--stiz-white) 86%, transparent);
    color: var(--stiz-black);
}

/* ============================================================
   모바일 (≤768px) — 표를 카드로 재배열해 가로 스크롤을 없앤다
   ============================================================ */
@media (max-width: 768px) {
    .fabric-hero__content {
        padding-block: 88px 26px;
    }

    .fabric-table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .fabric-table,
    .fabric-table--grade {
        display: block;
        min-width: 0;
    }

    /* 헤더 행을 숨기고, 각 td 가 data-label 을 제 라벨로 표시한다 */
    .fabric-table thead {
        display: none;
    }

    .fabric-table tbody {
        display: grid;
        gap: 12px;
    }

    .fabric-table tr {
        display: grid;
        gap: 12px;
        border: 1px solid var(--border);
        border-radius: var(--radius-card);
        background: var(--stiz-white);
        padding: 16px;
    }

    .fabric-table td {
        display: block;
        min-width: 0;
        border: 0;
        padding: 0;
        font-size: 13px;
    }

    .fabric-table td::before {
        display: block;
        margin-bottom: 4px;
        color: var(--gray-400);
        content: attr(data-label);
        font-size: 10px;
        font-weight: 850;
    }

    /* 첫 칸(원단명)은 카드 제목이라 라벨을 숨긴다 */
    .fabric-table td:first-child::before {
        display: none;
    }

    .fabric-material {
        white-space: normal;
    }

    .fabric-cta {
        grid-template-columns: minmax(0, 1fr);
    }
}
