/* ── CTG Mobile Menu v3.3 ─────────────────────────────────────── */

/* Overlay — visibility/pointer-events so opacity transition fires correctly */
.ctg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}
.ctg-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Drawer */
.ctg-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 82vw;
  max-width: 320px;
  background: #F7F0E6;
  z-index: 10000;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  /* FIX: overflow-x only — overflow-y:hidden was clipping the
     scrollbar track on the list on Android browsers.           */
  overflow-x: hidden;
}
.ctg-drawer.is-open {
  transform: translateX(0);
}

/* Drawer header */
.ctg-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #4A2C24;
  padding: 16px 18px;
  flex-shrink: 0;
}
.ctg-drawer__logo {
  color: #F7F0E6;
  font-size: 17px;
  font-weight: 700;
}
.ctg-drawer__close {
  background: none;
  border: none;
  color: #F7F0E6;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 4px;
  transition: background 0.15s;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ctg-drawer__close:hover {
  background: rgba(247, 240, 230, 0.18);
}
/* FIX: focus-visible should SHOW focus, not hide it */
.ctg-drawer__close:focus-visible {
  outline: 2px solid #F7F0E6;
  outline-offset: 2px;
  background: rgba(247, 240, 230, 0.18);
}

/* Nav list — -webkit-overflow-scrolling for smooth scroll on older iOS */
.ctg-drawer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}
.ctg-drawer__list li {
  border-bottom: 1px solid #E2D8CC;
}
/* FIX: removed dead 'display: block' — only display:flex needed here */
.ctg-drawer__list a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: #4A2C24;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  min-height: 44px;
}
.ctg-drawer__list a:active,
.ctg-drawer__list a:hover {
  background: #EDE0CB;
}
.ctg-drawer__list a:focus-visible {
  outline: 2px solid #4A2C24;
  outline-offset: -2px;
}

/* Hide header search + account + wishlist + currency on mobile */
@media (max-width: 768px) {
  .header-search,
  .header-action--account,
  .header-action--wishlist,
  .currency-switcher {
    display: none !important;
  }
}

/* Currency switcher — first list item at the top of the drawer.
   FIX: selector is li.ctg-drawer__list-currency (specificity 0,2,1)
   which beats .ctg-drawer__list li (0,1,1) — ensuring the brown
   2px border actually applies instead of the generic grey 1px one. */
li.ctg-drawer__list-currency {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 2px solid #4A2C24;
  background: #EDE0CB;
}

.ctg-drawer__currency-label {
  font-size: 11px;
  font-weight: 700;
  color: #4A2C24;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.ctg-drawer__list-currency .ctg-currency {
  display: flex;
  align-items: center;
  gap: 2px;
}

.ctg-drawer__list-currency .ctg-currency__btn {
  background: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: #6B4A3A;
  padding: 5px 10px;
  border-radius: 20px;
  /* FIX: transition only the 3 properties that change — not 'all'
     which would animate expensive layout properties on every tap   */
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  line-height: 1;
}

.ctg-drawer__list-currency .ctg-currency__btn:hover {
  color: #4A2C24;
  background: rgba(74, 44, 36, 0.08);
}

.ctg-drawer__list-currency .ctg-currency__btn.is-active {
  color: #F7F0E6;
  background: #4A2C24;
  border-color: #4A2C24;
  font-weight: 700;
}

.ctg-drawer__list-currency .ctg-currency__sep {
  color: #C8B8A8;
  font-size: 12px;
  user-select: none;
  padding: 0 2px;
}

/* Never render drawer or overlay on desktop */
@media (min-width: 768.001px) {
  .ctg-drawer,
  .ctg-overlay {
    display: none !important;
  }
}
