@import url('components/header.css');
@import url('components/hero.css');
@import url('components/steps.css');
@import url('components/voices.css');
@import url('components/about.css');
@import url('components/environment.css');
@import url('components/cta-band.css');
@import url('components/call.css');
@import url('components/layout.css');
@import url('components/chatbot.css');

/* ---------- Đầu trang con ---------- */
.page-head {
  padding-top: clamp(32px, 6vw, 72px);
}

.crumbs {
  display: flex;
  gap: 10px;
  font-size: var(--t-sm);
  color: var(--c-muted);
}

.crumbs a:hover {
  color: var(--c-primary);
}

.page-head__title {
  margin: 18px 0;
  font-size: var(--t-3xl);
  max-width: 18ch;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.page-head__lead {
  max-width: 38rem;
  font-size: var(--t-lg);
  color: var(--c-muted);
}

.page-head__frame {
  margin-top: 48px;
  overflow: hidden;
  border-radius: var(--r-lg);
  aspect-ratio: 4 / 3;
}

.page-head__img {
  width: 100%;
  height: 125%;
  object-fit: cover;
}

@media (min-width: 768px) {
  .page-head__frame {
    aspect-ratio: 21 / 8;
  }
}

/* ---------- Tiêu đề khối ---------- */
.sec-head {
  margin-bottom: 48px;
}

.sec-head__title {
  font-size: var(--t-2xl);
  max-width: 18ch;
}

.sec-head__text {
  margin-top: 16px;
  font-size: var(--t-lg);
  color: var(--c-muted);
  max-width: 34rem;
}

.sec-head .link-under {
  display: inline-block;
  margin-top: 24px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
}

.search {
  position: relative;
  display: block;
  flex: 1 1 280px;
  max-width: 380px;
}

.search .ico {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-muted);
}

.search input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px 10px 44px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
}

.search input:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-soft);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--c-muted);
  transition: background-color .2s, color .2s, border-color .2s;
}

.chip:hover {
  color: var(--c-text);
  border-color: var(--c-text);
}

.chip[aria-pressed="true"] {
  background: var(--c-text);
  border-color: var(--c-text);
  color: var(--c-bg);
}

.empty {
  padding: 64px 0;
  text-align: center;
  color: var(--c-muted);
}

/* ---------- Hỏi đáp ---------- */
.faq {
  display: grid;
}

.faq__item {
  border-bottom: 1px solid var(--c-border);
}

.faq__item:first-child {
  border-top: 1px solid var(--c-border);
}

.faq__item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--f-heading);
  font-size: var(--t-lg);
  font-weight: 600;
  line-height: 1.3;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__icon {
  transition: transform .25s;
  color: var(--c-primary);
}

.faq__item[open] .faq__icon {
  transform: rotate(45deg);
}

.faq__item p {
  padding-bottom: 24px;
  max-width: 60ch;
  color: var(--c-muted);
}

@media (min-width: 960px) {
  .faq--split {
    grid-template-columns: 5fr 7fr;
    gap: 72px;
  }
}

/* stack: tiêu đề trên, danh sách hẹp vừa tầm đọc */
.faq--stack .faq__list {
  max-width: 820px;
}

.wl-host[align="center"] .faq--stack .faq__list {
  margin-inline: auto;
}

/* cards: mỗi câu một thẻ, 2 cột */
.faq--cards .faq__list {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
}

.faq--cards .faq__item {
  padding: 4px 24px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface);
}

.faq--cards .faq__item:first-child {
  border-top: 1px solid var(--c-border);
}

/* ---------- Khối kêu gọi hành động ---------- */
/* ---------- Liên hệ ---------- */
.contact {
  display: grid;
  gap: 48px;
}

.contact__list li {
  display: flex;
  gap: 14px;
  padding-block: 16px;
  border-bottom: 1px solid var(--c-border);
}

.contact__list li:first-child {
  border-top: 1px solid var(--c-border);
}

.contact__list .ico {
  margin-top: 3px;
  color: var(--c-primary);
}

.contact__list a:hover {
  color: var(--c-primary);
}

.form {
  display: grid;
  gap: 20px;
  align-content: start;
  padding: clamp(20px, 4vw, 36px);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: var(--t-sm);
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
}

.field textarea {
  resize: vertical;
}

.field :is(input, select, textarea):focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-soft);
}

.field__err {
  display: none;
  margin-top: 6px;
  font-size: var(--t-sm);
  color: #d93025;
}

.field.is-invalid input {
  border-color: #d93025;
}

.field.is-invalid .field__err {
  display: block;
}

.form__ok {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: var(--c-primary-soft);
  font-weight: 600;
}

.form__ok .ico {
  color: var(--c-primary);
}

@media (min-width: 640px) {
  .form {
    grid-template-columns: 1fr 1fr;
  }

  .field--full {
    grid-column: 1 / -1;
  }
}

@media (min-width: 960px) {
  .contact {
    grid-template-columns: 5fr 7fr;
    gap: 72px;
  }
}


/* ---------- Footer ---------- */
.site-footer {
  padding: 72px 0 32px;
  background: var(--c-surface-2);
  border-top: 1px solid var(--c-border);
  font-size: var(--t-sm);
}

.site-footer__grid {
  display: grid;
  gap: 40px;
}

.site-footer__brand p {
  margin: 16px 0 24px;
  max-width: 28ch;
  color: var(--c-muted);
  font-size: var(--t-base);
}

.site-footer .plain-list {
  color: var(--c-muted);
}

.site-footer .plain-list a:hover {
  color: var(--c-primary);
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--c-border);
  color: var(--c-muted);
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: 2fr 1fr 1.6fr 1fr;
  }
}

/* Form vừa được điền sẵn */
.form__filled {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  background: var(--c-primary-soft);
  font-size: var(--t-sm);
  font-weight: 600;
}

.form__filled .ico {
  color: var(--c-primary);
}

.form.is-flash {
  animation: flash 1.2s ease;
}

/* ---------- Thanh tiến độ cuộn ---------- */
.progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: 3px;
  pointer-events: none;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--c-primary);
  transform-origin: left;
  transform: scaleX(0);
}

/* ---------- Đổi thương hiệu ---------- */
.switch-fab {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 16px 8px 10px;
  background: var(--c-surface);
  color: var(--c-text);
  border: 1px solid var(--c-border);
  border-radius: 999px;
  font-size: var(--t-sm);
  font-weight: 600;
  box-shadow: 0 12px 30px -12px color-mix(in srgb, var(--c-text) 40%, transparent);
  transition: transform .2s, bottom .3s;
}

.switch-fab:hover {
  transform: translateY(-2px);
}

.switch-fab__dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px color-mix(in srgb, #fff 45%, transparent);
}

@media (max-width: 639px) {
  .switch-fab {
    padding: 9px;
  }

  .switch-fab__label {
    display: none;
  }
}

.switcher {
  width: min(1100px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  background: var(--c-surface);
  color: var(--c-text);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
}

.switcher::backdrop {
  background: rgba(10, 10, 20, .55);
  backdrop-filter: blur(6px);
}

.switcher[open] {
  animation: pop .35s cubic-bezier(.2, .8, .2, 1);
}

.switcher__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 16px;
  background: var(--c-surface);
}

.switcher__head h2 {
  font-size: var(--t-xl);
}

.switcher__head p {
  color: var(--c-muted);
  font-size: var(--t-sm);
}

.switcher__grid {
  display: grid;
  gap: 16px;
  padding: 8px 28px 28px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

.brand-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  text-align: left;
  border: 2px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-bg);
  transition: transform .25s, border-color .25s, box-shadow .25s;
  padding: 0;
}

.brand-card:hover {
  transform: translateY(-4px);
  border-color: var(--bc);
  box-shadow: 0 24px 40px -24px var(--bc);
}

.brand-card.is-current {
  border-color: var(--bc);
}

.brand-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.brand-card__body {
  display: grid;
  gap: 4px;
  padding: 16px 18px 18px;
}

.brand-card__topic {
  font-size: .8125rem;
  color: var(--c-muted);
}

.brand-card strong {
  font-size: 1.625rem;
  line-height: 1.1;
  color: var(--bc);
}

.brand-card__tag {
  font-size: var(--t-sm);
  color: var(--c-muted);
}

.brand-card__swatches {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.brand-card__swatches i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .12);
}

.brand-card__now {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bc);
  color: var(--bc-on);
  font-size: .8125rem;
  font-weight: 700;
}

/* ---------- Tiện ích nhỏ dùng chung ---------- */
.sec--tight {
  padding-block: clamp(40px, 6vw, 72px);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--c-primary-soft);
  color: var(--c-primary);
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.tag--solid {
  background: var(--c-primary);
  color: var(--c-on-primary);
}

.checklist {
  display: grid;
  gap: 12px;
}

.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.checklist .ico {
  margin-top: 3px;
  color: var(--c-primary);
}

.checklist--sm {
  gap: 8px;
  font-size: var(--t-sm);
}

.checklist--sm .ico {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}


/* ==========================================================================
   Nguyên tử dùng chung (js/components/ui.js)
   ========================================================================== */

/* ---------- Avatar: ảnh hoặc chữ cái đầu ---------- */
.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--c-primary-soft);
  color: var(--c-primary);
  font-family: var(--f-heading);
  font-weight: 700;
  font-size: 1.125rem;
}

.avatar--sm {
  width: 32px;
  height: 32px;
  font-size: .875rem;
}

.avatar--lg {
  width: 64px;
  height: 64px;
  font-size: 1.5rem;
}

/* ---------- Sao đánh giá: 5 ký tự ★, tô màu theo --rating (0–5) ---------- */
.stars {
  display: inline-block;
  font-size: 1.125rem;
  line-height: 1;
  letter-spacing: 2px;
}

.stars::before {
  content: "★★★★★";
  background: linear-gradient(90deg, var(--c-accent) calc(var(--rating, 0) / 5 * 100%), var(--c-border) 0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stars--sm {
  font-size: .9375rem;
  letter-spacing: 1px;
}


/* ---------- Tab ---------- */
.tabs__list {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--c-border);
  scrollbar-width: none;
}

.tabs__tab {
  flex: none;
  min-height: 48px;
  padding: 12px 18px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--c-muted);
  font-weight: 600;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
}

.tabs__tab:hover {
  color: var(--c-text);
}

.tabs__tab[aria-selected="true"] {
  color: var(--c-text);
  border-bottom-color: var(--c-primary);
}

.tabs__panel {
  padding-top: 28px;
}

.tabs__panel>p+p {
  margin-top: 12px;
}

.tabs__lead {
  font-size: var(--t-lg);
  font-weight: 600;
}

/* ---------- Nội dung giàu hình ảnh (A+) ---------- */
.rich {
  display: grid;
  gap: 72px;
}

.rich__media {
  overflow: hidden;
  border-radius: var(--r-lg);
  aspect-ratio: 4 / 3;
}

.rich__media img {
  width: 100%;
  height: 115%;
  object-fit: cover;
}

.rich__body h3 {
  font-size: var(--t-xl);
}

.rich__body p {
  margin-top: 12px;
  max-width: 34rem;
  color: var(--c-muted);
  font-size: var(--t-lg);
}

.rich__item {
  display: grid;
  gap: 28px;
  align-items: center;
}

@media (min-width: 960px) {
  .rich--alternate {
    gap: 120px;
  }

  .rich--alternate .rich__item {
    grid-template-columns: 1.1fr .9fr;
    gap: 88px;
  }

  .rich--alternate .rich__item--flip {
    grid-template-columns: .9fr 1.1fr;
  }

  .rich--alternate .rich__item--flip .rich__media {
    order: 2;
  }
}

.rich--stack {
  max-width: 880px;
  margin-inline: auto;
  gap: 88px;
}

.rich--stack .rich__media {
  aspect-ratio: 16 / 9;
}

.rich--cards {
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.rich--cards .rich__item {
  align-content: start;
  gap: 0;
  overflow: hidden;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
}

.rich--cards .rich__media {
  border-radius: 0;
}

.rich--cards .rich__media img {
  height: 100%;
}

.rich--cards .rich__body {
  padding: 24px;
}

.rich--cards .rich__body h3 {
  font-size: var(--t-lg);
}

.rich--cards .rich__body p {
  font-size: var(--t-base);
}