/* =========================================
   KSAP Cart Page (Cart_main) Final Premium
   ========================================= */

/* --- 1. 상하단 전체 여백 및 배경 --- */
body.page-id-17 #main {
    background-color: #f8fafc !important; 
    padding-top: 100px !important;
    padding-bottom: 120px !important;
}

/* --- 2. 개별 상품 리스트 영역 (가격 노출 제어) --- */

/* [필수] 상품 우측의 '총계(Subtotal)' 열과 헤더 숨김 */
.wc-block-cart-items__header-total,
.wc-block-cart-item__total {
    display: none !important;
}

/* [필수] 상품명 아래의 가격 정보는 살리되 스타일링 */
.wc-block-cart-item__prices {
    margin-top: 8px !important;
    display: block !important;
}

.wc-block-components-product-price__value {
    color: #64748b !important; /* 약간 차분한 회색으로 고급스럽게 */
    font-weight: 600 !important;
    font-size: 1rem !important;
}

/* --- 3. PC 레이아웃 (65:35 사이드바 배치 강제) --- */
@media (min-width: 1024px) {
    .page-id-17 .fusion-row {
        max-width: 1300px !important;
        width: 95% !important;
    }

    .wc-block-components-sidebar-layout.wc-block-cart {
        display: flex !important;
        flex-direction: row !important;
        gap: 30px !important;
        align-items: flex-start !important;
    }

    .wc-block-cart__main {
        flex: 1 1 65% !important;
        width: 65% !important;
    }

    .wc-block-cart__sidebar {
        flex: 0 0 35% !important;
        width: 35% !important;
        position: sticky !important;
        top: 120px !important;
        height: fit-content;
    }
}

/* --- 4. 메인 카드 디자인 (상품 리스트) --- */
.wc-block-cart__main {
    background: white !important;
    padding: 3rem !important;
    border-radius: 20px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04) !important;
}

.wc-block-components-product-name {
    font-size: 1.3rem !important;
    font-weight: 850 !important;
    color: #1e3a8a !important;
    text-decoration: none !important;
}

.wc-block-cart-item__image img {
    border-radius: 12px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08) !important;
}

/* 항목 제거 버튼 스타일 */
.wc-block-cart-item__remove-link {
    color: #94a3b8 !important;
    font-size: 0.85rem !important;
    margin-top: 15px !important;
    display: inline-block !important;
}

/* --- 5. 사이드바 카드 디자인 (장바구니 합계) --- */
.wc-block-cart__sidebar {
    background: white !important;
    padding: 3rem !important;
    border-radius: 20px !important;
    border: 2px solid #2563eb !important;
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.1) !important;
}

.wc-block-cart__totals-title {
    font-size: 1.6rem !important;
    font-weight: 900 !important;
    color: #1e3a8a !important;
    text-align: center !important;
    margin-bottom: 2rem !important;
    border-bottom: 2px solid #f1f5f9 !important;
    padding-bottom: 1rem !important;
}

/* 예상 합계 텍스트 */
.wc-block-components-totals-item__label {
    font-weight: 700 !important;
    color: #475569 !important;
}

/* 최종 합계 금액 강조 */
.wc-block-components-totals-footer-item-tax-value {
    font-size: 2.2rem !important;
    font-weight: 950 !important;
    color: #2563eb !important;
    letter-spacing: -1.5px !important;
}

/* --- 6. 결제 진행 버튼 (글자색 흰색 고정) --- */
.wc-block-cart__submit-button {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%) !important;
    padding: 24px !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3) !important;
    border: none !important;
    width: 100% !important;
    display: block !important;
    transition: all 0.3s ease !important;
}

/* [필수] 버튼 내부 텍스트 흰색 강제 */
.wc-block-cart__submit-button .wc-block-components-button__text {
    color: #ffffff !important;
    font-size: 1.4rem !important;
    font-weight: 900 !important;
}

.wc-block-cart__submit-button:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.45) !important;
    filter: brightness(1.1);
}

/* --- 7. 모바일 최적화 (여백 최소화 및 패딩 제거) --- */
@media (max-width: 1023px) {
    body.page-id-17 #main {
        padding-top: 40px !important;
        padding-bottom: 60px !important;
    }

    /* 컨테이너 패딩 거의 없앰 */
    .wc-block-components-sidebar-layout.wc-block-cart {
        padding: 0 5px !important;
        gap: 15px !important;
    }

    /* 카드 내부 패딩을 아주 좁게 설정 (직선에 가깝게) */
    .wc-block-cart__main, 
    .wc-block-cart__sidebar {
        width: 100% !important;
        padding: 15px 10px !important; /* 패딩 최소화 */
        border-radius: 12px !important;
    }

    .wc-block-cart-item__product {
        padding-left: 10px !important;
    }

    .wc-block-components-product-name {
        font-size: 1.1rem !important;
    }

    /* 모바일에서 버튼 크기 조정 */
    .wc-block-cart__submit-button {
        padding: 18px !important;
    }
    .wc-block-cart__submit-button .wc-block-components-button__text {
        font-size: 1.2rem !important;
    }
}

/* 아바다 테마 기본 가로 여백 제거 */
.fusion-row {
    max-width: 100% !important;
}