/* =============================================
   Global — Font & Base
   ============================================= */
body {
    font-family: 'Sarabun', sans-serif;
    background-color: #f4f6fb;
    font-size: 1rem;
    color: #212529;
}

/* =============================================
   Navbar
   ============================================= */
.navbar-brand {
    letter-spacing: 0.02em;
}

/* =============================================
   Cards
   ============================================= */
.card {
    border-radius: 12px;
    overflow: hidden;
}

.card-header {
    font-weight: 600;
}

/* =============================================
   Form selects & inputs
   ============================================= */
.form-select,
.form-control {
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Sarabun', sans-serif;
}

.form-select:focus,
.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.2);
}

/* Price display */
#productPrice {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0d6efd;
    border-color: #dee2e6;
}

/* =============================================
   Result table
   ============================================= */
.result-table {
    font-size: 0.97rem;
}

.result-table td {
    vertical-align: middle;
    padding: 0.85rem 1rem;
}

.result-table tr + tr {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* label column (ชื่อ) */
.label-cell {
    width: 55%;
    color: #495057;
}

/* value column (ตัวเลข) — right-align */
.value-cell {
    width: 30%;
    text-align: right;
    font-weight: 600;
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* unit column */
.unit-cell {
    width: 15%;
    color: #6c757d;
    font-size: 0.82rem;
    white-space: nowrap;
    padding-left: 4px;
}

/* highlight colors */
.highlight-green {
    color: #198754;
    font-size: 1.15rem !important;
}

.highlight-blue {
    color: #0d6efd;
    font-size: 1.2rem !important;
}

/* =============================================
   Months select (inside table)
   ============================================= */
#installmentMonths {
    font-family: 'Sarabun', sans-serif;
    font-size: 0.9rem;
}

/* =============================================
   Summary receipt (inside modal)
   ============================================= */
.summary-receipt {
    font-size: 0.9rem;
    line-height: 1.6;
}

.receipt-title {
    font-size: 1rem;
    letter-spacing: 0.03em;
}

.receipt-store {
    font-size: 0.88rem;
    margin-top: 2px;
}

.receipt-divider {
    border-top: 1.5px dashed #ced4da;
    margin: 8px 0;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 3px 0;
    gap: 8px;
}

.receipt-row span:last-child {
    text-align: right;
    white-space: nowrap;
}

.net-transfer {
    background: #e7f1ff;
    border-radius: 8px;
    padding: 8px 10px;
    margin-top: 4px;
}

/* =============================================
   Placeholder section
   ============================================= */
#placeholderSection i {
    font-size: 3.5rem;
}

/* =============================================
   Buttons
   ============================================= */
.btn-lg {
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* =============================================
   Print styles
   ============================================= */
@media print {
    /* ซ่อนทุกอย่างยกเว้น print area */
    body > *:not(#printArea) {
        display: none !important;
    }

    body.printing > *:not(#printArea) {
        display: none !important;
    }

    #printArea {
        display: block !important;
        padding: 20px;
        font-family: 'Sarabun', sans-serif;
        font-size: 14pt;
    }

    .summary-receipt {
        max-width: 400px;
        margin: 0 auto;
    }

    .net-transfer {
        background: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* =============================================
   Responsive tweaks
   ============================================= */
@media (max-width: 575px) {
    .label-cell {
        width: 50%;
        font-size: 0.88rem;
    }

    .value-cell {
        font-size: 0.95rem;
    }

    .highlight-green {
        font-size: 1rem !important;
    }

    .highlight-blue {
        font-size: 1.05rem !important;
    }
}
