:root {
  --bg: #0c0c0c;
  --text: #e5e5e5;
  --accent: #fff;
  --muted: #666;
  --glass: rgba(255, 255, 255, 0.03);
  --radius: 15px;
  --glow-color: rgba(255, 255, 255, 0.4);
  --section-gap: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;

  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body.page-loaded {
  opacity: 1;
}

body.page-exit {
  opacity: 0;
}

body.no-scroll {
  overflow: hidden;
}
.container {
  max-width: 1300px;
  margin: auto;
  padding: 0 5% 60px;
}

.back {
  padding: 40px 5% 20px;
}
.back a {
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: 0.3s;
}
.back a:hover {
  color: var(--accent);
}

h1 {
  font-weight: 400;
  font-size: 80px;
  margin: 10px 0 60px;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.section-label {
  display: block;
  font-size: 15px;
  letter-spacing: 3px;
  margin-top: -10px;
  margin-bottom: 50px;
  color: var(--accent);
  text-transform: uppercase;
  opacity: 0.6;
  font-weight: 600;
}

/* --- FIX: CỐ ĐỊNH TỈ LỆ NGANG HÀNG --- */
.top-section {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  align-items: flex-start; /* Ép cả 2 cột bám đỉnh trên cùng */
  margin-bottom: var(--section-gap);
}

/* View 3D bám đỉnh ngang chữ Overview */
.viewer {
  width: 100%;
  margin-top: 30px; /* Khoảng cách để mép trên Iframe bằng đúng mép trên chữ Overview */
  position: relative;
}

.viewer-loading {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.6);
  color: #fff;

  font-size: 12px;
  letter-spacing: 2px;

  z-index: 5;
}

.viewer iframe {
  width: 100%;
  aspect-ratio: 16/10;
  border: none;
  border-radius: var(--radius);
  background: #111;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
  display: block;
  pointer-events: auto;
  touch-action: auto;
}

.viewer iframe:focus {
  outline: none;
}

#description {
  font-size: 15px;
  color: #aaa;
}
.tech-row .value {
  font-size: 16px;
  display: inline-block;
  line-height: 1.2;
  transition: all 0.3s ease;
  cursor: default;
  color: #ffffffab;
  transition:
    transform 0s ease,
    color 0.2s ease;
}
.tech-row .value:hover {
  color: #fff;
  transform: scale(1.01);
}

#techDetails {
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tech-row {
  align-items: center;
  display: grid;
  grid-template-columns: 150px 1fr;
  padding: 8px;
  position: relative;
}

/* label */
.tech-row .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  opacity: 0.35;
  line-height: 1;
  letter-spacing: 1px;
}

/* 🔥 line custom */
.tech-row:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;

  height: 1px;
  background: rgba(255, 255, 255, 0.089);
}

.product-info {
  max-width: 420px;
}
.block {
  margin-top: 28px;
}

.eyebrow {
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.8;
  padding-left: 12px;
  margin-bottom: 14px;
  position: relative;
}

.eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);

  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}

/* 🔥 đoạn text chính */
.lead {
  padding-left: 20px;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  opacity: 0.9;
}

/* Hero Section */
.hero-section {
  margin-bottom: var(--section-gap);
  width: 100%;
  display: flex;
  justify-content: center;
  transform-origin: center;
}
.hero-section .img-wrapper {
  width: 42%;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glass);
  cursor: pointer;
  will-change: transform;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

.hero-section .img-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at 50% 40%,
      rgba(255, 255, 255, 0.08),
      transparent 60%
    ),
    radial-gradient(circle at 50% 120%, rgba(0, 0, 0, 0.5), transparent 70%);

  pointer-events: none;
}

.hero-section .img-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.6);

  pointer-events: none;
}

.hero-section .img-wrapper:hover {
  transform: translateY(-6px);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.7);
}

.hero-section .img-wrapper:hover img {
  transform: scale(1.05);
}

.hero-section img {
  width: 100%;
  display: block;
  transition: transform 0.6s ease;
  will-change: transform;
  animation: heroBreath 5s ease-in-out infinite;
}

/* Thanh ngang phát sáng rõ ràng */
.divider-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: var(--section-gap);
}
.divider {
  height: 1.5px;
  width: 35%;
  margin: 24px 0;
  filter: blur(0.5px);
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
}

/* Gallery */
.gallery-header {
  text-align: center;
  margin-bottom: 30px;
}
.image-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
  margin-top: 110px;
}
.gallery-img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111;
  aspect-ratio: 1/1;
  border: 1px solid var(--glass);
  cursor: pointer;
  will-change: transform;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}
.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
  display: block;
  will-change: transform;
}

.gallery-img-wrap:hover img {
  transform: scale(1.08);
}

.img-label {
  position: absolute;
  bottom: 15px;
  left: 15px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0;
  transform: translateY(10px);
  transition: 0.3s ease;
}

.gallery-img-wrap:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
}

.gallery-img-wrap:hover .img-label {
  opacity: 1;
  transform: translateY(0);
}

/* Thank you rõ ràng */
.thanks-footer {
  text-align: center;
  padding: 70px 0 60px;
  font-size: 11px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.8;
  font-weight: 300;
}

/* Lightbox - Bo góc đồng nhất */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: 0.3s;
}
#lightbox.active {
  opacity: 1;
  pointer-events: auto;
}
#lightbox img {
  max-width: 85%;
  max-height: 85%;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.block.overview {
  margin-bottom: 65px;
}

.block.specs {
  margin-top: 0;
}

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-up.show {
  opacity: 1;
  transform: translateY(0);
}

/* Cho iPad Dọc / Tablet */
@media (max-width: 1194px) {
  #viewerBlock {
    order: -1;
    margin-bottom: -50px;
    margin-top: 25px;
  }
  .tech-row {
    grid-template-columns: 110px 1fr;
  }

  :root {
    --section-gap: 50px;
  }

  .tech-row .label {
    font-size: 10px;
  }

  .eyebrow {
    font-size: 12px;
    padding-left: 12px;
  }
  .lead {
    font-size: 14px;
    margin-bottom: -40px;
  }
  .tech-row .value {
    font-size: 14px;
  }

  h1 {
    font-size: 60px;
    margin: 10px 0 15px;
  }

  .viewer-loading {
    width: 90%;
    aspect-ratio: 1/1;
    border-radius: var(--radius);
    margin: auto;

    display: flex;
    align-items: center;
    justify-content: center;
  }

  .divider {
    width: 55%;
    margin: -0px;
  }

  .viewer {
    margin-top: 5px;
    margin-bottom: 5px;
  }
  .viewer iframe {
    margin: auto;
    width: 120%;
    aspect-ratio: 1/1;
    display: block;
    border-radius: var(--radius);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8);
    outline: none;

    -webkit-tap-highlight-color: transparent;
  }
  .hero-section .img-wrapper {
    width: 50%;
  }
  .image-section {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .top-section {
    display: flex;
    flex-direction: column;
  }

  #viewerBlock {
    order: -1;
    margin-bottom: -50px;
    margin-top: 25px;
  }
  .tech-row {
    grid-template-columns: 110px 1fr;
  }

  :root {
    --section-gap: 50px;
  }

  h1 {
    font-size: 60px;
    margin: 10px 0 15px;
  }

  .viewer-loading {
    width: 90%;
    aspect-ratio: 1/1;
    border-radius: var(--radius);
    margin: auto;

    display: flex;
    align-items: center;
    justify-content: center;
  }

  .divider {
    width: 55%;
    margin: -0px;
  }

  .viewer {
    margin-top: 5px;
    margin-bottom: 5px;
  }
  .viewer iframe {
    margin: auto;
    width: 90%;
    aspect-ratio: 1/1;
    display: block;
    border-radius: var(--radius);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8);
    outline: none;

    -webkit-tap-highlight-color: transparent;
  }
  .hero-section .img-wrapper {
    width: 80%;
  }
  .image-section {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

@media (max-width: 768px) and (orientation: landscape) {
  .top-section {
    display: flex;
    flex-direction: column;
  }

  #viewerBlock {
    order: -1;
    margin-bottom: -50px;
    margin-top: 25px;
  }
  .tech-row {
    grid-template-columns: 110px 1fr;
  }

  :root {
    --section-gap: 50px;
  }

  h1 {
    font-size: 30px;
    margin: 10px 0 1px;
  }

  .viewer-loading {
    width: 50%;
    aspect-ratio: 16/9;
    border-radius: var(--radius);
    margin: auto;

    display: flex;
    align-items: center;
    justify-content: center;
  }

  .divider {
    width: 55%;
    margin: -0px;
  }

  .viewer {
    margin-top: 5px;
    margin-bottom: 5px;
  }
  .viewer iframe {
    margin: auto;
    width: 50%;
    aspect-ratio: 16/9;
    display: block;
    border-radius: var(--radius);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8);
    outline: none;

    -webkit-tap-highlight-color: transparent;
  }

  .tech-row .label {
    font-size: 9px;
  }

  .eyebrow {
    font-size: 12px;
    padding-left: 12px;
  }
  .lead {
    font-size: 14px;
    margin-bottom: -40px;
  }
  .tech-row .value {
    font-size: 13px;
  }

  .hero-section .img-wrapper {
    width: 50%;
  }
  .image-section {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

@keyframes heroBreath {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}
