
:root{
  --bg:#ffffff;
  --text:#0f172a;
  --muted:#6b7280;
  --primary:#0b62ff;
  --border:#e5e7eb;
  --shadow:0 10px 25px rgba(0,0,0,.06);
}

*{box-sizing:border-box}
html:focus-within{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Helvetica Neue", sans-serif;
  color:var(--text);
  background:var(--bg);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
img{max-width:100%;height:auto;display:block;border-radius:16px}

.container{width:min(1120px, 92%);margin-inline:auto}

.site-header{position:sticky;top:0;background:#fff;border-bottom:1px solid var(--border);z-index:50}
.nav-wrap{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--text);font-weight:700;font-size:1.1rem}
.brand img{border-radius:8px}
.site-nav ul{display:flex;gap:22px;list-style:none;margin:0;padding:0}
.site-nav a{color:var(--text);text-decoration:none;font-weight:600}
.site-nav a:hover{color:var(--primary)}

.nav-toggle{display:none;background:none;border:1px solid var(--border);padding:8px 10px;border-radius:10px;font-size:20px}

.hero{padding:56px 0 24px}
.hero-inner{display:grid;grid-template-columns:1.1fr .9fr;gap:32px;align-items:center}
.hero-copy h1{font-size: clamp(2rem, 4.2vw, 3rem); line-height:1.1;margin:0 0 12px}
.hero-copy p{color:var(--muted);margin:0 0 18px}
.cta-row{display:flex;gap:12px;flex-wrap:wrap}
.btn{background:var(--primary);color:#fff;border:none;border-radius:12px;padding:12px 18px;text-decoration:none;display:inline-block;box-shadow:var(--shadow);font-weight:700}
.btn:hover{filter:brightness(.95)}
.btn-outline{background:#fff;color:var(--primary);border:1px solid var(--primary);box-shadow:none}

.trust{padding:48px 0;border-top:1px solid var(--border)}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}
.grid-3 article{padding:18px;border:1px solid var(--border);border-radius:16px;background:#fff;box-shadow:var(--shadow)}

.feature-split{padding:48px 0;border-top:1px solid var(--border)}
.split{display:grid;grid-template-columns:1fr 1fr;gap:28px;align-items:center}

.page-header{padding:28px 0 8px}
.page-header h1{margin:0 0 8px}

.check-list{padding-left:0;list-style:none}
.check-list li{padding-left:26px;position:relative;margin:10px 0}
.check-list li:before{content:"✓";position:absolute;left:0;top:0;color:var(--primary);font-weight:800}

.spec-table{width:100%;border-collapse:collapse}
.spec-table th, .spec-table td{border:1px solid var(--border);padding:10px;text-align:left}
.table-wrap{overflow:auto;border:1px solid var(--border);border-radius:12px}

.product-hero{margin:12px 0 28px}

.contact-grid{display:grid;grid-template-columns:1fr .8fr;gap:22px;margin:12px 0 48px}
.card{padding:18px;border:1px solid var(--border);border-radius:16px;background:#fff;box-shadow:var(--shadow)}
.field{display:flex;flex-direction:column;margin-bottom:12px}
label{font-weight:600;margin-bottom:6px}
input, textarea{padding:12px;border:1px solid var(--border);border-radius:10px;font:inherit}
input:focus, textarea:focus{outline:2px solid var(--primary);border-color:transparent}
.error{color:#b91c1c;font-size:.9rem;min-height:1.2em}
.form-note{color:var(--muted);font-size:.9rem;
}

/* Khóa resize, chỉ cuộn khi nội dung vượt khung */
#message {
  resize: none;           /* tắt kéo giãn */
  overflow-y: auto;       /* có cuộn dọc khi dài */
  overflow-x: hidden;     /* không cuộn ngang */
  box-sizing: border-box; /* kích thước ổn định */
}

/* Tuỳ chọn: đặt chiều cao cố định (thay rows nếu muốn) */
#message {
  min-height: 140px;      /* hoặc giá trị bạn muốn */
  max-height: 320px;      /* giữ hợp lý trên màn hình nhỏ */
  line-height: 1.4;
}

.site-footer{margin-top:48px;border-top:1px solid var(--border);background:#fff}
.footer-grid{display:grid;grid-template-columns:2fr 1fr 1.2fr;gap:22px;padding:24px 0}
.footer-grid h5{margin:0 0 10px}
.footer-grid ul{list-style:none;padding:0;margin:0}
.footer-grid a{text-decoration:none;color:var(--text)}
.footer-bottom{display:flex;justify-content:center;padding:14px 0;border-top:1px solid var(--border);color:var(--muted)}

.back-to-top{position:fixed;right:16px;bottom:16px;display:none;border:1px solid var(--border);background:#fff;padding:10px 12px;border-radius:10px;box-shadow:var(--shadow)}

@media (max-width: 1024px){
  .hero-inner{grid-template-columns:1fr}
  .split{grid-template-columns:1fr}
  .grid-3{grid-template-columns:1fr 1fr}
  .contact-grid{grid-template-columns:1fr}
}

@media (max-width: 720px){
  .site-nav{position:absolute;left:0;right:0;top:64px;background:#fff;border-top:1px solid var(--border);display:none}
  .site-nav.open{display:block}
  .site-nav ul{flex-direction:column;padding:10px}
  .nav-toggle{display:block}
  .grid-3{grid-template-columns:1fr}
}

.visually-hidden{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}


/* Smooth transitions */
a, .btn, .card, .site-nav a, input, textarea, .grid-3 article { transition: all .25s ease; }
:focus-visible{ outline: 3px solid var(--primary); outline-offset: 2px; }

/* Reveal on scroll */
.reveal{opacity:0; transform: translateY(14px);}
.reveal.is-visible{opacity:1; transform:none; transition: opacity .6s ease, transform .6s ease;}


/* Minimal Preloader */
#preloader {
  position:fixed; inset:0; background:#ffffff;
  display:flex; align-items:center; justify-content:center;
  z-index:9999
}
#preloader .loader-minimal {
  display:flex; align-items:center; justify-content:center;
  width:120px; height:120px
}
/* Spinner (default) */
#preloader[data-style="spinner"] .ring {
  width:64px; height:64px; border-radius:50%;
  border:4px solid rgba(11,98,255,.15);
  border-top-color:#0b62ff;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* Bounce (tuỳ chọn) */
#preloader[data-style="bounce"] .ring {
  width:18px; height:18px; border-radius:50%; background:#0b62ff;
  box-shadow: 32px 0 0 #9ec1ff, -32px 0 0 #133a7a;
  animation: bounce 0.6s ease-in-out infinite alternate;
}
@keyframes bounce { to { transform: translateY(-12px) } }
/* Motion safety */
@media (prefers-reduced-motion: reduce){
  *{animation:none !important; transition:none !important}
  #preloader{display:none}
}


@keyframes wave-h{ from{ transform:translateX(0)} to{ transform:translateX(-120px)} }
@keyframes ship-bob{ 0%,100%{ transform:translateY(0) rotate(0deg)} 50%{ transform:translateY(-5px) rotate(-.3deg)} }
@keyframes ship-sail{ 0%{ left:-40% } 100%{ left:110% } }
@keyframes smoke{ 0%{ transform: translateY(0) scale(1); opacity:.9 } 100%{ transform: translateY(-22px) scale(1.4); opacity:0 } }

/* Motion safety */
@media (prefers-reduced-motion: reduce){
  *{animation:none !important; transition:none !important}
  #preloader{display:none}
}

/* Icon badges */
.icon-row{display:flex; gap:16px; align-items:center; flex-wrap:wrap}
.icon-badge{display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--border); border-radius:12px; background:#fff; box-shadow:var(--shadow)}
.icon-badge img{width:24px; height:24px; border-radius:6px}


/* Product gallery */
.product-gallery{padding:12px 0 28px; border-top:1px solid var(--border)}
.product-gallery h2{margin:0 0 12px}
.gallery-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:14px}
.gallery-item{display:block; border:1px solid var(--border); border-radius:12px; overflow:hidden; background:#fff; box-shadow:var(--shadow)}
.gallery-item:hover{transform:translateY(-2px)}

@media (max-width: 1024px){ .gallery-grid{grid-template-columns:repeat(3,1fr)} }
@media (max-width: 720px){ .gallery-grid{grid-template-columns:repeat(2,1fr)} }

/* Lightbox */
.lightbox{position:fixed; inset:0; display:none; align-items:center; justify-content:center; z-index:10000}
.lightbox.open{display:flex}
.lb-backdrop{position:absolute; inset:0; background:rgba(15,23,42,.68); backdrop-filter:saturate(120%) blur(6px)}
.lb-figure{position:relative; z-index:1; max-width:min(92vw, 1100px); max-height:86vh; display:flex; flex-direction:column; gap:10px; align-items:center}
#lb-image{max-width:100%; max-height:78vh; border-radius:12px; box-shadow:var(--shadow); background:#fff}
.lb-close, .lb-prev, .lb-next{
  position:absolute; z-index:2; background:#ffffff; border:1px solid var(--border); border-radius:10px; padding:8px 12px; font-size:26px; line-height:1; box-shadow:var(--shadow)
}
.lb-close{top:20px; right:20px}
.lb-prev{left:20px; top:50%; transform:translateY(-50%)}
.lb-next{right:20px; top:50%; transform:translateY(-50%)}
.lb-close:hover, .lb-prev:hover, .lb-next:hover{filter:brightness(.96)}


/* Modern accents */
:root{
  --radius-2xl: 20px;
  --glass: rgba(255,255,255,.72);
  --glass-border: rgba(17,25,40,.08);
}
.card{backdrop-filter:saturate(150%) blur(4px); background:var(--glass); border-color:var(--glass-border)}
.grid-3 article {
  padding:18px;
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
  box-shadow:var(--shadow);
  transition: all .35s ease;
  cursor: default; /* giữ nguyên mũi tên chuột */
  position: relative;
  overflow: hidden;
}

/* hiệu ứng hover */
.grid-3 article::before {
  content:"";
  position:absolute;
  inset:0;
  border-radius:16px;
  padding:2px;
  background:linear-gradient(135deg, #0b62ff, #69a0ff);
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity:0;
  transition:opacity .35s ease;
}

.grid-3 article:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 14px 28px rgba(0,0,0,.12);
}

.grid-3 article:hover::before {
  opacity:1;
}

.btn{border-radius: var(--radius-2xl)}
img{border-radius: var(--radius-2xl)}
.section{padding: 48px 0}
.divider{height:1px; background:linear-gradient(90deg, transparent, var(--border), transparent)}
.badge{display:inline-block; padding:6px 10px; border:1px solid var(--border); border-radius:999px; font-size:.85rem; background:#fff}
.stat{display:flex; gap:10px; align-items:baseline}
.stat strong{font-size:1.6rem}

/* Partners strip */
.partners{display:grid; grid-template-columns:repeat(6,1fr); gap:16px; align-items:center}
.partners img{width:100%; height:auto; background:#fff; border:1px solid var(--border); padding:14px; border-radius:14px}
@media (max-width: 1024px){ .partners{grid-template-columns:repeat(3,1fr)} }
@media (max-width: 720px){ .partners{grid-template-columns:repeat(2,1fr)} }

/* Simple masonry-like gallery (responsive) */
.gallery-wide{columns:4 280px; column-gap:14px}
.gallery-wide a{display:inline-block; width:100%; margin:0 0 14px; break-inside:avoid; border:1px solid var(--border); border-radius:14px; overflow:hidden; background:#fff; box-shadow:var(--shadow)}
.gallery-wide a:hover{transform:translateY(-2px)}

/* Timeline */
.timeline{position:relative; padding-left:26px}
.timeline:before{content:""; position:absolute; left:8px; top:0; bottom:0; width:2px; background:var(--border)}
.timeline .t-item{position:relative; margin:14px 0; padding-left:10px}
.timeline .t-item:before{content:""; position:absolute; left:-2px; top:4px; width:10px; height:10px; background:var(--primary); border-radius:50%}
.timeline img{margin-top:8px}

/* Quick Email Form */
.quick-form {
  max-width: 520px;
  margin: auto;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.quick-form input,
.quick-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  font: inherit;
  background: #fff;
  transition: border-color .25s, box-shadow .25s;
}

.quick-form input:focus,
.quick-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11,98,255,.15);
  outline: none;
}

.btn-gradient {
  background: linear-gradient(135deg, #0b62ff, #69a0ff);
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-2xl);
  padding: 14px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.btn-gradient:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(11,98,255,.25);
}

.error {
  font-size: .85rem;
  color: #dc2626;
  margin-top: 4px;
}
.quick-form textarea {
  resize: none; /* chặn kéo giãn, chỉ hiện thanh cuộn khi cần */
}


/* ===================== Email Section ===================== */

/* Nền hình + overlay xanh */
.email-section {
  position: relative;
  isolation: isolate;                 /* giữ lớp overlay dưới nội dung */
  padding: 64px 0;
}

.email-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11, 98, 255, 0.1); /* lớp xanh mờ */
  z-index: -1;
}

/* Form nổi trên nền */
.quick-form {
  background: rgba(255,255,255,0.9);   /* hơi trong suốt để thấy nền */
  backdrop-filter: saturate(140%) blur(6px);
  border: 1px solid rgba(17,25,40,0.1);
  border-radius: 20px;
  padding: 28px;
}

/* Textarea: không cho kéo giãn, chỉ hiện thanh cuộn */
.quick-form textarea {
  resize: none;
}

.footer-logo {
  height: 100px;         /* chỉnh chiều cao logo */
  margin-bottom: -20px;  /* khoảng cách với chữ */
  display: block;
}


/* ==== Footer responsive tweaks ==== */
.site-footer{
  margin-top:48px;
  border-top:1px solid var(--border);
  background:#fff;
}

/* layout desktop */
.footer-grid{
  display:grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap:22px;
  align-items:flex-start;
}

/* logo ảnh trong footer */
.footer-logo{
  max-width: 160px;    /* tự co theo màn hình */
  width: 100%;
  height: auto;        /* giữ tỉ lệ */
  display:block;
  margin-bottom:12px;
}

/* văn bản trong footer */
.site-footer h4,
.site-footer h5{ margin:0 0 10px }
.site-footer p{ margin:6px 0 }
.site-footer a{ color:var(--text); text-decoration:none }
.site-footer a:hover{ color:var(--primary) }

/* tránh tràn dòng dài (địa chỉ, email, tel) */
.footer-grid p,
.footer-grid a{
  word-break: break-word;
}

/* dòng bản quyền */
.footer-bottom{
  display:flex;
  justify-content:center;
  padding:14px 0;
  border-top:1px solid var(--border);
  color:var(--muted);
}

/* ===== Tablet (<= 992px): footer all center, stack dọc ===== */
@media (max-width: 992px){
  .footer-grid{
    display: block;
    text-align: center;
  }
  .footer-grid > div{
    margin-bottom: 20px;
  }
  .footer-logo{
    max-width: 140px;
    margin: 0 auto 12px;
    display: block;
  }
  .footer-grid ul{
    padding: 0;
    list-style: none;
  }
  .footer-grid li{
    margin: 6px 0;
  }
}



/* ====== Mobile (<= 480px) ====== */
@media (max-width: 480px){
  .footer-grid{
    display: block;          /* xếp dọc */
    text-align: center;      /* canh giữa nội dung */
  }
  .footer-grid > div + div{
    margin-top: 20px;        /* khoảng cách giữa các khối */
  }
  .footer-logo{
    max-width: 120px;
    margin: 0 auto 10px;     /* logo canh giữa */
    display: block;
  }
  .footer-grid ul{
    padding: 0;
    list-style: none;
  }
  .footer-grid li{
    display: inline-block;   /* link nằm cạnh nhau */
    margin: 0 8px;
  }
  .footer-bottom{
    text-align: center;
  }
}

/* Checklist style */
.check-list {
  list-style: none;
  padding: 0;
  margin: 18px 0;
}
.check-list li {
  margin-bottom: 10px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* See more button */
.btn-see-more {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #0b62ff, #69a0ff);
  color: #fff;
  font-weight: 600;
  border-radius: 30px;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-see-more:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(11, 98, 255, 0.3);
}

/* Gallery images clickable */
.gallery-wide img {
  cursor: pointer;
  transition: transform .3s ease;
}
.gallery-wide img:hover {
  transform: scale(1.05);
}

/* Lightbox overlay */
.lightbox {
  display: none; /* ẩn mặc định */
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(0,0,0,0.85);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox-content {
  max-width: 90%;
  max-height: 80%;
  margin-bottom: 12px;
  border-radius: 8px;
}

.lightbox .close {
  position: absolute;
  top: 20px; right: 30px;
  color: #fff;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
}

#lightbox-caption {
  color: #f1f1f1;
  font-size: .95rem;
  text-align: center;
}
/* Thumbnail: luôn là hình chữ nhật gọn (4:3), crop phần thừa */
.gallery-img{
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;   /* đổi 16/9 nếu bạn thích */
  object-fit: cover;      /* cắt cho vừa khung */
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

/* Nếu dùng .gallery-grid thay vì .gallery-wide, đảm bảo lưới đẹp */
.gallery-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:14px;
}
@media (max-width:1024px){ .gallery-grid{ grid-template-columns: repeat(3, 1fr);} }
@media (max-width:720px){  .gallery-grid{ grid-template-columns: repeat(2, 1fr);} }
/* Lightbox: hiển thị đúng tỉ lệ gốc, không crop */
.lightbox-content{
  max-width: min(92vw, 1200px);
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;   /* giữ tỉ lệ ảnh gốc */
  border-radius: 12px;
  background: #fff;
}

/* ==== Navigation links ==== */
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
}

.site-nav a {
  position: relative;
  display: inline-block;
  padding: 6px 0;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: color .3s ease;
}

/* Hover: đổi màu + underline animate */
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width .3s ease;
}
.site-nav a:hover {
  color: var(--primary);
}
.site-nav a:hover::after {
  width: 100%;
}

/* Active link */
.site-nav a.active {
  color: var(--primary);
  font-weight: 600;
}
.site-nav a.active::after {
  width: 100%;
}

/* Page header split layout */
.page-header.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 40px 0;
}

.page-header.split .header-text h1 {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.page-header.split .header-text p {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Responsive: stack dọc trên mobile */
@media (max-width: 768px) {
  .page-header.split {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .page-header.split .header-image {
    margin-top: 20px;
  }
  .page-header.split .header-image img {
    max-width: 100%;
    height: auto;
  }
}

/* Vision & Mission cards */
.mv-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:22px;
  margin: 14px 0 28px;
}
.mv-card{
  background: rgba(255,255,255,.9);
  border:1px solid var(--border);
  border-radius:16px;
  padding:18px;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.mv-card:hover{
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0,0,0,.1);
  border-color: var(--primary);
}
.mv-icon{
  width:40px;height:40px;
  display:flex;align-items:center;justify-content:center;
  border-radius:12px;
  background: #eef4ff;
  margin-bottom:10px;
}
.mv-card h3{ margin:6px 0 8px; }
.mv-card p{ color:var(--muted); margin:0 0 10px; }
.mv-list{
  margin:0; padding-left:0; list-style:none;
}
.mv-list li{
  position:relative; padding-left:22px; margin:8px 0;
}
.mv-list li::before{
  content:"✓"; position:absolute; left:0; top:0; color:#0b62ff; font-weight:700;
}

/* Responsive */
@media (max-width: 768px){
  .mv-grid{ grid-template-columns: 1fr; }
}

/* Blog grid inside section */
.blog-grid{
  display:grid; gap:16px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width:1024px){ .blog-grid{ grid-template-columns: repeat(2, 1fr);} }
@media (max-width:640px){  .blog-grid{ grid-template-columns: 1fr; } }

.post-card{
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
  box-shadow: var(--shadow);
  padding:14px;
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.post-card:hover{
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0,0,0,.1);
  border-color: var(--primary);
}
.post-card .thumb{ display:block; border-radius:12px; overflow:hidden; border:1px solid var(--border); }
.thumb-img{ width:100%; aspect-ratio: 4/3; object-fit: cover; display:block; }
.post-meta{ color:var(--muted); font-size:.9rem; margin:10px 0 6px; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.badge{ display:inline-block; padding:4px 8px; background:#eef4ff; color:#0b62ff; border-radius:999px; font-size:.8rem; }
.excerpt{ color:var(--muted); font-size:.95rem; }

/* Section giới thiệu */
.intro-overview .container.split{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items:center;
}

.intro-text h2{
  font-size: 2rem;
  margin-bottom: 14px;
}
.intro-text p{
  margin-bottom: 12px;
  color: var(--muted);
  line-height: 1.6;
}

/* Hình chéo nhau */
/* Container giữ 2 ảnh */
.intro-images{
  position: relative;
  width: 100%;
  max-width: 480px;   /* bạn chỉnh tùy ý */
  margin: 0 auto;
}

/* Base style cho ảnh */
.intro-images img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  object-fit: cover;          /* đảm bảo lấp đầy khung */
  aspect-ratio: 4 / 3;        /* giữ tỷ lệ thumbnail chuẩn */
}

/* Ảnh chính */
.intro-images .img-main{
  transform: rotate(-4deg);
}

/* Ảnh overlay */
.intro-images .img-overlay{
  position: absolute;
  top: 14%;        /* dịch xuống 1 chút */
  left: 14%;       /* dịch sang phải 1 chút */
  width: 75%;      /* nhỏ hơn ảnh chính */
  transform: rotate(5deg);
  border: 4px solid #fff;
  z-index: 2;
}


/* Responsive */
@media (max-width: 768px){
  .intro-overview .container.split{
    grid-template-columns: 1fr;
    text-align: center;
  }
  .intro-images{
    margin-top: 20px;
  }
  .intro-images .img-overlay{
    position: absolute;
    top: 15%;
    left: 15%;
  }
}

/* ===== Product hero slider – polished ===== */
.product-hero{ padding: 10px 0 18px; }

/* Khung ảnh lớn */
.ph-view{
  position: relative;
  border:1px solid var(--border);
  border-radius:20px;
  background:
    radial-gradient(80% 60% at 50% 40%, #ffffff 0%, #f8fbff 60%, #f2f6ff 100%);
  box-shadow: 0 10px 30px rgba(11,98,255,.08);
  overflow: hidden;
  aspect-ratio: 16 / 9;                 /* đổi 4/3 nếu cần */
  display:flex; align-items:center; justify-content:center;
}

#ph-main{
  max-width: 100%;
  max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;                   /* không méo ảnh */
  transition: transform .35s ease, opacity .35s ease;
}
#ph-main.is-changing{ opacity:.3; transform: scale(.98); }

/* Nút điều hướng */
.ph-prev, .ph-next{
  position:absolute; top:50%; transform:translateY(-50%);
  border:none; background:#fff;
  border:1px solid var(--border);
  border-radius:14px; width:44px; height:44px;
  font-size:22px; line-height:1; cursor:pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
  display:grid; place-items:center;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.ph-prev{ left:14px; } .ph-next{ right:14px; }
.ph-prev:hover, .ph-next:hover{ transform: translateY(-50%) scale(1.06); box-shadow: 0 12px 26px rgba(0,0,0,.12); }
.ph-prev:active, .ph-next:active{ transform: translateY(-50%) scale(.98); }
.ph-prev:focus-visible, .ph-next:focus-visible{ outline: 3px solid rgba(11,98,255,.35); outline-offset: 2px; }

/* Hàng thumbnail */
.ph-thumbs{
  margin-top:12px; display:flex; gap:12px;
  overflow-x:auto; padding: 6px 2px 8px;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.ph-thumbs::-webkit-scrollbar{ height:8px; }
.ph-thumbs::-webkit-scrollbar-thumb{ background: rgba(11,98,255,.25); border-radius: 999px; }
.ph-thumbs::-webkit-scrollbar-track{ background: rgba(11,98,255,.08); border-radius: 999px; }

.ph-thumb{
  flex:0 0 auto; padding:6px; border:1px solid var(--border);
  border-radius:14px; background:#fff;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
  position: relative;
}
.ph-thumb::after{
  content:""; position:absolute; inset:0; border-radius:12px; pointer-events:none;
  background: linear-gradient(135deg, rgba(11,98,255,.18), rgba(105,160,255,.12));
  opacity:0; transition: opacity .2s ease;
}
.ph-thumb:hover{ transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,.08); }
.ph-thumb:hover::after{ opacity:.25; }

.ph-thumb img{
  display:block; width:110px; height:78px;     /* ô thumb cố định tỉ lệ */
  object-fit: cover; border-radius:10px;
  filter: saturate(.95);
  transition: filter .2s ease, transform .2s ease;
}
.ph-thumb.is-active{ border-color: #0b62ff; box-shadow: 0 12px 22px rgba(11,98,255,.18); }
.ph-thumb.is-active img{ filter: saturate(1.1); transform: scale(1.02); }

/* Trạng thái focus cho accessibility */
.ph-thumb:focus-visible{ outline: 3px solid rgba(11,98,255,.35); outline-offset: 3px; }

/* Responsive */
@media (max-width: 992px){
  .ph-view{ border-radius:18px; }
  .ph-thumb img{ width:100px; height:70px; }
}
@media (max-width: 768px){
  .ph-view{ aspect-ratio: 4 / 3; }
  .ph-thumb img{ width:90px; height:64px; }
}
@media (max-width: 480px){
  .ph-thumb img{ width:78px; height:56px; }
  .ph-prev, .ph-next{ width:40px; height:40px; font-size:20px; }
}

.product-gallery {
  position: relative;
  margin: 2rem auto;
  max-width: 1200px;
}

.gallery-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.gallery-track {
  display: flex;
  gap: 16px;
  transition: transform 0.4s ease;
  will-change: transform;
}

.gallery-item {
  flex: 0 0 calc(25% - 12px); /* 4 ảnh mỗi lần */
  display: block;
}

.gallery-item img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* Nút mũi tên */
.gallery-prev,
.gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 24px;
  border-radius: 50%;
  z-index: 2;
  transition: background 0.3s;
}

.gallery-prev:hover,
.gallery-next:hover {
  background: rgba(0,0,0,0.8);
}

.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

/* Responsive */
@media (max-width: 1024px) {
  .gallery-item { flex: 0 0 calc(33.333% - 12px); } /* 3 ảnh */
}
@media (max-width: 768px) {
  .gallery-item { flex: 0 0 calc(50% - 12px); } /* 2 ảnh */
}
@media (max-width: 480px) {
  .gallery-item { flex: 0 0 100%; } /* 1 ảnh */
}
.gallery-prev.is-disabled,
.gallery-next.is-disabled,
.gallery-prev:disabled,
.gallery-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
