/* CSS giống bản trước, tối ưu cho root */ 
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --header-h: 64px;
  --accent: #f89f1b;
  --bg: #050608;
  --fg: #f5f5f5;
}

html, body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #000;
  color: var(--fg);
  min-height: 100vh;
  overflow-x: hidden;
}

/* background canvas */
#spiral {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: radial-gradient(circle at center, #111 0, #020203 70%);
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 20%, rgba(255,255,255,0.08), transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(88,28,135,0.7), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(251,191,36,0.7), transparent 60%);
  mix-blend-mode: screen;
}

/* header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 20;
  background: rgba(0,0,0,0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.brand-logo {
  height: 28px;
  display: block;
}

nav ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 10px;
}

nav a {
  color: var(--fg);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 14px;
  white-space: nowrap;
}

nav a:hover {
  background: rgba(255,255,255,0.1);
}

/* language switch */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--fg);
  font-size: 11px;
}

.lang-btn.active {
  border-color: var(--accent);
  background: rgba(248,159,27,0.15);
}

.flag-img {
  width: 18px;
  height: 18px;
  border-radius: 999px;
}

.lang-code {
  min-width: 18px;
}

/* hamburger */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
}

.nav-toggle-box {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
}

.nav-toggle-line {
  width: 60%;
  height: 2px;
  background: #fff;
  border-radius: 999px;
}

/* layout */
main {
  padding-top: var(--header-h);
}

section {
  padding: 32px 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
}

.center-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero img {
  max-width: min(96vw, 700px);
  width: 100%;
  height: auto;
  display: block;
}

/* about */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 28px;
  align-items: center;
}

.about-figure img {
  max-width: 100%;
  border-radius: 18px;
  display: block;
}

h2 {
  font-size: clamp(24px, 3vw, 30px);
  margin-bottom: 12px;
}

p {
  line-height: 1.6;
  font-size: 15px;
}

/* products */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.card {
  background: rgba(0,0,0,0.75);
  border-radius: 16px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(248,159,27,0.6);
  box-shadow: 0 14px 40px rgba(0,0,0,0.8);
}

.card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.card h3 {
  font-size: 15px;
  margin: 8px 0 0;
}

/* contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0,1.1fr) minmax(0,1fr);
  gap: 20px;
}

.contact-box {
  background: rgba(0,0,0,0.78);
  border-radius: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 10px 28px rgba(0,0,0,0.65);
}

.contact-box h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.map-wrapper iframe {
  width: 100%;
  min-height: 220px;
  border: 0;
  border-radius: 12px;
}

.contact-box input,
.contact-box textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.18);
  padding: 8px 10px;
  background: rgba(0,0,0,0.9);
  color: #fff;
  font-size: 14px;
  box-sizing: border-box;
}

.contact-box textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-box button {
  border-radius: 999px;
  border: none;
  padding: 8px 18px;
  background: var(--accent);
  color: #111;
  font-weight: 600;
  cursor: pointer;
}

.contact-box button:hover {
  filter: brightness(1.05);
}

.contact-box .row {
  display: flex;
  gap: 10px;
}

.contact-box .row > div {
  flex: 1;
}

/* footer */
footer {
  padding: 12px 10px 16px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}

/* lightbox */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.78);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
}

.lightbox-backdrop.show {
  display: flex;
}

.lightbox {
  max-width: 90vw;
  max-height: 90vh;
  background: #050608;
  border-radius: 16px;
  padding: 10px 10px 14px;
  position: relative;
  border: 1px solid rgba(255,255,255,0.2);
}

.lightbox img {
  max-width: 80vw;
  max-height: 80vh;
  display: block;
  border-radius: 12px;
}

.lightbox-close {
  position: absolute;
  top: 4px;
  right: 8px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.lightbox-title {
  margin-top: 6px;
  font-size: 14px;
  text-align: center;
}

/* responsive */
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root {
    --header-h: 58px;
  }
  .nav-toggle {
    display: block;
  }
  nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.97);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.18s ease, opacity 0.18s ease;
  }
  nav.open {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }
  nav ul {
    flex-direction: column;
    padding: 8px 16px 10px;
  }
  nav a {
    padding: 6px 6px;
    font-size: 14px;
  }
  .container {
    padding: 0 14px;
  }
  section {
    padding: 24px 0;
  }
  #home {
    padding-top: 8px;
    padding-bottom: 18px;
  }
  .brand-logo {
    height: 22px;
  }
  .lang-switch {
    gap: 2px;
  }
  .lang-btn {
    padding: 0 4px;
    font-size: 10px;
  }
  .flag-img {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 480px) {
  nav a {
    padding: 6px 8px;
    font-size: 13px;
  }
  .brand-logo {
    height: 20px;
  }
  section {
    padding: 22px 0;
  }
  .lang-code {
    display: none;
  }
  .lang-switch {
    gap: 2px;
  }
  .lang-btn {
    padding: 0 2px;
  }
  .flag-img {
    width: 18px;
    height: 18px;
  }
}
