/* Menú compartido. En el teléfono se abre un panel; en el escritorio queda la barra. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

#site-chrome {
  position: sticky;
  top: 0;
  z-index: 80;
  font-family: Inter, system-ui, sans-serif;
}
body > #site-chrome { grid-column: 1 / -1; width: 100%; justify-self: stretch; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 60px;
  padding: 8px 16px;
  background: rgba(8, 8, 8, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #262626;
}
.site-brand {
  font-family: Oswald, Inter, sans-serif;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #2ee36f;
  text-decoration: none;
  font-size: 16px;
  margin-right: 8px;
  white-space: nowrap;
}
.site-links { display: flex; flex-wrap: nowrap; gap: 8px; flex: 1; min-width: 0; }
.site-nav a.btn, .site-nav button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 0;
  background: #00843D;
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
}
.site-nav a.btn.secondary, .site-nav button.btn.secondary {
  background: #ffffff10;
  color: #fff;
  border: 1px solid #ffffff22;
}
.site-nav a.btn:hover, .site-nav button.btn:hover { background: #06a04d; }
.site-nav a.btn.secondary:hover, .site-nav button.btn.secondary:hover { background: #ffffff1c; }
.site-out { margin-left: auto; flex: 0 0 auto; }

.nav-toggle, .nav-cart, .nav-enter, .site-drawer, .nav-backdrop { display: none; }
.nav-enter {
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  background: #00843D;
  border: 0;
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.nav-enter:hover { background: #06a04d; color: #fff; }

.nav-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: #2ee36f;
  color: #052e16;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

@media (max-width: 979px) {
  .site-links, .site-out { display: none !important; }
  .site-nav {
    gap: 2px;
    min-height: calc(56px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 8px 0 4px;
  }
  .site-brand { flex: 1; margin-right: 0; font-size: 15px; letter-spacing: .04em; text-align: left; }
  .nav-enter {
    display: inline-flex;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    flex: 0 0 auto;
  }
  .nav-toggle, .nav-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    flex: 0 0 auto;
  }
  .nav-toggle:active, .nav-cart:active { background: #ffffff14; }
  .nav-cart .nav-count { position: absolute; top: 4px; right: 2px; }
  body.has-admin-nav .nav-cart { display: none; }
  .nav-bars { width: 18px; height: 14px; display: grid; align-content: space-between; }
  .nav-bars i { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
  body.nav-open .nav-bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  body.nav-open .nav-bars i:nth-child(2) { opacity: 0; }
  body.nav-open .nav-bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 85;
  }
  body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  .site-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    left: auto;
    width: min(320px, calc(100% - 48px));
    background: #101010;
    border-left: 1px solid #2a2a2a;
    z-index: 90;
    padding: calc(14px + env(safe-area-inset-top)) 12px calc(16px + env(safe-area-inset-bottom));
    transform: translateX(105%);
    transition: transform .22s ease, opacity .22s ease;
    box-shadow: -24px 0 60px rgba(0, 0, 0, .45);
    visibility: hidden;
    pointer-events: none;
  }
  body.nav-open .site-drawer { transform: translateX(0); visibility: visible; pointer-events: auto; }
  body:not(.has-admin-nav) .site-drawer {
    top: calc(64px + env(safe-area-inset-top));
    bottom: auto;
    left: 16px;
    right: 16px;
    width: auto;
    max-height: min(520px, calc(100dvh - 88px));
    border: 1px solid #2a2a2a;
    border-radius: 18px;
    transform: translateY(-10px);
    opacity: 0;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  }
  body:not(.has-admin-nav).nav-open .site-drawer { transform: none; opacity: 1; }
  body:not(.has-admin-nav) .drawer-head { justify-content: center; }
  body:not(.has-admin-nav) .drawer-close { position: absolute; right: 8px; top: 8px; }
  body:not(.has-admin-nav) .drawer-link { justify-content: center; }
  body:not(.has-admin-nav) .drawer-link span { flex: 0 1 auto; text-align: center; }
  body:not(.has-admin-nav) .drawer-out { text-align: center; }
  body.nav-open { overflow: hidden; }
  .drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 6px 12px;
    position: relative;
    min-height: 44px;
  }
  .drawer-head strong {
    font-family: Oswald, Inter, sans-serif;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #2ee36f;
    font-size: 16px;
  }
  .drawer-close {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: #ffffff10;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .drawer-links { display: flex; flex-direction: column; gap: 4px; overflow: auto; }
  .drawer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 12px;
    border-radius: 14px;
    color: #f5f5f5;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
  }
  .drawer-link svg { flex: 0 0 auto; }
  .drawer-link span { flex: 1; }
  .drawer-link.is-on { background: #00843D; color: #fff; }
  .drawer-link:active { background: #ffffff14; }
  .drawer-link.is-on:active { background: #06a04d; }
  .drawer-out {
    margin-top: auto;
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid #ffffff22;
    background: transparent;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }

}

@media (min-width: 980px) {
  .site-drawer, .nav-backdrop { display: none !important; }
  .site-nav {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
    align-items: center;
    column-gap: 12px;
  }
  .site-brand { grid-column: 1; justify-self: start; }
  .site-links {
    grid-column: 2;
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    flex: none !important;
    width: max-content;
    max-width: 100%;
    margin: 0 !important;
    justify-content: center;
  }
  .nav-enter,
  .site-out {
    grid-column: 3;
    justify-self: end;
    display: inline-flex !important;
    margin-left: 0 !important;
  }
}
