/* ThueXeTuLaiHaiPhong — trang đại lý mẫu (/agency/).
   Palette follows the site identity: deep teal #0B5563 / sidebar #07333c,
   warm paper background, ink text. Only agency-specific pieces live here;
   cards, spec grid, forms and buttons come from market.css / guides.css. */

.demo-banner {
  background: #fdf3e0; border: 1px solid #e8cf9a; color: #6b5312;
  border-radius: 10px; padding: 10px 14px; font-size: 14px; line-height: 1.5;
  margin: 14px 0 18px;
}
.demo-banner strong { color: #54400a; }

.ag-hero {
  display: grid; grid-template-columns: 1fr; gap: 18px; align-items: center;
  background: linear-gradient(135deg, #07333c 0%, #0B5563 62%, #12707f 100%);
  color: #eef4f2; border-radius: 16px; padding: 26px 22px; margin-bottom: 8px;
  overflow: hidden;
}
.ag-hero h1 { color: #ffffff; margin: 0 0 8px; font-size: clamp(1.55rem, 4.5vw, 2.3rem); line-height: 1.2; }
.ag-hero .ag-hero-sub { color: #cfe4df; font-size: 1.02rem; line-height: 1.55; margin: 0 0 16px; max-width: 34em; }
.ag-hero .ag-hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.ag-hero .btn { background: #ffffff; color: #07333c; border: 0; }
.ag-hero .btn:hover { background: #e6f2ef; }
.ag-hero-img { border-radius: 12px; overflow: hidden; box-shadow: 0 12px 30px rgba(2, 24, 29, 0.35); }
.ag-hero-img img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/10; }
@media (min-width: 900px) {
  .ag-hero { grid-template-columns: 1.05fr 1fr; padding: 34px 32px; }
}

.btn-wa {
  display: inline-flex; align-items: center; gap: 8px;
  background: #1da851; color: #ffffff !important; border: 0; border-radius: 9px;
  padding: 11px 18px; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer;
}
.btn-wa:hover { background: #178a43; }
.ag-hero .btn-wa { background: #1da851; color: #ffffff !important; }
.ag-hero .btn-wa:hover { background: #25bd5c; }
.wa-ico { width: 19px; height: 19px; flex: none; }

.ag-trust {
  display: grid; grid-template-columns: 1fr; gap: 10px; margin: 16px 0 4px;
}
@media (min-width: 720px) { .ag-trust { grid-template-columns: repeat(3, 1fr); } }
.ag-trust div {
  background: #ffffff; border: 1px solid #E4E1D8; border-radius: 12px; padding: 13px 15px;
  font-size: 14.5px; line-height: 1.5;
}
.ag-trust strong { display: block; color: #0B5563; font-size: 15.5px; margin-bottom: 2px; }

.ag-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.ag-chip {
  border: 1px solid #c9d8d4; background: #ffffff; color: #07333c; border-radius: 999px;
  padding: 8px 15px; font-size: 14px; font-weight: 600; cursor: pointer; font: inherit;
}
.ag-chip:hover { border-color: #0B5563; }
.ag-chip.active { background: #0B5563; color: #ffffff; border-color: #0B5563; }
.ag-card-btn { margin-left: auto; }
.car-card .car-price { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.ag-steps { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 14px 0; }
@media (min-width: 720px) { .ag-steps { grid-template-columns: repeat(3, 1fr); } }
.ag-step { background: #ffffff; border: 1px solid #E4E1D8; border-radius: 12px; padding: 16px; }
.ag-step .n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; background: #0B5563; color: #fff;
  font-weight: 700; margin-bottom: 8px;
}
.ag-step h3 { margin: 0 0 6px; font-size: 1rem; }
.ag-step p { margin: 0; font-size: 14.5px; line-height: 1.55; color: #3d4a46; }

.ag-pitch {
  background: #07333c; color: #dcebe7; border-radius: 16px; padding: 24px 22px; margin: 26px 0 8px;
}
.ag-pitch h2 { color: #ffffff; margin-top: 0; }
.ag-pitch ul { margin: 10px 0 16px; padding-left: 20px; line-height: 1.65; }
.ag-pitch a { color: #7fc4bd; }
.ag-pitch .btn { background: #ffffff; color: #07333c; border: 0; }

.ag-book-panel { margin-top: 22px; }
.ag-book-done {
  background: #e9f6ec; border: 1px solid #bfe3c8; border-radius: 12px; padding: 16px 18px; margin-top: 14px;
}
.ag-book-done h3 { margin: 0 0 6px; color: #1d6b2a; }
.ag-wa-note { font-size: 13.5px; color: #5d6a66; margin-top: 8px; }

.ag-toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 16px);
  background: #07333c; color: #eef4f2; border-radius: 10px; padding: 12px 18px;
  font-size: 14.5px; line-height: 1.45; max-width: min(92vw, 480px); text-align: center;
  box-shadow: 0 10px 28px rgba(2, 24, 29, 0.35); opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease; z-index: 200;
}
.ag-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== v2: toolbar (search + sort), save buttons, gallery, card polish ===== */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ag-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 2px; }
.ag-search { flex: 1 1 240px; }
.ag-search input {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 16px;
  padding: 11px 14px; border: 1.5px solid #c9d8d4; border-radius: 10px;
  background: #ffffff; color: #14201d;
}
.ag-search input:focus { border-color: #0B5563; outline: 2px solid rgba(11, 85, 99, 0.25); }
.ag-sort select {
  font: inherit; font-size: 15px; padding: 11px 12px; height: 100%;
  border: 1.5px solid #c9d8d4; border-radius: 10px; background: #ffffff; color: #07333c;
}
.ag-count { color: #5d6a66; font-size: 14px; margin: 8px 0 0; }

.car-card { transition: box-shadow 0.18s ease, transform 0.18s ease; }
.car-card:hover { box-shadow: 0 10px 26px rgba(7, 51, 60, 0.14); transform: translateY(-2px); }
.car-card .car-price strong { color: #0B5563; font-size: 1.18rem; }
.car-thumb-wrap { position: relative; }
.demo-badge {
  position: absolute; left: 10px; bottom: 10px; z-index: 2;
  background: rgba(7, 51, 60, 0.88); color: #eaf4f1; font-size: 12px; font-weight: 600;
  padding: 4px 9px; border-radius: 999px; letter-spacing: 0.2px;
}
.save-btn {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.95); color: #07333c;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(2, 24, 29, 0.28);
}
.save-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; }
.save-btn:hover { background: #ffffff; transform: scale(1.06); }
.save-btn.saved { background: #0B5563; color: #ffffff; }
.save-btn.saved svg { fill: currentColor; }

.btn-save-detail {
  display: inline-flex; align-items: center; gap: 7px; vertical-align: middle;
  font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer;
  background: #ffffff; color: #07333c; border: 1.5px solid #c9d8d4; border-radius: 999px;
  padding: 7px 14px; margin-left: 8px;
}
.btn-save-detail svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.btn-save-detail:hover { border-color: #0B5563; }
.btn-save-detail.saved { background: #0B5563; border-color: #0B5563; color: #ffffff; }
.btn-save-detail.saved svg { fill: currentColor; }

.ag-gallery { margin: 16px 0 6px; }
.ag-gallery-main {
  border-radius: 14px; overflow: hidden; background: #dcebe7;
  box-shadow: 0 8px 24px rgba(7, 51, 60, 0.12);
}
.ag-gallery-main img { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.ag-thumbs { display: flex; gap: 10px; margin-top: 10px; }
.ag-thumb {
  border: 2px solid transparent; border-radius: 10px; padding: 0; cursor: pointer;
  background: #dcebe7; overflow: hidden; flex: 1 1 0; max-width: 112px; min-width: 0;
}
.ag-thumb img { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.ag-thumb:hover { border-color: #9db8b2; }
.ag-thumb.active { border-color: #0B5563; }
