/* ============================================================================
   LIVE YOUR DREAM — Chrome · RE-SKIN "Salomón" (dirección vigente)
   Banda anuncio · topnav + megamenús · overlay búsqueda · footer · tabbar ·
   drawer de categorías. Prefijo .lyd-* para no colisionar con WooCommerce.
   Mobile-first. Nav horizontal ≥1200px; por debajo, tabbar + drawer. Solo light.
   Usa exclusivamente var(--…) de variables.css. Radios 0, negro = acción,
   teal = acento puntual, tipografía condensada mayúsculas.
   ============================================================================ */

/* ---- Skip link ---- */
.lyd-skip-link {
  background: var(--ink);
  color: #ffffff;
  border: 0;
  border-radius: 0;
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: var(--fw-bold);
}
.lyd-skip-link:focus,
.lyd-skip-link:focus-visible {
  position: fixed !important;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 200;
  width: auto;
  height: auto;
  clip: auto;
  margin: 0;
  overflow: visible;
  white-space: normal;
}

/* ============================================================================
   Banda anuncio
   ============================================================================ */
.lyd-announce {
  background: var(--ink);
  color: #ffffff;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: var(--text-micro);
  font-weight: var(--fw-bold);
  text-align: center;
  padding: 9px var(--space-4);
  line-height: var(--lh-micro);
}
.lyd-announce strong { color: var(--accent); font-weight: var(--fw-bold); }

/* ============================================================================
   Top nav (sticky) — contexto de posicionamiento de megamenú y buscador
   ============================================================================ */
.lyd-topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border-subtle);
  transition: box-shadow 200ms ease;
}
.lyd-topnav.is-scrolled { box-shadow: var(--shadow-sm); }

.lyd-topnav__row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: var(--topnav-h);
}

.lyd-topnav__brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.lyd-topnav__logo { height: 34px; width: auto; }

/* Navegación central: oculta hasta 1200px (se usa tabbar + drawer). */
.lyd-topnav__nav {
  display: none;
  flex: 1 1 auto;
  gap: var(--space-8);
  justify-content: center;
  align-items: stretch;
  height: 100%;
}

/* Cada disciplina (item con megamenú) y el enlace suelto "Ofertas". */
.lyd-nav-item { position: static; display: flex; align-items: center; }
.lyd-topnav__nav > a,
.lyd-nav-item__link {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.9375rem;
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  padding: 6px 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  cursor: pointer;
}
.lyd-nav-item__link svg {
  width: 13px; height: 13px; stroke-width: 2.6;
  transition: transform 200ms ease;
}
.lyd-topnav__nav > a::after,
.lyd-nav-item__link::after {
  content: '';
  position: absolute;
  left: 0; right: 100%; bottom: -2px;
  height: 2px;
  background: var(--accent);
  transition: right 200ms ease;
}
.lyd-topnav__nav > a:hover::after,
.lyd-topnav__nav > a.is-active::after,
.lyd-nav-item:hover .lyd-nav-item__link::after,
.lyd-nav-item:focus-within .lyd-nav-item__link::after { right: 0; }
.lyd-nav-item:hover .lyd-nav-item__link svg,
.lyd-nav-item:focus-within .lyd-nav-item__link svg { transform: rotate(180deg); }

/* ============================================================================
   Megamenú (panel ancho full-bleed, CSS puro con :hover / :focus-within)
   ============================================================================ */
.lyd-megamenu {
  position: absolute;
  left: 0; right: 0; top: 100%;
  background: var(--bg-base);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
  z-index: 90;
}
.lyd-nav-item:hover .lyd-megamenu,
.lyd-nav-item:focus-within .lyd-megamenu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.lyd-megamenu__inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 1.15fr;
  gap: var(--space-10);
  padding: var(--space-10) var(--gutter-desktop) var(--space-12);
}
.lyd-mm-col h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: var(--fw-bold);
  font-size: var(--text-micro);
  color: var(--text-muted);
  margin: 0 0 var(--space-4);
}
.lyd-mm-col ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: var(--space-3);
}
.lyd-mm-col a {
  font-family: var(--font-sans);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9375rem;
  font-weight: var(--fw-medium);
  color: var(--text-primary);
}
.lyd-mm-col a:hover { color: var(--accent-on); }
.lyd-mm-viewall {
  display: inline-flex; align-items: center; gap: var(--space-2);
  margin-top: var(--space-5);
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: var(--fw-bold);
  letter-spacing: 0.1em;
  font-size: var(--text-micro);
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 3px;
}
.lyd-mm-viewall:hover { color: var(--accent-on); border-bottom-color: var(--accent); }
.lyd-mm-viewall svg { width: 14px; height: 14px; }

.lyd-mm-feature {
  position: relative; overflow: hidden;
  min-height: 220px; align-self: stretch;
  isolation: isolate;
  background: linear-gradient(135deg, var(--brand-navy), var(--ink));
}
.lyd-mm-feature img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; z-index: -2;
  transition: transform 600ms cubic-bezier(.2,.7,.2,1);
}
.lyd-mm-feature:hover img { transform: scale(1.05); }
.lyd-mm-feature::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(17,17,17,0) 40%, rgba(17,17,17,0.74) 100%);
  z-index: -1;
}
.lyd-mm-feature__label {
  position: absolute; left: var(--space-5); right: var(--space-5); bottom: var(--space-5);
  color: #ffffff;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: var(--fw-bold);
  line-height: 0.95;
  font-size: 1.35rem;
}
.lyd-mm-feature__label small {
  display: block;
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.82);
  margin-top: 6px;
}

/* ============================================================================
   Acciones (buscar, mi cuenta, carrito)
   ============================================================================ */
.lyd-topnav__actions {
  display: flex; align-items: center; gap: 2px;
  margin-left: auto; flex: 0 0 auto;
}
/* Botón hamburguesa (móvil/tablet <1200px) — abre el drawer de categorías */
.lyd-hamburger { display: inline-flex; margin-inline-start: calc(var(--space-2) * -1); }

.lyd-iconbtn {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent;
  color: var(--text-primary);
  position: relative;
}
.lyd-iconbtn:hover { color: var(--accent-on); }
.lyd-iconbtn svg { width: 21px; height: 21px; stroke-width: 1.6; }

/* Badge circular negro del carrito */
.lyd-topnav__cart-badge {
  position: absolute;
  top: 7px; right: 6px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  background: var(--ink);
  color: #ffffff;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: var(--fw-bold);
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
}
.lyd-topnav__cart-badge[hidden] { display: none; }

/* Acceso a cuenta: icono + texto "Mi cuenta" (texto ≥768px) */
.lyd-topnav__account {
  display: inline-flex; align-items: center; gap: var(--space-2);
  height: 44px; padding: 0 var(--space-2) 0 var(--space-3);
  color: var(--text-primary);
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  font-size: 0.8125rem;
}
.lyd-topnav__account:hover { color: var(--accent-on); }
.lyd-topnav__account svg { width: 21px; height: 21px; stroke-width: 1.6; }
.lyd-topnav__account span { display: none; }
@media (min-width: 768px) { .lyd-topnav__account span { display: inline; } }

/* Candado SSL (solo checkout) */
.lyd-topnav__lock {
  display: none;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: var(--text-micro);
  font-weight: var(--fw-bold);
  color: var(--text-muted);
}
.lyd-topnav__lock svg { width: 16px; height: 16px; color: var(--ink); }

/* ============================================================================
   Buscador overlay (full-bleed bajo el header; .is-open vía JS)
   ============================================================================ */
.lyd-search-overlay {
  position: absolute;
  left: 0; right: 0; top: 100%;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
  z-index: 95;
}
.lyd-search-overlay.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.lyd-search-overlay__inner { padding: var(--space-8) var(--gutter-desktop) var(--space-10); }

.lyd-search-form,
.lyd-search-overlay__form form,
.lyd-search-overlay__form .woocommerce-product-search {
  display: flex; align-items: center; gap: var(--space-3);
  border-bottom: 2px solid var(--ink);
  padding-bottom: var(--space-3);
}
.lyd-search-form__ico { width: 24px; height: 24px; stroke-width: 1.8; flex: 0 0 auto; color: var(--ink); }
.lyd-search-overlay__form input[type="search"],
.lyd-search-overlay__form input[type="text"],
.lyd-search-form input[type="search"] {
  flex: 1 1 auto;
  border: 0; background: transparent; outline: none;
  font-family: var(--font-sans);
  font-size: 1.25rem;
  color: var(--text-primary);
  padding: 6px 0;
  min-height: auto;
}
.lyd-search-overlay__form input::placeholder,
.lyd-search-form input::placeholder { color: var(--text-tertiary); }
/* Botón submit del form de Woo: lupa/negro, sin caja pill */
.lyd-search-overlay__form button[type="submit"] {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 var(--space-4);
  background: var(--ink);
  color: #ffffff;
  border: 0;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: var(--fw-bold);
  font-size: 0.8125rem;
  cursor: pointer;
}
.lyd-search-overlay__form button[type="submit"]:hover { background: var(--accent); color: var(--accent-on); }
.lyd-search-close {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent;
  color: var(--text-muted); flex: 0 0 auto;
}
.lyd-search-close:hover { color: var(--ink); }
.lyd-search-close svg { width: 22px; height: 22px; stroke-width: 1.8; }

.lyd-search-suggest {
  margin-top: var(--space-6);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3);
}
.lyd-search-suggest__label {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: var(--fw-bold);
  font-size: 0.6875rem;
  color: var(--text-muted);
}
.lyd-search-chip {
  padding: 8px 14px;
  border: 1px solid var(--border-default);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: var(--fw-bold);
  font-size: var(--text-micro);
  color: var(--text-primary);
}
.lyd-search-chip:hover { background: var(--ink); color: #ffffff; border-color: var(--ink); }

/* Oculta el label textual de Woo dejándolo accesible */
.lyd-search-overlay__form label {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ============================================================================
   Backdrop compartido (buscador + drawer)
   ============================================================================ */
.lyd-nav-backdrop {
  position: fixed; inset: 0;
  background: rgba(17,17,17,0.4);
  opacity: 0; visibility: hidden;
  transition: opacity 200ms ease, visibility 200ms;
  z-index: 80;
}
.lyd-nav-backdrop.is-open { opacity: 1; visibility: visible; }

/* ============================================================================
   Drawer de categorías (móvil, lateral izquierdo)
   ============================================================================ */
.lyd-cat-drawer {
  position: fixed; top: 0; bottom: 0; left: 0;
  width: min(88vw, 380px);
  background: var(--bg-base);
  z-index: 110;
  transform: translateX(-100%);
  transition: transform 260ms cubic-bezier(.2,.7,.2,1);
  display: flex; flex-direction: column;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
}
.lyd-cat-drawer.is-open { transform: translateX(0); }
.lyd-cat-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-5) var(--space-5) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}
.lyd-cat-drawer__title {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: var(--fw-bold);
  letter-spacing: 0.1em;
  font-size: 0.9375rem;
}
.lyd-cat-drawer__close {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent;
  color: var(--text-muted);
}
.lyd-cat-drawer__close svg { width: 24px; height: 24px; stroke-width: 1.8; }

.lyd-cat-acc { border-bottom: 1px solid var(--border-subtle); }
.lyd-cat-acc > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  font-size: 0.9375rem;
}
.lyd-cat-acc > summary::-webkit-details-marker { display: none; }
.lyd-cat-acc > summary svg {
  width: 18px; height: 18px; stroke-width: 2.2;
  transition: transform 200ms ease;
}
.lyd-cat-acc[open] > summary svg { transform: rotate(180deg); }
.lyd-cat-acc__body {
  padding: 0 var(--space-5) var(--space-4);
  display: flex; flex-direction: column; gap: var(--space-3);
}
.lyd-cat-acc__body a { font-size: 0.9375rem; color: var(--text-secondary); }
.lyd-cat-acc__body a:hover { color: var(--accent-on); }

/* ============================================================================
   Footer
   ============================================================================ */
.lyd-footer {
  background: var(--ink);
  color: var(--brand-paper);
  padding: var(--space-20) 0 var(--space-8);
}
.lyd-footer__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.lyd-footer__logo { height: 56px; width: auto; margin-bottom: var(--space-5); }
.lyd-footer__claim {
  color: rgba(248,248,248,0.6);
  font-size: var(--text-small);
  max-width: 36ch;
  line-height: 1.55;
  margin: 0;
}
.lyd-footer__cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8) var(--space-4);
}
.lyd-footer__col h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: var(--fw-bold);
  font-size: 0.8125rem;
  margin: 0 0 var(--space-4);
  color: #ffffff;
}
.lyd-footer__list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: var(--space-3);
}
.lyd-footer__list li { color: rgba(248,248,248,0.6); font-size: var(--text-small); }
.lyd-footer__list a { font-size: var(--text-small); color: rgba(248,248,248,0.6); }
.lyd-footer__list a:hover { color: var(--accent); }

.lyd-footer__bottom {
  display: flex; flex-direction: column; gap: var(--space-4);
  padding-top: var(--space-6);
  font-size: var(--text-micro);
  color: rgba(248,248,248,0.45);
}
.lyd-footer__legal { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.lyd-footer__legal a { color: rgba(248,248,248,0.45); }
.lyd-footer__legal a:hover { color: var(--accent); }
.lyd-footer__pay { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.lyd-pay-pill {
  padding: 5px 10px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.75);
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
}

@media (min-width: 768px) {
  .lyd-footer__top { grid-template-columns: 1.2fr 2fr; }
  .lyd-footer__cols { grid-template-columns: repeat(4, 1fr); }
  .lyd-footer__bottom { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ============================================================================
   Tabbar (móvil, sticky bottom). Solo <1200px.
   ============================================================================ */
.lyd-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--bg-base);
  border-top: 1px solid var(--border-subtle);
  box-shadow: 0 -2px 8px rgba(17,17,17,0.05);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  display: flex; justify-content: space-around;
  z-index: 90;
}
.lyd-tabbar__item {
  flex: 1; min-height: 54px; padding: 6px 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 0; background: transparent;
  color: var(--text-muted);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
  font-weight: var(--fw-bold);
  position: relative;
}
.lyd-tabbar__item svg { width: 22px; height: 22px; stroke-width: 1.6; }
.lyd-tabbar__item.is-active { color: var(--ink); }
.lyd-tabbar__item.is-active::before {
  content: '';
  position: absolute;
  top: 0; left: 28%; right: 28%;
  height: 2px;
  background: var(--accent);
}
.lyd-tabbar__icon-wrap { position: relative; display: inline-flex; }
.lyd-tabbar__badge {
  position: absolute;
  top: -6px; right: -8px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  background: var(--ink);
  color: #ffffff;
  border-radius: var(--radius-full);
  font-size: 9px;
  font-weight: var(--fw-bold);
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
}
.lyd-tabbar__badge[hidden] { display: none; }

/* ============================================================================
   Breakpoints de chrome
   ============================================================================ */
@media (min-width: 1024px) {
  .lyd-topnav__row { height: var(--topnav-h-desktop); }
  .lyd-topnav__logo { height: 44px; }
}

/* Nav horizontal necesita ~1200px (5 disciplinas + Ofertas + logo + acciones).
   Por debajo: tabbar + drawer de categorías. */
@media (min-width: 1200px) {
  .lyd-topnav__nav { display: flex; }
  .lyd-tabbar,
  .lyd-cat-drawer { display: none; }
  .lyd-hamburger { display: none; }
}
@media (max-width: 1199px) {
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
}

/* ============================================================================
   Chrome dedicado de checkout (anti-fuga): logo + candado SSL
   ============================================================================ */
body.woocommerce-checkout .lyd-topnav__nav,
body.woocommerce-checkout .lyd-topnav__actions,
body.woocommerce-checkout .lyd-tabbar,
body.woocommerce-checkout .lyd-cat-drawer,
body.woocommerce-checkout .lyd-search-overlay { display: none; }
body.woocommerce-checkout .lyd-topnav__lock { display: inline-flex; }
@media (max-width: 1199px) {
  body.woocommerce-checkout { padding-bottom: 0; }
}
