:root {
    --cart-opt-point-color: #6200ea;
    --cart-opt-bg-gray: #f8f9fa;
    --cart-opt-text-dark: #111;
    --cart-opt-border-color: #ddd;
}

/* 장바구니 카테고리 섹션 */
.cart_category_section {
    width: 100%;
    margin-bottom: 40px;
    background: #fff;
    border: 1px solid var(--cart-opt-border-color);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cart_category_section .category_title {
    padding: 16px 20px;
    background: var(--cart-opt-bg-gray);
    border-bottom: 1px solid var(--cart-opt-border-color);
    font-size: 16px;
    font-weight: 700;
    color: var(--cart-opt-text-dark);
    margin: 0;
}

.cart_category_section table {
    width: 100%;
    border-collapse: collapse;
}

.option_wr {
    width: 100%;
    margin-bottom: 20px;
}

.get_item_options,
.get_item_supply {
    display: flex;
    align-items: center;
    gap: 10px;
}

.get_item_options label,
.get_item_supply label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    min-width: auto;
}

.get_item_options span,
.get_item_supply span {
    display: flex;
    flex: 1;
}

.it_option,
.it_supply {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--cart-opt-border-color);
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.it_option:hover,
.it_supply:hover {
    border-color: var(--cart-opt-point-color);
}

.it_option:focus,
.it_supply:focus {
    outline: none;
    border-color: var(--cart-opt-point-color);
    box-shadow: 0 0 0 3px rgba(98, 0, 234, 0.1);
}

.it_option:disabled,
.it_supply:disabled {
    background: var(--cart-opt-bg-gray);
    color: #999;
    cursor: not-allowed;
}

#sit_sel_option {
    width: 100%;
    margin-bottom: 30px;
}

#sit_sel_option h3 {
    font-size: 16px;
    font-weight: 800;
    color: #111;
    margin-bottom: 12px;
}

#sit_opt_added {
    padding: 0;
    margin: 0;
    list-style: none;
}

.sit_opt_list,
.sit_spl_list {
    background: #F5F5F5;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    list-style: none;
}

.opt_name {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.sit_opt_subj {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    word-break: break-all;
}

.opt_count {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 8px;
}

.qty_controls {
    display: flex;
    align-items: center;
    gap: 0;
}

.qty_box,
.opt_count .num_input {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    height: 34px;
}

.opt_count button {
    width: 34px;
    height: 34px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: background 0.2s;
}

.opt_count button:hover {
    background: #f5f5f5;
}

.sit_qty_minus {
    border-radius: 4px 0 0 4px !important;
}

.sit_qty_plus {
    border-radius: 0 4px 4px 0 !important;
}

.opt_count .num_input {
    width: 44px !important;
    height: 34px !important;
    min-width: 44px !important;
    border: 1px solid #ddd !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    text-align: center !important;
    font-weight: bold !important;
    font-size: 14px !important;
    color: #333 !important;
    padding: 0 !important;
    outline: none !important;
    background: #fff !important;
}

.sit_opt_prc {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    white-space: nowrap;
}

.sit_opt_total {
    margin-left: auto;
    font-size: 18px;
    font-weight: 600;
    color: #000;
    white-space: nowrap;
}

.sit_opt_del {
    font-size: 24px;
    border: 0;
    background: none !important;
    cursor: pointer !important;
    color: #999 !important;
    transition: all 0.2s !important;
    line-height: 1;
    margin-left: auto !important;
}

.sit_opt_del:hover {
    color: #333 !important;
}



.mod_btn_confirm {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

.mod_btn_submit,
.mod_btn_close {
    flex: 1;
    height: 48px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.mod_btn_submit {
    background: var(--cart-opt-point-color);
    color: #fff;
}

.mod_btn_submit:hover {
    background: #5200d0;
}

.mod_btn_close {
    background: #fff;
    border: 1px solid var(--cart-opt-border-color);
    color: var(--cart-opt-text-dark);
}

.mod_btn_close:hover {
    background: #f9f9f9;
}

/* ===== 카테고리별 폼 설명 ===== */
.option_info {
    padding: 15px;
    background: #f0f0f0;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #333;
}

/* ===== 모달 헤더 ===== */
.mod_option_header {
    flex-shrink: 0;
    background: #fff;
    padding: 20px 20px 15px 20px;
    border-bottom: 1px solid #C6C6C6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mod_option_header h2 {
    margin: 0;
    padding: 0;
    font-size: 18px;
    font-weight: 700;
    color: #111;
    letter-spacing: 0.5px;
}

.mod_option_close_btn {
    background: none;
    border: none;
    font-size: 24px;
    font-weight: 700;
    color: #A7A7A7;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mod_option_close_btn:hover {
    color: #000;
}

/* ===== 상품정보 영역 (스크롤 X) ===== */
.mod_option_product_info {
    flex-shrink: 0;
    background: #fff;
    padding: 15px 20px;
    display: flex;
    align-items: center;
}

.product_info_inner {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.product_thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    background: #f5f5f5;
}

.product_thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product_details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product_name {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    line-height: 1.4;
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product_price_line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.discount_badge {
    color: #F20000;
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
}

.price_value {
    font-weight: 700;
}

.price_value.sale_price {
    color: #000;
    font-size: 20px;
}

.won_unit {
    font-size: 15px;
    color: #000;
    font-weight: 700;
    margin-left: 2px;
}

.price_value.cost_price {
    color: #999;
    font-size: 14px;
    text-decoration: line-through;
}

/* ===== 모달 오버레이 ===== */
.mod_option_bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== 모달 창 ===== */
#mod_option_frm {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    padding: 0;
    animation: modalSlideUp 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

/* ===== 모달 바디 (스크롤 영역) ===== */
.mod_option_body {
    overflow-y: auto;
    padding: 20px;
    flex: 1;
}

/* 모달 애니메이션 */
@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* ===== 모달 내 폼 요소들 ===== */
#mod_option_frm .option_wr {
    margin-bottom: 25px;
}

#mod_option_frm .option_wr h3 {
    font-size: 16px;
    font-weight: 400;
    color: #111;
    padding-bottom: 10px;
}

#mod_option_frm #sit_sel_option {
    margin-bottom: 25px;
}

#mod_option_frm #sit_sel_option h3 {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--cart-opt-point-color);
    padding-bottom: 8px;
}

.mod_option_footer {
    padding: 20px;
    border-top: 1px solid #ddd;
}

#mod_option_frm .mod_btn_confirm {
    margin-top: 0;
    display: flex;
    gap: 8px;
}

#sit_tot_price {
    display: block;
    margin-bottom: 15px;
    padding: 10px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    text-align: right;
}

/* 반응형 */
@media (max-width: 768px) {
    .opt_count {
        flex-wrap: wrap;
    }

    #sit_tot_price {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .btn_confirm {
        flex-direction: column;
    }

    #mod_option_frm {
        width: 95%;
        max-height: 95vh;
        padding: 20px;
    }

    #mod_option_frm .option_wr h3,
    #mod_option_frm #sit_sel_option h3 {
        font-size: 14px;
    }
}

.credit-package-discount {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    background: rgb(243, 239, 255);
    padding: 4px 8px;
    border-radius: 14px;
}
