/* ──────────────────────────────────────────────
   차량정보 — 변형 상세 (page)
   Hero + 트림 카드 (옵션 아코디언) + 다른 변형 + 모바일 sticky CTA
   ────────────────────────────────────────────── */

/* ── Hero ───────────────────────────────────── */

.cp_hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    padding: 28px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #fff;
    margin-bottom: 36px;
}

.cp_hero_image {
    border-radius: 10px;
    overflow: hidden;
    background: #F5F6F8;
    aspect-ratio: 16 / 11;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cp_hero_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cp_hero_noimg {
    color: #D5D7DB;
    font-size: 80px;
}

.cp_hero_info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.cp_hero_brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color-sub);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cp_hero_brand .cp_img {
    width: 30px;
    aspect-ratio: 60/40;
    display: flex;
}

.cp_hero_brand .cp_img img {
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.cp_hero_model {
    font-size: 30px;
    font-weight: 800;
    color: var(--text-color);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.cp_hero_variant {
    font-size: 16px;
    color: var(--text-color-sub);
    margin: 0;
    font-weight: 500;
}

.cp_hero_tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 8px;
}

.cp_tag {
    padding: 4px 10px;
    border-radius: 12px;
    background: #F0F3F7;
    color: var(--text-color-sub);
    font-size: 12px;
    font-weight: 500;
}

.cp_hero_price {
    padding: 14px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin: 4px 0 6px;
}

.cp_price_label {
    display: block;
    font-size: 12px;
    color: var(--text-color-light);
    margin-bottom: 4px;
    font-weight: 500;
}

.cp_hero_price strong {
    display: block;
    font-size: 26px;
    font-weight: 800;
    color: var(--main-color);
    letter-spacing: -0.02em;
}

.cp_hero_price small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-color-light);
}

.cp_hero_desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color-sub);
    margin: 0;
}

.cp_hero_cta {
    align-self: flex-start;
    margin-top: 6px;
    padding: 14px 28px;
    border-radius: 8px;
    background: var(--main-color);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}

.cp_hero_cta:hover {
    background: #0a213c;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(16, 48, 80, 0.25);
}

.cp_hero_cta i {
    font-size: 17px;
}

/* ── 섹션 공통 ─────────────────────────────── */

.cp_trims {
    margin-bottom: 36px;
}

.cp_section_head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--text-color);
}

.cp_section_head h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    letter-spacing: -0.01em;
}

.cp_section_head span {
    font-size: 13px;
    color: var(--main-color);
    font-weight: 600;
}

/* ── 트림 아코디언 ─────────────────────────── */

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

.cp_trim {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.15s;
}

.cp_trim:hover {
    border-color: var(--main-color);
}

.cp_trim.open {
    border-color: var(--main-color);
}

.cp_trim_head {
    width: 100%;
    padding: 18px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 16px;
    align-items: center;
    text-align: left;
}

.cp_trim_head:hover {
    background: #FAFBFC;
}

.cp_trim.open .cp_trim_head {
    background: #F7F9FB;
}

.cp_trim_title strong {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 6px;
}

.cp_trim_specs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--text-color-sub);
}

.cp_trim_specs span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.cp_trim_specs i {
    font-size: 13px;
    color: var(--text-color-light);
}

.cp_trim_price {
    text-align: right;
}

.cp_trim_price strong {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--main-color);
    letter-spacing: -0.01em;
}

.cp_trim_price small {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: var(--text-color-light);
}

.cp_trim_toggle {
    font-size: 22px;
    color: var(--text-color-sub);
    transition: transform 0.2s;
}

.cp_trim.open .cp_trim_toggle {
    transform: rotate(180deg);
}

.cp_trim_body {
    display: none;
    padding: 20px 22px 22px;
    border-top: 1px solid var(--border-color);
}

.cp_trim.open .cp_trim_body {
    display: block;
}

.cp_trim_desc {
    font-size: 13px;
    color: var(--text-color-sub);
    line-height: 1.6;
    margin: 0 0 16px;
    padding: 12px 14px;
    background: #FAFBFC;
    border-radius: 6px;
}

/* ── 옵션 그룹 ─────────────────────────────── */

.cp_options_guide {
    font-size: 12px;
    color: var(--text-color-sub);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: #F0F4F8;
    border-radius: 6px;
}

.cp_options_guide i {
    color: var(--main-color);
    font-size: 14px;
}

.cp_options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.cp_option_group h5 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

.cp_option_group ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cp_option_group li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
}

/* 옵션 체크 가능 행 */
.cp_option {
    cursor: pointer;
    gap: 8px;
    padding: 8px 10px !important;
    border-radius: 6px;
    transition: background 0.12s;
}

.cp_option:hover {
    background: #F7F9FB;
}

.cp_option_check {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: transparent;
    font-size: 12px;
    transition: all 0.12s;
    background: #fff;
}

.cp_option.selected .cp_option_check {
    background: var(--main-color);
    border-color: var(--main-color);
    color: #fff;
}

.cp_option.default {
    cursor: default;
}

.cp_option.default:hover {
    background: transparent;
}

.cp_option.default .cp_option_check {
    background: #C7CDD3;
    border-color: #C7CDD3;
    color: #fff;
}

.cp_option_name {
    color: var(--text-color);
    flex: 1;
}

.cp_option_badge {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.cp_option_badge.default {
    background: #E8F0F7;
    color: var(--main-color);
}

.cp_option_badge.paid {
    background: #FFF4E0;
    color: #B07000;
}

.cp_option_badge.free {
    background: #E8F5E9;
    color: #2E7D32;
}

.cp_no_options {
    color: var(--text-color-light);
    font-size: 13px;
    margin: 0;
}

.cp_trim_cta {
    margin-top: 18px;
    padding: 12px 18px;
    border-radius: 6px;
    background: #F0F3F7;
    color: var(--main-color);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s;
}

.cp_trim_cta:hover {
    background: var(--main-color);
    color: #fff;
}

.cp_trim_cta i {
    font-size: 15px;
}

/* ── 견적 요약 박스 ──────────────────────── */

.cp_quote {
    margin-bottom: 36px;
}

.cp_quote_box {
    border: 2px solid var(--main-color);
    border-radius: 12px;
    background: #fff;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(16, 48, 80, 0.06);
    position: relative;
}

/* 모바일 컴팩트 핸들/딤 — 데스크탑에선 숨김 */
.cp_quote_handle,
.cp_quote_dim {
    display: none;
}

.cp_quote_row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
}

.cp_quote_row.main {
    padding-top: 0;
}

.cp_quote_label {
    color: var(--text-color-sub);
    font-weight: 500;
}

.cp_quote_row strong {
    color: var(--text-color);
    font-weight: 700;
    font-size: 15px;
}

.cp_quote_row.main strong {
    font-size: 17px;
    color: var(--text-color);
}

.cp_quote_options_wrap {
    margin: 14px 0;
    padding: 14px 0;
    border-top: 1px dashed var(--border-color);
    border-bottom: 1px dashed var(--border-color);
}

.cp_quote_options_head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-color-sub);
    margin-bottom: 8px;
}

.cp_quote_options_head em {
    font-style: normal;
    font-weight: 700;
    color: var(--main-color);
}

.cp_quote_options_head span em {
    color: var(--main-color);
    margin: 0 2px;
}

.cp_quote_options {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.cp_quote_opt {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    padding: 4px 0;
}

.cp_quote_opt span {
    color: var(--text-color-sub);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 8px;
}

.cp_quote_opt em {
    font-style: normal;
    font-weight: 600;
    color: var(--text-color);
    flex-shrink: 0;
}

.cp_quote_opt em.default {
    color: var(--main-color);
}

.cp_quote_opt em.free {
    color: #2E7D32;
}

.cp_quote_opt_empty {
    padding: 12px 0;
    text-align: center;
    color: var(--text-color-light);
    font-size: 12px;
}

.cp_quote_total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.cp_quote_total span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.cp_quote_total strong {
    font-size: 26px;
    font-weight: 800;
    color: var(--main-color);
    letter-spacing: -0.02em;
}

.cp_quote_cta {
    display: flex;
    width: 100%;
    height: 50px;
    border-radius: 8px;
    background: var(--main-color);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s;
}

.cp_quote_cta:hover {
    background: #0a213c;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(16, 48, 80, 0.25);
}

.cp_quote_cta i {
    font-size: 17px;
}

/* ── 다른 변형 (Swiper) ───────────────────── */

.cp_other_swiper_wrap {
    position: relative;
}

.cp_other_swiper {
    overflow: hidden;
    padding: 0 0 36px;
}

.cp_other_swiper .swiper-wrapper {
    align-items: stretch;
}

.cp_other_swiper .swiper-slide {
    height: auto;
}


/* 페이지네이션 */
.cp_other_pagination {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.cp_other_pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #D5D7DB;
    opacity: 1;
    border-radius: 50%;
    transition: all 0.15s;
}

.cp_other_pagination .swiper-pagination-bullet-active {
    width: 24px;
    border-radius: 4px;
    background: var(--main-color);
}

.cp_other_card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: all 0.15s;
}

.cp_other_card:hover {
    border-color: var(--main-color);
    transform: translateY(-2px);
}

.cp_other_image {
    aspect-ratio: 16 / 10;
    background: #F5F6F8;
    overflow: hidden;
}

.cp_other_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cp_card_noimg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #D5D7DB;
    font-size: 44px;
}

.cp_other_body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cp_other_variant {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.cp_other_tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.cp_other_price strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--main-color);
}

.cp_empty {
    padding: 40px;
    text-align: center;
    color: var(--text-color-light);
    background: #FAFBFC;
    border-radius: 8px;
}

/* ── 모바일 sticky CTA ───────────────────── */

.cp_sticky {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background: #fff;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
    padding: 12px 16px;
    align-items: center;
    gap: 12px;
}

.cp_sticky_price {
    flex: 1;
    font-size: 12px;
    color: var(--text-color-sub);
}

.cp_sticky_price strong {
    display: block;
    font-size: 16px;
    color: var(--main-color);
    font-weight: 700;
}

.cp_sticky_cta {
    padding: 12px 20px;
    border-radius: 6px;
    background: var(--main-color);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cp_sticky_cta i {
    font-size: 16px;
}

/* ── 반응형 ─────────────────────────────────── */

@media (max-width: 1024px) {
    .cp_hero {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .cp_hero_model {
        font-size: 24px;
    }

    .cp_hero_price strong {
        font-size: 22px;
    }

    /* Swiper로 변경됨 — 네비 버튼 위치만 보정 */
    .cp_other_nav.prev {
        left: 0;
    }

    .cp_other_nav.next {
        right: 0;
    }
}

@media (max-width: 768px) {
    #floating_wrap {
        display: none;
    }

    /* 견적 박스 가려지지 않게 본문 여유 */
    body {
        padding-bottom: 140px;
    }

    .cp_hero {
        padding: 16px;
    }

    .cp_hero_cta {
        align-self: stretch;
        justify-content: center;
    }

    .cp_trim_head {
        grid-template-columns: 1fr auto;
        row-gap: 8px;
        padding: 14px 16px;
    }

    .cp_trim_title {
        grid-column: 1 / -1;
    }

    .cp_trim_price {
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .cp_trim_toggle {
        position: absolute;
        right: 16px;
        top: 14px;
    }

    .cp_trim {
        position: relative;
    }

    .cp_trim_body {
        padding: 16px 18px 18px;
    }

    .cp_options {
        grid-template-columns: 1fr;
    }

    /* 기존 sticky 가격 바는 견적 박스가 대체 → 숨김 */
    .cp_sticky {
        display: none !important;
    }

    /* ── 견적 박스 모바일 fixed 모드 ─────── */

    .cp_quote {
        margin-bottom: 0;
    }

    .cp_quote .cp_section_head {
        display: none;
    }

    .cp_quote_box {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 99;
        border: 1px solid var(--border-color);
        border-bottom: none;
        border-radius: 14px 14px 0 0;
        padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
        max-height: 85vh;
        overflow: hidden;
        /* 박스 자체 스크롤 X — 옵션 wrap만 내부 스크롤 */
        display: flex;
        flex-direction: column;
        transition: padding 0.2s;
    }

    /* 펼침 모드 — 고정 영역들 flex-shrink: 0, 옵션 wrap만 flex: 1로 늘려 내부 스크롤 */
    .cp_quote_box.expanded .cp_quote_handle,
    .cp_quote_box.expanded .cp_quote_row,
    .cp_quote_box.expanded .cp_quote_total,
    .cp_quote_box.expanded .cp_quote_cta {
        flex-shrink: 0;
    }

    .cp_quote_box.expanded .cp_quote_options_wrap {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        min-height: 100px;
    }

    .cp_quote_box.expanded .cp_quote_options_head {
        flex-shrink: 0;
    }

    .cp_quote_box.expanded .cp_quote_options {
        flex: 1 1 auto;
        overflow-y: auto;
        max-height: none;
        -webkit-overflow-scrolling: touch;
    }

    /* 컴팩트 핸들 노출 */
    .cp_quote_handle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        gap: 12px;
        margin-bottom: 0;
    }

    .cp_quote_handle_info b {
        display: block;
        font-size: 11px;
        font-weight: 500;
        color: var(--text-color-sub);
        margin-bottom: 2px;
    }

    .cp_quote_handle_info strong {
        font-size: 20px;
        font-weight: 800;
        color: var(--main-color);
        letter-spacing: -0.02em;
    }

    .cp_quote_handle_icon {
        width: 34px;
        height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        color: var(--text-color-sub);
        border-radius: 50%;
        background: #F3F5F7;
        transition: transform 0.2s, background 0.15s;
        flex-shrink: 0;
    }

    .cp_quote_box.expanded .cp_quote_handle_icon {
        transform: rotate(180deg);
    }

    /* 컴팩트 모드: 핸들 + CTA만 보이고 상세 내역은 숨김 */
    .cp_quote_box:not(.expanded) .cp_quote_row,
    .cp_quote_box:not(.expanded) .cp_quote_options_wrap,
    .cp_quote_box:not(.expanded) .cp_quote_total {
        display: none;
    }

    /* 컴팩트 모드일 때 CTA를 핸들 옆에 작게 */
    .cp_quote_box:not(.expanded) {
        padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    }

    .cp_quote_box:not(.expanded) .cp_quote_cta {
        margin-top: 12px;
        height: 44px;
        font-size: 14px;
    }

    /* 펼침 모드 — 상세 내역 + 큰 CTA */
    .cp_quote_box.expanded {
        padding-top: 18px;
    }

    .cp_quote_box.expanded .cp_quote_handle {
        margin-bottom: 14px;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border-color);
    }

    /* 펼침 시 본문 가림용 딤 — JS로 .open 토글 */
    .cp_quote_dim {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 99;
    }

    .cp_quote_dim.open {
        display: block;
    }


    /* 펼침 시 본문 스크롤 잠금 */
    body.cp_quote_open {
        overflow: hidden;
    }
}

@media (max-width: 480px) {
    .cp_hero_model {
        font-size: 22px;
    }
}