/**
 * 장바구니 Zeplin 퍼블리싱 (PC·MO 공통)
 * 시안: shop-list-ttodrak-album / 홈과 동일 스택(Pretendard, #0096e3, #e1f9fe)
 */

.tta-cart-page,
.tta-cart-page--mo {
    font-family: "Pretendard Variable", Pretendard, "PretendardVariable", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #111;
    box-sizing: border-box;
}

.tta-cart-page *,
.tta-cart-page--mo * {
    box-sizing: border-box;
}

/* ---------- 히어로 ----------
 * Zeplin (Web 1280) 장바구니: Component 49 — Rectangle 45 만 #e1f9fe, 높이 130px.
 * 본문 영역 배경은 흰색(기본), 페이지 전체에 연블루 칠하지 않음. */
.tta-cart__hero {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: #e1f9fe;
    min-height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    text-align: center;
}

.tta-cart__title {
    margin: 0;
    font-size: 28px;
    font-weight: 400;
    line-height: 33px;
    letter-spacing: -0.02em;
    color: #000;
}

/* ---------- 레이아웃 래퍼 ---------- */
.tta-cart__inner {
    max-width: 1036px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

@media (min-width: 1068px) {
    .tta-cart__inner {
        padding: 32px 0 56px;
    }
}

.tta-cart__bsk {
    margin: 0;
}

/* ---------- PC 테이블 ---------- */
.tta-cart__table-wrap {
    margin: 0;
    border: 1px solid #e1e1e1;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.tta-cart__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

/* Zeplin: 헤더 위쪽 선 진함 · 아래쪽 선 연함 */
.tta-cart__table thead th {
    padding: 14px 12px;
    background: #fff;
    font-weight: 500;
    font-size: 15px;
    color: #333;
    border-top: 1px solid #6e6e6e;
    border-bottom: 1px solid #d8d8d8;
    text-align: center;
    vertical-align: middle;
}

.tta-cart__table thead th:first-child {
    width: 52px;
}

.tta-cart__table thead th.tta-cart__th-img {
    width: 186px;
}

.tta-cart__table tbody td {
    padding: 16px 12px;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: middle;
    text-align: center;
    color: #222;
}

/* 상품 행 마지막 줄도 합계 바와 구분되도록 유지 (합계 영역에서 상단 보더로 마감) */
.tta-cart__table tbody tr:last-child td {
    border-bottom: none;
}

.tta-cart__table .td_img {
    vertical-align: middle;
}

.tta-cart__table .td_img .sod_img {
    display: inline-block;
    vertical-align: middle;
    border-radius: 0;
    overflow: hidden;
    background: #f4f6f8;
    line-height: 0;
}

.tta-cart__table .td_img .sod_img img {
    display: block;
    width: 170px;
    height: 170px;
    max-width: 100%;
    object-fit: cover;
    border-radius: 0;
}

.tta-cart__table .td_prd {
    text-align: left;
}

.tta-cart__table .td_prd .sod_name {
    overflow: hidden;
}

.tta-cart__table .prd_name {
    color: #111;
    text-decoration: none;
    font-weight: 600;
}

.tta-cart__table .prd_name:hover {
    color: #0096e3;
}

.tta-cart__table .sod_opt {
    margin-top: 8px;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

/* Zeplin: 옵션 뱃지 — 연회색 박스 + 옵션 글자 연블루 */
.tta-cart__table .sod_opt li {
    color: #555;
}

.tta-cart__table .sod_opt li:before {
    content: "옵션";
    display: inline-block;
    margin: 0 6px 0 0;
    padding: 4px 8px;
    border-radius: 4px;
    background: #e8eaed;
    line-height: 1.2;
    font-size: 12px;
    font-weight: 500;
    color: #4a90d9;
    vertical-align: middle;
}

.tta-cart__table .sod_option_btn {
    margin-top: 10px;
}

/* Zeplin: 선택사항수정 — 흰 배경 · 얇은 회색 테두리 · 캡슐 */
.tta-cart__table .mod_options {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: #666;
    background: #fff;
    border: 1px solid #d4d6db;
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    width: 100%;
}

.tta-cart__table .mod_options:hover {
    background: #fafafa;
    border-color: #b8bcc4;
}

.tta-cart__table .td_numbig,
.tta-cart__table .td_num {
    font-variant-numeric: tabular-nums;
}

/* Zeplin: 소계 열 가운데 정렬 */
.tta-cart__table .text_right {
    text-align: center !important;
}

.tta-cart__table .total_prc {
    font-weight: 600;
    font-size: 15px;
    color: #111;
}

.tta-cart__empty {
    padding: 48px 16px !important;
    text-align: center;
    font-size: 15px;
    color: #666;
}

/* Zeplin: 합계 아래 툴바 — 카드 하단 라운드 */
.tta-cart__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 16px 18px;
    background: #fff;
    border-top: 1px solid #ececec;
    border-radius: 0 0 12px 12px;
}

/* default_shop .btn_cart_del 하단 보더·과한 패딩 제거 */
#tta_cart_page .tta-cart__toolbar.btn_cart_del,
.tta-cart-page .tta-cart__toolbar.btn_cart_del,
#tta_cart_page_mo .tta-cart__toolbar.btn_cart_del,
.tta-cart-page--mo .tta-cart__toolbar.btn_cart_del {
    padding: 16px 16px 18px;
    border-bottom: none;
}

/* Zeplin: 보조 버튼 3종 공통 — 흰 배경 · 얇은 회색 테두리 · 캡슐 · 중간 톤 글자 */
.tta-cart__btn-continue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 142px;
    height: 44px;
    padding: 0 22px;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    text-decoration: none;
    background: #fff;
    border: 1px solid #d4d6db;
    border-radius: 999px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.tta-cart__btn-continue:hover {
    background: #fafafa;
    border-color: #b8bcc4;
    color: #444;
}

.tta-cart__toolbar-right {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.tta-cart__btn-ghost {
    min-width: 132px;
    height: 44px;
    padding: 0 18px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    background: #fff;
    border: 1px solid #d4d6db;
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.tta-cart__btn-ghost:hover {
    background: #fafafa;
    border-color: #b8bcc4;
    color: #444;
}

/* 합계 — Zeplin Rectangle 2205: #efefef 풀폭 · 문구 가운데 · 금액 빨강 굵게 */
.tta-cart__totals {
    margin-top: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    display: block;
}

.tta-cart__sum-bar {
    width: 100%;
    margin-top: 0;
    padding: 22px 16px;
    background: #efefef;
    border: none;
    border-top: 1px solid #e0e0e0;
    border-radius: 0;
    text-align: center;
    box-sizing: border-box;
}

.tta-cart__sum-txt {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #111;
    letter-spacing: -0.02em;
}

.tta-cart__sum-num {
    display: inline-block;
    margin: 0 4px 0 6px;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    color: #d53d3f;
    font-variant-numeric: tabular-nums;
}

.tta-cart__sum-won {
    font-size: 22px;
    font-weight: 700;
    color: #111;
}

/* default_shop.css / mobile_shop.css 의 #sod_bsk_tot .sod_bsk_cnt(33%·#212a37) 무력화 */
#tta_cart_page #sod_bsk #sod_bsk_tot,
.tta-cart-page #sod_bsk #sod_bsk_tot {
    border: none;
    margin: 0;
}

#tta_cart_page #sod_bsk #sod_bsk_tot .tta-cart__sum-bar.sod_bsk_cnt,
.tta-cart-page #sod_bsk #sod_bsk_tot .tta-cart__sum-bar.sod_bsk_cnt {
    width: 100% !important;
    max-width: 100%;
    float: none;
    clear: both;
    background: #efefef !important;
    color: inherit;
    line-height: inherit;
}

#tta_cart_page_mo #m_sod_bsk_tot,
.tta-cart-page--mo #m_sod_bsk_tot {
    border: none;
    margin: 0;
}

#tta_cart_page_mo #m_sod_bsk_tot .tta-cart__sum-bar.sod_bsk_cnt,
.tta-cart-page--mo #m_sod_bsk_tot .tta-cart__sum-bar.sod_bsk_cnt {
    width: 100% !important;
    max-width: 100%;
    float: none;
    clear: both;
    background: #efefef !important;
    color: inherit;
    line-height: inherit;
}

/* default_shop #sod_bsk_act .btn_submit 고정 높이·너비 덮어쓰기 */
#tta_cart_page #sod_bsk_act .tta-cart__btn-order,
.tta-cart-page #sod_bsk_act .tta-cart__btn-order,
#tta_cart_page_mo #sod_bsk_act .tta-cart__btn-order,
.tta-cart-page--mo #sod_bsk_act .tta-cart__btn-order {
    height: 48px !important;
    width: auto !important;
    min-width: 142px;
}

/* 하단 액션 — 캡슐형: 주문 #2c5273, 취소 #aeaeae, 흰 글자 */
.tta-cart__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    padding-top: 0;
}

.tta-cart__act-pair {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.tta-cart__btn-order,
.tta-cart__actions .btn_submit.tta-cart__btn-order {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 142px;
    width: auto;
    height: 48px;
    padding: 0 28px !important;
    font-family: inherit;
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #fff !important;
    background: #2c5273 !important;
    border: none !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, filter 0.15s;
}

.tta-cart__btn-order:hover,
.tta-cart__actions .btn_submit.tta-cart__btn-order:hover {
    background: #244563 !important;
    filter: none;
}

.tta-cart__btn-order--solo {
    background: #2c5273 !important;
    color: #fff !important;
}

.tta-cart__btn-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 142px;
    width: auto;
    height: 48px;
    padding: 0 28px;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: #aeaeae;
    border: none;
    border-radius: 999px;
    transition: background 0.15s, color 0.15s;
}

.tta-cart__btn-cancel:hover {
    background: #9a9a9a;
    color: #fff;
}

.tta-cart__naverpay {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

/* 옵션 수정 레이어 */
#mod_option_frm {
    z-index: 10000;
}

.mod_option_bg {
    z-index: 9999;
}

/* ---------- 좁은 PC / 태블릿: 테이블 카드화 ---------- */
@media (max-width: 900px) {
    .tta-cart__table thead {
        display: none;
    }

    .tta-cart__table tbody tr {
        display: block;
        padding: 16px;
        border-bottom: 1px solid #eef1f4;
    }

    .tta-cart__table tbody tr:last-child {
        border-bottom: none;
    }

    .tta-cart__table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 6px 0;
        border: 0;
        text-align: right !important;
    }

    .tta-cart__table tbody td::before {
        content: attr(data-label);
        font-size: 12px;
        font-weight: 600;
        color: #888;
        margin-right: 12px;
        flex-shrink: 0;
    }

    .tta-cart__table .td_chk::before {
        content: none;
    }

    .tta-cart__table .td_chk {
        justify-content: flex-start;
        padding-bottom: 12px;
    }

    .tta-cart__table .td_img {
        display: block;
        text-align: center;
        padding-bottom: 12px;
    }

    .tta-cart__table .td_img::before {
        display: none;
    }

    .tta-cart__table .td_img .sod_img img {
        width: 120px;
        height: 120px;
        margin: 0 auto;
    }

    .tta-cart__table .td_prd {
        display: block;
        padding-bottom: 12px;
    }

    .tta-cart__table .td_prd::before {
        content: none;
    }

    .tta-cart__table .td_prd .sod_name {
        max-width: 100%;
    }
}

/* ---------- 모바일 전용 ---------- */
#tta_cart_page_mo #container,
.tta-cart-page--mo #container {
    padding-bottom: 24px;
}

.tta-cart__hero--mo {
    min-height: 88px;
}

.tta-cart__inner--mo {
    max-width: 100%;
    padding: 16px 16px 32px;
}

/* MO: PC Zeplin과 동일 — 단일 흰 카드 안에 목록·합계 바·툴바 */
.tta-cart__card-mo {
    margin: 0 0 8px;
    border: 1px solid #e1e1e1;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.tta-cart__chk-all {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    margin-bottom: 0;
    background: #fff;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #b2b2b2;
    font-size: 14px;
    font-weight: 500;
}

.tta-cart__card-mo .tta-cart__chk-all {
    border-bottom: 1px solid #b2b2b2;
}

.tta-cart__list-mo {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tta-cart__card-mo .tta-cart__list-mo {
    margin: 0;
}

.tta-cart__li-mo {
    background: #fff;
    border: none;
    border-radius: 0;
    padding: 16px 14px;
    margin-bottom: 0;
    box-shadow: none;
    border-bottom: 1px solid #b2b2b2;
}

.tta-cart__card-mo .tta-cart__li-mo:last-of-type {
    border-bottom: none;
}

.tta-cart__li-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    gap: 8px 10px;
    align-items: start;
}

.tta-cart__li-head .li_chk {
    grid-row: 1 / span 2;
    align-self: start;
    padding-top: 4px;
}

.tta-cart__li-head .li_name {
    grid-column: 2;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 600;
}

.tta-cart__li-head .li_name a {
    color: #111;
    text-decoration: none;
}

.tta-cart__li-head .total_img {
    grid-column: 3;
    grid-row: 1 / span 2;
    border-radius: 12px;
    overflow: hidden;
    background: #f4f6f8;
}

.tta-cart__li-head .li_mod {
    grid-column: 2;
}

.tta-cart__li-mo .mod_options {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: #666;
    background: #fff;
    border: 1px solid #d4d6db;
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.tta-cart__li-mo .mod_options:hover {
    background: #fafafa;
    border-color: #b8bcc4;
}

.tta-cart__li-mo .sod_opt {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e8ecf0;
    font-size: 13px;
    color: #666;
    line-height: 1.45;
}

.tta-cart__meta-mo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f2f5;
    font-size: 13px;
    color: #444;
}

.tta-cart__card-mo .tta-cart__meta-mo {
    border-top-color: #e8ecf0;
}

.tta-cart__lbl {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: none;
    letter-spacing: -0.02em;
    margin-bottom: 2px;
}

.tta-cart__subtotal-mo {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e8ecf0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 700;
}

.tta-cart__subtotal-mo strong {
    font-size: 18px;
    color: #111;
    font-variant-numeric: tabular-nums;
}

.tta-cart__empty-mo {
    text-align: center;
    padding: 40px 16px !important;
    font-size: 15px;
    color: #666;
    background: #fff;
    border-radius: 16px;
    border: 1px dashed #d8dee6;
}

.tta-cart__toolbar--mo {
    padding: 16px 14px 18px;
    border-top: 1px solid #ececec;
    background: #fff;
    border-radius: 0 0 12px 12px;
}

.tta-cart__card-mo .tta-cart__sum-bar {
    border-radius: 0;
    padding-left: 14px;
    padding-right: 14px;
    text-align: center;
}

.tta-cart__li-mo .sod_opt li {
    color: #555;
}

.tta-cart__li-mo .sod_opt li:before {
    content: "옵션";
    display: inline-block;
    margin: 0 6px 0 0;
    padding: 4px 8px;
    border-radius: 4px;
    background: #e8eaed;
    line-height: 1.2;
    font-size: 12px;
    font-weight: 500;
    color: #4a90d9;
    vertical-align: middle;
}

.tta-cart__actions--mo {
    margin-top: 28px;
    padding: 0;
    position: static;
    background: none;
}

.tta-cart__actions--mo .tta-cart__btn-order--solo {
    width: 100%;
    max-width: 320px;
}

.tta-cart__actions--mo .tta-cart__act-pair {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.tta-cart__actions--mo .tta-cart__btn-order,
.tta-cart__actions--mo .tta-cart__btn-cancel {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 160px;
}

@media (max-width: 360px) {
    .tta-cart__toolbar--mo {
        flex-direction: column;
        align-items: stretch;
    }

    .tta-cart__toolbar--mo .tta-cart__toolbar-right {
        justify-content: stretch;
    }

    .tta-cart__toolbar--mo .tta-cart__btn-ghost {
        flex: 1;
        min-width: 0;
    }

    .tta-cart__sum-num {
        font-size: 26px;
    }

    .tta-cart__sum-txt,
    .tta-cart__sum-won {
        font-size: 18px;
    }
}

.tta-cart__naverpay-mo {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    width: 100%;
}
