.cart-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 15px;
    font-family: 'Noto Sans KR', sans-serif;
    background: #f8f9fa;
}

.cart-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px 0;
}

.cart-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.cart-subtitle {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
    display: none;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-cart h3 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.empty-cart p {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 20px;
}

.btn-continue-shopping {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.btn-continue-shopping:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

.cart-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

#cart-content {
    display: none;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f1f3f4;
    background: #fafbfc;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.item-count {
    font-size: 13px;
    color: #7f8c8d;
    background: #e9ecef;
    padding: 4px 10px;
    border-radius: 15px;
}

/* 데스크톱 버전 */
.item-image { height: 50px; }

.cart-items-desktop {
    display: block;
    padding: 10px;
}

.cart-header-row {
    display: grid;
    grid-template-columns: 80px 2fr 80px 80px 100px 80px 80px 100px;
    gap: 8px;
    padding: 10px 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-size: 11px;
    font-weight: 600;
    color: #2c3e50;
}

.cart-header-row > div {
    font-size: 11px;
    font-weight: 600;
    color: #2c3e50;
}

.cart-item-row {
    display: grid;
    grid-template-columns: 80px 2fr 80px 80px 100px 80px 80px 100px;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid #f1f3f4;
    align-items: center;
    transition: background-color 0.3s ease;
    font-size: 11px;
}

/* 비회원일 때 할인/적립금 컬럼이 숨겨진 경우의 그리드 레이아웃 */
.cart-header-row.no-discount,
.cart-item-row.no-discount {
    grid-template-columns: 80px 3fr 80px 80px 100px 80px 100px;
}

/* 개별 배송 섹션의 그리드 레이아웃 (배송비 컬럼 포함) */
.delivery-section.individual .cart-header-row,
.delivery-section.individual .cart-item-row {
    grid-template-columns: 80px 2fr 80px 80px 100px 80px 80px 100px;
}

.delivery-section.individual .cart-header-row.no-discount,
.delivery-section.individual .cart-item-row.no-discount {
    grid-template-columns: 80px 3fr 80px 80px 100px 80px 100px;
}

/* 공급업체/기본 배송 섹션의 그리드 레이아웃 (배송비 컬럼 제외) */
.delivery-section.company .cart-header-row,
.delivery-section.company .cart-item-row,
.delivery-section.default .cart-header-row,
.delivery-section.default .cart-item-row {
    grid-template-columns: 80px 2fr 80px 80px 100px 80px 80px;
}

.delivery-section.company .cart-header-row.no-discount,
.delivery-section.company .cart-item-row.no-discount,
.delivery-section.default .cart-header-row.no-discount,
.delivery-section.default .cart-item-row.no-discount {
    grid-template-columns: 80px 3fr 80px 80px 100px 80px;
}

.cart-item-row > div {
    font-size: 11px;
}

.cart-item-row:hover {
    background: #fafbfc;
}

.cart-col-no {
    text-align: center;
}

.item-number {
    font-weight: 600;
    color: #7f8c8d;
    font-size: 11px;
    margin-bottom: 3px;
}

.btn-delete {
    background: #dc3545;
    color: white;
    border: none;
    padding: 3px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 4px rgba(220, 53, 69, 0.2);
}

.btn-delete:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

.cart-col-item {
    display: flex;
    align-items: center;
}

.item-info {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.item-image img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.item-details {
    flex: 1;
}

.item-name {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.3;
    font-size: 11px;
    display: block;
    margin-bottom: 2px;
    word-wrap: break-word;
    word-break: keep-all;
    overflow-wrap: break-word;
    hyphens: auto;
}

.item-name:hover {
    color: #667eea;
}

.item-option {
    font-size: 9px;
    color: #7f8c8d;
    display: block;
    line-height: 1.2;
}

.cart-col-price, .cart-col-option, .cart-col-total {
    text-align: right;
    font-weight: 600;
    color: #2c3e50;
    font-size: 11px;
}

.cart-col-price .original-price {
    text-decoration: line-through;
    color: #7f8c8d;
    font-size: 10px;
    font-weight: 400;
}

.cart-col-price .final-price {
    color: #e74c3c;
    font-weight: 700;
}

.cart-col-total {
    font-size: 11px;
    color: #667eea;
}

.cart-col-qty {
    display: flex;
    justify-content: center;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 4px;
}

.quantity-input {
    width: 35px;
    padding: 3px;
    text-align: center;
    border: 1px solid #e9ecef;
    border-radius: 3px;
    font-size: 11px;
    background: #fafbfc;
    transition: all 0.3s ease;
}

.quantity-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.quantity-buttons {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.btn-quantity-up, .btn-quantity-down {
    background: #6c757d;
    color: white;
    border: none;
    padding: 2px 4px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 8px;
    line-height: 1;
    transition: all 0.3s ease;
}

.btn-quantity-up:hover, .btn-quantity-down:hover {
    background: #545b62;
    transform: scale(1.05);
}

.cart-col-discount {
    text-align: center;
    font-size: 10px;
}

.discount-info, .point-info {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 2px;
    justify-content: center;
}

.discount-icon, .point-icon {
    font-size: 10px;
}

.discount-amount, .point-amount {
    color: #28a745;
    font-weight: 500;
    font-size: 10px;
}

.cart-col-delivery {
    text-align: center;
    font-size: 10px;
    line-height: 1.2;
    color: #7f8c8d;
}

.delivery-type {
    color: #7f8c8d;
    font-size: 9px;
    display: block;
    margin-top: 1px;
}

/* 모바일 버전 */
.cart-items-mobile {
    display: none;
}

.cart-item-mobile {
    padding: 15px;
    border-bottom: 1px solid #f1f3f4;
    background: white;
}

.item-header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.item-number-mobile {
    font-weight: 600;
    color: #7f8c8d;
    font-size: 14px;
}

.btn-delete-mobile {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.btn-delete-mobile:hover {
    background: #c82333;
}

.item-content-mobile {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.item-image-mobile img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.item-details-mobile {
    flex: 1;
}

.item-name-mobile {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.4;
    font-size: 15px;
    display: block;
    margin-bottom: 4px;
    word-wrap: break-word;
    word-break: keep-all;
    overflow-wrap: break-word;
    hyphens: auto;
}

.item-name-mobile:hover {
    color: #667eea;
}

.item-option-mobile {
    font-size: 12px;
    color: #7f8c8d;
    display: block;
}

.item-price-mobile {
    margin-bottom: 10px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.price-label {
    font-size: 13px;
    color: #7f8c8d;
}

.price-value {
    font-weight: 600;
    color: #2c3e50;
    font-size: 13px;
}

.price-value .original-price {
    text-decoration: line-through;
    color: #7f8c8d;
    font-size: 11px;
    font-weight: 400;
}

.price-value .final-price {
    color: #e74c3c;
    font-weight: 700;
}

.price-value.discount {
    color: #e74c3c;
    font-weight: 600;
}

.price-value.point {
    color: #28a745;
    font-weight: 600;
}

.item-quantity-mobile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.qty-label {
    font-size: 13px;
    color: #7f8c8d;
    min-width: 40px;
}

.quantity-control-mobile {
    display: flex;
    align-items: center;
    gap: 6px;
}

.quantity-input-mobile {
    width: 50px;
    padding: 6px;
    text-align: center;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 13px;
    background: #fafbfc;
}

.quantity-buttons-mobile {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.btn-quantity-up-mobile, .btn-quantity-down-mobile {
    background: #6c757d;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    line-height: 1;
}

.item-total-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px 0;
    border-top: 1px solid #f1f3f4;
}

.total-label {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 600;
}

.total-value {
    font-size: 16px;
    color: #667eea;
    font-weight: 700;
}

.item-delivery-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.delivery-label {
    color: #7f8c8d;
}

.delivery-value {
    color: #2c3e50;
    font-weight: 500;
}

.cart-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.15);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item.total {
    border-top: 2px solid rgba(255,255,255,0.3);
    font-weight: 600;
    font-size: 16px;
    margin-top: 10px;
    padding-top: 12px;
}

.summary-label {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
}

.summary-value {
    font-weight: 600;
    color: white;
    font-size: 14px;
}

.summary-item.total .summary-value {
    font-size: 18px;
}

.cart-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 25px;
}

.btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-icon {
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2);
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
    color: white;
    text-decoration: none;
}

.btn-danger {
    background: #dc3545;
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    color: white;
    text-decoration: none;
}

/* 배송 섹션 스타일 */
.delivery-section {
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.delivery-section-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 12px 15px;
    border-bottom: 2px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.delivery-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.delivery-section-icon {
    font-size: 16px;
}

.delivery-section-info {
    font-size: 11px;
    color: #6c757d;
    background: rgba(108, 117, 125, 0.1);
    padding: 3px 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.delivery-section-price {
    font-weight: 600;
    color: #e74c3c;
}

.delivery-section-free {
    color: #28a745;
    font-weight: 600;
}

.delivery-section-items {
    background: white;
}

.delivery-section .cart-header-row {
    background: #fafbfc;
    border-bottom: 1px solid #e9ecef;
    margin: 0;
}

.delivery-section .cart-item-row {
    border-bottom: 1px solid #f1f3f4;
    margin: 0;
}

.delivery-section .cart-item-row:last-child {
    border-bottom: none;
}

/* 개별 배송 섹션 스타일 */
.delivery-section.individual .delivery-section-header {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-bottom-color: #f39c12;
}

.delivery-section.individual .delivery-section-title {
    color: #856404;
}

/* 공급업체 배송 섹션 스타일 */
.delivery-section.company .delivery-section-header {
    background: linear-gradient(135deg, #d1ecf1 0%, #a8d8ea 100%);
    border-bottom-color: #17a2b8;
}

.delivery-section.company .delivery-section-title {
    color: #0c5460;
}

/* 기본 배송 섹션 스타일 */
.delivery-section.default .delivery-section-header {
    background: linear-gradient(135deg, #d4edda 0%, #b7e5c7 100%);
    border-bottom-color: #28a745;
}

.delivery-section.default .delivery-section-title {
    color: #155724;
}

/* 모바일 배송 섹션 */
.delivery-section-mobile {
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.delivery-section-header-mobile {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 12px 15px;
    border-bottom: 2px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.delivery-section-title-mobile {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.delivery-section-info-mobile {
    font-size: 12px;
    color: #6c757d;
    background: rgba(108, 117, 125, 0.1);
    padding: 3px 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.delivery-section-items-mobile {
    background: white;
}

/* 모바일 배송 섹션별 스타일 */
.delivery-section-mobile.individual .delivery-section-header-mobile {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-bottom-color: #f39c12;
}

.delivery-section-mobile.individual .delivery-section-title-mobile {
    color: #856404;
}

.delivery-section-mobile.company .delivery-section-header-mobile {
    background: linear-gradient(135deg, #d1ecf1 0%, #a8d8ea 100%);
    border-bottom-color: #17a2b8;
}

.delivery-section-mobile.company .delivery-section-title-mobile {
    color: #0c5460;
}

.delivery-section-mobile.default .delivery-section-header-mobile {
    background: linear-gradient(135deg, #d4edda 0%, #b7e5c7 100%);
    border-bottom-color: #28a745;
}

.delivery-section-mobile.default .delivery-section-title-mobile {
    color: #155724;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .cart-container {
        padding: 10px;
    }
    
    .cart-items-desktop {
        display: none;
    }
    
    .cart-items-mobile {
        display: block;
    }
    
    .cart-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 180px;
        justify-content: center;
    }
    
    .item-content-mobile {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .item-quantity-mobile {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .quantity-control-mobile {
        width: 100%;
        justify-content: flex-start;
    }
}
