/* ===== Brand Ratio — header mobile + menu trượt =====
   ≤880px: header lưới 3 cột (nút menu | logo giữa | tìm + giỏ); ẩn nav, icon tài khoản, nút dùng thử.
   Menu trượt là <dialog> từ trái, nhóm danh mục dạng <details>. Hành vi ở nav-drawer.js. */

.brand-burger { display: none; }

@media (max-width: 880px) {
  .brand-inner { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; padding: 0 12px; }
  .brand-nav-links, .brand-account-btn, .brand-actions .brand-cta-btn { display: none; }
  .brand-burger { display: inline-flex; justify-self: start; }
  .brand-inner > .brand-logo { justify-self: center; }
  .brand-actions { justify-self: end; gap: 2px; }
}

html.brand-drawer-open { overflow: hidden; }

.brand-drawer {
  position: fixed; inset: 0 auto 0 0; margin: 0;
  width: min(360px, 88vw); max-width: none; height: 100dvh; max-height: none;
  padding: 0; border: none; background: var(--brand-bg); color: var(--brand-ink);
  box-shadow: 18px 0 48px rgba(22, 22, 27, 0.18);
}
.brand-drawer[open] { display: flex; flex-direction: column; }
.brand-drawer:focus { outline: none; }
.brand-drawer::backdrop { background: rgba(22, 22, 27, 0.45); }

.brand-drawer-head {
  flex: none; height: 72px; padding: 0 12px 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(40, 40, 47, 0.1);
}

.brand-drawer-nav { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px 20px 20px; }
.brand-drawer-link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 0; border-bottom: 1px solid rgba(40, 40, 47, 0.1);
  font-size: 16.5px; font-weight: 600; letter-spacing: -0.01em; color: var(--brand-ink); text-decoration: none;
  cursor: pointer; list-style: none;
}
.brand-drawer-link::-webkit-details-marker { display: none; }
.brand-drawer-link.is-active { font-weight: 750; }
.brand-drawer-chev { width: 12px; height: 12px; flex: none; color: var(--brand-muted); transition: transform var(--brand-dur-fast) var(--brand-ease); }
.brand-drawer-group[open] > summary .brand-drawer-chev { transform: rotate(180deg); }
.brand-drawer-group[open] > summary { border-bottom-color: transparent; }

.brand-drawer-sub { list-style: none; margin: 0; padding: 0 0 12px 14px; border-bottom: 1px solid rgba(40, 40, 47, 0.1); }
.brand-drawer-sub a {
  display: block; padding: 9px 0; font-size: 14.5px; font-weight: 500; color: var(--brand-ink-2); text-decoration: none;
}
.brand-drawer-sub a:hover { color: var(--brand-ink); }
.brand-drawer-sub .brand-drawer-all { font-weight: 650; color: var(--brand-ink); }

.brand-drawer-foot {
  flex: none; padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(40, 40, 47, 0.1);
}
.brand-drawer-account {
  display: flex; align-items: center; gap: 12px;
  font-size: 15px; font-weight: 600; color: var(--brand-ink); text-decoration: none;
}
.brand-drawer-account-ico {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(40, 40, 47, 0.22);
}
.brand-drawer-account-ico svg { width: 19px; height: 19px; display: block; }

@media (prefers-reduced-motion: no-preference) {
  .brand-drawer[open] { transition: transform 300ms var(--brand-ease); }
  @starting-style { .brand-drawer[open] { transform: translateX(-100%); } }
  .brand-drawer[open]::backdrop { transition: opacity 240ms var(--brand-ease); }
  @starting-style { .brand-drawer[open]::backdrop { opacity: 0; } }
}
