/* ========================================
   장바구니 Excel 스타일 CSS
   - 그라데이션 없음
   - 보라색 계열 없음
   - 단색 배경과 명확한 경계선
   ======================================== */

/* ========== 전역 설정 ========== */
.cart-container {
    font-family: "Noto Sans KR", sans-serif;
    line-height: 1.4;
    box-sizing: border-box;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px 0 20px;
}

/* ========== 헤더 섹션 ========== */
.cart-hero {
    background-color: #2c3e50;
    color: white;
    padding: 0.5rem 0;
    text-align: center;
    margin-bottom: 5px;
    border-radius: 10px;
    border: 1px solid #1a252f;
}

.cart-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.cart-hero p {
    font-size: 1rem;
    opacity: 0.9;
}

/* ========== 네비게이션 영역 ========== */
.cart-nav-wrapper {
    margin-bottom: 0.3rem;
    padding: 5px 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: auto;
}

/* ========== Excel 스타일 테이블 컨테이너 ========== */
.excel-cart-table-wrapper {
    background-color: #FFFFFF;
    border-radius: 0;
    overflow: hidden;
    border: 1px solid #CCCCCC;
    max-width: 1100px;
    margin: 0 auto;
}

/* ========== Excel 스타일 테이블 ========== */
.excel-cart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    border: 1px solid #CCCCCC;
}

/* 테이블 헤더 */
.excel-cart-table thead tr {
    background-color: #F0F0F0;
    border-bottom: 2px solid #CCCCCC;
}

.excel-cart-table th {
    padding: 10px 12px;
    font-weight: 700;
    color: #333333;
    border: 1px solid #CCCCCC;
    font-size: 13px;
}

.excel-cart-table th.th-left { text-align: left; }
.excel-cart-table th.th-center { text-align: center; }
.excel-cart-table th.th-right { text-align: right; }

/* 테이블 바디 - 홀짝 행 */
.excel-cart-table tbody tr:nth-child(odd) {
    background-color: #FFFFFF;
}

.excel-cart-table tbody tr:nth-child(even) {
    background-color: #F9F9F9;
}

.excel-cart-table tbody tr {
    border-bottom: 1px solid #CCCCCC;
    transition: background-color 0.2s ease;
}

.excel-cart-table tbody tr:hover {
    background-color: #E8F4FF !important;
}

/* 테이블 셀 */
.excel-cart-table td {
    padding: 10px;
    border: 1px solid #ccc;
    vertical-align: top;
    color: #222;
}

.excel-cart-table td.td-center {
    text-align: center;
    vertical-align: middle;
}

.excel-cart-table td.td-right {
    text-align: right;
    vertical-align: middle;
}

/* ========== 상품 정보 셀 ========== */
.product-info-cell {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.product-icon {
    padding: 8px;
    border-radius: 6px;
    font-size: 18px;
    line-height: 1;
    min-width: 36px;
    text-align: center;
}

/* 제품별 아이콘 배경색 */
.product-icon.cadarok { background-color: #e3f2fd; }
.product-icon.sticker { background-color: #f3e5f5; }
.product-icon.msticker { background-color: #e8f5e8; }
.product-icon.leaflet { background-color: #fff3e0; }
.product-icon.inserted { background-color: #fff3e0; }
.product-icon.namecard { background-color: #fce4ec; }
.product-icon.envelope { background-color: #e0f2f1; }
.product-icon.merchandisebond { background-color: #f1f8e9; }
.product-icon.littleprint { background-color: #e8eaf6; }

.product-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
    font-size: 15px;
}

.product-number {
    color: #718096;
    font-size: 12px;
}

/* ========== 규격/옵션 셀 ========== */
.specs-cell {
    font-size: 13px; /* Changed from 11px to 13px */
    line-height: 1.5;
    /* display: grid; - 그리드 제거, 1열로 변경 */
    /* grid-template-columns: repeat(2, 1fr); */
    /* gap: 1px 6px; */
    max-width: 100%;
}

.spec-line {
    margin-bottom: 2px;
    color: #4a5568;
}

.spec-item {
    display: inline;
    margin-bottom: 0;
    color: #4a5568;
}

.spec-separator {
    color: #999;
    margin: 0 4px;
}

.spec-label {
    font-weight: 500;
}

/* 추가 옵션 섹션 */
.options-section {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}

.options-title {
    color: #e53e3e;
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 4px;
}

.option-item {
    color: #2d3748;
    font-size: 11px;
    margin-bottom: 2px;
}

.option-category {
    color: #e53e3e;
    font-weight: 500;
}

.option-price {
    color: #38a169;
    font-weight: 600;
}

/* 제품별 라벨 색상 (보라색 제외) */
.spec-label.sticker { color: #d69e2e; }
.spec-label.msticker { color: #38a169; }
.spec-label.namecard { color: #d69e2e; }
.spec-label.merchandisebond { color: #e91e63; }
.spec-label.ncrflambeau { color: #3182ce; }
.spec-label.envelope { color: #00b4d8; }

/* ========== 수량 셀 ========== */
.quantity-cell {
    font-weight: 400;
    color: #2d3748;
    font-size: 15px;
}

/* ========== 가격 셀 ========== */
.price-label {
    color: #4a5568;
    font-size: 13px;
    margin-bottom: 2px;
}

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

.price-total {
    font-weight: 700;
    color: #D9534F;
    font-size: 16px;
}

/* ========== 삭제 버튼 ========== */
.delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: #fed7d7;
    color: #e53e3e;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    border: 1px solid #feb2b2;
}

.delete-btn:hover {
    background-color: #fc8181;
    color: white;
    transform: scale(1.1);
}

/* ========== 요약 섹션 ========== */
.cart-summary {
    margin-top: 12px;
    background-color: #F8F9FA;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #CCCCCC;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

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

.summary-title {
    color: #4a5568;
    font-weight: 600;
    font-size: 14px; /* Changed from 12px to 14px */
}

.summary-count {
    color: #718096;
    font-size: 13px;
}

/* 요약 그리드 */
.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.summary-box {
    text-align: center;
    padding: 8px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #CCCCCC;
}

.summary-box-label {
    color: #718096;
    font-size: 12px;
    margin-bottom: 2px;
}

.summary-box-value {
    color: #2d3748;
    font-weight: 600;
    font-size: 13px; /* Changed from 12px to 13px */
}

/* 총 결제금액 박스 */
.summary-box.total {
    background-color: #1E90FF;
    color: white;
    border: 1px solid #1873CC;
}

.summary-box.total .summary-box-label {
    opacity: 0.9;
    color: white;
}

.summary-box.total .summary-box-value {
    font-weight: 700;
    font-size: 14px !important; /* Keep total price slightly larger */
    color: white;
}

/* ========== 버튼 그룹 ========== */
.button-group {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* 계속 쇼핑 버튼 */
.btn-continue {
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.btn-continue:hover {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
}

/* 견적서 받기 버튼 */
.btn-quote {
    padding: 10px 20px;
    background-color: #1E90FF;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px; /* Changed from 12px to 14px */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(30, 144, 255, 0.3);
}

.btn-quote:hover {
    background-color: #1873CC;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(30, 144, 255, 0.4);
}

/* 주문하기 버튼 */
.btn-order {
    padding: 12px 32px;
    background-color: #D9534F;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px; /* Changed from 12px to 14px */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 6px rgba(217, 83, 79, 0.4);
}

.btn-order:hover {
    background-color: #C9302C;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(217, 83, 79, 0.5);
}

/* ========== 빈 장바구니 ========== */
.empty-cart {
    text-align: center;
    padding: 20px;
    font-family: "Noto Sans KR", sans-serif;
    font-size: 14px;
    color: #222;
    line-height: 1.4;
}

.empty-cart-icon {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.8;
}

.empty-cart h3 {
    font-size: 18px;
    margin: 0 0 8px 0;
    color: #222;
    font-weight: bold;
}

.empty-cart p {
    margin: 0 0 15px 0;
    color: #555;
    font-size: 14px;
}

/* ========== 견적서 섹션 ========== */
.quotation-section {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.quotation-header {
    text-align: center;
    border-bottom: 3px solid #2c3e50;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.quotation-header h1 {
    font-size: 36px;
    margin: 0;
    color: #2c3e50;
    font-weight: 700;
}

/* 견적서 테이블 */
.quote-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    font-size: 13px;
}

.quote-table thead tr {
    background-color: #34495e;
    color: white;
}

.quote-table th {
    padding: 12px;
    text-align: center;
    font-weight: normal;
    border: 1px solid #2c3e50;
}

.quote-table td {
    padding: 8px;
    border: 1px solid #CCCCCC;
    text-align: center;
}

.quote-table td.text-left {
    text-align: left;
}

.quote-table td.text-right {
    text-align: right;
}

.quote-table td.small-text {
    font-size: 11px;
}

.quote-table tbody tr {
    border-bottom: 1px solid #CCCCCC;
}

/* ========== 반응형 ========== */
@media (max-width: 768px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .btn-continue,
    .btn-quote,
    .btn-order {
        width: 100%;
    }
}

/* --- Appended for Cart Refactor & Font-Size Adjustments (2025-12-23) --- */

/* 1. Global Table Font Size */
.excel-cart-table,
.excel-cart-table th,
.excel-cart-table td {
    font-size: 14px; /* Base size */
}

/* 2. Product Name */
.excel-cart-table .product-name {
    font-weight: 600;
    font-size: 14px;
}

/* 3. Specs/Options Column (규격/옵션) */
.specs-cell, .spec-item, .specs-cell div {
    font-size: 13px !important; /* Increased from 11px */
}

/* 4. Quantity/Amount Column - 세로 중앙 정렬 */
.amount-cell {
    text-align: center;
    font-size: 14px;
    vertical-align: middle !important;
}

/* 단위 셀 세로 중앙 정렬 */
.unit-cell {
    text-align: center;
    vertical-align: middle !important;
}
.amount-value {
    font-weight: 600;
    display: inline; /* 기본: inline으로 변경 */
    font-size: 13px !important;
}
.amount-unit {
    margin-left: 2px;
    display: inline;
}
.amount-sub {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #777;
}

/* 전단지 매수 표시 (수량 아래) - 파란색 강조 */
.amount-sub {
    font-size: 11px;
    color: #1e88ff;
    font-weight: 400;
    display: block;
    margin-top: 2px;
}

/* 전단지 전용 스타일 - 0.5연 표기 강조 */
.amount-cell.leaflet .amount-value {
    color: #1e88ff; /* 파란색 강조 */
    font-weight: 700;
}
.amount-cell.leaflet .amount-unit {
    color: #1e88ff;
    font-weight: 600;
}
.amount-cell.leaflet .amount-sub {
    color: #1e88ff; /* 파란색 통일 */
    font-style: normal;
}

/* 5. Order Summary Title (주문요약 제목) */
.summary-title {
    font-size: 14px !important; /* Increased from 12px */
}

/* 6. Prices (숫자 원) */
.price-total,
.summary-box-value {
    font-size: 13px !important; /* Changed to 13px */
}

.summary-box.total .summary-box-value {
    font-size: 14px !important; /* Keep total price slightly larger */
}




/* ========== cartContent 기본 스타일 ========== */
#cartContent {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 장바구니 내 모든 섹션 폭 통일 (1100px) */
#cartContent > form,
#cartContent > div[style*="background"]:not(.empty-cart),
.cart-info-section,
.cart-contact-section {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

/* ========== 모바일 반응형 - 폭 통일 ========== */
@media (max-width: 768px) {
    /* 모든 컨테이너 폭 통일 - cart-hero 기준 */
    .cart-container {
        padding: 8px;
        max-width: 100%;
    }

    .cart-hero {
        margin-left: 0;
        margin-right: 0;
        border-radius: 8px;
    }

    .cart-nav-wrapper {
        padding: 4px;
        margin-left: 0;
        margin-right: 0;
        background: transparent;
        box-shadow: none;
    }

    /* 아래 콘텐츠도 헤더와 동일한 폭 */
    #cartContent {
        padding: 8px;
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .excel-cart-table-wrapper {
        max-width: 100%;
        margin: 0;
    }

    /* 이용 안내 섹션 폭 통일 */
    #cartContent > div {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }

    /* 주문요약 폭 통일 */
    .cart-summary {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
}

