/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-dark: #1B5E20;
  --green: #2E7D32;
  --green-mid: #388E3C;
  --green-light: #4CAF50;
  --green-pale: #81C784;
  --green-bg: #F1F8F1;
  --blue: #1565C0;
  --white: #ffffff;
  --gray-50: #F8FAF8;
  --gray-100: #F0F4F0;
  --gray-200: #E0E8E0;
  --gray-500: #6B7B6B;
  --gray-700: #374137;
  --text: #1A2E1A;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 20px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.12);
  --transition: .25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Roboto', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 80px 0; }
.bg-light { background: var(--gray-50); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--green-light);
  color: var(--white);
  border-color: var(--green-light);
}
.btn-primary:hover { background: var(--green-mid); border-color: var(--green-mid); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(76,175,80,.35); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.7);
}
.btn-outline:hover { background: var(--white); color: var(--green); }
.btn-ghost {
  background: transparent;
  color: var(--green);
  border-color: var(--green-light);
}
.btn-ghost:hover { background: var(--green-bg); }
.btn-sm { padding: 10px 20px; font-size: .85rem; }
.btn-full { width: 100%; }

/* ===== HEADER ===== */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow var(--transition);
}
#header.scrolled { box-shadow: var(--shadow); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
  color: var(--green);
}
.logo-icon { font-size: 1.6rem; }
.logo-text strong { color: var(--green); }

#nav ul {
  display: flex;
  align-items: center;
  gap: 8px;
}
#nav a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--gray-700);
  transition: var(--transition);
}
#nav a:hover { color: var(--green); background: var(--green-bg); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
  display: block;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 70px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(27,94,32,.88) 0%, rgba(46,125,50,.82) 50%, rgba(56,142,60,.75) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--white);
  text-align: center;
  padding: 60px 20px;
}

.badge {
  display: inline-block;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.4);
  color: var(--white);
  padding: 6px 18px;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: .5px;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero-content h1 span { color: var(--green-pale); }

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  opacity: .9;
  max-width: 600px;
  margin: 0 auto 30px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}
.hero-chips span {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 500;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
}
.hero-wave svg { display: block; width: 100%; }

/* ===== TRUST STRIP ===== */
.trust-strip { padding: 40px 0; background: var(--white); }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--green-bg);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}
.trust-icon { font-size: 2rem; }
.trust-item strong { display: block; font-size: 1.15rem; font-weight: 700; color: var(--green); }
.trust-item span { font-size: .85rem; color: var(--gray-500); }

/* ===== SECTION HEADER ===== */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-header.light { color: var(--white); }
.section-tag {
  display: inline-block;
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-pale);
  padding: 5px 16px;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .5px;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.section-header.light .section-tag {
  background: rgba(255,255,255,.15);
  color: var(--white);
  border-color: rgba(255,255,255,.3);
}
.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--green-dark);
}
.section-header.light h2 { color: var(--white); }
.section-header p { font-size: 1rem; color: var(--gray-500); max-width: 500px; margin: 0 auto; }
.section-header.light p { color: rgba(255,255,255,.8); }

/* ===== FEATURES ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: var(--transition);
  box-shadow: var(--shadow);
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--green-pale); }
.feature-icon { font-size: 2.5rem; margin-bottom: 16px; }
.feature-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--green-dark); margin-bottom: 10px; }
.feature-card p { font-size: .9rem; color: var(--gray-500); line-height: 1.7; }

/* ===== PRODUCTS ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.product-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  transition: var(--transition);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.product-badge {
  position: absolute;
  top: 16px; left: 16px;
  background: var(--green-light);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: .75rem;
  font-weight: 700;
  z-index: 1;
}
.badge-blue { background: var(--blue) !important; }

.product-img {
  height: 220px;
  overflow: hidden;
  background: var(--gray-100);
  position: relative;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .4s ease;
  display: block;
}
.product-card:hover .product-img img { transform: scale(1.04); }

/* ── Mũi tên duyệt ảnh ── */
.img-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(0,0,0,.32);
  border: none;
  color: #fff;
  width: 30px;
  height: 46px;
  border-radius: 5px;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s, background .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  user-select: none;
}
.img-arrow-left  { left: 6px; }
.img-arrow-right { right: 6px; }
.product-img:hover .img-arrow,
.product-card:hover .img-arrow { opacity: 1; }
.img-arrow:hover { background: rgba(0,0,0,.58); }
@media (pointer: coarse) {
  /* Trên mobile luôn hiện mờ mờ */
  .img-arrow { opacity: .45; }
}

.product-thumbs {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.product-thumbs img {
  width: 52px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition), opacity var(--transition);
  opacity: .7;
}
.product-thumbs img:hover,
.product-thumbs img.active { border-color: var(--green-light); opacity: 1; }

.product-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 14px;
}
.product-body h3 { font-size: 1.05rem; font-weight: 700; color: var(--green-dark); }
.product-desc { font-size: .85rem; color: var(--gray-500); }

.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.spec {
  background: var(--green-bg);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.spec-label { font-size: .72rem; color: var(--gray-500); }
.spec-val { font-size: .88rem; font-weight: 700; color: var(--green-dark); }

.product-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: auto;
}
.price-old { font-size: .85rem; color: var(--gray-500); text-decoration: line-through; }
.price-new { font-size: 1.3rem; font-weight: 800; color: var(--green); }

.product-actions { display: flex; flex-direction: column; gap: 8px; }

/* ===== VIDEOS ===== */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.video-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.video-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.video-thumb {
  height: 220px;
  background: var(--gray-700);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.video-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
  display: block;
}
.video-card:hover .video-thumb img { transform: scale(1.05); }
.video-play {
  position: relative;
  z-index: 1;
  width: 68px; height: 68px;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--green);
  transition: var(--transition);
  padding-left: 6px;
  flex-shrink: 0;
}
.video-card:hover .video-play { transform: scale(1.1); background: var(--white); }
.video-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 1;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  color: var(--white);
  padding: 24px 16px 16px;
  font-size: .9rem;
  font-weight: 600;
}

/* ===== FAQ ===== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}
.faq-q:hover { color: var(--green); background: var(--green-bg); }
.faq-q[aria-expanded="true"] { color: var(--green); background: var(--green-bg); }
.faq-arrow {
  font-size: 1.4rem;
  transition: transform var(--transition);
  color: var(--green-pale);
  flex-shrink: 0;
}
.faq-q[aria-expanded="true"] .faq-arrow { transform: rotate(90deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
}
.faq-a.open { max-height: 300px; }
.faq-a p {
  padding: 0 24px 20px;
  font-size: .95rem;
  color: var(--gray-500);
  line-height: 1.7;
}

/* ===== CONTACT ===== */
.contact {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 24px;
}
.contact-card {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-lg);
  padding: 32px;
  color: var(--white);
}
.contact-icon { font-size: 2rem; margin-bottom: 16px; }
.contact-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.contact-card p { font-size: .9rem; opacity: .85; margin-bottom: 20px; line-height: 1.6; }
.contact-map {
  width: 100%;
  height: 180px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}
.contact-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: grayscale(20%);
}
.contact-info { display: flex; flex-direction: column; gap: 10px; }
.contact-info a, .contact-info span {
  font-size: .9rem;
  color: rgba(255,255,255,.9);
  display: flex;
  align-items: center;
  gap: 6px;
}
.contact-info a:hover { color: var(--green-pale); }

.contact-form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.contact-form-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--green-dark); margin-bottom: 24px; }
.form-group { margin-bottom: 14px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  font-family: inherit;
  font-size: .9rem;
  color: var(--text);
  transition: border-color var(--transition);
  background: var(--white);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--green-light); }
.form-group textarea { resize: none; }
.form-success {
  text-align: center;
  padding: 20px;
  color: var(--green);
  font-weight: 600;
  font-size: .95rem;
}

/* ===== FOOTER ===== */
.footer { background: var(--green-dark); color: rgba(255,255,255,.85); padding: 60px 0 0; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-brand .logo { color: var(--white); margin-bottom: 12px; }
.footer-brand p { font-size: .875rem; opacity: .7; line-height: 1.7; }
.footer-links h4, .footer-contact h4 { font-size: .95rem; font-weight: 700; color: var(--white); margin-bottom: 16px; }
.footer-links ul { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: .875rem; opacity: .7; transition: opacity var(--transition); }
.footer-links a:hover { opacity: 1; color: var(--green-pale); }
.footer-phone { display: block; font-size: 1.3rem; font-weight: 800; color: var(--green-pale); margin-bottom: 10px; }
.footer-contact p { font-size: .875rem; opacity: .7; margin-bottom: 6px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 0;
  text-align: center;
}
.footer-bottom p { font-size: .8rem; opacity: .5; }

/* ===== MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal.open { display: flex; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.75); }
.modal-content {
  position: relative;
  z-index: 1;
  background: var(--text);
  border-radius: var(--radius);
  width: min(700px, 95vw);
  overflow: hidden;
}
.modal-close {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(255,255,255,.15);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 36px; height: 36px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background var(--transition);
}
.modal-close:hover { background: rgba(255,255,255,.3); }
#modalVideo iframe { width: 100%; height: 380px; display: block; border: none; }

/* ===== ANIMATIONS ===== */
.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.animate-in.visible { opacity: 1; transform: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .videos-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .section { padding: 60px 0; }

  #nav {
    position: fixed;
    top: 70px; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 20px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
    box-shadow: var(--shadow);
  }
  #nav.open { transform: none; opacity: 1; pointer-events: auto; }
  #nav ul { flex-direction: column; align-items: stretch; }
  #nav a { display: block; text-align: center; }

  .hamburger { display: flex; }

  .features-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr; }
  .videos-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-ctas { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .trust-grid { grid-template-columns: 1fr; }
  .hero-chips { flex-direction: column; align-items: center; }
  .videos-grid { grid-template-columns: 1fr; }
}

/* ── Slide animation khi chuyển ảnh ── */
@keyframes slideInRight {
  from { transform: translateX(52px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes slideInLeft {
  from { transform: translateX(-52px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}
.img-slide-next { animation: slideInRight .32s ease; }
.img-slide-prev { animation: slideInLeft  .32s ease; }

/* ── Lightbox arrows ── */
.lb-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  width: 44px;
  height: 64px;
  border-radius: 8px;
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  user-select: none;
  padding: 0;
}
.lb-arrow:hover { background: rgba(255,255,255,.28); }
.lb-arrow-left  { left: 12px; }
.lb-arrow-right { right: 12px; }
.lb-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  color: rgba(255,255,255,.7);
  font-size: .85rem;
  font-family: system-ui, sans-serif;
  pointer-events: none;
}
@media (max-width: 600px) {
  .lb-arrow { width: 36px; height: 52px; font-size: 1.5rem; }
  .lb-arrow-left  { left: 4px; }
  .lb-arrow-right { right: 4px; }
}
