/* Phần bổ sung cho thương hiệu ENOVA: logo, khối giới thiệu và công cụ ước tính. */

/* ---------- Logo ---------- */
.site-header .brand img.enova-wordmark { width: auto; height: 54px; max-width: none; display: block; border-radius: 8px; }
.drawer-brand img.enova-wordmark { width: auto; height: 46px; max-width: none; border-radius: 7px; }
.footer-brand img.enova-wordmark-footer { width: auto; height: 68px; max-width: 100%; border-radius: 10px; }
@media (max-width: 640px) {
  .site-header .brand img.enova-wordmark { height: 42px; }
}

/* ---------- Khối kêu gọi và giới thiệu ---------- */
.enova-intro { text-align: center; max-width: 820px; }
.enova-cta-box { background: #04281e; color: #fff; border-radius: 20px; padding: 40px 28px; text-align: center; }
.enova-cta-box h2 { color: #fff; margin: 8px 0 10px; }
.enova-cta-box p { color: #cfe3da; max-width: 62ch; margin: 0 auto 20px; }
.enova-cta-box .eyebrow { color: #f78522; }

/* ---------- Công cụ ước tính (tiền tố ev- để không đụng CSS chung) ---------- */
.ev-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
.ev-wrap *, .ev-wrap *::before, .ev-wrap *::after, .ev-dialog * { box-sizing: border-box; }
.ev-intro { padding-top: 40px; padding-bottom: 8px; }
.ev-intro h1 { font-size: clamp(26px, 4vw, 42px); line-height: 1.15; margin: 0 0 12px; color: #04281e; max-width: 22em; }
.ev-intro p { margin: 0; color: #52627a; font-size: 16.5px; max-width: 66ch; }
.ev-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 24px; align-items: start; padding-top: 24px; padding-bottom: 40px; color: #10233f; }
@media (max-width: 920px) { .ev-grid { grid-template-columns: minmax(0, 1fr); } }
.ev-form { background: #fff; border: 1px solid #d9dfe7; border-radius: 18px; padding: 4px 22px 18px; }
.ev-step { padding: 18px 0; border-bottom: 1px solid #d9dfe7; }
.ev-step:last-child { border-bottom: 0; }
.ev-step h2 { display: flex; align-items: center; gap: 10px; font-size: 17px; margin: 0 0 12px; color: #04281e; }
.ev-n { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: #04281e; color: #fff; font-size: 13px; }
.ev-label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
.ev-hint { font-size: 13px; color: #5b6b82; margin: 4px 0 0; }
.ev-form select, .ev-form input[type="number"] { width: 100%; font: inherit; font-size: 16px; color: #10233f; background: #fff; border: 1.5px solid #d9dfe7; border-radius: 10px; padding: 11px 12px; }
.ev-form input[type="range"] { width: 100%; accent-color: #f78522; height: 30px; margin: 4px 0 0; }
.ev-billval { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ev-billval span { font-size: 15px; font-weight: 600; color: #5b6b82; }
.ev-chips, .ev-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ev-chip { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 13px; border-radius: 999px; border: 1.5px solid #d9dfe7; background: #fff; color: #10233f; cursor: pointer; }
.ev-chip[aria-pressed="true"], .ev-chip[aria-selected="true"] { background: #04281e; border-color: #04281e; color: #fff; }
.ev-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 480px) { .ev-opts { grid-template-columns: minmax(0, 1fr); } }
.ev-opt { position: relative; display: block; border: 1.5px solid #d9dfe7; border-radius: 12px; padding: 12px 14px; cursor: pointer; margin: 0; }
.ev-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.ev-opt b { display: block; font-size: 15px; }
.ev-opt small { display: block; color: #5b6b82; font-size: 13px; line-height: 1.4; margin-top: 2px; }
.ev-opt:has(input:checked) { border-color: #f78522; background: #fef1e4; box-shadow: inset 0 0 0 1px #f78522; }
.ev-opt:has(input:focus-visible), .ev-chip:focus-visible, .ev-btn:focus-visible { outline: 3px solid #f78522; outline-offset: 2px; }
.ev-dayrow { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: #5b6b82; }

.ev-result { position: sticky; top: 100px; background: #04281e; color: #eef6f2; border-radius: 20px; padding: 24px; }
@media (max-width: 920px) { .ev-result { position: static; } }
.ev-result.ev-loading .ev-price, .ev-result.ev-loading .ev-kpis, .ev-result.ev-loading .ev-bars { opacity: .55; }
.ev-result h2 { margin: 0; font-size: 15px; font-weight: 600; color: #a9c6b9; }
.ev-price { margin: 6px 0 2px; font-size: clamp(28px, 4vw, 40px); font-weight: 800; color: #fff; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ev-sep { color: #a9c6b9; font-weight: 500; margin: 0 6px; }
.ev-result .ev-note { font-size: 13px; color: #a9c6b9; margin: 8px 0 0; }
.ev-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; border-block: 1px solid #1d4a3a; }
.ev-kpis > div { padding: 13px 10px 13px 0; }
.ev-kpis > div + div { padding-left: 12px; border-left: 1px solid #1d4a3a; }
.ev-kpis strong { display: block; font-size: 21px; color: #fff; font-variant-numeric: tabular-nums; }
.ev-kpis strong.ev-good { color: #7fe0ac; }
.ev-kpis span { font-size: 12.5px; color: #a9c6b9; }
@media (max-width: 420px) { .ev-kpis strong { font-size: 17px; } .ev-result { padding: 18px; } }
.ev-chart-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.ev-chart-head h3 { margin: 0; font-size: 15px; color: #fff; }
.ev-legend { display: flex; gap: 12px; font-size: 12.5px; color: #a9c6b9; }
.ev-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }
.ev-key-save { background: #f78522; }
.ev-key-pay { background: #5f8c7a; }
.ev-bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 5px; height: 170px; margin-top: 12px; }
.ev-bar { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-height: 0; }
.ev-bar i { display: block; width: 100%; flex: none; }
.ev-bar i:first-child { border-radius: 4px 4px 0 0; margin-bottom: 2px; }
.ev-bar span { font-size: 10.5px; color: #a9c6b9; text-align: center; margin-top: 5px; }
.ev-spec { margin: 16px 0 0; border-top: 1px solid #1d4a3a; }
.ev-spec > div { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid #1d4a3a; font-size: 14px; }
.ev-spec dt { color: #a9c6b9; }
.ev-spec dd { margin: 0; color: #fff; font-weight: 600; overflow-wrap: anywhere; }
.ev-spec dd small { display: block; font-weight: 400; color: #a9c6b9; }
.ev-result .ev-alert { margin: 14px 0 0; padding: 11px 13px; border-radius: 10px; background: #4a3310; color: #ffd9a0; font-size: 14px; }
.ev-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
@media (max-width: 480px) { .ev-cta { grid-template-columns: 1fr; } }
.ev-btn { display: flex; align-items: center; justify-content: center; text-align: center; font: inherit; font-weight: 700; font-size: 15px; padding: 13px 15px; border-radius: 12px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; }
.ev-btn-primary { background: #f78522; color: #1f1003; }
.ev-btn-primary:disabled { opacity: .6; cursor: wait; }
.ev-btn-ghost { background: transparent; color: #fff; border-color: #35705a; }
.ev-btn-plain { background: #fff; color: #10233f; border-color: #d9dfe7; }

.ev-dialog { border: 0; border-radius: 18px; padding: 0; width: calc(100% - 28px); max-width: 460px; max-height: calc(100dvh - 28px); color: #10233f; }
.ev-dialog::backdrop { background: rgba(2, 20, 14, .6); }
.ev-dialog form { padding: 22px; }
.ev-dialog h3 { margin: 0 0 6px; font-size: 20px; }
.ev-dialog p { margin: 0 0 12px; font-size: 14px; color: #5b6b82; }
.ev-dialog input:not([type="checkbox"]) { width: 100%; font: inherit; font-size: 16px; border: 1.5px solid #d9dfe7; border-radius: 10px; padding: 11px 12px; margin-bottom: 10px; }
.ev-dialog .ev-honey { position: absolute; left: -9999px; width: 1px; height: 1px; }
.ev-consent { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; }
.ev-consent input { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.ev-dialog .ev-err { min-height: 20px; margin: 8px 0; color: #b4441f; font-size: 13.5px; }
.ev-dialog .ev-err.ev-ok { color: #17784a; }
.ev-row { display: flex; justify-content: flex-end; gap: 10px; }

.ev-combo { padding-bottom: 56px; color: #10233f; }
.ev-combo h2 { color: #04281e; margin: 0 0 6px; }
.ev-sub { color: #52627a; margin: 0 0 6px; max-width: 78ch; }
.ev-table-wrap { overflow-x: auto; margin-top: 14px; border: 1px solid #d9dfe7; border-radius: 14px; background: #fff; }
.ev-table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.ev-table th, .ev-table td { padding: 11px 12px; border-bottom: 1px solid #e6ebf1; text-align: left; vertical-align: top; }
.ev-table thead th { background: #04281e; color: #fff; font-size: 13px; }
.ev-table tbody th { white-space: nowrap; background: #f6f8fa; position: sticky; left: 0; }
.ev-table small { display: block; color: #5b6b82; }
.ev-table tbody tr:last-child > * { border-bottom: 0; }

/* ---------- Trang nội dung dạng bài (giới thiệu, chính sách) ---------- */
.enova-prose { max-width: 880px; }
.enova-prose h1 { color: #04281e; font-size: clamp(26px, 3.6vw, 38px); }
.enova-prose, .ct-prose { line-height: 1.75; color: #1e293b; overflow-wrap: anywhere; }
.enova-prose h2, .ct-prose h2 { font-size: 21px; color: #04281e; margin: 24px 0 8px; }
.enova-prose h3, .ct-prose h3 { font-size: 18px; margin: 18px 0 6px; }
.enova-prose img, .ct-prose img { max-width: 100%; height: auto; border-radius: 10px; }
.ct-prose iframe, .enova-prose iframe { max-width: 100%; border: 0; border-radius: 10px; }
.enova-prose table, .ct-prose table { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; }
.enova-prose td, .enova-prose th, .ct-prose td, .ct-prose th { border: 1px solid #d9dfe7; padding: 8px 10px; }
.enova-prose a, .ct-prose a { color: #0f7a58; text-decoration: underline; }

/* ---------- Sản phẩm (tiền tố ct-) ---------- */
.ct-page { padding-top: 24px; padding-bottom: 56px; color: #10233f; }
.ct-page h1 { color: #04281e; font-size: clamp(23px, 3vw, 33px); line-height: 1.25; margin: 10px 0 6px; }
.ct-crumbs { font-size: 13.5px; color: #5b6b82; display: flex; flex-wrap: wrap; gap: 6px; }
.ct-crumbs a { color: #0f7a58; }
.ct-crumbs b { font-weight: 600; }
.ct-count { margin: 0 0 14px; color: #5b6b82; font-size: 14px; }
.ct-search { display: flex; gap: 10px; max-width: 620px; }
.ct-search input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 11px 14px; border: 1.5px solid #d9dfe7; border-radius: 10px; }
.ct-chips, .ct-sort, .ct-allcats > div { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-chips { margin-top: 16px; }
.ct-chips a, .ct-allcats a { padding: 7px 13px; border-radius: 999px; border: 1.5px solid #d9dfe7; background: #fff; font-size: 14px; color: #10233f; }
.ct-chips a[aria-current], .ct-allcats a[aria-current] { background: #04281e; border-color: #04281e; color: #fff; }
.ct-allcats { margin-top: 14px; }
.ct-allcats summary { cursor: pointer; font-weight: 600; color: #0f7a58; padding: 6px 0; }
.ct-allcats > div { margin-top: 10px; max-height: 320px; overflow-y: auto; }
.ct-sort { margin-top: 14px; align-items: center; font-size: 14px; }
.ct-sort span { color: #5b6b82; }
.ct-sort a { padding: 5px 10px; border-radius: 8px; color: #10233f; }
.ct-sort a[aria-current] { background: #e8f3ee; color: #0f7a58; font-weight: 700; }
.ct-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
@media (max-width: 1050px) { .ct-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .ct-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.ct-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #e1e7ee; border-radius: 14px; overflow: hidden; min-width: 0; }
.ct-card:hover { box-shadow: 0 10px 26px rgba(4, 40, 30, .12); }
.ct-card-img { position: relative; display: block; aspect-ratio: 1; background: #fff; }
.ct-card-img img { width: 100%; height: 100%; object-fit: contain; padding: 10px; box-sizing: border-box; }
.ct-off, .ct-badge { position: absolute; top: 8px; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.ct-off { left: 8px; background: #d9480f; color: #fff; }
.ct-badge { right: 8px; background: #04281e; color: #fff; }
.ct-card-body { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 14px; flex: 1; }
.ct-brand { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: #7b8a9f; }
.ct-card h3 { margin: 0; font-size: 14.5px; line-height: 1.4; flex: 1; }
.ct-card h3 a { color: #10233f; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ct-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.ct-price strong { color: #c2410c; font-size: 16.5px; }
.ct-price s { color: #8b97a8; font-size: 13px; }
.ct-price em { color: #0f7a58; font-style: normal; font-weight: 700; font-size: 14px; }
.ct-price span { font-size: 13px; color: #5b6b82; }
.ct-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 28px; }
.ct-pager a, .ct-pager span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; }
.ct-pager a { border: 1.5px solid #d9dfe7; color: #10233f; }
.ct-pager a[aria-current] { background: #04281e; border-color: #04281e; color: #fff; }
.ct-empty { margin-top: 28px; }
.ct-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; margin-top: 18px; align-items: start; }
@media (max-width: 860px) { .ct-detail { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
.ct-main { border: 1px solid #e1e7ee; border-radius: 16px; background: #fff; aspect-ratio: 1; overflow: hidden; }
.ct-main img { width: 100%; height: 100%; object-fit: contain; }
.ct-thumbs { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; padding-bottom: 4px; }
.ct-thumbs button { flex: none; width: 72px; height: 72px; padding: 3px; border: 2px solid #e1e7ee; border-radius: 10px; background: #fff; cursor: pointer; }
.ct-thumbs button[aria-current] { border-color: #f78522; }
.ct-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.ct-info h1 { margin-top: 0; }
.ct-meta { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14px; }
.ct-meta span { color: #5b6b82; margin-right: 6px; }
.ct-price-lg { background: #fdf3ea; border-radius: 12px; padding: 14px 16px; margin: 12px 0; }
.ct-price-lg strong { font-size: 28px; }
.ct-price-lg strong.ct-ask { font-size: 21px; color: #0f7a58; }
.ct-off-inline { background: #d9480f; color: #fff !important; border-radius: 6px; padding: 2px 8px; font-weight: 700; }
.ct-variants { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0; }
.ct-variants th, .ct-variants td { border: 1px solid #e1e7ee; padding: 7px 10px; text-align: left; }
.ct-specs { padding-left: 20px; line-height: 1.8; }
.ct-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ct-btn-line { border: 1.5px solid #04281e; color: #04281e; }
.ct-note { font-size: 13px; color: #5b6b82; }
.ct-desc { margin-top: 36px; max-width: 900px; }
.ct-quote { margin-top: 36px; max-width: 720px; border: 1px solid #e1e7ee; border-radius: 16px; padding: 20px; background: #f8fafb; scroll-margin-top: 110px; }
.ct-quote h2, .ct-related h2, .ct-desc > h2 { color: #04281e; margin-top: 0; }
.ct-related { margin-top: 40px; }

/* ---------- Ghi đè CSS gốc ---------- */
/* Logo chữ nhật: CSS gốc ép logo thành ô vuông nhỏ trên điện thoại. */
.site-header .header-main .brand { flex: 0 0 auto; }
.site-header .header-main .brand img.enova-wordmark { width: 139px !important; height: 54px !important; min-width: 139px; object-fit: contain; }
.drawer-content .drawer-brand img.enova-wordmark { width: 118px !important; height: 46px !important; min-width: 118px; object-fit: contain; }
@media (max-width: 640px) {
  .site-header .header-main .brand img.enova-wordmark { width: 108px !important; height: 42px !important; min-width: 108px; }
}
@media (max-width: 359px) {
  .site-header .header-main .brand img.enova-wordmark { width: 92px !important; height: 36px !important; min-width: 92px; }
}
/* Ảnh sản phẩm luôn nằm gọn trong khung vuông. */
.ct-card .ct-card-img { height: 0; padding-bottom: 100%; aspect-ratio: auto; flex: none; }
.ct-card .ct-card-img img.card-photo { position: absolute; inset: 0; width: 100% !important; height: 100% !important; min-height: 0 !important; max-height: none !important; aspect-ratio: auto !important; object-fit: contain !important; margin: 0; border-radius: 0; transform: none !important; }

/* Trợ lý AI đang ẩn: thanh dưới trên điện thoại còn hai nút, chia đều. */
.mobile-sticky-bottom:not(:has(.m-btn-chat)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mobile-sticky-bottom:not(:has(.m-btn-chat)) .m-bottom-btn { flex: 1 1 0; }
