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

.price-hero {
    position: relative;
    min-height: 250px;
    overflow: hidden;
    background: var(--stiz-black);
    color: var(--stiz-white);
}

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

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

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

.price-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;
}

.price-tool-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 20px;
    align-items: start;
}

.price-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--stiz-white);
    box-shadow: var(--shadow-soft);
}

.price-panel__header {
    border-bottom: 1px solid var(--border);
    padding: 24px 26px 20px;
}

.price-panel__header h2 {
    margin: 0;
    color: var(--stiz-black);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0;
}

.price-panel__body {
    display: grid;
    padding: 0;
}

.price-step {
    display: grid;
    gap: 18px;
    border-bottom: 1px solid var(--border);
    padding: 24px 26px;
}

.price-step:last-child {
    border-bottom: 0;
}

.price-step.hidden {
    display: none;
}

.price-step__heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-step__heading h3 {
    margin: 0;
    color: var(--stiz-black);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0;
}

.price-step__number {
    display: inline-flex;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--stiz-black);
    color: var(--stiz-white);
    font-size: 11px;
    font-weight: 900;
}

.price-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.price-field {
    display: grid;
    min-width: 0;
    gap: 8px;
}

.price-field.hidden {
    display: none;
}

.price-field.is-wide {
    grid-column: 1 / -1;
}

.price-field label {
    color: var(--gray-800);
    font-size: 13px;
    font-weight: 850;
}

.price-field-hint {
    margin-left: 4px;
    color: var(--gray-400);
    font-size: 11px;
    font-weight: 700;
}

.price-field select,
.price-quantity input {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--stiz-white);
    color: var(--stiz-black);
    padding: 0 14px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
}

.price-field select:focus,
.price-quantity input:focus {
    border-color: var(--stiz-black);
    outline: 2px solid color-mix(in srgb, var(--stiz-blue) 22%, transparent);
    outline-offset: 1px;
}

.price-special-notice {
    margin: 0;
    border-left: 3px solid var(--stiz-blue);
    background: var(--surface-muted);
    padding: 11px 12px;
    color: var(--gray-600);
    font-size: 12px;
    line-height: 1.6;
}

.price-special-notice.hidden {
    display: none;
}

.price-reorder-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    padding: 13px 14px;
    cursor: pointer;
}

.price-reorder-check input {
    margin-top: 3px;
    flex: 0 0 auto;
    accent-color: var(--stiz-black);
}

.price-reorder-check span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.price-reorder-check strong {
    color: var(--stiz-black);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.25;
}

.price-reorder-check small {
    color: var(--gray-500);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.price-quantity {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    gap: 8px;
}

.price-quantity button {
    display: inline-flex;
    min-width: 48px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    color: var(--stiz-black);
}

.price-quantity button:hover {
    border-color: var(--stiz-black);
    background: var(--stiz-white);
}

.price-part-quantity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.price-part-quantity {
    display: grid;
    min-width: 0;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    padding: 14px;
}

.price-part-quantity > span {
    color: var(--stiz-black);
    font-size: 13px;
    font-weight: 900;
}

.price-part-quantity .price-quantity {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
}

.price-part-quantity .price-quantity button,
.price-part-quantity .price-quantity input {
    min-height: 44px;
}

.price-result {
    position: sticky;
    top: 92px;
    overflow: hidden;
}

.price-result__top {
    background: var(--stiz-black);
    color: var(--stiz-white);
    padding: 26px;
}

.price-result__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.price-result__label small {
    color: var(--gray-400);
    font-size: 11px;
    font-weight: 800;
}

.price-tier-badge {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    border-radius: 999px;
    background: var(--surface-strong);
    color: var(--gray-700);
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 900;
}

.price-tier-badge.is-discounted {
    background: var(--stiz-red);
    color: var(--stiz-white);
}

.price-result__selection {
    margin: 18px 0 8px;
    color: color-mix(in srgb, var(--stiz-white) 70%, transparent);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.price-result__total {
    margin: 0;
    font-size: clamp(32px, 4vw, 44px);
    font-weight: 950;
    line-height: 1;
    letter-spacing: 0;
}

.price-result__summary {
    display: grid;
    padding: 14px 26px;
}

.price-result__summary > div {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--border);
}

.price-result__summary > div:last-child {
    border-bottom: 0;
}

.price-result__summary > div.hidden,
.price-result__details > div.hidden {
    display: none;
}

.price-result__summary span {
    color: var(--gray-500);
    font-size: 11px;
    font-weight: 750;
}

.price-result__summary strong {
    overflow-wrap: anywhere;
    color: var(--stiz-black);
    font-size: 12px;
    font-weight: 900;
    text-align: right;
}

.price-result__breakdown {
    border-top: 1px solid var(--border);
}

.price-result__breakdown summary {
    display: flex;
    min-height: 48px;
    cursor: pointer;
    list-style: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 26px;
    color: var(--gray-600);
    font-size: 12px;
    font-weight: 800;
}

.price-result__breakdown summary::-webkit-details-marker {
    display: none;
}

.price-result__breakdown summary .material-symbols-outlined {
    font-size: 19px;
    transition: transform 160ms ease;
}

.price-result__breakdown[open] summary .material-symbols-outlined {
    transform: rotate(180deg);
}

.price-result__details {
    margin: 0;
    border-top: 1px solid var(--border);
    padding: 12px 26px 18px;
}

.price-result__details > div {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    color: var(--gray-600);
    font-size: 13px;
}

.price-result__details > div:last-child {
    border-bottom: 0;
}

.price-result__details dd {
    margin: 0;
    color: var(--stiz-black);
    font-weight: 850;
    text-align: right;
}

.price-result__footer {
    border-top: 1px solid var(--border);
    padding: 20px 26px 26px;
}

.price-result__footer > p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 10px 0 0;
    color: var(--gray-500);
    font-size: 11px;
}

.price-result__footer > p .material-symbols-outlined {
    color: var(--stiz-blue);
    font-size: 16px;
}

.price-policy-band {
    border-block: 1px solid var(--border);
    background: var(--stiz-white);
}

.price-policy-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1px;
    margin: 0;
    padding: 0;
    background: var(--border);
    list-style: none;
}

.price-policy-list li {
    display: grid;
    min-height: 126px;
    align-content: center;
    background: var(--stiz-white);
    padding: 24px;
}

.price-policy-list strong {
    color: var(--stiz-black);
    font-size: 19px;
    font-weight: 900;
}

.price-policy-list span {
    margin-top: 6px;
    color: var(--gray-500);
    font-size: 12px;
    line-height: 1.5;
}

.price-table-section {
    background: var(--stiz-white);
}

.price-table-section h2 {
    margin: 6px 0 24px;
    color: var(--stiz-black);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 950;
    line-height: 1.08;
    letter-spacing: 0;
}

.price-filter-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.price-table-wrap {
    margin-top: 24px;
    overflow-x: auto;
    border-block: 1px solid var(--border);
}

.price-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.price-table th,
.price-table td {
    border-bottom: 1px solid var(--border);
    padding: 15px 14px;
    color: var(--gray-700);
    font-size: 13px;
    text-align: left;
    vertical-align: middle;
}

.price-table th {
    background: var(--surface-muted);
    color: var(--gray-500);
    font-size: 11px;
    font-weight: 900;
}

.price-table td strong,
.price-table td small {
    display: block;
}

.price-table td strong {
    color: var(--stiz-black);
    font-weight: 850;
}

.price-table td small {
    margin-top: 3px;
    color: var(--gray-400);
}

.price-table .price-table-amount {
    color: var(--stiz-black);
    font-size: 15px;
    font-weight: 900;
    text-align: right;
    white-space: nowrap;
}

.price-table .price-table-school {
    color: var(--stiz-blue);
}

.price-row-action {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--stiz-white);
    color: var(--gray-600);
}

.price-row-action:hover {
    border-color: var(--stiz-black);
    color: var(--stiz-black);
}

.price-row-action .material-symbols-outlined {
    font-size: 20px;
}

.price-row-action-label {
    display: none;
}

@media (max-width: 820px) {
    .price-tool-layout {
        grid-template-columns: 1fr;
    }

    .price-result {
        position: static;
    }

    .price-policy-list {
        grid-template-columns: 1fr;
    }

    .price-policy-list li {
        min-height: auto;
    }
}

@media (max-width: 560px) {
    .price-hero,
    .price-hero__content {
        min-height: 220px;
    }

    .price-hero__content {
        padding-block: 92px 28px;
    }

    .price-form-grid {
        grid-template-columns: 1fr;
    }

    .price-field.is-wide {
        grid-column: auto;
    }

    .price-part-quantity-grid {
        grid-template-columns: 1fr;
    }

    .price-panel__header,
    .price-result__top,
    .price-result__footer {
        padding-inline: 20px;
    }

    .price-step {
        padding-inline: 20px;
    }

    .price-result__summary {
        padding-inline: 20px;
    }

    .price-result__breakdown summary {
        padding-inline: 20px;
    }

    .price-result__details {
        padding-inline: 20px;
    }

    .price-table-wrap {
        overflow: visible;
        border: 0;
    }

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

    .price-table thead {
        display: none;
    }

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

    .price-table tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        background: var(--stiz-white);
        padding: 16px;
    }

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

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

    .price-table td:nth-child(1),
    .price-table td:nth-child(2),
    .price-table td:nth-child(3),
    .price-table td:nth-child(6) {
        grid-column: 1 / -1;
    }

    .price-table td:nth-child(1) {
        color: var(--stiz-blue);
        font-size: 11px;
        font-weight: 850;
    }

    .price-table td:nth-child(1)::before,
    .price-table td:nth-child(6)::before {
        display: none;
    }

    .price-table .price-table-amount {
        font-size: 14px;
        text-align: left;
    }

    .price-row-action {
        width: 100%;
        min-height: 44px;
        gap: 6px;
        background: var(--stiz-black);
        color: var(--stiz-white);
    }

    .price-row-action:hover {
        background: var(--gray-800);
        color: var(--stiz-white);
    }

    .price-row-action-label {
        display: inline;
        font-size: 12px;
        font-weight: 850;
    }

    .price-table .price-table-empty {
        display: block;
    }

    .price-table .price-table-empty td {
        padding: 18px;
        text-align: center;
    }
}

/* 2026-08-04: 추가주문 체크박스 → 자동 가산 안내문으로 교체 */
.price-reorder-note {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-muted);
}

.price-reorder-note strong {
    font-size: 13px;
    color: var(--text-primary, var(--stiz-black));
}

.price-reorder-note small {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ============================================================
   복합 견적 (2026-08-06): 담기 버튼 + 라인 목록 + 합산 패널
   ============================================================ */
.price-bundle-add { margin-top: 16px; }
.price-bundle-hint {
    margin-top: 8px; font-size: 12px; line-height: 1.6; color: var(--text-muted);
}
.price-bundle {
    margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border);
}
.price-bundle-title {
    font-size: 14px; font-weight: 800; color: var(--stiz-black);
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.price-bundle-title span { font-size: 12px; font-weight: 700; color: var(--stiz-blue); }
.price-bundle-lines { list-style: none; margin: 0 0 10px; padding: 0; }
.price-bundle-lines li {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface-muted); margin-bottom: 6px;
}
.price-bundle-line { flex: 1; min-width: 0; }
.price-bundle-line strong { display: block; font-size: 12.5px; font-weight: 700; color: var(--stiz-black); }
.price-bundle-line small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--text-muted); }
.price-bundle-lines button {
    flex: none; width: 30px; height: 30px; border: 1px solid var(--border);
    border-radius: 50%; background: var(--stiz-white); color: var(--text-muted);
    font-size: 12px; cursor: pointer;
}
.price-bundle-total {
    display: flex; align-items: center; justify-content: space-between;
    margin: 10px 0; padding: 10px 12px; border-radius: var(--radius-sm);
    background: var(--stiz-black); color: var(--stiz-white);
}
.price-bundle-total span { font-size: 12.5px; }
.price-bundle-total strong { font-size: 18px; font-weight: 900; }
.price-bundle-actions { display: grid; gap: 6px; }
.price-bundle-share {
    width: 100%; margin-top: 8px; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface-muted); color: var(--stiz-black);
    font: inherit; font-size: 12px; line-height: 1.6; resize: vertical;
}

/* ============================================================
   모바일 하단 예상 총액 바 (2026-08-11)
   ≤820px 에서는 결과 패널이 폼 전체 아래로 내려간다(위 :594 그리드 1열).
   카톡 인앱 브라우저로 열면 총액을 보려고 폼을 다 지나쳐야 했다.
   → 총액만 화면 아래에 고정해 «수량을 바꾸면 즉시 금액이 보이게» 한다.
   데스크톱(≥821px)에서는 존재하지 않는 것과 같다(display:none).
   ============================================================ */
.price-mobile-summary {
    display: none;
}

@media (max-width: 820px) {
    .price-guide-page {
        /* 고정 바가 마지막 콘텐츠(계산 내역 보기·무료 시안 요청 버튼)를 가리지 않도록 여백 확보
           (실측 바 높이 81px + 여유 15px) */
        padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    }

    .price-mobile-summary {
        position: fixed;
        z-index: var(--z-chat-fab);
        right: 0;
        bottom: 0;
        left: 0;
        display: flex;
        align-items: center;
        gap: 12px;
        border-top: 1px solid var(--border);
        background: var(--stiz-black);
        color: var(--stiz-white);
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
        box-shadow: var(--shadow-xl);
    }

    /* E-8: display 를 명시했으니 [hidden] 반례를 반드시 둔다 */
    .price-mobile-summary[hidden] {
        display: none;
    }

    .price-mobile-summary__text {
        display: grid;
        min-width: 0;
        flex: 1;
        gap: 1px;
    }

    .price-mobile-summary__text small {
        color: var(--gray-400);
        font-size: 11px;
        font-weight: 800;
    }

    .price-mobile-summary__text strong {
        font-size: 21px;
        font-weight: 950;
        line-height: 1.2;
        letter-spacing: 0;
    }

    .price-mobile-summary__text span {
        overflow: hidden;
        color: color-mix(in srgb, var(--stiz-white) 62%, transparent);
        font-size: 11px;
        font-weight: 700;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .price-mobile-summary__btn {
        display: inline-flex;
        min-width: 64px;
        min-height: 44px;   /* 터치 타깃 44px */
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        gap: 4px;
        border: 1px solid color-mix(in srgb, var(--stiz-white) 34%, transparent);
        border-radius: var(--radius-sm);
        background: transparent;
        color: var(--stiz-white);
        padding: 0 12px;
        font-size: 12px;
        font-weight: 850;
    }

    .price-mobile-summary__btn .material-symbols-outlined {
        font-size: 18px;
    }

    /* 챗봇 플로팅 버튼이 고정 바에 깔리지 않게 이 페이지에서만 위로 올린다 */
    .price-guide-page #stiz-chat-btn {
        bottom: calc(100px + env(safe-area-inset-bottom, 0px));
    }
}
