:root {
  --subnav-height: 60px;
  --subnav-bg: rgb(87, 87, 87);
}

/* Barra full width sticky bajo el header */
.relay-nav {
  position: sticky;
  top: var(--header-height);
  z-index: 900;
  background: var(--subnav-bg);
  height: var(--subnav-height);
  display: flex;
  align-items: center;
  width: 100%;
}

/* Inner */
.relay-nav__inner {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
}

/* Desktop links */
.relay-nav__links {
  justify-content: center;
  gap: 12px;
}

.relay-nav__link {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 999px;
  line-height: 1;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relay-nav__link:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Mobile selector */
.relay-nav__mobile {
  display: none;
  justify-content: center;
}

.relay-nav__select {
  height: 42px;
  min-width: min(520px, 92vw);
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}

.relay-nav__select:focus {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

.relay-nav__chev {
  transform: translateY(1px);
}

/* Panel móvil */
.relay-nav__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1200;
}

.relay-nav__panel {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: calc(var(--header-height) + var(--subnav-height) + 8px);
  width: min(520px, 92vw);
  max-height: min(420px, 60vh);
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  z-index: 1300;
}

.relay-nav__panel-header {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.relay-nav__panel-title {
  font-size: 14px;
  font-weight: 800;
  color: #111;
}

.relay-nav__close {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  color: #111;
}

.relay-nav__panel-body {
  padding: 10px;
  overflow: auto;
}

.relay-nav__panel-link {
  display: block;
  padding: 12px 12px;
  border-radius: 10px;
  color: #111;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.relay-nav__panel-link:hover {
  background: #f3f3f3;
}

/* Offset para anchors: evita que header+subnav tapen la sección */
.product-section {
  scroll-margin-top: calc(var(--header-height) + var(--subnav-height) + 16px);
}

/* Switch desktop/móvil */
@media (max-width: 768px) {
  .relay-nav__links {
    display: none;
  }
  .relay-nav__mobile {
    display: flex;
  }
}
