.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  height: var(--ama-header-h);
  overflow: visible;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.4s var(--ama-ease), box-shadow 0.4s var(--ama-ease);
}

.header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #000;
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  pointer-events: none;
}

.header > * {
  position: relative;
  z-index: 1;
}

.header.is-scrolled {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  margin-inline: auto;
  padding-inline: max(1rem, env(safe-area-inset-left)) max(1rem, env(safe-area-inset-right));
  box-sizing: border-box;
  gap: 0.75rem;
}

.header__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  line-height: 0;
}

.header__logo img {
  display: block;
  height: 40px;
  width: auto;
  max-height: calc(var(--ama-header-h) - 32px);
  object-fit: contain;
  object-position: left center;
  background: transparent;
  transition: opacity 0.3s ease, transform 0.35s var(--ama-ease);
}

.header__logo:hover img {
  opacity: 0.82;
  transform: scale(1.02);
}

.header__nav {
  display: flex;
  align-items: center;
  gap: clamp(0.7rem, 1.4vw, 1.5rem);
}

.header__nav a {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ama-silver);
  transition: color 0.3s ease;
}

.header__nav a:hover { color: #fff; }

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.header__end {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

/* Selector de idioma */
.lang-switch {
  position: relative;
}

.lang-switch__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 30px;
  padding: 0 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ama-ink);
  background: transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.lang-switch__toggle:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
}
.lang-switch__globe {
  flex-shrink: 0;
  opacity: 0.65;
}

.lang-switch__chevron {
  flex-shrink: 0;
  opacity: 0.5;
  transition: transform 0.25s ease;
}

.lang-switch.is-open .lang-switch__chevron {
  transform: rotate(180deg);
}

.lang-switch__menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  min-width: 9.5rem;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 220;
}

.lang-switch.is-open .lang-switch__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-switch__menu li {
  margin: 0;
}

.lang-switch__option {
  display: block;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: left;
  color: var(--ama-ink-dark-soft);
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-switch__option:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--ama-ink-dark);
}

.lang-switch__option.is-active {
  background: rgba(0, 0, 0, 0.06);
  color: var(--ama-ink-dark);
  font-weight: 600;
}

.lang-switch--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.lang-switch--inline .lang-switch__option {
  width: auto;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}

.header__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--ama-ink);
  transition: transform 0.3s var(--ama-ease), background 0.3s ease, border-color 0.3s ease;
}

.header__social svg {
  width: 18px;
  height: 18px;
}

.header__social--wa:hover,
.header__social--ig:hover {
  background: #fff;
  border-color: #fff;
  color: #000;
  transform: translateY(-2px);
}

.header__cta {
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ama-ink);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.header__cta:hover {
  background: #fff;
  border-color: #fff;
  color: var(--ama-ink-dark);
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--ama-ink);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: transparent;
}

.menu-toggle svg {
  display: block;
  width: 20px;
  height: 20px;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: var(--ama-header-h);
  left: 0;
  right: 0;
  z-index: 210;
  background: #fff;
  padding: 0.35rem max(1.25rem, env(safe-area-inset-right)) 1.1rem max(1.25rem, env(safe-area-inset-left));
  flex-direction: column;
  gap: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
  max-height: min(70svh, calc(100svh - var(--ama-header-h)));
  overflow-x: hidden;
  overflow-y: auto;
}

.mobile-nav.is-open { display: flex; }

.mobile-nav a {
  display: block;
  padding: 0.95rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #111;
}

.mobile-nav a:last-of-type { border-bottom: 0; }

.mobile-nav a:hover { color: var(--ama-ink-dark); }

.mobile-nav__social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* Botones flotantes WhatsApp + Instagram */
.fab-group {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 180;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  transition: transform 0.35s var(--ama-ease), box-shadow 0.35s var(--ama-ease);
}

.fab svg {
  width: 24px;
  height: 24px;
}

.fab:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}

.fab--ig {
  background: #000;
  color: #fff;
  border: 1px solid #000;
}

.fab--wa {
  background: #fff;
  color: #000;
  border: 1px solid #000;
}

.footer {
  border-top: 1px solid var(--ama-line-soft);
  padding: 3rem 0 2rem;
  background: var(--ama-black);
  color: var(--ama-ink-soft);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2rem;
}

.footer__logo img {
  height: 40px;
  width: auto;
  margin-bottom: 1rem;
}

.footer__desc {
  max-width: 320px;
  color: var(--ama-muted);
  font-size: 0.875rem;
}

.footer__title {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ama-silver);
  margin-bottom: 1rem;
}

.footer a {
  display: block;
  color: var(--ama-muted);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.footer a:hover { color: var(--ama-ink); }

.footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ama-line-soft);
  color: var(--ama-muted-soft);
  font-size: 0.8125rem;
}

@media (min-width: 861px) {
  .header__bar {
    width: min(var(--ama-container), 94vw);
    padding-inline: 0;
  }
}

@media (max-width: 860px) {
  .header__nav, .header__cta { display: none; }
  .menu-toggle { display: inline-flex; }
  .header__logo { min-width: 0; }
  .header__logo img {
    height: 32px;
    max-width: min(120px, 36vw);
  }
  .footer__logo img {
    height: 32px;
  }
  .header__end {
    gap: 0.4rem;
    margin-left: auto;
  }
  .lang-switch__toggle {
    height: 40px;
    padding: 0 0.6rem;
  }
  .lang-switch__menu {
    position: fixed;
    top: calc(var(--ama-header-h) + 0.4rem);
    right: max(1rem, env(safe-area-inset-right));
    left: auto;
    min-width: 11.5rem;
    z-index: 230;
  }
  .mobile-nav .lang-switch--inline { display: none; }
  .footer__grid { grid-template-columns: 1fr; }
  .fab-group { right: 1rem; bottom: 1rem; }
}
