/*
 * 리스스킨 (car_detail_lease) — 리스 계산기 중심 카드형 매물 상세
 * 갤러리·라이트박스·아코디언 토글은 car_detail_encar.css/js를 그대로 재사용하고
 * (엔카 클래스는 이 파일에서 손대지 않음), 여기서는 히어로/카드/퀵닷/모바일독 등
 * 리스스킨 전용 마크업(cdl-*)만 스타일링한다.
 *
 * 사이트 기본 폰트(나눔스퀘어 등)와 무관하게 이 스킨 안에서는 항상 Pretendard로 통일한다
 * (easyplancar/sample/sim0724에서 쓰는 것과 동일한 서브셋 파일을 그대로 재사용 — 이미 그
 * 사이트를 방문했다면 브라우저 캐시도 재활용됨).
 */
@import url("/fonts/pretendard/pretendard-core.css");
@import url("/fonts/pretendard/pretendard-dynamic.css");

.epc-subpage-shell:has(.car-detail-lease-page),
.epc-page-shell:has(.car-detail-lease-page) {
    overflow: visible;
}

/* 모바일독·라이트박스는 .cdl-page 바깥 형제 요소라 body 기준으로 한 번에 적용한다 */
body:has(.car-detail-lease-page) {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
}

.cdl-page.epc-car-detail-page {
    max-width: var(--epc-detail-max-width, 1120px);
    width: 100%;
    margin: 24px auto 48px;
    box-sizing: border-box;
    padding: 0 10px 18px;
    color: #1a2233;
}

.cdl-page * {
    box-sizing: border-box;
}

/* ---------- 상단: 갤러리 + 히어로 ---------- */

.cdl-top {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
    gap: 22px;
    align-items: stretch;
    margin-bottom: 24px;
}

/* 엔카 스킨은 썸네일을 메인 이미지 옆(그리드 2열)에 두지만, 리스스킨은 참고 사이트처럼
   썸네일을 메인 이미지 아래 가로 스트립으로 내린다 — encar-gallery의 그리드 컬럼을
   1열로 바꾸고, 사이드 썸네일 그리드를 가로 flex로 바꿔준다. */
.cdl-gallery {
    display: flex;
    flex-direction: column;
    grid-template-columns: minmax(0, 1fr);
    height: 100%;
    margin-bottom: 0;
}

/* 오른쪽 히어로(리스 계산기 카드)가 이미지보다 길어져서 아래쪽이 비어보이는 걸 막기 위해,
   메인 이미지의 고정 비율 대신 남는 높이를 그대로 채우게(flex:1) 한다 — 짧아지지 않고
   히어로 카드 높이에 맞춰 오히려 길어진다. */
.cdl-gallery .encar-gallery__main {
    aspect-ratio: auto;
    flex: 1 1 auto;
    min-height: 320px;
}

.cdl-gallery__side {
    display: flex;
    flex: 0 0 auto;
    grid-template-columns: none;
    grid-template-rows: none;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 2px;
}

.cdl-gallery__side .encar-gallery__thumb {
    flex: 0 0 96px;
    width: 96px;
    height: 72px;
}

.cdl-hero {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.shm-detail-viewer-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eef6ff;
    border: 1px solid #d6e9fc;
    color: var(--main-color, #0086d8);
    font-size: 13px;
    font-weight: 600;
    margin: 0;
}

.cdl-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cdl-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    background: #f1f4f8;
    color: #55606f;
    font-size: 12px;
    font-weight: 700;
}

.cdl-badge--model {
    background: color-mix(in srgb, var(--main-color, #0086d8) 12%, #fff);
    color: var(--main-color, #0086d8);
}

.cdl-badge--serial {
    margin-left: auto;
    background: #f8f9fb;
    color: #8a94a3;
    font-weight: 600;
}

.cdl-hero__title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.35;
    color: #10182a;
    letter-spacing: -0.01em;
}

.cdl-spec-grid {
    /* 색상 미선택 매물은 칸이 3개로 줄어드는데, 고정 4열이면 빈 칸이 남아 어색해서
       실제 렌더된 박스 수에 맞춰 균등하게 나눠 채운다 */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 8px;
}

.cdl-spec-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 10px 6px;
    border-radius: 12px;
    background: #f6f8fb;
    border: 1px solid #eef1f5;
    min-height: 62px;
    text-align: center;
}

.cdl-spec-box__label {
    font-size: 11px;
    color: #8a94a3;
    font-weight: 600;
}

.cdl-spec-box__value {
    font-size: 14px;
    font-weight: 700;
    color: #1a2233;
    word-break: break-word;
}

/* ---------- 리스 계산기 카드 ---------- */

.cdl-lease-card {
    border: 1px solid #e6eaf0;
    border-radius: 18px;
    padding: 16px 18px 18px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.cdl-lease-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.cdl-lease-card__label {
    font-size: 13px;
    font-weight: 700;
    color: #55606f;
}

.cdl-lease-card__vat {
    font-size: 11px;
    font-weight: 500;
    color: #a5adba;
}

.cdl-lease-card__initial-badge {
    flex: 0 0 auto;
    padding: 4px 9px;
    border-radius: 999px;
    background: #fdeef0;
    color: #d0334c;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.cdl-lease-card__amount {
    display: flex;
    align-items: baseline;
    gap: 3px;
    margin-bottom: 12px;
}

.cdl-lease-card__num {
    display: inline-block;
    font-size: 32px;
    font-weight: 900;
    color: var(--main-color, #0086d8);
    letter-spacing: -0.02em;
    transition: opacity 0.15s ease;
}

/* 월리스료/선납금 변경 시 숫자가 카운트업되며 살짝 튀는 펄스 (케이중고차리스 참고) */
[data-cdl-monthly],
[data-cdl-monthly-mirror],
[data-cdl-down-won] {
    display: inline-block;
}

.cdl-amount-pulse {
    animation: cdlAmountPulse 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cdlAmountPulse {
    0% {
        transform: scale(1);
    }
    28% {
        transform: scale(1.1);
        color: var(--main-color, #0086d8);
    }
    100% {
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cdl-amount-pulse {
        animation: none;
    }
}

.cdl-lease-card__unit {
    font-size: 17px;
    font-weight: 700;
    color: #1a2233;
}

.cdl-lease-card__term {
    margin-left: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #a5adba;
}

.cdl-lease-card__down {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 12px;
    margin-bottom: 12px;
    border-radius: 10px;
    background: #f6f8fb;
    border: 1px solid #eef1f5;
}

.cdl-lease-card__down-label {
    font-size: 12px;
    font-weight: 700;
    color: #7b8494;
}

.cdl-lease-card__down-amount {
    font-size: 13px;
    font-weight: 800;
    color: #1a2233;
}

.cdl-lease-card__tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
    gap: 6px;
    padding: 4px;
    border-radius: 12px;
    background: #f6f8fb;
    margin-bottom: 14px;
}

.cdl-lease-tab {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    padding: 9px 4px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    color: #7b8494;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.cdl-lease-tab:hover:not(.is-active) {
    background: rgba(255, 255, 255, 0.7);
    color: #55606f;
}

.cdl-lease-tab:active {
    transform: scale(0.94);
}

.cdl-lease-tab.is-active {
    background: #fff;
    border-color: #e6eaf0;
    color: var(--main-color, #0086d8);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.cdl-lease-card__down-section {
    margin-bottom: 12px;
}

.cdl-lease-card__down-title {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    color: #55606f;
}

.cdl-lease-card__down-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 6px;
}

.cdl-lease-card__down-tabs .cdl-lease-tab {
    padding: 8px 2px;
    font-size: 12px;
    border: 1px solid #e6eaf0;
    background: #fff;
}

.cdl-lease-card__down-tabs .cdl-lease-tab:hover:not(.is-active) {
    background: #f6f8fb;
    border-color: #d8dee6;
    color: #55606f;
}

.cdl-lease-card__down-tabs .cdl-lease-tab.is-active {
    background: var(--main-color, #0086d8);
    border-color: var(--main-color, #0086d8);
    color: #fff;
    box-shadow: none;
}

.cdl-lease-card__down-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f6f8fb;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.4;
    color: #8b93a3;
}

.cdl-lease-card__down-hint::before {
    content: "💡";
    flex: 0 0 auto;
    font-size: 12px;
    line-height: 1;
}

.cdl-lease-card__cta,
.cdl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, background-color 0.15s ease;
}

.cdl-lease-card__cta {
    width: 100%;
    min-height: 48px;
    border-radius: 12px;
    background: var(--main-color, #0086d8);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--main-color, #0086d8) 30%, transparent);
}

.cdl-lease-card__cta:hover,
.cdl-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
}

.cdl-lease-card__cta:hover {
    box-shadow: 0 12px 22px color-mix(in srgb, var(--main-color, #0086d8) 36%, transparent);
}

.cdl-btn:hover {
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.14);
}

.cdl-lease-card__cta:active,
.cdl-btn:active {
    transform: translateY(0) scale(0.97);
    filter: brightness(0.97);
}

/* ---------- 오른쪽(모바일=하단) 따라다니는 간편상담 ---------- */

.cdl-float-counsel {
    position: fixed;
    right: 18px;
    top: 50%;
    z-index: 920;
    width: 196px;
    opacity: 0;
    pointer-events: none;
    transform: translate(18px, -50%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s ease;
}

.cdl-float-counsel.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate(0, -50%);
}

.cdl-float-counsel__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 14px 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e6eaf0;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}

.cdl-float-counsel__head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cdl-float-counsel__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--main-color, #0086d8) 12%, #fff);
    color: var(--main-color, #0086d8);
}

.cdl-float-counsel__title {
    font-size: 14px;
    font-weight: 800;
    color: var(--main-color, #0086d8);
    letter-spacing: -0.02em;
    line-height: 1.25;
    word-break: keep-all;
}

.cdl-float-counsel__fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cdl-float-counsel__input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #dbe1e8;
    border-radius: 10px;
    background: #fff;
    font-size: 13px;
    box-sizing: border-box;
}

.cdl-float-counsel__input:focus {
    outline: none;
    border-color: var(--main-color, #0086d8);
}

.cdl-float-counsel__submit {
    min-height: 42px;
    border: 0;
    border-radius: 10px;
    background: var(--main-color, #0086d8);
    color: #fff;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.cdl-float-counsel__submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 8px 16px color-mix(in srgb, var(--main-color, #0086d8) 30%, transparent);
}

.cdl-float-counsel__submit:active {
    transform: scale(0.97);
    filter: brightness(0.96);
}

/* 상세에서 사이트 공통 우측 상담과 겹치지 않게 숨김(오늘본차량 등은 유지) */
body:has(.car-detail-lease-page) #rightbanner .sw22-side-counsel,
body:has(.car-detail-lease-page) .sw22-side-counsel {
    display: none !important;
}

/* ---------- 본문 카드 공통 ---------- */

.cdl-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 좌: 기본정보→옵션 / 우: 판매담당자→빠른상담 — 세로 열 기준 2단 */
.cdl-columns {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: start;
    gap: 16px;
}

.cdl-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.cdl-col > .cdl-card {
    margin: 0;
}

.cdl-card {
    background: #fff;
    border: 1px solid #eef1f5;
    border-radius: 18px;
    padding: 20px 20px 22px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.cdl-card__title {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 800;
    color: #10182a;
}

.cdl-card__title-sub {
    font-size: 13px;
    font-weight: 600;
    color: #a5adba;
    margin-left: 6px;
}

.cdl-card__head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.cdl-card__head-row .cdl-card__title {
    margin-bottom: 0;
}

/* ---------- 기본정보 ---------- */

.cdl-basic-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.cdl-basic-item {
    background: #f6f8fb;
    border-radius: 12px;
    padding: 13px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    transition: background-color 0.15s ease;
}

.cdl-basic-item:hover {
    background: #eef2f9;
}

.cdl-basic-item dt {
    font-size: 11.5px;
    color: #8a94a3;
    font-weight: 600;
    letter-spacing: 0.1px;
}

.cdl-basic-item dd {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 14.5px;
    font-weight: 700;
    color: #1a2233;
    word-break: break-word;
}

.cdl-basic-sep {
    color: #c3cad4;
    font-weight: 500;
}

.cdl-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700;
}

.cdl-chip--good {
    background: #e8f6ee;
    color: #1a9a53;
}

.cdl-chip--bad {
    background: #fdedec;
    color: #e0453c;
}

.cdl-chip--neutral {
    background: #eef1f5;
    color: #1a2233;
}

.cdl-basic-sale {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #f6f8fb;
}

.cdl-basic-sale__label {
    font-size: 12.5px;
    font-weight: 600;
    color: #8a94a3;
}

.cdl-basic-sale__value {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14.5px;
    font-weight: 700;
    color: #1a2233;
}

/* ---------- 판매 담당자 ---------- */

.cdl-dealer {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cdl-dealer__photo {
    width: 96px;
    height: 96px;
    border-radius: 14px;
    overflow: hidden;
    background: #f6f8fb;
}

.cdl-dealer__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cdl-dealer__list {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 4px 14px;
    border-radius: 12px;
    background: #f6f8fb;
}

.cdl-dealer__list > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #e6eaf0;
    font-size: 13px;
}

.cdl-dealer__list > div:last-child {
    border-bottom: 0;
}

.cdl-dealer__list dt {
    color: #8a94a3;
    flex-shrink: 0;
}

.cdl-dealer__list dd {
    margin: 0;
    font-weight: 700;
    color: #1a2233;
    text-align: right;
    word-break: break-word;
}

.cdl-dealer__tel a {
    color: var(--main-color, #0086d8);
    text-decoration: none;
}

/* 상사주소는 길어지면 2열 표(cdl-dealer__list) 안에서 줄바꿈되며 어색해지므로,
   목록에서 빼고 한 줄로 쓸 수 있는 넓은 폭을 그대로 준다 */
.cdl-dealer__address {
    margin: -4px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f6f8fb;
}

.cdl-dealer__address > div {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 13px;
}

.cdl-dealer__address dt {
    flex: 0 0 auto;
    color: #8a94a3;
}

.cdl-dealer__address dd {
    margin: 0;
    font-weight: 700;
    color: #1a2233;
    word-break: break-word;
}

.cdl-dealer__actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.cdl-btn {
    min-height: 46px;
    padding: 0 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid transparent;
}

.cdl-btn--dark {
    background: #1a2233;
    color: #fff;
}

.cdl-btn--primary {
    background: var(--main-color, #0086d8);
    color: #fff;
}

.cdl-btn--ghost {
    background: color-mix(in srgb, var(--main-color, #0086d8) 8%, #fff);
    border-color: color-mix(in srgb, var(--main-color, #0086d8) 30%, transparent);
    color: var(--main-color, #0086d8);
    min-height: 38px;
    padding: 0 14px;
    font-size: 13px;
}

/* ---------- 옵션 아코디언 ---------- */

.cdl-option-disclaimer {
    margin: -2px 0 12px;
    padding: 9px 12px;
    border-radius: 8px;
    background: #fff8ec;
    color: #9a6b1f;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

.cdl-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cdl-option-acc {
    border: 1px solid #eef1f5;
    border-radius: 12px;
    overflow: hidden;
}

.cdl-option-acc__head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    background: #f6f8fb;
    border: 0;
    font-size: 14px;
    font-weight: 700;
    color: #1a2233;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.cdl-option-acc__head:hover {
    background: #eef2f9;
}

.cdl-option-acc__head:active {
    background: #e6ebf3;
}

.cdl-option-acc .encar-detail-accordion__body {
    padding: 14px 16px;
}

.cdl-option-chips {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cdl-option-chips li {
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    border: 1px solid transparent;
    background: #f6f8fb;
    color: #b6bcc6;
}

.cdl-option-chips li.is-on {
    background: #fff;
    border-color: #d8dee6;
    color: #1a2233;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* ---------- 상담 폼 ---------- */

.cdl-consult-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.cdl-consult-form__car {
    padding: 12px 14px;
    border-radius: 12px;
    background: #f6f8fb;
    border: 1px solid #eef1f5;
    margin-bottom: 4px;
}

.cdl-consult-form__car-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--main-color, #0086d8);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 4px;
}

.cdl-consult-form__car-name {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #1a2233;
}

.cdl-consult-form__label {
    font-size: 12px;
    font-weight: 700;
    color: #55606f;
    margin-bottom: -4px;
}

.cdl-consult-form__input {
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #dbe1e8;
    font-size: 13.5px;
    background: #fff;
}

.cdl-consult-form__input:focus {
    outline: none;
    border-color: var(--main-color, #0086d8);
}

.cdl-consult-form__agree {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #8a94a3;
}

.cdl-consult-form__submit {
    margin-top: 2px;
    min-height: 44px;
}

/* ---------- 특약 안내 ---------- */

.cdl-terms__title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cdl-terms__title::before {
    content: "";
    flex: 0 0 auto;
    width: 4px;
    height: 15px;
    border-radius: 2px;
    background: var(--main-color, #0086d8);
}

.cdl-terms__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
}

.cdl-terms__list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 11px 0;
    border-top: 1px solid #eef1f5;
    font-size: 13px;
    line-height: 1.5;
    color: #444d5c;
}

.cdl-terms__list li:first-child {
    border-top: 0;
}

.cdl-terms__num {
    flex: 0 0 auto;
    font-weight: 700;
    color: var(--main-color, #0086d8);
    white-space: nowrap;
}

.cdl-terms__text {
    word-break: keep-all;
}

/* ---------- 상세설명 ---------- */

.cdl-desc-viewers {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    background: #1e2536;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
}

.cdl-desc-viewers strong {
    color: #4fd1c5;
    font-weight: 800;
}

.cdl-desc {
    font-size: 14px;
    line-height: 1.7;
    color: #333c48;
    word-break: break-word;
}

.cdl-desc img {
    max-width: 100%;
}

/* ---------- 사진정보 ---------- */

.cdl-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.cdl-photo-item {
    padding: 0;
    border: 1px solid #eef1f5;
    border-radius: 12px;
    overflow: hidden;
    background: #f6f8fb;
    aspect-ratio: 4 / 3;
    cursor: zoom-in;
}

.cdl-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.cdl-photo-item:hover img {
    transform: scale(1.05);
}

/* ---------- 성능기록부 ---------- */

.cdl-perf-frame {
    width: 100%;
    height: 480px;
    border: 1px solid #eef1f5;
    border-radius: 12px;
    background: #fff;
}

/* ---------- 약관 ---------- */

.cdl-legal {
    background: #f8f9fb;
    box-shadow: none;
}

.cdl-legal p {
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.6;
    color: #8a94a3;
}

.cdl-legal p:last-child {
    margin-bottom: 0;
}

/* ---------- 반응형 ---------- */

@media (max-width: 1100px) {
    /* 여백이 좁으면 오른쪽 플로팅 대신 하단 가로 바로 */
    .cdl-float-counsel {
        top: auto;
        right: 12px;
        left: 12px;
        bottom: 12px;
        width: auto;
        transform: translateY(calc(100% + 24px));
    }

    .cdl-float-counsel.is-visible {
        transform: translateY(0);
    }

    .cdl-float-counsel__form {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 12px 14px;
        border-radius: 14px;
    }

    .cdl-float-counsel__head {
        flex-shrink: 0;
    }

    .cdl-float-counsel__fields {
        flex: 1;
        flex-direction: row;
        align-items: center;
        min-width: 0;
    }

    .cdl-float-counsel__input {
        flex: 1;
        min-width: 0;
        height: 42px;
    }

    .cdl-float-counsel__submit {
        flex-shrink: 0;
        min-width: 110px;
        min-height: 42px;
        padding: 0 14px;
    }

    .cdl-page.epc-car-detail-page {
        padding-bottom: 88px;
    }
}

@media (max-width: 900px) {
    .cdl-top {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .cdl-float-counsel {
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 0;
    }

    .cdl-float-counsel__form {
        border-radius: 16px 16px 0 0;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
        padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
        gap: 10px;
        flex-wrap: wrap;
    }

    .cdl-float-counsel__head {
        width: 100%;
    }

    .cdl-float-counsel__fields {
        width: 100%;
    }

    .cdl-float-counsel__submit {
        min-width: 96px;
    }
}

@media (max-width: 640px) {
    .cdl-columns {
        grid-template-columns: 1fr;
    }

    /* 1단으로 쌓이는 모바일에서는 히어로 높이에 맞출 이유가 없어 다시 일반 비율로 되돌린다 */
    .cdl-gallery .encar-gallery__main {
        aspect-ratio: 4 / 3;
        flex: none;
        min-height: 0;
    }

    .cdl-spec-grid {
        gap: 6px;
    }

    .cdl-spec-box {
        padding: 8px 4px;
        min-height: 56px;
    }

    .cdl-spec-box__value {
        font-size: 12.5px;
    }

    .cdl-hero__title {
        font-size: 19px;
    }

    .cdl-lease-card__num {
        font-size: 27px;
    }

    .cdl-basic-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cdl-basic-sale {
        flex-wrap: wrap;
    }

    .cdl-dealer__actions {
        grid-template-columns: 1fr 1fr;
    }

    /* 선납금 옵션(보통 0~50% 6개)이 좁은 화면에서 한 줄로 욱여넣으면 너무 빽빽해져 3열×2줄로 감싼다 */
    .cdl-lease-card__down-tabs {
        grid-template-columns: repeat(3, 1fr);
    }

    .cdl-lease-card__down-tabs .cdl-lease-tab {
        padding: 7px 2px;
        font-size: 11.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cdl-lease-card__cta,
    .cdl-btn,
    .cdl-quickdock__btn,
    .cdl-lease-tab,
    .cdl-mobile-dock__btn {
        transition: none;
    }

    .cdl-lease-card__cta:hover,
    .cdl-btn:hover,
    .cdl-quickdock__btn:hover,
    .cdl-lease-card__cta:active,
    .cdl-btn:active,
    .cdl-quickdock__btn:active,
    .cdl-lease-tab:active,
    .cdl-mobile-dock__btn:active {
        transform: none;
    }
}

/* 리스/엔카 스킨 페이지는 car_detail.css(기본 스킨)를 로드하지 않아서 공용 컴포넌트인
   section_help_tip.php(.epc-section-help / .epc-sale-method-help)의 말풍선 스타일이
   전혀 적용되지 않았다(버튼은 브라우저 기본 스타일, 툴팁은 위치 지정 없이 그냥 텍스트로
   흘러나옴). 여기서 동일한 모양으로 다시 정의한다. */
.epc-section-help,
.epc-sale-method-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.epc-section-help__btn,
.epc-sale-method-help__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    padding: 0;
    margin: 0;
    border: 1px solid #94a3b8;
    border-radius: 50%;
    background: #fff;
    color: #64748b;
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.epc-section-help__tip,
.epc-sale-method-help__tip {
    display: none;
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    z-index: 20;
    min-width: 120px;
    max-width: 260px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    white-space: normal;
    word-break: keep-all;
    text-align: left;
}

.epc-section-help__tip::after,
.epc-sale-method-help__tip::after {
    content: '';
    position: absolute;
    left: 14px;
    bottom: -6px;
    width: 10px;
    height: 10px;
    background: #fff;
    border-right: 1px solid #cbd5e1;
    border-bottom: 1px solid #cbd5e1;
    transform: rotate(45deg);
}

.epc-section-help.is-open .epc-section-help__tip,
.epc-sale-method-help.is-open .epc-sale-method-help__tip {
    display: block;
}

.epc-section-help--wide .epc-section-help__tip {
    min-width: 280px;
    max-width: min(420px, 94vw);
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
}

.epc-section-help--below .epc-section-help__tip {
    bottom: auto;
    top: calc(100% + 8px);
}

.epc-section-help--below .epc-section-help__tip::after {
    bottom: auto;
    top: -6px;
    border-right: 1px solid #cbd5e1;
    border-bottom: none;
    border-top: 1px solid #cbd5e1;
    border-left: 1px solid #cbd5e1;
}
