/* Site header: icons in the main navigation and, when signed in, the account pill with its menu.
   The golden "Mis regalos" button (.nav-cloud) keeps its own styles untouched.
   The header keeps its own positioning (sticky on the storefront); the light line below needs no change to it. */
.homepage-header::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, #f6c98a00, #f6c98a55 20%, #ff8cc466 50%, #b892ff44 80%, #b892ff00);
}

/* Navigation icons. */
#homepage-navigation > a { gap: 8px; }
.nav-icon { display: inline-grid; flex: none; place-items: center; }
.nav-icon svg, .mobile-account-create svg, .mobile-account-logout svg, .account-menu svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-icon svg { width: 18px; height: 18px; color: #c9a3e6; transition: color .2s ease, filter .2s ease; }
#homepage-navigation > a:is(:hover, :focus-visible) .nav-icon svg { color: #fbe3bb; filter: drop-shadow(0 0 6px #f6c98a99); }
#homepage-navigation > a[aria-current="page"] .nav-icon svg { color: #f6c98a; filter: drop-shadow(0 0 6px #f6c98aaa); }
.homepage-header #homepage-navigation :is(.mobile-account-create, .mobile-account-logout) { display: none; }

/* Account pill. */
.account-menu { position: relative; }
.account-menu[hidden] { display: none; }
.account-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 12px 0 5px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff8f3;
  font: inherit;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  background:
    linear-gradient(#2a1230, #2a1230) padding-box,
    linear-gradient(120deg, #f6c98a88, #ff8cc488, #b892ff66) border-box;
  box-shadow: 0 8px 22px #0c061c66;
  transition: box-shadow .2s ease;
}
.account-pill.is-open, .account-pill:hover {
  background:
    linear-gradient(#381a40, #381a40) padding-box,
    linear-gradient(120deg, #fbe3bb, #ff8cc4, #b892ff) border-box;
  box-shadow: 0 8px 26px #ff6fae33;
}
.account-pill:focus-visible { outline: 3px solid #f6c98a; outline-offset: 3px; }
.account-name { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-avatar {
  position: relative;
  isolation: isolate;
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff8f3;
  font: 400 1.05rem/1 'Memorias Saludo', cursive;
  text-shadow: 0 0 8px #ff8cc4cc;
  background: radial-gradient(circle at 35% 30%, #5a2a5e, #2a1230 72%);
}
.account-avatar::before {
  content: '';
  position: absolute;
  inset: -2px;
  z-index: -1;
  padding: 2px;
  border-radius: 50%;
  background: conic-gradient(from 200deg, #fbe3bb, #f2a65a, #ff6fae, #b892ff, #fbe3bb);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.account-chevron { width: 17px; height: 17px; color: #c9a3e6; transition: transform .2s ease; }
.account-pill.is-open .account-chevron { color: #fbe3bb; transform: rotate(180deg); }

/* Account menu. */
.account-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 50;
  display: grid;
  gap: 2px;
  width: 270px;
  padding: 8px;
  border: 1px solid #6b457088;
  border-radius: 20px;
  background: linear-gradient(160deg, #3a1b42f5, #241029f7);
  box-shadow: 0 24px 60px #000000a6, inset 0 0 0 1px #ffffff0a;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  white-space: normal;
}
.account-dropdown[hidden] { display: none; }
.account-dropdown::before {
  content: '';
  position: absolute;
  top: -7px;
  right: 28px;
  width: 12px;
  height: 12px;
  border-top: 1px solid #6b457088;
  border-left: 1px solid #6b457088;
  background: #3a1b42;
  transform: rotate(45deg);
}
.account-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  color: #eadcec;
  font: inherit;
  font-size: .93rem;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
  background: none;
  cursor: pointer;
}
.account-item svg { width: 19px; height: 19px; flex: none; color: #c9a3e6; }
.account-item:is(:hover, :focus-visible) { color: #fff8f3; background: #ffffff0f; outline: none; }
.account-item:is(:hover, :focus-visible) svg { color: #fbe3bb; }
.account-item.is-create { margin-bottom: 4px; color: #2b0f2e; background: linear-gradient(110deg, #fbe3bb, #f6c98a 45%, #ff9fb8); box-shadow: 0 8px 20px #ff6fae33; }
.account-item.is-create svg { color: #2b0f2e; }
.account-item.is-create:is(:hover, :focus-visible) { color: #2b0f2e; background: linear-gradient(110deg, #fff0d6, #fbe3bb 45%, #ffb5c9); }
.account-item.is-create:is(:hover, :focus-visible) svg { color: #2b0f2e; }
.account-count { display: grid; place-items: center; min-width: 22px; height: 22px; margin-left: auto; padding: 0 7px; border-radius: 999px; color: #2b0f2e; font-size: .75rem; font-weight: 800; background: #f6c98a; }
.account-count[hidden] { display: none; }
.account-sep { display: block; height: 1px; margin: 6px 4px; background: #4a2a50; }
.account-item.is-out { color: #ffb3c4; }
.account-item.is-out svg { color: #ff8fa8; }

@media (min-width: 801px) and (max-width: 940px) {
  /* Between the mobile breakpoint and 940px the full row does not fit: drop the nav icons. */
  #homepage-navigation .nav-icon { display: none; }
}

@media (max-width: 800px) {
  /* Phone: the pill is just the avatar, and the menu button follows the site colors. */
  .account-pill { height: 46px; padding: 0 4px; }
  .account-name, .account-chevron { display: none; }
  .account-dropdown { right: -54px; }
  .account-dropdown::before { right: 72px; }
  body .homepage-header.is-enhanced .menu-toggle {
    border: 1px solid transparent;
    border-radius: 14px;
    color: #fbe3bb;
    background:
      linear-gradient(#2a1230, #2a1230) padding-box,
      linear-gradient(120deg, #f6c98a88, #ff8cc488) border-box;
  }
  /* The menu sheet: almost full width, frosted plum, items with an icon tile. */
  body .homepage-header.is-enhanced #homepage-navigation {
    right: 16px;
    left: 16px;
    width: auto;
    gap: 2px;
    padding: 10px;
    border: 1px solid #6b457088;
    border-radius: 22px;
    background: linear-gradient(165deg, #3a1b42fa, #22102afa);
    box-shadow: 0 26px 60px #000000b0;
  }
  body .homepage-header #homepage-navigation > a { justify-content: flex-start; gap: 14px; min-height: 54px; padding: 0 10px; border-radius: 14px; color: #eadcec; text-decoration: none; }
  body .homepage-header #homepage-navigation > a:hover { background: #ffffff0d; }
  #homepage-navigation .nav-icon { width: 38px; height: 38px; border-radius: 12px; background: #ffffff0d; }
  #homepage-navigation .nav-icon svg { width: 20px; height: 20px; }
  #homepage-navigation > a[aria-current="page"] .nav-icon { background: linear-gradient(135deg, #f6c98a33, #ff8cc426); box-shadow: inset 0 0 0 1px #f6c98a55; }
  .homepage-header #homepage-navigation .mobile-account-create:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    margin: 10px 0 4px;
    padding: 0 16px;
    border-radius: 999px;
    color: #2b0f2e;
    font-weight: 800;
    text-decoration: none;
    background: linear-gradient(110deg, #fbe3bb, #f6c98a 45%, #ff9fb8);
    box-shadow: 0 10px 24px #ff6fae40;
  }
  .homepage-header #homepage-navigation .mobile-account-logout:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border: 0;
    color: #ffb3c4;
    font: inherit;
    font-weight: 700;
    background: none;
    cursor: pointer;
  }
  .mobile-account-create svg { width: 20px; height: 20px; }
  .mobile-account-logout svg { width: 18px; height: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-icon svg, .account-pill, .account-chevron { transition: none; }
}
