@charset "utf-8";

/* 장바구니: PC 그리드 + 모바일 카드 (테이블 미사용) */
.shop-cart-page,
#con.shop-cart-page.sub_content,
#con.sub_content.shop-cart-page {
    padding: 20px 12px 48px !important;
    box-sizing: border-box !important;
    color: #333;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: hidden !important;
}

.cart-page-wrap {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.cart-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 14px;
    padding: 0 0 12px;
    border-bottom: 2px solid #2f2f2f;
    flex-wrap: wrap;
}

.cart-page-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #111;
}

.cart-head-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.cart-head-btns button,
.cart-head-btns a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 14px;
    font-size: 12px;
    line-height: 1;
    text-decoration: none;
    box-sizing: border-box;
    cursor: pointer;
    border-radius: 0;
    white-space: nowrap;
}

.cart-head-btns .is-disabled,
.cart-head-btns button:disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.btn-cart-buy {
    border: 0;
    background: #d9483b;
    color: #fff;
    font-weight: 700;
}

.shop-cart-page .btn-cart-continue-dark,
.shop-cart-page a.btn-cart-continue-dark,
.cart-head-btns a.btn-cart-continue-dark,
.cart-bottom-empty a.btn-cart-continue-dark {
    border: 0 !important;
    background: #4a4a4a !important;
    color: #fff !important;
}

.shop-cart-page a.btn-cart-continue-dark:hover,
.shop-cart-page a.btn-cart-continue-dark:visited,
.shop-cart-page a.btn-cart-continue-dark:active {
    color: #fff !important;
    background: #333 !important;
}

.btn-cart-outline {
    border: 1px solid #c8c8c8;
    background: #fff;
    color: #333;
}

.cart-mobile-allchk,
.cart-mobile-buybar {
    display: none;
}

.cart-list-wrap {
    border-top: 1px solid #cfcfcf;
    border-bottom: 1px solid #cfcfcf;
    background: #fff;
}

.cart-list-head,
.cart-item-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px 110px 110px 100px 48px;
    align-items: center;
    gap: 0;
    width: 100%;
    box-sizing: border-box;
}

.cart-list-head {
    background: #f7f7f7;
    border-bottom: 1px solid #ddd;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.cart-list-head > div {
    padding: 11px 8px;
}

.cart-list-head .col-name {
    text-align: left;
}

.cart-item-row {
    border-bottom: 1px solid #e5e5e5;
    font-size: 12px;
    color: #333;
}

.cart-item-row > div {
    padding: 14px 10px;
    text-align: center;
    box-sizing: border-box;
    min-width: 0;
}

.cart-item-row .col-name {
    text-align: left;
}

.cart-warehouse-bar {
    padding: 8px 14px;
    background: #f3f3f3;
    text-align: left;
    font-size: 12px;
    color: #555;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
}

.cart-item-name {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
}

.cart-item-thumb {
    flex: 0 0 auto;
}

.cart-item-thumb img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 1px solid #ddd;
    background: #fafafa;
    display: block;
}

.cart-item-text {
    min-width: 0;
    flex: 1 1 auto;
}

.cart-item-title {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #222;
    text-decoration: none;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.cart-item-opt {
    font-size: 11px;
    color: #888;
    line-height: 1.4;
}

.cart-mod-btn {
    margin-top: 6px;
    padding: 2px 8px;
    font-size: 11px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
}

.cart-price-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    line-height: 1.3;
}

.cart-price-wrap strong {
    font-size: 13px;
    color: #111;
}

.cart-point-tag {
    font-size: 11px;
    color: #c45c2a;
    font-weight: 600;
}

.cart-qty-box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.cart-qty-ctrl {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid #c8c8c8;
    background: #fff;
}

.cart-qty-input {
    width: 42px;
    height: 28px;
    border: 0;
    text-align: center;
    font-size: 12px;
    box-sizing: border-box;
}

.cart-qty-arrows {
    display: flex;
    flex-direction: column;
    border-left: 1px solid #c8c8c8;
}

.cart-qty-arrows button {
    width: 18px;
    height: 14px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid #c8c8c8;
    background: #f7f7f7;
    font-size: 8px;
    line-height: 1;
    color: #666;
    cursor: pointer;
}

.cart-qty-arrows button:last-child {
    border-bottom: 0;
}

.cart-qty-mod,
.cart-del-one {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    height: 24px;
    padding: 0 10px;
    font-size: 11px;
    border: 1px solid #c8c8c8;
    background: #fff;
    color: #333;
    cursor: pointer;
}

.cart-empty {
    padding: 70px 20px;
    text-align: center;
    color: #888;
    font-size: 14px;
}

.cart-summary-box {
    margin: 14px 0 0;
    padding: 14px 4px 8px;
}

.cart-summary-wrap {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #444;
}

.cart-summary-left {
    color: #666;
}

.cart-pack-em {
    color: #d9483b;
    font-weight: 700;
}

.cart-summary-right {
    text-align: right;
    line-height: 1.6;
}

.cart-summary-right .sum-op {
    display: inline-block;
    margin: 0 6px;
    width: 16px;
    height: 16px;
    line-height: 14px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 50%;
    color: #888;
    font-size: 11px;
    vertical-align: middle;
}

.cart-grand-total {
    color: #c45c2a !important;
    font-size: 15px;
    font-weight: 700;
}

.cart-point-earn {
    margin-top: 10px;
    text-align: right;
    font-size: 12px;
    color: #555;
}

.cart-point-earn strong {
    color: #111;
}

.cart-bottom-empty {
    margin-top: 28px;
    text-align: center;
}

.cart-bottom-empty .btn-cart-continue-dark {
    display: inline-flex;
    min-width: 160px;
    height: 44px;
    padding: 0 24px;
}

.cart-naverpay {
    margin-top: 16px;
    text-align: center;
}

#sod_bsk_list #mod_option_frm {
    z-index: 10000;
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(540px, calc(100vw - 24px));
    max-height: 80vh;
    overflow: auto;
    margin-left: 0;
    transform: translate(-50%, -50%);
    background: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

#sod_bsk_list .mod_option_bg {
    content: "";
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    display: block;
    z-index: 9999;
}

/* ========== Mobile / tablet card layout ========== */
@media screen and (max-width: 1090px) {
    .shop-cart-page,
    #con.shop-cart-page.sub_content,
    #con.sub_content.shop-cart-page {
        padding: 10px 10px 96px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-x: hidden !important;
    }

    .cart-page-wrap {
        max-width: 100%;
    }

    .cart-page-head {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 10px;
        padding-bottom: 10px;
    }

    .cart-page-title {
        font-size: 18px;
    }

    .cart-head-btns {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .cart-head-btns button,
    .cart-head-btns a {
        flex: none;
        width: 100%;
        height: 40px;
        font-size: 13px;
        padding: 0 8px;
        white-space: normal;
    }

    .cart-mobile-allchk {
        display: flex !important;
        align-items: center;
        margin: 0 0 8px;
        padding: 10px 12px;
        background: #f7f7f7;
        border: 1px solid #e0e0e0;
        font-size: 13px;
        font-weight: 600;
        color: #333;
    }

    .cart-mobile-allchk label {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
    }

    .cart-mobile-allchk input {
        width: 18px;
        height: 18px;
    }

    .cart-list-wrap {
        border: 0;
        background: transparent;
        overflow: visible;
    }

    .cart-list-head {
        display: none !important;
    }

    .cart-warehouse-bar {
        margin: 0 0 8px;
        border: 1px solid #e0e0e0;
        padding: 10px 12px;
    }

    .cart-item-row {
        display: block !important;
        position: relative;
        margin: 0 0 12px;
        padding: 14px 12px 12px;
        border: 1px solid #ddd;
        background: #fff;
        width: 100%;
        box-sizing: border-box;
    }

    .cart-item-row > div {
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        text-align: left !important;
    }

    .cart-item-row .col-name {
        padding-right: 36px !important;
        margin-bottom: 12px;
    }

    .cart-item-name {
        gap: 10px;
    }

    .cart-item-thumb img {
        width: 72px;
        height: 72px;
    }

    .cart-item-title {
        font-size: 14px;
        line-height: 1.45;
    }

    .cart-item-row .col-chk {
        position: absolute;
        top: 14px;
        right: 12px;
        width: auto !important;
        z-index: 2;
    }

    .cart-item-row .col-chk input {
        width: 20px;
        height: 20px;
    }

    .cart-item-row .col-price,
    .cart-item-row .col-qty,
    .cart-item-row .col-sum,
    .cart-item-row .col-act {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 10px 0 !important;
        border-top: 1px solid #f0f0f0;
        min-height: 44px;
    }

    .cart-item-row .col-price::before,
    .cart-item-row .col-qty::before,
    .cart-item-row .col-sum::before,
    .cart-item-row .col-act::before {
        content: attr(data-label);
        flex: 0 0 auto;
        font-size: 12px;
        color: #777;
        font-weight: 600;
    }

    .cart-price-wrap {
        align-items: flex-end;
        flex-direction: row;
        gap: 8px;
    }

    .cart-qty-box {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .cart-qty-mod,
    .cart-del-one {
        min-width: 72px;
        height: 32px;
        font-size: 12px;
    }

    .cart-empty {
        padding: 48px 16px;
        border: 1px solid #e5e5e5;
        background: #fff;
    }

    .cart-summary-box {
        margin-top: 4px;
        padding: 14px 12px;
        border: 1px solid #e5e5e5;
        background: #fafafa;
    }

    .cart-summary-wrap {
        flex-direction: column;
        gap: 10px;
    }

    .cart-summary-left,
    .cart-summary-right,
    .cart-point-earn {
        text-align: left;
        width: 100%;
    }

    .cart-summary-right {
        line-height: 1.8;
    }

    .cart-summary-right .sum-op {
        display: none;
    }

    .cart-grand-total {
        display: block !important;
        margin-top: 6px;
        font-size: 18px !important;
    }

    .cart-bottom-empty .btn-cart-continue-dark {
        width: 100%;
        max-width: 280px;
    }

    .cart-mobile-buybar {
        display: flex !important;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 90;
        align-items: center;
        gap: 10px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
        background: #fff;
        border-top: 1px solid #ddd;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
        box-sizing: border-box;
    }

    .cart-mobile-buybar-info {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 12px;
        color: #666;
        line-height: 1.3;
    }

    .cart-mobile-buybar-info strong {
        display: block;
        margin-top: 2px;
        font-size: 16px;
        color: #c45c2a;
    }

    .cart-mobile-buybar .btn-cart-buy {
        flex: 0 0 auto;
        height: 44px;
        padding: 0 18px;
        font-size: 14px;
        white-space: nowrap;
    }
}

@media screen and (max-width: 1090px) and (min-width: 769px) {
    .cart-mobile-buybar {
        display: none !important;
    }

    .shop-cart-page,
    #con.shop-cart-page.sub_content {
        padding-bottom: 36px !important;
    }
}
