:root {
  --navy: #071a39;
  --blue: #0b4ea2;
  --red: #df1b25;
  --green: #087a3b;
  --mint: #e9f7ef;
  --gold: #d6a33b;
  --ink: #111827;
  --muted: #5b6678;
  --line: #d9e2ef;
  --paper: #f6f8fb;
  --white: #fff;
  --radius: 8px;
  --shadow: 0 18px 48px rgba(7, 26, 57, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Be Vietnam Pro", "Noto Sans Khmer", Arial, sans-serif;
  line-height: 1.55;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(18px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 138px;
  color: var(--navy);
  font-weight: 800;
}

.brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 700;
}

.nav a:hover {
  color: var(--red);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.lang-switch button {
  min-width: 38px;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.lang-switch button.active {
  color: var(--white);
  background: var(--navy);
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius);
  padding: 0 18px;
  font-weight: 800;
  text-align: center;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

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

.primary {
  color: var(--white);
  background: var(--red);
  box-shadow: 0 14px 28px rgba(223, 27, 37, 0.18);
}

.secondary {
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: clamp(28px, 5vw, 64px);
  align-items: end;
  padding: clamp(56px, 8vw, 108px) clamp(18px, 5vw, 72px) 48px;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(7, 26, 57, 0.94), rgba(8, 122, 59, 0.85)),
    url("https://d24rsy7fvs79n4.cloudfront.net/thegioichay.com.vn/20260512082759_6103_1778549279.2921.webp")
      center/cover;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1,
.catalog h2,
.contact-band h2 {
  margin: 0;
  color: inherit;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 820px;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
}

.lead {
  max-width: 660px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 2vw, 1.24rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-panel {
  display: grid;
  gap: 10px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.hero-panel strong {
  font-size: 4rem;
  line-height: 1;
}

.hero-panel span {
  font-size: 1.1rem;
  font-weight: 800;
}

.hero-panel small {
  color: rgba(255, 255, 255, 0.78);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 420px) 1fr;
  gap: 18px;
  align-items: end;
  padding: 28px clamp(18px, 5vw, 72px);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.search-box {
  display: grid;
  gap: 8px;
  color: var(--navy);
  font-weight: 800;
}

.search-box input {
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  color: var(--ink);
  background: var(--paper);
  outline: none;
}

.search-box input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(11, 78, 162, 0.1);
}

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

.filter-tabs button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  color: var(--navy);
  background: var(--white);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

.filter-tabs button.active {
  color: var(--white);
  border-color: var(--green);
  background: var(--green);
}

.catalog {
  padding: clamp(44px, 6vw, 72px) clamp(18px, 5vw, 72px);
}

.catalog-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.catalog-heading h2 {
  max-width: 680px;
  color: var(--navy);
  font-size: clamp(1.8rem, 4vw, 3rem);
}

#resultCount {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 12px 32px rgba(7, 26, 57, 0.06);
}

.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--mint);
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.product-meta span {
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--paper);
}

.product-body h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
  line-height: 1.28;
}

.product-desc {
  margin: 0;
  min-height: 4.6em;
  color: var(--muted);
  font-size: 0.88rem;
}

.price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.price {
  color: var(--red);
  font-size: 1.08rem;
  font-weight: 800;
}

.source-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  border-radius: var(--radius);
  color: var(--navy);
  background: var(--mint);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 0 10px;
}

.product-actions {
  display: grid;
  gap: 8px;
}

.secondary-link {
  color: var(--green);
  background: var(--white);
  border: 1px solid rgba(8, 122, 59, 0.24);
}

.source-link:hover {
  color: var(--white);
  background: var(--green);
}

.contact-band {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 28px;
  align-items: center;
  padding: clamp(36px, 5vw, 60px) clamp(18px, 5vw, 72px);
  background: var(--white);
  border-top: 1px solid var(--line);
}

.contact-band h2 {
  color: var(--navy);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.contact-band {
  color: var(--white);
  background: var(--navy);
}

.contact-band h2 {
  color: var(--white);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-self: end;
}

.dark {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(18px, 5vw, 72px);
  color: var(--muted);
  background: var(--white);
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 700;
}

.empty {
  grid-column: 1 / -1;
  padding: 36px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--white);
  text-align: center;
  font-weight: 800;
}

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

@media (max-width: 860px) {
  .site-header,
  .nav {
    gap: 14px;
  }

  .nav {
    display: none;
  }

  .hero,
  .toolbar,
  .contact-band {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-heading {
    display: grid;
  }

  .contact-actions {
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding-inline: 14px;
  }

  .header-actions {
    gap: 8px;
  }

  .lang-switch {
    padding: 3px;
  }

  .lang-switch button {
    min-width: 32px;
    min-height: 32px;
  }

  .brand {
    min-width: 0;
  }

  .brand span {
    display: none;
  }

  .site-header .button {
    min-height: 40px;
    padding-inline: 12px;
    font-size: 0.84rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }
}
