/* ============================================================
   Vàng bạc Cát Tường – Landing page (Figma: home01)
   ============================================================ */
:root {
  --c-primary: #500303;
  --c-primary-2: #6e0a0a;
  --c-cream: #fff6f6;
  --c-white: #ffffff;
  --c-text: #121212;
  --c-text-2: #3b3b3b;
  --c-text-3: #363636;
  --c-navy: #17304d;
  --c-down: #d50a0a;
  --c-up: #1fb486;
  --c-teal: #147b72;
  --c-border: #f2f2f2;
  --c-border-2: #e6e6e6;
  --c-gold-1: #f6dc9c;
  --c-gold-2: #c9963f;

  --font: 'Google Sans Flex', 'Google Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-table: 'Inter', var(--font);

  --container: 1116px;
  --gutter: 16px;
  --radius: 8px;
  --nav-h: 82px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--c-text);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--c-primary); color: #fff; padding: 8px 12px; border-radius: 4px; }
.skip-link:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--c-gold-2); outline-offset: 2px; }

/* ---------- Topbar ---------- */
.topbar { background: var(--c-primary); color: var(--c-white); }
.topbar__inner { height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar__company { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; min-width: 0; transition: opacity 0.2s; }
.topbar__company:hover { opacity: 0.85; }
.topbar__company span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__company svg { flex: none; }
.topbar__btn {
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 4px;
  padding: 8px 12px;
  font-weight: 600;
  transition: background-color 0.2s;
}
.topbar__btn:hover { background: rgba(255, 255, 255, 0.1); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--c-cream); transition: box-shadow 0.2s; }
.nav.is-scrolled { box-shadow: 0 2px 16px rgba(80, 3, 3, 0.08); }
.nav__inner { height: var(--nav-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.nav__links { display: flex; gap: 37px; font-weight: 600; }
.nav__links--right { justify-content: flex-end; }
.nav__links a { padding: 4px 0; transition: color 0.2s; }
.nav__links a:hover { color: var(--c-primary); }
/* Logo Cát Tường: chỉ dùng biểu tượng */
.brand { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; transition: transform 0.25s; }
.brand:hover { transform: scale(1.04); }
.brand__mark { flex: none; display: block; width: 54px; height: 54px; filter: drop-shadow(0 2px 6px rgba(0, 25, 18, 0.18)); }
.brand__text { display: none; }
.brand--footer { margin-bottom: 28px; }
.brand--footer .brand__mark { width: 72px; height: 72px; }

.nav__toggle { display: none; width: 44px; height: 44px; border: 0; background: none; padding: 10px; justify-self: end; }
.nav__toggle span { display: block; height: 2px; background: var(--c-primary); border-radius: 2px; transition: transform 0.25s, opacity 0.25s; }
.nav__toggle span + span { margin-top: 6px; }
.nav__toggle[aria-expanded='true'] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__toggle[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded='true'] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Menu ngăn kéo (điện thoại / tablet) ---------- */
html.is-locked { overflow: hidden; }
.drawer { position: fixed; inset: 0; z-index: 100; }
.drawer[hidden] { display: none; }
.drawer__backdrop {
  position: absolute; inset: 0; background: rgba(20, 4, 4, 0.5); opacity: 0; transition: opacity 0.35s ease;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(86vw, 380px);
  display: flex; flex-direction: column; overflow-y: auto;
  padding: 0 24px calc(24px + env(safe-area-inset-bottom));
  background:
    radial-gradient(120% 50% at 100% 0%, rgba(150, 30, 30, 0.55) 0%, rgba(150, 30, 30, 0) 60%),
    linear-gradient(180deg, #5c0707 0%, #380202 100%);
  color: var(--c-white); box-shadow: -24px 0 48px rgba(0, 0, 0, 0.25);
  transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.22, 0.8, 0.2, 1);
}
.drawer.is-open .drawer__backdrop { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; min-height: 72px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.drawer__brand .brand__mark { width: 46px; height: 46px; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35)); }
.drawer__close {
  width: 42px; height: 42px; margin-right: -6px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); color: var(--c-white); display: grid; place-items: center; transition: background-color 0.2s;
}
.drawer__close:hover { background: rgba(255, 255, 255, 0.16); }
.drawer__nav { display: flex; flex-direction: column; padding: 8px 0; }
.drawer__nav a {
  display: flex; align-items: center; gap: 14px; padding: 15px 0;
  font-size: 19px; font-weight: 600; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0; transform: translateX(18px); transition: opacity 0.4s ease, transform 0.4s ease;
}
.drawer.is-open .drawer__nav a { opacity: 1; transform: none; }
.drawer.is-open .drawer__nav a:nth-child(1) { transition-delay: 0.08s; }
.drawer.is-open .drawer__nav a:nth-child(2) { transition-delay: 0.12s; }
.drawer.is-open .drawer__nav a:nth-child(3) { transition-delay: 0.16s; }
.drawer.is-open .drawer__nav a:nth-child(4) { transition-delay: 0.2s; }
.drawer.is-open .drawer__nav a:nth-child(5) { transition-delay: 0.24s; }
.drawer.is-open .drawer__nav a:nth-child(6) { transition-delay: 0.28s; }
.drawer__no { width: 22px; font-size: 12px; font-weight: 600; letter-spacing: 0.5px; color: #e4c189; }
.drawer__text { flex: 1; }
.drawer__chev { opacity: 0.4; transition: transform 0.2s, opacity 0.2s; }
.drawer__nav a:hover .drawer__chev,
.drawer__nav a:active .drawer__chev { opacity: 1; transform: translateX(3px); }
.drawer__foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 24px; }
.drawer__hotline {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border-radius: 16px;
  background: linear-gradient(135deg, var(--c-gold-1), var(--c-gold-2)); color: #3a1d00; font-size: 18px; font-weight: 700; line-height: 1.2;
}
.drawer__hotline-ico { flex: none; width: 40px; height: 40px; border-radius: 50%; background: rgba(58, 29, 0, 0.12); display: grid; place-items: center; }
.drawer__hotline small { display: block; font-size: 12px; font-weight: 600; opacity: 0.75; }
.drawer__order { display: block; padding: 13px 16px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.28); text-align: center; font-weight: 600; transition: background-color 0.2s; }
.drawer__order:hover { background: rgba(255, 255, 255, 0.08); }
.drawer__company { margin-top: 8px; font-size: 13px; line-height: 1.55; color: rgba(255, 255, 255, 0.62); }
.drawer__company strong { display: block; margin-bottom: 2px; font-weight: 600; color: rgba(255, 255, 255, 0.9); }

/* ---------- Hero ---------- */
.hero { position: relative; height: clamp(460px, 45.7vw, 658px); overflow: hidden; background: #1c0303; color: var(--c-white); touch-action: pan-y; }
.hero__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1s ease, visibility 0s linear 1s; }
.hero__slide.is-active { opacity: 1; visibility: visible; transition: opacity 1s ease; z-index: 1; }
.hero__bg { position: absolute; inset: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; transform: scale(1.06); }
.hero__slide.is-active .hero__bg img { animation: kenBurns 9s ease-out forwards; }
@keyframes kenBurns { from { transform: scale(1.06); } to { transform: scale(1); } }

.hero__content { position: relative; z-index: 1; height: 100%; display: flex; align-items: center; pointer-events: none; }
/* --w = chiều rộng tiêu đề trong Figma (khung 1440px), co theo màn hình */
.hero__title { width: min(calc(var(--w) * 1px), calc(var(--w) * 100vw / 1440)); opacity: 0; transform: translateY(28px); }
.hero__slide.is-active .hero__title { animation: titleIn 0.9s 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
@keyframes titleIn { to { opacity: 1; transform: none; } }
.hero__title img { width: 100%; height: auto; }
.hero__title--stack img + img { margin-top: 1.5%; }

.hero__arrow {
  position: absolute; z-index: 2; top: 50%; translate: 0 -50%;
  width: 66px; height: 66px; border-radius: 50%;
  border: 1px solid #d9d9d9; background: transparent; color: var(--c-white);
  display: grid; place-items: center; transition: background-color 0.2s, border-color 0.2s;
}
.hero__arrow:hover { background: rgba(255, 255, 255, 0.14); border-color: var(--c-white); }
.hero__arrow--prev { left: 47px; }
.hero__arrow--next { right: 47px; }

/* Chỉ báo slide: chấm tròn, slide hiện tại kéo dài thành viên thuốc và chạy tiến trình */
.hero__dots { position: absolute; z-index: 2; left: 0; right: 0; bottom: 26px; display: flex; justify-content: center; align-items: center; gap: 8px; }
.hero__dots button { position: relative; width: 8px; height: 20px; padding: 0; border: 0; background: none; transition: width 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }
.hero__dots button::before,
.hero__dots button::after { content: ''; position: absolute; left: 0; top: 6px; height: 8px; border-radius: 4px; }
.hero__dots button::before { right: 0; background: rgba(255, 255, 255, 0.45); transition: background-color 0.3s; }
.hero__dots button:hover::before { background: rgba(255, 255, 255, 0.8); }
.hero__dots button::after { width: 0; background: var(--c-white); }
.hero__dots button[aria-selected='true'] { width: 36px; }
.hero__dots button[aria-selected='true']::before { background: rgba(255, 255, 255, 0.28); }
.hero__dots button[aria-selected='true']::after { animation: slideProgress var(--dur, 6s) linear forwards; }
.hero.is-paused .hero__dots button[aria-selected='true']::after { animation-play-state: paused; }
.hero.is-static .hero__dots button[aria-selected='true']::after { animation: none; width: 100%; }
@keyframes slideProgress { from { width: 8px; } to { width: 100%; } }

/* ---------- Sections ---------- */
.main { padding-top: 72px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 72px; }
.section__title { font-size: 38px; line-height: 1.25; font-weight: 700; color: var(--c-text-2); }
.section__title--center { text-align: center; }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.section__unit { font-size: 20px; font-weight: 600; color: var(--c-text-2); white-space: nowrap; }

/* ---------- Tabs: thanh chọn bo tròn, viên đỏ trượt theo tab đang chọn ---------- */
.tabs {
  position: relative; display: flex; width: fit-content; margin: 20px auto 28px; padding: 6px;
  background: #fbf4f2; border: 1px solid #f1e2de; border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(80, 3, 3, 0.04);
}
.tabs__indicator {
  position: absolute; z-index: 0; top: 6px; bottom: 6px; left: 0;
  width: var(--w, 0); transform: translateX(var(--x, 0));
  border-radius: 999px; background: linear-gradient(135deg, #7d0e0e 0%, var(--c-primary) 100%);
  box-shadow: 0 6px 16px rgba(80, 3, 3, 0.28);
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), width 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tabs__btn {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 150px; padding: 12px 32px; border: 0; border-radius: 999px; background: none;
  color: #7a5a5a; font-size: 17px; font-weight: 600; line-height: 1.2; transition: color 0.3s;
}
.tabs__btn:hover { color: var(--c-primary); }
.tabs__btn.is-active { color: var(--c-white); }

/* ---------- Sản phẩm: 3 nhóm nằm cạnh nhau, đổi tab là trượt ngang ---------- */
.product-viewport {
  --panel-gap: 40px;
  /* chừa lề để bóng/viền hover của thẻ không bị cắt */
  margin: -12px; padding: 12px; overflow: hidden;
  transition: height 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.product-track {
  display: flex; align-items: flex-start; gap: var(--panel-gap);
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
  touch-action: pan-y;
}
.product-track.is-dragging { transition: none; }
.product-panel { flex: 0 0 100%; min-width: 0; transition: opacity 0.45s; }
.product-panel[aria-hidden='true'] { opacity: 0.35; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.product-empty { grid-column: 1 / -1; padding: 32px 0; text-align: center; color: var(--c-text-3); }
.product-more {
  display: flex; align-items: center; gap: 6px; margin: 28px auto 0; padding: 12px 28px;
  border: 1px solid #ead8d2; border-radius: 999px; background: var(--c-white);
  color: var(--c-primary); font-size: 15px; font-weight: 600; transition: background-color 0.2s, border-color 0.2s;
}
.product-more:hover { background: var(--c-cream); border-color: var(--c-primary); }
.product-more[hidden] { display: none; }

.card {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 24px; background: var(--c-white);
  border: 1px solid var(--c-border); border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--c-primary); box-shadow: 0 8px 24px rgba(80, 3, 3, 0.08); }
.card__media { aspect-ratio: 1; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--c-white); }
.card__media img { transition: transform 0.4s ease; }
.card__media--contain { position: relative; }
.card__media--contain img { position: absolute; inset: 0; margin: auto; object-fit: contain; width: var(--size, 82%); height: var(--size, 82%); }
.card__media--photo { position: relative; aspect-ratio: 16 / 10; background: #2a2622; }
.card__media--photo::before {
  content: ''; position: absolute; inset: -30px; background: var(--bg) center / cover no-repeat;
  filter: blur(22px) brightness(0.85) saturate(1.1);
}
.card__media--photo img { position: relative; width: 100%; height: 100%; object-fit: contain; }
.card:hover .card__media img { transform: scale(1.04); }
.card__hot { position: absolute; top: 10px; left: 11px; width: 93px; height: auto; z-index: 1; }
.card__name {
  font-size: 20px; line-height: 1.3; font-weight: 600; color: var(--c-text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em;
}
.card__code { margin-top: -6px; font-size: 13px; color: #8a7d7d; }
.card__soldout {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 8px 16px; border-radius: 999px; background: rgba(30, 10, 10, 0.78); color: var(--c-white);
  font-size: 13px; font-weight: 700; letter-spacing: 0.6px; white-space: nowrap;
}
.card.is-soldout .card__media img { opacity: 0.45; filter: grayscale(0.5); }
.card--skeleton { pointer-events: none; }
.card--skeleton .card__media,
.card--skeleton span { background: linear-gradient(90deg, #f6efef 25%, #fbf7f7 50%, #f6efef 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 10px; }
.card--skeleton span { display: block; height: 18px; }
.card--skeleton span:last-child { width: 60%; }
.card__prices { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 8px; }
.card__price { display: flex; flex-direction: column; }
.card__price--buy { text-align: right; }
.card__price-label { color: var(--c-text-3); font-size: 16px; }
.card__price-value { font-size: 24px; line-height: 32px; font-weight: 500; }
.card__price--sell .card__price-value { color: var(--c-teal); }
.card__price--buy .card__price-value { color: var(--c-down); }

/* ---------- Price tables ---------- */
.price-table { border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.price-table__head,
.price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 38%) minmax(134px, max-content);
  align-items: center;
  padding: 0 24px;
}
.price-table__head { background: var(--c-primary); color: var(--c-white); font-size: 24px; line-height: 34px; font-weight: 500; min-height: 52px; padding-top: 9px; padding-bottom: 9px; }
.price-row { min-height: 50px; padding-top: 11px; padding-bottom: 11px; }
.price-row:nth-child(odd) { background: var(--c-cream); }
.price-row__name { font-family: var(--font-table); font-weight: 600; color: var(--c-navy); padding-right: 16px; }
.price {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 22px; line-height: 28px; font-weight: 600;
  border-radius: 4px; transition: background-color 0.6s;
}
.price--up { color: var(--c-up); }
.price--down { color: var(--c-down); }
.price--flat { color: var(--c-text-2); }
.price__arrow { flex: none; width: 18px; height: 18px; }
.price__arrow--up { color: var(--c-up); }
.price__arrow--down { color: var(--c-down); transform: rotate(180deg); }
.price__arrow--flat { color: #a39a9a; }
.price.flash-up { animation: flashUp 1.6s ease; }
.price.flash-down { animation: flashDown 1.6s ease; }
@keyframes flashUp { 0%, 30% { background: rgba(31, 180, 134, 0.18); } 100% { background: transparent; } }
@keyframes flashDown { 0%, 30% { background: rgba(213, 10, 10, 0.14); } 100% { background: transparent; } }

.price-row--skeleton span { height: 20px; border-radius: 4px; background: linear-gradient(90deg, #f3eaea 25%, #fbf5f5 50%, #f3eaea 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.price-row--skeleton span:nth-child(1) { width: 60%; }
.price-row--skeleton span:nth-child(2) { width: 45%; }
.price-row--skeleton span:nth-child(3) { width: 90%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.price-table__unit { display: none; }
.price-table__empty { padding: 20px 24px; color: var(--c-text-3); background: var(--c-cream); }


/* ---------- Footer ---------- */
.footer { position: relative; background: #fbf3ee url('../assets/img/footer-bg.webp') center / cover no-repeat; color: var(--c-text-2); padding: 56px 0 56px; }
.footer__inner { position: relative; }
.footer__grid { display: flex; justify-content: space-between; gap: 48px; }
.footer h3 { font-size: 18px; line-height: 26px; font-weight: 700; color: var(--c-text-2); margin-bottom: 11px; }
.footer__company { max-width: 463px; font-weight: 500; }
.footer__contact { list-style: none; margin: 0; padding: 0; }
.footer__contact b { font-weight: inherit; }
.footer__ico { display: none; }
.footer__company a { text-decoration: underline; text-underline-offset: 3px; }
.footer__company a:hover { color: var(--c-primary); }
.footer__cols { display: flex; gap: 72px; }
.footer__col { font-weight: 500; }
.footer__col summary { list-style: none; pointer-events: none; }
.footer__col summary::-webkit-details-marker { display: none; }
.footer__col h3 { margin-bottom: 12px; }
.footer__caret { display: none; }
.footer__links { display: flex; flex-direction: column; gap: 8px; }
.footer__links a { color: var(--c-text); transition: color 0.2s; }
.footer__links a:hover { color: var(--c-primary); }
.footer__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-top: 100px; font-weight: 500; }
.footer__totop { position: absolute; top: -37px; right: -111px; width: 108px; transition: transform 0.3s; }
.footer__totop:hover { transform: translateY(-4px); }

/* ---------- Cụm nút liên hệ nổi: to, sáng, có chuyển động gây chú ý ---------- */
.cta-float { position: fixed; right: 24px; bottom: 24px; z-index: 60; width: 392px; display: flex; flex-direction: column; gap: 14px; }
.cta {
  position: relative; isolation: isolate; display: flex; align-items: center; gap: 14px;
  min-height: 80px; padding: 14px 20px 14px 14px; border-radius: 22px;
  transition: transform 0.25s, box-shadow 0.25s;
  animation: ctaNudge 6s ease-in-out infinite;
}
.cta--account { animation-delay: 0.25s; }
.cta:hover { transform: translateY(-3px) scale(1.015); animation-play-state: paused; }
/* nảy nhẹ định kỳ để hút mắt */
@keyframes ctaNudge { 0%, 86%, 100% { transform: none; } 89% { transform: translateY(-7px); } 92% { transform: translateY(0); } 95% { transform: translateY(-3px); } }
/* vệt sáng lướt qua */
.cta__shine { position: absolute; inset: 0; z-index: -1; border-radius: inherit; overflow: hidden; pointer-events: none; }
.cta__shine::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-20deg); animation: ctaShine 3.6s ease-in-out infinite;
}
.cta--account .cta__shine::after { animation-delay: 1.8s; }
@keyframes ctaShine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.cta__icon { position: relative; flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; }
.cta__icon svg { width: 26px; height: 26px; }
.cta__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cta__label { font-size: 17px; line-height: 1.22; font-weight: 800; letter-spacing: 0.1px; }
.cta__sub { font-size: 13px; line-height: 1.3; font-weight: 600; opacity: 0.9; }
.cta__chev { flex: none; width: 24px; height: 24px; transition: transform 0.2s; }
.cta:hover .cta__chev { transform: translateX(4px); }

/* Tư vấn: xanh ngọc lục bảo (màu logo Cát Tường), icon nền trắng + chấm online, sóng lan nhẹ */
.cta--consult {
  color: var(--c-white);
  background: linear-gradient(135deg, #2a9d7c 0%, #137059 50%, #0a4a3a 100%);
  box-shadow: 0 16px 38px rgba(10, 74, 58, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.cta--consult::before {
  content: ''; position: absolute; inset: 0; z-index: -2; border-radius: inherit;
  animation: ctaPulse 2.2s ease-out infinite;
}
@keyframes ctaPulse { 0% { box-shadow: 0 0 0 0 rgba(19, 112, 89, 0.4); } 75%, 100% { box-shadow: 0 0 0 14px rgba(19, 112, 89, 0); } }
.cta--consult .cta__icon { background: var(--c-white); color: #137059; box-shadow: 0 4px 12px rgba(5, 50, 38, 0.3); }
.cta--consult .cta__icon::after {
  content: ''; position: absolute; top: 1px; right: 1px; width: 12px; height: 12px; border-radius: 50%;
  background: #34d399; border: 2px solid var(--c-white); animation: onlineDot 1.6s ease-in-out infinite;
}
@keyframes onlineDot { 0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); } 50% { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); } }

/* Mở tài khoản: vàng ánh kim sáng, icon nền nâu đậm */
.cta--account {
  color: #3a1d00;
  background: linear-gradient(135deg, #fff1bf 0%, #f6cf62 40%, #e0a537 75%, #c98a22 100%);
  box-shadow: 0 16px 38px rgba(201, 138, 34, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.cta--account .cta__icon { background: #3a1d00; color: #f6cf62; box-shadow: 0 4px 12px rgba(58, 29, 0, 0.3); }

/* Nút lên đầu trang nổi: hiện khi đã cuộn xuống, vòng tròn chạy theo % đã cuộn */
.totop {
  position: fixed; z-index: 59; right: 430px; bottom: 38px; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; background: var(--c-white); color: var(--c-primary);
  box-shadow: 0 10px 26px rgba(60, 8, 8, 0.18);
  opacity: 0; visibility: hidden; transform: translateY(12px) scale(0.9);
  transition: opacity 0.3s, transform 0.3s, visibility 0s linear 0.3s, background-color 0.2s, color 0.2s;
}
.totop.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity 0.3s, transform 0.3s, background-color 0.2s, color 0.2s; }
.totop:hover { background: var(--c-primary); color: var(--c-white); }
.totop__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.totop__ring circle { fill: none; stroke-width: 2.5; stroke: rgba(80, 3, 3, 0.1); }
.totop__ring .totop__bar { stroke: var(--c-gold-2); stroke-linecap: round; stroke-dasharray: 138.2; stroke-dashoffset: calc(138.2 * (1 - var(--p, 0))); }
.totop__arrow { position: relative; }

/* ---------- Dải kêu gọi liên hệ ---------- */
.cta-band {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px;
  padding: 44px 52px; border-radius: 24px; color: var(--c-white);
  background:
    radial-gradient(110% 140% at 100% 0%, rgba(42, 157, 124, 0.55) 0%, rgba(42, 157, 124, 0) 55%),
    linear-gradient(135deg, #0d5c48 0%, #073a2e 100%);
  box-shadow: 0 22px 50px rgba(7, 58, 46, 0.25);
}
.cta-band__mark { position: absolute; right: -50px; top: -60px; width: 280px; height: 280px; opacity: 0.1; pointer-events: none; }
.cta-band__text { position: relative; }
.cta-band__eyebrow { margin-bottom: 8px; font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: #f6cf62; }
.cta-band__title { font-size: 32px; line-height: 1.2; font-weight: 800; }
.cta-band__desc { margin-top: 10px; max-width: 560px; font-size: 16px; line-height: 1.55; opacity: 0.88; }
.cta-band__actions { position: relative; display: flex; flex-direction: column; gap: 12px; }
.band-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 30px; border-radius: 999px;
  font-size: 17px; font-weight: 800; white-space: nowrap; transition: transform 0.25s, background-color 0.25s, box-shadow 0.25s;
}
.band-btn:hover { transform: translateY(-2px); }
.band-btn--consult {
  color: #3a1d00; background: linear-gradient(135deg, #fff1bf 0%, #f6cf62 45%, #e0a537 100%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.band-btn--call { color: var(--c-white); border: 1.5px solid rgba(255, 255, 255, 0.55); }
.band-btn--call:hover { background: rgba(255, 255, 255, 0.1); }

/* ---------- Bong bóng lời chào ---------- */
.greet {
  position: fixed; z-index: 61; right: 24px; bottom: 214px; width: 340px;
  display: flex; align-items: flex-start; gap: 12px; padding: 16px 44px 16px 14px;
  background: var(--c-white); border: 1px solid #efe5e5; border-radius: 18px;
  box-shadow: 0 18px 44px rgba(30, 10, 10, 0.22);
  opacity: 0; transform: translateY(12px) scale(0.96); transform-origin: bottom right; transition: opacity 0.3s, transform 0.3s;
}
.greet[hidden] { display: none; }
.greet.is-open { opacity: 1; transform: none; }
.greet::after {
  content: ''; position: absolute; right: 40px; bottom: -8px; width: 16px; height: 16px; background: var(--c-white);
  border-right: 1px solid #efe5e5; border-bottom: 1px solid #efe5e5; transform: rotate(45deg);
}
.greet__avatar { flex: none; width: 40px; height: 40px; }
.greet__title { display: block; font-size: 15px; font-weight: 800; color: var(--c-text); }
.greet__text { margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--c-text-3); }
.greet__btn {
  display: inline-flex; margin-top: 10px; padding: 9px 18px; border-radius: 999px;
  background: linear-gradient(135deg, #2a9d7c, #137059); color: var(--c-white); font-size: 14px; font-weight: 700;
}
.greet__close {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: #f6f1f1; color: #6b5b5b;
}
.greet__close:hover { background: #ece3e3; }

/* ---------- Bảng chọn cách liên hệ: Zalo / Gọi điện ---------- */
.contact-sheet { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; }
.contact-sheet[hidden] { display: none; }
.contact-sheet__backdrop {
  position: absolute; inset: 0; background: rgba(20, 8, 8, 0.55); opacity: 0; transition: opacity 0.3s;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.contact-sheet__panel {
  position: relative; width: min(420px, 100%); padding: 28px 24px 22px; border-radius: 24px; text-align: center;
  background: var(--c-white); box-shadow: 0 30px 70px rgba(20, 5, 5, 0.35);
  opacity: 0; transform: translateY(16px) scale(0.97); transition: opacity 0.3s, transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.contact-sheet.is-open .contact-sheet__backdrop { opacity: 1; }
.contact-sheet.is-open .contact-sheet__panel { opacity: 1; transform: none; }
.contact-sheet__close {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: #f6f1f1; color: #6b5b5b;
}
.contact-sheet__close:hover { background: #ece3e3; }
.contact-sheet__logo { width: 52px; height: 52px; margin: 0 auto 10px; }
.contact-sheet__title { font-size: 22px; line-height: 1.25; font-weight: 800; color: var(--c-text); }
.contact-sheet__desc { margin-top: 4px; margin-bottom: 18px; font-size: 15px; color: var(--c-text-3); }
.contact-opt {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; text-align: left; color: var(--c-white);
  transition: transform 0.2s, box-shadow 0.2s;
}
.contact-opt + .contact-opt { margin-top: 12px; }
.contact-opt:hover { transform: translateY(-2px); }
.contact-opt--zalo { background: linear-gradient(135deg, #2b86ff 0%, #0068ff 100%); box-shadow: 0 10px 24px rgba(0, 104, 255, 0.3); }
.contact-opt--call { background: linear-gradient(135deg, #2a9d7c 0%, #137059 50%, #0a4a3a 100%); box-shadow: 0 10px 24px rgba(10, 74, 58, 0.3); }
.contact-opt__icon {
  flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--c-white); color: #137059;
}
.contact-opt__icon--zalo { color: #0068ff; font-size: 14px; font-weight: 800; letter-spacing: -0.2px; }
.contact-opt__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.contact-opt__text strong { font-size: 17px; font-weight: 800; line-height: 1.25; }
.contact-opt__text small { font-size: 14px; font-weight: 600; opacity: 0.9; letter-spacing: 0.3px; }
.contact-opt__chev { flex: none; opacity: 0.85; }
.contact-sheet__note { margin-top: 14px; font-size: 13.5px; color: var(--c-text-3); }

/* ============================================================
   Responsive
   ============================================================ */
@media (min-width: 768px) {
  :root { --gutter: 24px; }
  /* chừa chỗ cho 2 nút nổi để không che dòng bản quyền khi cuộn tới cuối */
  .footer { padding-bottom: 220px; }
}

@media (max-width: 1439px) {
  .footer__totop { right: var(--gutter); top: 0; }
}

/* Màn hẹp hơn thiết kế: dời tiêu đề banner để không đè lên mũi tên */
@media (min-width: 1024px) and (max-width: 1365px) {
  .hero__arrow--prev { left: 16px; }
  .hero__arrow--next { right: 16px; }
  .hero__content { max-width: none; padding-left: 104px; padding-right: 104px; }
}

/* Tablet */
@media (max-width: 1023px) {
  :root { --nav-h: 68px; }
  .topbar__inner { height: 56px; }
  .nav__inner { grid-template-columns: auto 1fr auto; }
  .nav__links { display: none; }
  .nav__logo { grid-column: 1; }
  .nav__logo .brand__mark { width: 46px; height: 46px; }
  /* Tablet/điện thoại: logo nằm bên trái nên đặt thêm tên thương hiệu cho đỡ trống */
  .nav__logo { gap: 10px; }
  .nav__logo .brand__text { display: flex; flex-direction: column; font-family: 'Poltawski Nowy', Georgia, 'Times New Roman', serif; line-height: 1.05; white-space: nowrap; }
  .nav__logo .brand__small { font-size: 13px; font-weight: 500; letter-spacing: 0.3px; color: #8a6a22; }
  .nav__logo .brand__name {
    font-size: 23px; font-weight: 600;
    background: linear-gradient(180deg, #b48a2a 0%, #7c5610 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .nav__toggle { display: block; grid-column: 3; }

  .hero__arrow { display: none; }
  .hero__title { width: calc(var(--w) * 125vw / 1440); }

  .main { gap: 56px; padding-top: 56px; padding-bottom: 56px; }
  .section__title { font-size: 32px; }
  .cta-band { grid-template-columns: 1fr; padding: 36px 32px; }
  .cta-band__actions { flex-direction: row; flex-wrap: wrap; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

  .price-table__head { font-size: 20px; }
  .price { font-size: 20px; }

  .footer__grid { flex-direction: column; gap: 32px; }
  .footer__cols { gap: 48px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; margin-top: 48px; }
}

/* ============================================================
   Mobile (< 768px) — bố cục riêng cho điện thoại
   ============================================================ */
@media (max-width: 767px) {
  :root { --nav-h: 60px; }

  /* Header: chỉ còn 1 thanh (logo + menu). Thông tin công ty, tra cứu đơn hàng nằm trong menu */
  .topbar { display: none; }
  .nav { box-shadow: 0 1px 0 rgba(80, 3, 3, 0.06); }
  .nav__logo .brand__mark { width: 42px; height: 42px; }
  .nav__logo .brand__small { font-size: 12px; }
  .nav__logo .brand__name { font-size: 21px; }
  .nav__toggle { margin-right: -8px; }

  /* Banner: ảnh sản phẩm ở trên, tiêu đề nằm trên dải màu hoà theo ảnh ở dưới */
  .hero { --img-h: 92vw; height: calc(var(--img-h) + 150px); background: #1c0303; }
  .hero__slide { background: var(--tone, #1c0303); }
  .hero__bg { bottom: auto; height: var(--img-h); overflow: hidden; }
  .hero__bg img { object-position: var(--pos, 70%) center; }
  .hero__bg::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 42%, var(--tone, #1c0303) 100%);
  }
  .hero__content { align-items: flex-end; padding-bottom: 50px; }
  .hero__title { width: var(--wm, calc(var(--w) * 82vw / 744)); }
  .hero__dots { bottom: 18px; justify-content: flex-start; gap: 6px; padding: 0 var(--gutter); }
  .hero__dots button { width: 6px; }
  .hero__dots button::before,
  .hero__dots button::after { top: 7px; height: 6px; border-radius: 3px; }
  .hero__dots button[aria-selected='true'] { width: 28px; }
  @keyframes slideProgress { from { width: 6px; } to { width: 100%; } }

  /* Khoảng cách các phần */
  .main { gap: 44px; padding-top: 36px; padding-bottom: 44px; }
  .section__title { font-size: 22px; line-height: 1.3; letter-spacing: 0.2px; }
  .section__head { margin-bottom: 12px; }
  .section__unit { display: none; }


  /* Dải liên hệ */
  .cta-band { padding: 28px 20px; gap: 20px; border-radius: 20px; }
  .cta-band__mark { width: 180px; height: 180px; right: -40px; top: -40px; }
  .cta-band__title { font-size: 22px; }
  .cta-band__desc { font-size: 14.5px; }
  .cta-band__actions { flex-direction: column; }
  .band-btn { width: 100%; padding: 14px 18px; font-size: 15.5px; white-space: normal; text-align: center; }

  /* Bảng chọn liên hệ: trượt lên từ đáy */
  .contact-sheet { place-items: end stretch; padding: 0; }
  .contact-sheet__panel {
    width: 100%; border-radius: 24px 24px 0 0; padding: 24px 18px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(100%); transition: opacity 0.2s, transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .contact-sheet__panel::before { content: ''; display: block; width: 44px; height: 5px; margin: -10px auto 14px; border-radius: 3px; background: #e6dcdc; }
  .contact-sheet__logo { width: 44px; height: 44px; }
  .contact-sheet__title { font-size: 20px; }

  /* Bong bóng lời chào nằm trên thanh 2 nút */
  .greet { left: 8px; right: 8px; bottom: calc(92px + env(safe-area-inset-bottom)); width: auto; }
  .greet::after { right: auto; left: 22%; }
  body.greet-open .totop { opacity: 0; visibility: hidden; }

  /* Tabs: full chiều ngang */
  .tabs { width: 100%; margin: 14px 0 16px; padding: 4px; }
  .tabs__indicator { top: 4px; bottom: 4px; }
  .tabs__btn { flex: 1; min-width: 0; padding: 10px 4px; font-size: 15px; }
  .product-viewport { --panel-gap: 24px; }

  /* Thẻ sản phẩm */
  .product-grid { gap: 12px; }
  .card { padding: 0; gap: 0; overflow: hidden; border-radius: 14px; border-color: #f1e9e9; box-shadow: 0 2px 10px rgba(80, 3, 3, 0.05); }
  .card:hover { box-shadow: 0 2px 10px rgba(80, 3, 3, 0.05); }
  .card__media { border-radius: 0; }
  .card__media--photo::before { inset: -16px; filter: blur(14px) brightness(0.85); }
  .card__media--contain img { width: min(92%, calc(var(--size, 70%) * 1.22)); height: min(92%, calc(var(--size, 70%) * 1.22)); }
  .card__hot { width: 62px; top: 8px; left: 8px; }
  .card__name {
    margin: 10px 12px 0; font-size: 14px; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em;
  }
  .card__prices { flex-direction: column; gap: 3px; padding: 8px 12px 12px; margin-top: auto; }
  .card__price { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 6px; text-align: left; }
  .card__price--buy { text-align: left; }
  .card__price-label { font-size: 12px; color: #8a7d7d; }
  .card__price-value { font-size: 14px; line-height: 20px; font-weight: 700; }
  .card__code { margin: 2px 12px 0; font-size: 11.5px; }
  .card__soldout { padding: 6px 12px; font-size: 11px; }
  .product-more { margin-top: 20px; padding: 11px 22px; font-size: 14px; }

  /* Bảng giá dạng danh sách: tên ở trên, Mua vào / Bán ra ở dưới */
  .price-table { border-radius: 14px; border: 1px solid #f1e6e6; box-shadow: 0 2px 10px rgba(80, 3, 3, 0.04); }
  .price-table__head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; min-height: 0; font-size: 15px; line-height: 20px; }
  .price-table__head span:nth-child(2),
  .price-table__head span:nth-child(3) { display: none; }
  .price-table__unit { display: inline; font-size: 13px; font-weight: 500; opacity: 0.85; }
  .price-row {
    grid-template-columns: 1fr 1fr; grid-template-areas: 'name name' 'buy sell';
    gap: 6px 12px; padding: 12px 16px; min-height: 0;
  }
  .price-row + .price-row { border-top: 1px solid #f4eded; }
  .price-row__name { grid-area: name; font-size: 14px; line-height: 1.35; padding-right: 0; }
  .price-row__cell { display: flex; flex-direction: column; gap: 1px; }
  .price-row__cell::before { content: attr(data-label); font-size: 12px; color: #8a7d7d; }
  .price-row__cell:last-child { grid-area: sell; }
  .price { font-size: 17px; line-height: 24px; font-weight: 700; gap: 3px; }
  .price__arrow { width: 14px; height: 14px; }
  .price-row--skeleton { grid-template-areas: none; grid-template-columns: 1fr; gap: 8px; }
  .price-row--skeleton span:nth-child(3) { display: none; }

  /* Footer */
  .footer { padding: 40px 0 168px; font-size: 14px; }
  .footer__totop { display: none; }
  .brand--footer { margin-bottom: 22px; }
  .brand--footer .brand__mark { width: 60px; height: 60px; }
  .footer__grid { gap: 26px; }
  .footer__company { max-width: none; }
  .footer__company h3 { font-size: 16px; margin-bottom: 16px; }
  .footer__contact { display: flex; flex-direction: column; gap: 14px; }
  .footer__contact li { display: flex; align-items: flex-start; gap: 12px; }
  .footer__ico {
    display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
    background: var(--c-white); color: var(--c-primary); box-shadow: 0 2px 8px rgba(80, 3, 3, 0.08);
  }
  .footer__contact li > span:last-child { line-height: 1.45; color: var(--c-text-2); font-weight: 500; }
  .footer__contact b { display: block; margin-bottom: 1px; font-size: 12px; font-weight: 500; color: #8a7d7d; }
  .footer__company a { text-decoration: none; color: var(--c-primary); font-weight: 600; }

  .footer__cols { display: block; border-top: 1px solid rgba(59, 59, 59, 0.12); }
  .footer__col { border-bottom: 1px solid rgba(59, 59, 59, 0.12); }
  .footer__col summary { pointer-events: auto; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 15px 0; }
  .footer__col h3 { margin: 0; font-size: 15px; line-height: 22px; }
  .footer__caret { display: block; color: #8a7d7d; transition: transform 0.25s; }
  .footer__col[open] .footer__caret { transform: rotate(180deg); }
  .footer__links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 0 0 16px; }
  .footer__links a { font-size: 14px; font-weight: 500; color: var(--c-text-2); }

  .footer__bottom { margin-top: 24px; gap: 14px; font-size: 12px; line-height: 1.6; font-weight: 400; color: #7a7272; }
  .footer__copy { width: 100%; padding-top: 14px; border-top: 1px solid rgba(59, 59, 59, 0.12); text-align: center; }

  /* Cụm 2 nút: thẻ trắng nổi ở đáy màn hình — to, sáng, dễ bấm */
  .cta-float {
    left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto;
    flex-direction: row; gap: 6px; padding: 6px; border-radius: 24px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 12px 36px rgba(40, 5, 5, 0.26), 0 0 0 1px rgba(80, 3, 3, 0.06);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  }
  .cta { flex: 1; min-width: 0; min-height: 64px; padding: 8px 10px 8px 8px; gap: 8px; border-radius: 18px; text-wrap: balance; }
  .cta:hover { transform: none; }
  .cta--consult { flex: 0 0 44%; box-shadow: 0 8px 20px rgba(10, 74, 58, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.28); }
  .cta--account { box-shadow: 0 8px 20px rgba(201, 138, 34, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.75); }
  .cta--consult::before { animation-name: ctaPulseSm; }
  @keyframes ctaPulseSm { 0% { box-shadow: 0 0 0 0 rgba(19, 112, 89, 0.38); } 75%, 100% { box-shadow: 0 0 0 7px rgba(19, 112, 89, 0); } }
  /* điện thoại: bỏ icon để chữ luôn gọn 2 dòng, căn giữa */
  .cta { justify-content: center; text-align: center; padding: 8px 12px; }
  .cta__icon { display: none; }
  .cta__label { font-size: 14px; line-height: 1.22; }
  .cta__sub, .cta__chev { display: none; }
  .totop { right: 14px; bottom: calc(98px + env(safe-area-inset-bottom)); width: 46px; height: 46px; }
}

/* Điện thoại nhỏ (≤ 380px): chữ nhỏ lại chút để 2 nút vẫn gọn 2 dòng */
@media (max-width: 380px) {
  .cta { padding: 8px 8px; }
  .cta--consult { flex-basis: 41%; }
  .cta__label { font-size: 13px; }
}

@media (max-width: 339px) {
  .product-grid { grid-template-columns: minmax(0, 1fr); }
}
