/* Header surfaces bundle 2026-08-27: alignment refinements. */
/* TINTIN desktop header — source of truth for >=1025px. */
.tt-header-desktop { display: none !important; }

@media (min-width: 1025px) {
  .tt-header-desktop {
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
    height: 88px;
    background: #fff !important;
    border-bottom: 1px solid rgba(139,38,66,.13) !important;
    box-shadow: 0 10px 32px rgba(126,30,65,.045) !important;
    backdrop-filter: none;
  }

  .tt-header-desktop .tt-header-inner {
    display: grid;
    grid-template-columns: minmax(170px,1fr) auto minmax(170px,1fr);
    align-items: center;
    height: 88px;
    padding: 0 clamp(28px,3.4vw,64px);
    gap: 32px;
  }

  .tt-header-desktop .tt-logo-link {
    justify-self:start;
    display:inline-flex;
    align-items:center;
    gap:12px;
    min-width:0;
    color:#8b2642;
    text-decoration:none;
  }
  .tt-header-desktop .tt-logo-img { width:auto; height:48px; flex:0 0 auto; }
  .tt-header-desktop .tt-nav-desktop {
    position: relative;
    justify-self: center;
    display: flex !important;
    align-items: center;
    gap: 6px;
    isolation: isolate;
  }

  .tt-header-desktop .tt-desktop-active-pill {
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    width: 0;
    height: 44px;
    border: 1px solid rgba(179,36,87,.5);
    border-radius: 999px;
    background: #fff6f9;
    box-shadow: 0 6px 18px rgba(139,38,66,.07);
    opacity: 0;
    transform: translateX(var(--tt-pill-x,0));
    transition: transform 420ms cubic-bezier(.2,.85,.2,1), width 340ms cubic-bezier(.2,.85,.2,1), opacity 160ms ease;
    pointer-events: none;
  }

  .tt-header-desktop .tt-desktop-active-pill.is-ready { opacity: 1; }
  .tt-header-desktop .tt-nav > a,
  .tt-header-desktop .tt-nav-dropdown > button {
    z-index: 1;
    min-height: 44px;
    padding: 12px 22px;
    font-weight: 600 !important;
    letter-spacing: .09em !important;
    color: #8b2642 !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    transform: none !important;
  }

  /* Tienda es parte de la navegación principal, no un botón de acción.
     Esta regla deliberadamente más específica neutraliza capas globales
     antiguas que le aplicaban un segundo marco blanco/rosado al activarse. */
  #tt-header-desktop-tablet #tt-nav-desktop-tablet #btn-tienda,
  #tt-header-desktop-tablet #tt-nav-desktop-tablet #btn-tienda:hover,
  #tt-header-desktop-tablet #tt-nav-desktop-tablet #btn-tienda:focus-visible,
  #tt-header-desktop-tablet #tt-nav-desktop-tablet #btn-tienda.active,
  #tt-header-desktop-tablet #tt-nav-desktop-tablet #btn-tienda[aria-expanded="true"] {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    transform: none !important;
  }

  .tt-header-desktop .tt-nav > a::after,
  .tt-header-desktop .tt-nav-dropdown > button::after { display: none; }
  .tt-header-desktop .tt-nav > a:hover,
  .tt-header-desktop .tt-nav-dropdown > button:hover { color: #a50f4d !important; }
  .tt-header-desktop .tt-header-actions { justify-self: end; gap: 10px; }
  .tt-header-desktop .tt-header-actions > button,
  .tt-header-desktop .tt-header-actions > .tt-nav-dropdown > button {
    width: 46px;
    height: 46px;
    color: #242124 !important;
    background: #fff !important;
    border: 1px solid rgba(139,38,66,.14) !important;
    box-shadow: none;
    transition: transform .22s cubic-bezier(.2,.85,.2,1), color .2s ease, background .2s ease, box-shadow .22s ease, border-color .2s ease;
  }

  .tt-header-desktop .tt-header-actions > button:hover,
  .tt-header-desktop .tt-header-actions > .tt-nav-dropdown > button:hover {
    color: #a50f4d !important;
    background: #fff4f8 !important;
    border-color: rgba(139,38,66,.22) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(139,38,66,.09) !important;
  }

  .tt-header-desktop .tt-dropdown {
    top: calc(100% + 20px);
    width: min(980px, calc(100vw - 64px)) !important;
    max-width: 980px !important;
  }

  .tt-header-desktop .tt-dropdown-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px;
  }

  .tt-header-desktop .tt-dropdown-card {
    min-width: 0;
    padding: 18px 10px;
  }

  .tt-header-desktop .tt-dropdown-icon {
    width: 84px !important;
    height: 84px !important;
    border-radius: 22px !important;
    overflow: hidden;
  }

  .tt-header-desktop .tt-dropdown-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  html[data-tt-surface-controller="ready"] .tt-nav-dropdown:not(.open) .tt-dropdown {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateX(-50%) translateY(-10px) scale(.98) !important;
  }
}

@media (min-width: 1025px) and (max-width: 1120px) {
  .tt-header-desktop .tt-header-inner {
    /* La reserva simétrica mantiene la navegación centrada y deja espacio
       real para Buscar + Alertas + Cuenta + Carrito en una sesión activa. */
    grid-template-columns: 196px minmax(0, 1fr) 196px !important;
    gap: 10px !important;
    padding-inline: 14px !important;
  }
  .tt-header-desktop .tt-logo-img { height:38px !important; max-width:48px; object-fit:contain; }
  .tt-header-desktop .tt-logo-link { gap:6px; }
  .tt-header-desktop .tt-nav > a,
  .tt-header-desktop .tt-nav-dropdown > button { padding-inline: 11px !important; font-size: .72rem !important; }
  .tt-header-desktop .tt-header-actions { gap: 4px !important; }
  .tt-header-desktop .tt-header-actions > button,
  .tt-header-desktop .tt-header-actions > .tt-nav-dropdown > button { width: 44px !important; height: 44px !important; }
  .tt-header-desktop .tt-dropdown {
    width: min(800px, calc(100vw - 32px)) !important;
    max-width: min(800px, calc(100vw - 32px)) !important;
  }
  .tt-header-desktop .tt-dropdown-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .tt-header-desktop .tt-desktop-active-pill { transition: none; }
}
/* Header surfaces bundle 2026-08-27: alignment refinements. */
