.quotation-page {
    --q-border: #dce6f2;
    --q-ink: #243d5c;
    --q-muted: #596f88;
    --q-soft: #edf5ff;
    --q-card: #fff;
    box-sizing: border-box;
    width: 100%;
    max-width: 1472px;
    min-width: 0;
    margin: 0 auto;
    padding: 24px 16px 72px;
    color: var(--q-ink);
}
.quotation-page .q-muted { color: var(--q-muted); }
.quotation-page .q-page-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.quotation-page .q-page-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 10px; background: #e3efff; color: #1f63bd; font-size: 25px; flex-shrink: 0; }
.quotation-page .q-steps { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 24px; color: var(--q-muted); }
.quotation-page .q-steps button { padding: 9px 18px; border-radius: 6px; font-size: 14px; background: #f0f3f8; border: 1px solid transparent; }
.quotation-page .q-steps .active { color: #215caa; border-color: #bed7fb; background: #e6f1ff; font-weight: 700; }
.quotation-page .q-review-layout { display: grid; grid-template-columns: minmax(0, 1fr) 318px; align-items: start; gap: 20px; }
.quotation-page .q-card { background: var(--q-card); border: 1px solid var(--q-border); border-radius: 8px; overflow: hidden; margin-bottom: 18px; box-shadow: 0 4px 18px rgba(35, 70, 110, .035); }
.quotation-page .q-card-head { padding: 17px 20px; border-bottom: 1px solid var(--q-border); background: linear-gradient(120deg, var(--q-soft), var(--q-card)); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quotation-page .q-count { padding: 4px 9px; background: #e6effc; color: #2c5a96; border-radius: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.quotation-page .q-line { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 16px; padding: 20px; border-bottom: 1px solid var(--q-border); }
.quotation-page .q-line:last-child { border-bottom: 0; }
.quotation-page .q-product-image { display: grid; place-items: center; width: 78px; height: 78px; background: #f7faff; border: 1px solid #e5edf7; border-radius: 6px; overflow: hidden; color: #91abc8; }
.quotation-page .q-product-image img { width: 100%; height: 100%; object-fit: contain; }
.quotation-page .q-item-heading { display: flex; align-items: start; gap: 8px; }
.quotation-page .q-item-heading h3 { flex: 1; min-width: 0; margin: 0; font-size: 15px; line-height: 1.6; font-weight: 700; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.quotation-page .q-remove { border: 0; background: #fff0f1; color: #be3d50; width: 32px; height: 32px; padding: 0; display: grid; place-items: center; border-radius: 5px; flex-shrink: 0; }
.quotation-page .q-remove:hover { background: #ffe0e4; color: #a52237; }
.quotation-page .q-option { font-size: 13px; color: var(--q-muted); margin: 3px 0 7px; overflow-wrap: anywhere; }
.quotation-page .q-sku { display: inline-block; font-size: 11px; color: #45617f; background: #f0f5fb; padding: 3px 7px; border-radius: 4px; }
.quotation-page .q-item-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; margin-top: 14px; }
.quotation-page .q-line-price { font-size: 18px; font-weight: 700; color: #2162b7; }
.quotation-page .q-unit-price { font-size: 12px; color: var(--q-muted); margin-top: 2px; }
.quotation-page .q-controls { display: inline-flex; align-items: center; padding: 3px; gap: 2px; border: 1px solid #cbdcf1; border-radius: 6px; background: #f7faff; }
.quotation-page .q-controls .btn { width: 32px; height: 32px; min-height: 32px; padding: 0; background: #e8f1ff; color: #215dac; border: 0; font-size: 18px; }
.quotation-page .q-controls .btn:hover { background: #d6e7ff; }
.quotation-page .q-controls input { width: 58px; height: 32px; padding: 2px; text-align: center; border: 0; box-shadow: none; font-weight: 700; font-size: 14px; background: transparent; color: var(--q-ink); appearance: textfield; -moz-appearance: textfield; }
.quotation-page .q-controls input::-webkit-inner-spin-button,
.quotation-page .q-controls input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.quotation-page .q-browse-bar { padding: 14px 20px; border-top: 1px solid var(--q-border); }
.quotation-page .q-btn-soft { background: #edf5ff; color: #245caa; border: 1px solid #c8dcf7; border-radius: 5px; font-weight: 600; }
.quotation-page .q-btn-soft:hover { background: #deedff; color: #174c96; border-color: #a9c9f1; }
.quotation-page .btn:disabled { opacity: .65; cursor: wait; }
.quotation-page .btn:focus-visible, .quotation-page .form-control:focus-visible { outline: 3px solid #9dc5ff; outline-offset: 2px; }
.quotation-page .q-summary-card { position: sticky; top: 18px; }
.quotation-page .q-summary { padding: 20px; }
.quotation-page .q-summary > div { display: flex; justify-content: space-between; gap: 14px; font-size: 14px; margin-bottom: 14px; }
.quotation-page .q-summary > div > span:first-child { color: var(--q-muted); }
.quotation-page .q-summary strong { flex-shrink: 0; }
.quotation-page .q-summary .q-total { display: block; border: 1px solid #cbdff8; border-radius: 6px; background: #edf5ff; padding: 14px; margin: 18px 0 12px; }
.quotation-page .q-total span { display: block; }
.quotation-page .q-total span:last-child { color: #155ab6; font-weight: 700; font-size: 25px; margin-top: 4px; }
.quotation-page .q-summary-action { padding: 0 20px 20px; }
.quotation-page .q-note { display: flex; gap: 7px; font-size: 12px; color: var(--q-muted); line-height: 1.6; margin: 0; }
.quotation-page .q-search { padding: 0 20px 18px; }
.quotation-page .q-result { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--q-border); }
.quotation-page .q-result > div { min-width: 0; overflow-wrap: anywhere; }
.quotation-page .q-result img { width: 48px; height: 48px; object-fit: contain; border-radius: 4px; }
.quotation-page .q-result .fw-semibold { font-size: 14px; }
.quotation-page .q-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--q-border); background: #f6faff; }
.quotation-page #qContactSummary { color: #2a5a93 !important; }
.quotation-page .quote-address-card, .quotation-page .quote-tax-card { background: #f8fbff !important; border-color: var(--q-border) !important; }
.quotation-page .form-control, .quotation-page .form-select { border-color: #cddcee; border-radius: 5px; min-height: 40px; }
.quotation-page .input-group-text { background: #edf5ff; border-color: #cddcee; color: #4c76aa; }
.quotation-page .form-label { color: var(--q-ink); font-weight: 600; font-size: 14px; }
.quotation-page .quote-option-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.quotation-page .quote-option-card { display: flex; gap: 8px; align-items: center; border: 1px solid var(--q-border); padding: 12px; border-radius: 6px; background: var(--q-card); cursor: pointer; }
.quotation-page .quote-option-card:has(input:checked) { border-color: #a5c9f8; background: #edf5ff; }
.quotation-page .quote-option-title { display: block; font-weight: 600; }
.quotation-page .quote-option-desc { display: block; font-size: 13px; color: var(--q-muted); }
.quotation-page .captcha-box { display: inline-block; color: #264d7a; background: #e9f2ff; border: 1px dashed #a8c6ec; font-size: 24px; font-weight: 700; letter-spacing: 5px; padding: 8px 16px; border-radius: 6px; }
.quotation-page .q-success { padding: 38px 22px; text-align: center; background: linear-gradient(145deg, #f0fbf6, var(--q-card)); }
.quotation-page .q-success-icon { display: grid; place-items: center; margin: 0 auto 18px; width: 68px; height: 68px; font-size: 35px; color: #24825f; background: #dff3e9; border-radius: 50%; }
.quotation-page [hidden] { display: none !important; }
.q-swal-popup { border: 1px solid #d7e6f8 !important; border-radius: 12px !important; background: #fafdff !important; color: #243d5c !important; font-family: inherit; }
.q-swal-title { color: #264d7a !important; font-size: 21px !important; }
.q-swal-confirm { margin: 0 5px; padding: 9px 20px; color: #fff; background: #286bd2; border: 1px solid #286bd2; border-radius: 5px; font-weight: 600; }
.q-swal-cancel { margin: 0 5px; padding: 9px 20px; color: #405e83; background: #ecf3fb; border: 1px solid #d0dfef; border-radius: 5px; }
.q-swal-confirm:focus-visible, .q-swal-cancel:focus-visible { outline: 3px solid #9dc5ff; outline-offset: 2px; }
[data-bs-theme="dark"] .quotation-page { --q-border: #35485f; --q-ink: #dce9f9; --q-muted: #b0c0d2; --q-card: #202d3e; --q-soft: #283d57; }
[data-bs-theme="dark"] .quotation-page .q-browse-bar,
[data-bs-theme="dark"] .quotation-page .q-actions,
[data-bs-theme="dark"] .quotation-page .quote-address-card,
[data-bs-theme="dark"] .quotation-page .quote-tax-card { background: #25374b !important; }
[data-bs-theme="dark"] .quotation-page .q-product-image { background: #fff; }
[data-bs-theme="dark"] .quotation-page .q-controls,
[data-bs-theme="dark"] .quotation-page .q-summary .q-total,
[data-bs-theme="dark"] .quotation-page .quote-option-card:has(input:checked) { background: #283d57; border-color: #42618a; }
[data-bs-theme="dark"] .quotation-page .q-total span:last-child,
[data-bs-theme="dark"] .quotation-page .q-line-price { color: #9dc7ff; }
[data-bs-theme="dark"] .quotation-page .q-steps button { background: #25374b; }
[data-bs-theme="dark"] .quotation-page .q-steps .active { background: #304d73; color: #c8e0ff; }
@media (max-width: 991.98px) {
    .quotation-page .q-review-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .quotation-page .q-summary-card { position: static; }
}
@media (max-width: 575.98px) {
    .quotation-page { padding: 16px 10px 60px; }
    .quotation-page .q-page-header { gap: 12px; }
    .quotation-page .q-page-header > a { margin-left: 60px; }
    .quotation-page .q-page-icon { width: 42px; height: 42px; font-size: 23px; }
    .quotation-page .q-page-header h1 { font-size: 21px; }
    .quotation-page .q-steps { gap: 6px; margin-bottom: 18px; }
    .quotation-page .q-steps button { font-size: 12px; padding: 8px 10px; }
    .quotation-page .q-card-head { padding: 15px; }
    .quotation-page .q-line { grid-template-columns: 58px minmax(0, 1fr); padding: 15px; gap: 12px; }
    .quotation-page .q-product-image { width: 58px; height: 58px; }
    .quotation-page .q-item-heading h3 { font-size: 14px; }
    .quotation-page .q-item-footer { gap: 10px; }
    .quotation-page .q-controls { margin-left: auto; }
    .quotation-page .q-summary { padding: 18px; }
    .quotation-page .q-summary-action { padding: 0 18px 18px; }
    .quotation-page .q-browse-bar { padding: 12px 15px; }
    .quotation-page .q-search { padding: 0 15px 15px; }
    .quotation-page .q-actions { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .q-swal-popup { animation: none !important; }
}

.quotation-page .q-sync-status { color: #365a85; min-height: 21px; }
.quotation-page .q-sync-loading::before {
    content: ''; display: inline-block; width: 12px; height: 12px;
    margin-right: 7px; vertical-align: -1px; border: 2px solid #c6dcfa;
    border-top-color: #2867bc; border-radius: 50%; animation: q-sync-spin .8s linear infinite;
}
@keyframes q-sync-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .quotation-page .q-sync-loading::before { animation: none; } }

.quotation-page .q-price-badge-wrap { margin-bottom: 6px; }
.quotation-page .q-price-badge-wrap:empty { display: none; }
.quotation-page .q-price-badge {
    display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px;
    border: 1px solid #cbd8e8; border-radius: 4px; background: #f6f9fc;
    color: #405a78; font-size: 13px; font-weight: 700; line-height: 1.4;
}
.quotation-page .q-price-badge.is-sale { background: #fff6ec; border-color: #ffc98d; color: #a94a00; }
.quotation-page .q-price-badge.is-flash { background: #fff0f2; border-color: #ffbdc7; color: #bd1732; }
.quotation-page .q-price-badge.is-wholesale { background: #ecfaf3; border-color: #aedcc4; color: #216c49; }
.quotation-page .q-price-badge.is-inquiry { background: #edf5ff; border-color: #bdd7fa; color: #245ba5; }
.quotation-page .q-promo-detail { display: block; color: var(--q-muted); font-size: 12px; margin-top: 4px; }
.quotation-page .q-result-price { margin: 5px 0; }

.quotation-page .q-wholesale-offer { display: block; margin-top: 7px; color: #216c49; background: #ecfaf3; border: 1px solid #b9dfca; border-radius: 4px; padding: 4px 8px; font-size: 12px; line-height: 1.6; width: fit-content; }
.quotation-page .q-wholesale-wrap:empty { display: none; }

.quotation-page .q-item-media { min-width: 0; }
.quotation-page .q-availability-wrap { margin-top: 7px; }
.quotation-page .q-availability-wrap:empty { display: none; }
.quotation-page .q-availability {
    display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
    padding: 4px 6px; border: 1px solid #b7ddc9; border-radius: 4px;
    color: #216c49; background: #ecfaf3; font-size: 11px; font-weight: 700;
    line-height: 1.5; vertical-align: middle; box-sizing: border-box;
}
.quotation-page .q-availability span { min-width: 0; overflow-wrap: anywhere; }
.quotation-page .q-availability i { flex-shrink: 0; }
.quotation-page .q-availability.is-preorder { color: #a84a00; background: #fff7ed; border-color: #ffd09b; }

/* Compact cart-style quotation rows. */
.quotation-page .q-line { grid-template-columns: 104px minmax(0, 1fr) 138px; gap: 16px; padding: 18px 16px; }
.quotation-page .q-product-image { width: 104px; height: 104px; border-radius: 3px; background: #fff; box-shadow: 0 3px 12px rgba(35,70,110,.06); }
.quotation-page .q-item-body { min-width: 0; }
.quotation-page .q-item-heading h3 { font-size: 15px; line-height: 1.6; }
.quotation-page .q-price-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 8px; }
.quotation-page .q-unit-price { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 13px; }
.quotation-page .q-current-unit { color: #1962d8; font-size: 17px; font-weight: 700; }
.quotation-page .q-original-price { color: #718096; font-size: 13px; }
.quotation-page .q-price-badge-wrap { margin: 0; }
.quotation-page .q-price-badge { padding: 3px 7px; font-size: 12px; }
.quotation-page .q-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.quotation-page .q-info-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; overflow-wrap: anywhere; border: 1px solid #cddffc; color: #2763bd; background: #f2f7ff; padding: 3px 7px; border-radius: 3px; font-size: 11px; line-height: 1.6; }
.quotation-page .q-info-chip.is-stock { color: #247251; background: #eefaf4; border-color: #c4e7d4; }
.quotation-page .q-info-chip.is-weight { color: #a65012; background: #fff7ee; border-color: #ffe0bf; }
.quotation-page .q-meta .q-availability { padding: 3px 7px; border-radius: 3px; }
.quotation-page .q-wholesale-wrap { margin: -4px 0 10px; }
.quotation-page .q-wholesale-offer { margin-top: 0; }
.quotation-page .q-controls { margin-left: 0; padding: 0; gap: 0; border-radius: 4px; background: #fff; }
.quotation-page .q-controls .btn { height: 34px; width: 34px; border-radius: 0; background: #f5f8fc; color: #466287; font-size: 16px; }
.quotation-page .q-controls input { width: 76px; height: 34px; border-left: 1px solid #dce6f2; border-right: 1px solid #dce6f2; border-radius: 0; }
.quotation-page .q-stock-note { margin-top: 8px; color: var(--q-muted); font-size: 11px; line-height: 1.6; }
.quotation-page .q-stock-note:empty { display: none; }
.quotation-page .q-line-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.quotation-page .q-line-caption { font-size: 12px; color: var(--q-muted); }
.quotation-page .q-line-price { color: var(--q-ink); font-size: 16px; text-align: right; overflow-wrap: anywhere; }
.quotation-page .q-remove { width: auto; height: auto; min-height: 30px; margin-top: auto; padding: 5px 8px; display: inline-flex; gap: 5px; align-items: center; border: 1px solid #ffc8cf; border-radius: 4px; font-size: 12px; }
.quotation-page .q-search { padding-top: 16px; border-top: 1px solid var(--q-border); }
@media (max-width: 767.98px) {
    .quotation-page .q-line { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 16px 12px; }
    .quotation-page .q-product-image { width: 72px; height: 72px; }
    .quotation-page .q-line-side { grid-column: 2; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; }
    .quotation-page .q-line-side .q-remove { margin: 0 0 0 auto; }
    .quotation-page .q-line-price { font-size: 15px; }
    .quotation-page .q-card-head { flex-wrap: wrap; }
}

/* Keep the next button visually stable during background recalculation. */
.quotation-page #qNext:disabled { opacity: 1; cursor: default; }

.quotation-page .q-info-chip,
.quotation-page .q-wholesale-offer { font-weight: 700; }

/* Match search-result badge dimensions and align icon/text centers. */
.quotation-page .q-result-price {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.quotation-page .q-result-price .q-price-badge,
.quotation-page .q-result-price .q-availability {
    display: inline-flex; align-items: center; justify-content: center;
    box-sizing: border-box; min-height: 26px; padding: 4px 7px;
    font-size: 12px; font-weight: 700; line-height: 16px;
    border-width: 1px; border-radius: 4px; vertical-align: middle;
}
.quotation-page .q-result-price .q-price-badge i,
.quotation-page .q-result-price .q-availability i {
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; line-height: 1; flex-shrink: 0;
}
.quotation-page .q-result > div > .q-wholesale-offer { margin: 0 0 5px; max-width: 100%; }

/* Match metadata badges inside selected quotation rows. */
.quotation-page .q-meta .q-availability,
.quotation-page .q-meta .q-info-chip {
    display: inline-flex; align-items: center; box-sizing: border-box;
    min-height: 26px; padding: 3px 7px; font-size: 11px;
    font-weight: 700; line-height: 18px; gap: 4px;
    border-width: 1px; border-radius: 3px; margin: 0;
}
.quotation-page .q-meta .q-availability i,
.quotation-page .q-meta .q-info-chip i {
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; line-height: 1; flex-shrink: 0;
}
/* All three quantity controls share one sizing rule. */
.quotation-page .q-controls { align-items: stretch; overflow: hidden; }
.quotation-page .q-controls .btn,
.quotation-page .q-controls input {
    box-sizing: border-box; height: 36px; min-height: 36px; max-height: 36px;
    margin: 0; padding: 0; border-radius: 0; line-height: 1;
}
.quotation-page .q-controls .btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; min-width: 36px; flex: 0 0 36px;
}
.quotation-page .q-controls input { width: 76px; flex: 0 0 76px; font-size: 14px; }

/* A single compact quantity bar, without nested Bootstrap input rings. */
.quotation-page .q-controls {
    border: 1px solid var(--q-border); border-radius: 4px;
    background: var(--q-card); box-shadow: none; transition: border-color .15s ease;
}
.quotation-page .q-controls:focus-within { border-color: #78a6e1; }
.quotation-page .q-controls .btn {
    background: var(--q-soft); color: var(--q-ink); font-size: 16px;
    box-shadow: none;
}
.quotation-page .q-controls input {
    width: 56px; flex: 0 0 56px; min-width: 0;
    background: var(--q-card); color: var(--q-ink);
    border: 0; border-left: 1px solid var(--q-border); border-right: 1px solid var(--q-border);
    border-radius: 0; font-family: inherit; font-size: 14px; font-weight: 600;
}
.quotation-page .q-controls input:focus,
.quotation-page .q-controls input:focus-visible {
    outline: none; box-shadow: none; border-radius: 0;
}
.quotation-page .q-controls .btn:focus,
.quotation-page .q-controls .btn:focus-visible {
    outline: none; box-shadow: inset 0 0 0 1px #78a6e1;
}

.quotation-page .q-steps button { font-family: inherit; cursor: pointer; line-height: 1.5; }
.quotation-page .q-steps button:hover { border-color: #bed7fb; color: #215caa; }
.quotation-page .q-steps button:focus-visible { outline: 2px solid #78a6e1; outline-offset: 2px; }
