/* ==========================================================================
   솔루션 개요 / 제품 상세 페이지 전용
   (공통 요소는 common.css)
   ========================================================================== */

/* 제품 상세 상단: 참고 디자인처럼 가운데 정렬 + 여유 있는 간격 */
.product-hero {
    padding: 72px 0 64px;
}

.product-hero h1 {
    font-size: clamp(2rem, 4.4vw, 3rem);
}

/* 기능 구성도 그림 아래의 모듈 카드 */
.func-grid {
    margin-top: 32px;
}

/* ---------- 솔루션 비교표 ---------- */

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.solution-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    table-layout: fixed; /* 제품 열 너비를 똑같이 맞춘다 */
    background: #fff;
}

.solution-table thead th:first-child {
    width: 130px;
}

.solution-table th,
.solution-table td {
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    line-height: 1.6;
}

.solution-table thead th {
    background: var(--navy);
    color: #fff;
    font-weight: 700;
}

.solution-table thead th:first-child {
    color: var(--teal);
}

.solution-table tbody th {
    min-width: 120px;
    background: var(--light);
    color: var(--teal-d);
    font-weight: 700;
}

.solution-table tbody tr:last-child th,
.solution-table tbody tr:last-child td {
    border-bottom: 0;
}

/* ---------- 이용 기간별 요금표 ---------- */

.price-table {
    width: 100%;
    margin-top: 18px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.price-table th,
.price-table td {
    padding: 9px 5px;
    border-bottom: 1px solid var(--line);
    text-align: right;
    white-space: nowrap;
}

.price-table thead th {
    padding-top: 0;
    color: var(--sub);
    font-size: 0.78rem;
    font-weight: 700;
}

.price-table th:first-child {
    text-align: left;
}

.price-table tbody th {
    color: var(--navy);
    font-weight: 700;
}

/* 월 요금 강조 */
.price-table tbody td:nth-child(2) {
    color: var(--teal-d);
    font-weight: 700;
}

.price-table tbody tr:last-child th,
.price-table tbody tr:last-child td {
    border-bottom: 0;
}

/* 표가 들어간 요금 카드는 좁아지면 한 줄에 하나씩 보여준다 */
@media (max-width: 1100px) {
    #pricing .card-grid.cols-3 {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto;
    }
}

.pricing-note-box {
    margin-top: 28px;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--gray);
}

/* ---------- 게이트웨이 시스템 구성도 ---------- */

.arch {
    padding: 32px 28px;
    border: 1.5px solid rgba(0, 184, 160, 0.25);
    border-radius: 20px;
    background: linear-gradient(180deg, #f5fcfb 0%, #ffffff 100%);
    text-align: center;
}

.arch-layer {
    padding: 8px 0;
}

.arch-label {
    margin: 0 0 14px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sub);
}

.arch-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.arch-chips li {
    padding: 11px 16px;
    border: 1px solid rgba(0, 184, 160, 0.3);
    border-radius: 12px;
    background: #fff;
    color: var(--navy);
    font-size: 0.92rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.arch-chips.storage li {
    border-top: 3px solid var(--gold-d);
}

.arch-chips.field li {
    border-top: 3px solid var(--blue);
}

.arch-core {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 15px 30px;
    border-radius: 12px;
    background: var(--grad);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(0, 184, 160, 0.28);
}

.arch-flow {
    margin: 18px 0;
    padding-top: 18px;
    border-top: 1px dashed rgba(0, 184, 160, 0.35);
    color: var(--teal-d);
    font-size: 1.2rem;
    font-weight: 500;
}

@media (max-width: 640px) {
    .product-hero {
        padding: 56px 0 52px;
    }

    .arch {
        padding: 24px 14px;
    }

    .arch-chips li {
        font-size: 0.85rem;
        padding: 9px 12px;
    }

    .arch-core {
        padding: 13px 18px;
        font-size: 0.95rem;
    }
}

/* ---------- 기능 구성도 (트리) ----------
   예전에는 같은 내용을 PNG 한 장으로 싣고 그 아래 카드로 한 번 더 요약했다.
   이미지는 모바일에서 가로로 밀어야 했고 확대하면 흐려졌으며, 무엇보다 메뉴명이
   검색엔진에 한 글자도 잡히지 않았다. 같은 그림을 마크업으로 그려 텍스트로 남긴다. */

.func-tree {
    margin-top: 32px;
}

.func-tree-root {
    position: relative;
    width: max-content;
    max-width: 100%;
    margin: 0 auto 36px;
    padding: 14px 32px;
    border-radius: 12px;
    background: var(--grad);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 800;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.func-tree-root::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    width: 2px;
    height: 36px;
    background: rgba(30, 143, 255, 0.35);
}

.func-tree-cols {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 14px;
}

/* 가지들을 잇는 가로선 — 양끝 가지의 중앙까지만 그린다. */
.func-tree-cols::before {
    content: "";
    position: absolute;
    top: -18px;
    left: calc(50% / var(--branches, 7));
    right: calc(50% / var(--branches, 7));
    height: 2px;
    background: rgba(30, 143, 255, 0.35);
}

.func-branch {
    position: relative;
}

.func-branch::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    width: 2px;
    height: 18px;
    background: rgba(30, 143, 255, 0.35);
}

.func-branch h3 {
    margin: 0 0 10px;
    padding: 11px 8px;
    border-radius: 8px;
    background: var(--blue-d);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.35;
}

.func-branch ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.func-branch li {
    padding: 9px 8px;
    border: 1px solid rgba(30, 143, 255, 0.45);
    border-radius: 7px;
    background: #fff;
    color: var(--text);
    font-size: 0.84rem;
    line-height: 1.4;
    text-align: center;
    word-break: keep-all;
}

@media (max-width: 900px) {
    .func-tree-cols {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    /* 여러 줄로 접히면 가지를 잇는 선이 엉뚱한 곳에 걸린다. */
    .func-tree-cols::before,
    .func-branch::before,
    .func-tree-root::after {
        display: none;
    }

    .func-tree-root {
        margin-bottom: 20px;
    }
}

/* ---------- 요금 카드 ---------- */

/* 가장 낮은 월 요금(2년)을 한눈에 찾게 한다. */
.price-table tr.is-best th,
.price-table tr.is-best td {
    background: var(--light);
}

.price-table tr.is-best th::after {
    content: "최저";
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--teal);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    vertical-align: middle;
}

.price-cta {
    display: block;
    margin-top: 18px;
    text-align: center;
}

/* ---------- 요약도 표: 좁은 화면에서는 세로로 ---------- */

@media (max-width: 700px) {
    .table-wrap {
        overflow-x: visible;
    }

    .solution-table {
        min-width: 0;
        display: block;
    }

    .solution-table thead {
        display: none;
    }

    .solution-table tbody,
    .solution-table tr,
    .solution-table th,
    .solution-table td {
        display: block;
        width: auto;
    }

    .solution-table tr {
        margin-bottom: 14px;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: var(--shadow-sm);
    }

    .solution-table tbody th {
        min-width: 0;
    }

    .solution-table td::before {
        content: attr(data-col);
        display: block;
        margin-bottom: 2px;
        color: var(--sub);
        font-size: 0.78rem;
        font-weight: 700;
    }

    .solution-table td {
        border-bottom: 1px solid var(--line);
    }

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