/* Ruby Wang RW58 - tinh chỉnh độ ổn định, 20/11/2026.
   Chỉ bổ sung quy tắc, không sửa logo, bố cục thương hiệu hay CSS gốc. */

/* Khi điều hướng không còn đủ chiều ngang (do phóng to Windows, font tải chậm,
   hoặc màn hình Lenovo), dùng danh sách mở được thay vì cắt mất tab. */
@media (min-width: 961px) {
  html body .site-header.rw58-adaptive-menu .nav {
    position:relative!important;
    min-width:0!important;
    gap:10px!important;
  }
  html body .site-header.rw58-adaptive-menu .menu-toggle {
    display:inline-flex!important;
    justify-content:center!important;
    align-items:center!important;
    flex:0 0 46px!important;
    width:46px!important;
    min-width:46px!important;
    min-height:44px!important;
    z-index:1301!important;
  }
  html body .site-header.rw58-adaptive-menu .nav-cta {
    display:none!important;
  }
  html body .site-header.rw58-adaptive-menu #primary-nav,
  html body .site-header.rw58-adaptive-menu #primary-nav:not(.open) {
    display:none!important;
    position:absolute!important;
    z-index:1300!important;
    top:calc(100% + 4px)!important;
    right:0!important;
    left:auto!important;
    width:min(360px,calc(100vw - 24px))!important;
    min-width:0!important;
    max-height:calc(100dvh - 88px)!important;
    padding:10px 16px 16px!important;
    margin:0!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:0!important;
    overflow-y:auto!important;
    background:#571525!important;
    border:1px solid rgba(226,184,119,.38)!important;
    box-shadow:0 12px 28px rgba(30,0,12,.32)!important;
    white-space:normal!important;
  }
  html body .site-header.rw58-adaptive-menu #primary-nav.open {
    display:flex!important;
  }
  html body .site-header.rw58-adaptive-menu #primary-nav a:not(.btn) {
    display:block!important;
    width:100%!important;
    min-height:44px!important;
    padding:12px 7px!important;
    font:500 13px/1.45 'Be Vietnam Pro',Arial,sans-serif!important;
    white-space:normal!important;
    border-bottom:1px solid rgba(240,220,180,.17)!important;
  }
  html body .site-header.rw58-adaptive-menu #primary-nav .nav-cta-mobile {
    display:inline-flex!important;
    align-self:flex-start!important;
    margin-top:12px!important;
    font-weight:700!important;
  }
}

/* Nút thực tế vẫn nhỏ gọn, nhưng vùng chạm đủ cao trên điện thoại. */
@media (max-width: 760px) {
  html body #home .hero-actions > a.btn,
  html body #home .hero-actions > a.btn.btn-outline {
    min-height:44px!important;
    padding:11px 15px!important;
    font-weight:700!important;
  }
  html body .site-header #primary-nav {
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }
}

/* Cuộn đến một mục không bị thanh header che tiêu đề. */
#method,#menu,#hanh-trinh,#cong-thuc,#space,#offers,#dat-ban,#contact {
  scroll-margin-top:clamp(76px,9vh,112px);
}

/* Tránh chuyển động liên tục tiêu tốn CPU trên máy cấu hình vừa và nhỏ;
   không thay đổi màu/kiểu chữ của giao diện thương hiệu. */
@media (prefers-reduced-motion: reduce) {
  html body #space .rw58-space-item img {transition:none!important;}
  html body #space .rw58-space-item:hover img {transform:none!important;}
}
