/* Dieu huong mobile gace.store (<=991px). Tao 2026-07-25.
   KHONG sua main.scss / main.js / header.bwt / site-nav.bwt.
   Rollback: xoa 4 dong tham chieu trong layouts/theme.bwt. */

.gcnav,
.gcnav__overlay,
.gcnav__drawer { display: none; }

@media (max-width: 991px) {

/* ---------- 1. An dieu huong cu ---------- */
.header .topbar,
.header-menu,
.header-nav,
.opacity_menu   { display: none !important; }
.header::before { display: none !important; }
.header         { margin-bottom: 0 !important; }

/* ---------- 2. Thanh header sticky ---------- */
/* padding-top giu cho cho .gcnav__bar dang fixed.
   KHONG dung position:sticky o day: sticky chi dinh trong pham vi hop cua cha,
   ma .gcnav chi cao ~120px nen cuon qua do la header roi ra. */
.gcnav { display: block; padding-top: 56px; }

.gcnav__bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  height: 56px;
  padding: 0 4px;
  background: var(--gc-main, #1C5B41);
}

.gcnav__burger,
.gcnav__icon,
.gcnav__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.gcnav__burger { color: var(--gc-accent, #FE9614); }

.gcnav__logo { display: flex; justify-content: center; min-width: 0; }
.gcnav__logo img { height: 34px; width: auto; max-width: 100%; object-fit: contain; }

.gcnav__actions { display: flex; }
.gcnav__icon { position: relative; text-decoration: none; }

.gcnav__badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--gc-accent, #FE9614);
  color: #fff;
  font: 700 11px/18px system-ui, -apple-system, sans-serif;
  text-align: center;
}
.gcnav__badge[hidden] { display: none; }

/* ---------- 3. O tim kiem ---------- */
.gcnav__search { padding: 8px 12px; background: #FFFAF0; }

.gcnav__search form,
.gcnav__drawer-search form { display: flex; }

.gcnav__search input,
.gcnav__drawer-search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #d8d2c4;
  border-right: 0;
  border-radius: 24px 0 0 24px;
  background: #fff;
  color: #231f20;
  font-size: 16px;          /* <16px khien iOS tu zoom khi focus */
  -webkit-appearance: none;
  appearance: none;
}
.gcnav__search input:focus,
.gcnav__drawer-search input:focus {
  outline: 2px solid var(--gc-accent, #FE9614);
  outline-offset: -2px;
}

.gcnav__search button,
.gcnav__drawer-search button {
  flex: 0 0 auto;
  width: 56px;
  height: 48px;
  border: 0;
  border-radius: 0 24px 24px 0;
  background: var(--gc-main, #1C5B41);
  color: #fff;
  cursor: pointer;
}
.gcnav__drawer-search button { background: var(--gc-accent, #FE9614); }

/* ---------- 4. Overlay ---------- */
.gcnav__overlay {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 10000;           /* > #messenger-button (9999) */
  background: rgba(0, 0, 0, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease-out;
}
.gcnav__overlay.is-open { opacity: 1; pointer-events: auto; }

/* ---------- 5. Drawer ---------- */
.gcnav__drawer {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 10001;
  width: min(85vw, 320px);
  background: var(--gc-main, #1C5B41);
  color: #fff;
  visibility: hidden;
  transform: translateX(-100%);
  transition: transform .25s ease-out, visibility .25s ease-out;
  overscroll-behavior: contain;
}
.gcnav__drawer.is-open { visibility: visible; transform: translateX(0); }

.gcnav__drawer-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 4px 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .15);
}
.gcnav__drawer-head img { height: 32px; width: auto; display: block; }

.gcnav__drawer-search { flex: 0 0 auto; padding: 12px; }

/* ---------- 6. Menu ---------- */
.gcnav__nav {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.gcnav__menu,
.gcnav__sub { margin: 0; padding: 0; list-style: none; }

.gcnav__item {
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.gcnav__item > a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 56px 12px 16px;
  color: #fff;
  font-size: 15px;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;      /* thay word-break: break-all cua theme cu */
}
.gcnav__item.is-active > a {
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--gc-accent, #FE9614);
}

.gcnav__toggle {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.gcnav__toggle svg { transition: transform .2s ease-out; }
.gcnav__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.gcnav__sub { display: none; background: rgba(0, 0, 0, .18); }
.gcnav__toggle[aria-expanded="true"] + .gcnav__sub { display: block; }

.gcnav__sub a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 16px 10px 32px;
  color: rgba(255, 255, 255, .92);
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.gcnav__sub li + li a { border-top: 1px solid rgba(255, 255, 255, .08); }
.gcnav__sub li.is-active a { font-weight: 700; color: #fff; }

/* ---------- 7. Chan drawer ---------- */
.gcnav__drawer-foot {
  flex: 0 0 auto;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, .15);
  background: rgba(0, 0, 0, .15);
  font-size: 14px;
}
.gcnav__account {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
}
.gcnav__drawer-foot a { color: #fff; text-decoration: none; }
.gcnav__tel {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  font-weight: 700;
  color: var(--gc-accent, #FE9614) !important;
}

/* ---------- 8. Khoa cuon nen ---------- */
body.gcnav-open { overflow: hidden; }

/* ---------- 9. Giam chuyen dong ---------- */
@media (prefers-reduced-motion: reduce) {
  .gcnav__drawer,
  .gcnav__overlay,
  .gcnav__toggle svg { transition: none; }
}

} /* het @media (max-width: 991px) */