/* ─────────────────────────────
   MOBILE-MENU.CSS — Lo Castro hamburger drawer
   wp-content/themes/twentytwentyfive-child/styles/mobile-menu.css

   Loaded site-wide (see functions.php) since the header appears on
   every page. Reuses the --lc-* tokens from style.css.
   ───────────────────────────── */

.lc-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1000;
  visibility: hidden;
  pointer-events: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.lc-mobile-menu.is-open {
  visibility: visible;
  pointer-events: auto;
}

body.lc-mobile-menu-locked {
  overflow: hidden;
}

.lc-mobile-menu-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.lc-mobile-menu.is-open .lc-mobile-menu-overlay {
  opacity: 1;
}

.lc-mobile-menu-panels {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  max-width: 100%;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
}

.lc-mobile-menu.is-open .lc-mobile-menu-panels {
  transform: translateX(0);
}

/* ── Primary panel ── */
.lc-mobile-menu-primary {
  width: 420px;
  max-width: 88vw;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--lc-bg);
  padding: 18px 22px calc(28px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.lc-mobile-menu-close {
  appearance: none;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  color: var(--lc-text);
  width: 24px;
  height: 24px;
}

.lc-mobile-menu-close svg {
  width: 20px;
  height: 20px;
}

.lc-mobile-menu-divider {
  border-top: 1px solid var(--lc-border-subtle);
  margin: 20px 0;
}

.lc-mobile-menu-cats {
  display: flex;
  flex-direction: column;
}

.lc-mobile-menu-catbtn {
  appearance: none;
  cursor: pointer;
  border: none;
  background: none;
  text-align: left;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  font-family: var(--lc-font-serif);
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--lc-text);
  text-decoration: none;
}

.lc-mobile-menu-catbtn svg {
  width: 15px;
  height: 15px;
  opacity: 0.4;
  flex-shrink: 0;
}

.lc-mobile-menu-wishlist {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  font-family: var(--lc-font-serif);
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--lc-text);
  text-decoration: none;
}

.lc-mobile-menu-wishlist-label {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lc-mobile-menu-wishlist svg {
  width: 17px;
  height: 17px;
}

.lc-mobile-menu-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(74, 47, 27, 0.55);
  color: var(--lc-bg);
  font-size: 11px;
  font-family: var(--lc-font-display);
  letter-spacing: normal;
  text-transform: none;
  flex-shrink: 0;
}

.lc-mobile-menu-secondary {
  display: flex;
  flex-direction: column;
}

.lc-mobile-menu-secondary a {
  color: var(--lc-text);
  text-decoration: none;
  font-family: var(--lc-font-serif);
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 9px 0;
  opacity: 0.9;
}

.lc-mobile-menu-secondary a:hover {
  opacity: 1;
}

.lc-mobile-menu-spacer {
  flex: 1;
  min-height: 24px;
}

.lc-mobile-menu-account-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--lc-font-serif);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lc-mobile-menu-account {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--lc-text);
  text-decoration: none;
}

.lc-mobile-menu-account svg {
  width: 15px;
  height: 15px;
}

.lc-mobile-menu-account-sep {
  opacity: 0.4;
}

.lc-mobile-menu-lang {
  display: flex;
  gap: 10px;
}

.lc-mobile-menu-lang a,
.lc-mobile-menu-lang .is-active {
  color: var(--lc-text);
  text-decoration: none;
  font-family: var(--lc-font-serif);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lc-mobile-menu-lang a {
  opacity: 0.4;
}

.lc-mobile-menu-lang .is-active {
  opacity: 1;
}

/* ── Sub panel (category detail) ──
   Slides in alongside the primary panel on wider screens, and covers it
   full-width on narrow screens (see media query below). */
.lc-mobile-menu-sub {
  width: 420px;
  max-width: 88vw;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--lc-bg);
  padding: 18px 22px calc(28px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  border-left: 1px solid var(--lc-border-subtle);
  display: none;
}

.lc-mobile-menu.is-sub-open .lc-mobile-menu-sub {
  display: block;
}

.lc-mobile-menu-back {
  appearance: none;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  color: var(--lc-text);
  width: 24px;
  height: 24px;
  margin-bottom: 20px;
}

.lc-mobile-menu-back svg {
  width: 20px;
  height: 20px;
}

.lc-mobile-menu-sub-kicker {
  font-family: var(--lc-font-display);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.5;
  margin: 0 0 18px;
}

.lc-mobile-menu-sub-links {
  display: flex;
  flex-direction: column;
}

.lc-mobile-menu-sub-link {
  color: var(--lc-text);
  text-decoration: none;
  font-family: var(--lc-font-serif);
  font-weight: 400;
  font-size: 20px;
  padding: 10px 0;
}

.lc-mobile-menu-sub-viewall {
  display: block;
  color: var(--lc-text);
  text-decoration: none;
  font-family: var(--lc-font-display);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 0;
}

.lc-mobile-menu-sub-promo {
  margin-top: 24px;
}

.lc-mobile-menu-sub-promo-image {
  aspect-ratio: 4 / 3;
  background: var(--lc-surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lc-mobile-menu-sub-promo-image img {
  width: 48px;
  height: 48px;
  opacity: 0.35;
}

.lc-mobile-menu-sub-promo-caption {
  font-family: var(--lc-font-display);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.5;
  margin: 12px 0 0;
}

/* ── Narrow screens: sub panel covers the primary panel full-width
   instead of sitting beside it, since there's no room for two 420px
   columns side by side on a phone. ── */
@media (max-width: 700px) {
  .lc-mobile-menu-primary,
  .lc-mobile-menu-sub {
    width: 100vw;
    max-width: 100vw;
  }

  .lc-mobile-menu-sub {
    position: absolute;
    top: 0;
    left: 0;
    border-left: none;
  }
}

/* ── Focus states ──
   Same treatment as the header's own elements (style.css): remove the
   browser's heavy default outline, replace with a subtle branded one
   that only shows on keyboard focus, not on mouse click. */
.lc-mobile-menu-close,
.lc-mobile-menu-catbtn,
.lc-mobile-menu-wishlist,
.lc-mobile-menu-secondary a,
.lc-mobile-menu-account,
.lc-mobile-menu-lang a,
.lc-mobile-menu-back,
.lc-mobile-menu-sub-link,
.lc-mobile-menu-sub-viewall {
  outline: none;
  border-radius: 2px;
}

.lc-mobile-menu-close:focus-visible,
.lc-mobile-menu-catbtn:focus-visible,
.lc-mobile-menu-wishlist:focus-visible,
.lc-mobile-menu-secondary a:focus-visible,
.lc-mobile-menu-account:focus-visible,
.lc-mobile-menu-lang a:focus-visible,
.lc-mobile-menu-back:focus-visible,
.lc-mobile-menu-sub-link:focus-visible,
.lc-mobile-menu-sub-viewall:focus-visible {
  outline: 1px solid rgba(74, 47, 27, 0.4);
  outline-offset: 3px;
}