/* Header común IBIN · solo escritorio (>= 1101 px) */
.ibin-desktop-header-v3 { display: none; }

/* Normalización visual del header móvil existente. Conserva sus desplegables. */
@media (max-width: 1100px) {
  .ibin-legacy-primary-nav {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 500;
    width: 100%;
    min-height: 96px;
    margin: 0;
    padding: 14px 24px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    box-sizing: border-box;
  }

  .ibin-legacy-primary-nav > .logo {
    display: inline-flex;
    flex: 1 1 calc(100% - 58px);
    width: calc(100% - 58px);
    min-width: 0;
    max-width: calc(100% - 58px);
    margin: 0;
    padding: 0;
    flex-direction: column;
    align-items: flex-start;
    font-size: clamp(21px, 5.8vw, 24px) !important;
    font-weight: 400;
    line-height: 1;
    letter-spacing: .11em;
    white-space: nowrap;
  }

  .ibin-legacy-primary-nav > .logo > span {
    display: block;
    width: 100% !important;
    max-width: none !important;
    margin-top: 9px;
    font-size: clamp(8.4px, 2.25vw, 10px) !important;
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: .09em !important;
    white-space: nowrap !important;
    overflow: visible !important;
    opacity: .92 !important;
  }

  .ibin-legacy-primary-nav:not(.menu-open) > .logo > span {
    color: #4F5A3A !important;
  }

  .ibin-legacy-primary-nav > .logo .logo-mobile-break {
    display: none !important;
  }

  .ibin-legacy-primary-nav > .nav-hamburger {
    display: flex;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 8px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    box-sizing: border-box;
  }

  .ibin-legacy-primary-nav > .nav-hamburger > span {
    width: 28px;
    height: 2px;
    margin: 0;
  }

  @media (max-width: 370px) {
    .ibin-legacy-primary-nav { padding-right: 16px; padding-left: 16px; }
    .ibin-legacy-primary-nav > .logo {
      font-size: 20px !important;
      letter-spacing: .08em;
    }
    .ibin-legacy-primary-nav > .logo > span {
      font-size: 8px !important;
      letter-spacing: .055em !important;
    }
  }
}

@media (min-width: 1101px) {
  .ibin-legacy-primary-nav { display: none !important; }

  .ibin-desktop-header-v3 {
    --ibin-header-bg: #F5F0E6;
    --ibin-header-text: #4F5A3A;
    --ibin-header-accent: #B89A5E;
    --ibin-header-cta-bg: #4F5A3A;
    --ibin-header-cta-text: #F5F0E6;
    position: sticky;
    top: 0;
    z-index: 9000;
    display: block;
    width: 100%;
    min-height: 100px;
    margin: 0;
    border: 0;
    border-bottom: 1px solid rgba(79, 90, 58, .22);
    background: var(--ibin-header-bg);
    color: var(--ibin-header-text);
    box-sizing: border-box;
    font-family: "Jost", sans-serif;
  }

  .ibin-desktop-header-v3 *,
  .ibin-desktop-header-v3 *::before,
  .ibin-desktop-header-v3 *::after { box-sizing: border-box; }

  .ibin-desktop-header-v3__inner {
    display: grid;
    grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(24px, 3vw, 56px);
    width: 100%;
    max-width: 1920px;
    min-height: 99px;
    margin: 0 auto;
    padding: 14px clamp(24px, 4vw, 76px);
  }

  .ibin-desktop-header-v3__brand {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
  }

  .ibin-desktop-header-v3__brand-name {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(27px, 1.65vw, 32px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: .12em;
  }

  .ibin-desktop-header-v3__tagline {
    margin-top: 8px;
    font-family: "Jost", sans-serif;
    font-size: clamp(9px, .58vw, 11px);
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: .27em;
    opacity: .7;
  }

  .ibin-desktop-header-v3__nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(13px, 1.4vw, 28px);
    min-width: 0;
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    position: static;
    inset: auto;
    transform: none;
  }

  .ibin-desktop-header-v3__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 4px 0;
    color: inherit;
    font-family: "Jost", sans-serif;
    font-size: clamp(14px, .84vw, 16px);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: .055em;
    text-decoration: none;
    white-space: nowrap;
  }

  .ibin-desktop-header-v3__link::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 2px;
    left: 0;
    height: 1px;
    background: var(--ibin-header-accent);
    opacity: 0;
    transform: scaleX(.35);
    transition: opacity .2s ease, transform .2s ease;
  }

  .ibin-desktop-header-v3__link:hover::after,
  .ibin-desktop-header-v3__link[aria-current="page"]::after {
    opacity: 1;
    transform: scaleX(1);
  }

  .ibin-desktop-header-v3__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px clamp(16px, 1.25vw, 24px);
    border: 1px solid var(--ibin-header-cta-bg);
    background: var(--ibin-header-cta-bg);
    color: var(--ibin-header-cta-text);
    font-family: "Jost", sans-serif;
    font-size: clamp(13px, .78vw, 15px);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: .1em;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease;
  }

  .ibin-desktop-header-v3__cta:hover {
    background: transparent;
    color: var(--ibin-header-cta-bg);
  }

  .ibin-desktop-header-v3 a:focus-visible {
    outline: 2px solid var(--ibin-header-accent);
    outline-offset: 4px;
  }

  /* Hogaria conserva excepcionalmente su identidad cromática. */
  .ibin-desktop-header-v3--hogaria {
    --ibin-header-bg: #FFFFFF;
    --ibin-header-text: #1A3D28;
    --ibin-header-accent: #C5E60A;
    --ibin-header-cta-bg: #C5E60A;
    --ibin-header-cta-text: #111111;
    border-bottom-color: #1A3D28;
  }

  .ibin-desktop-header-v3--hogaria .ibin-desktop-header-v3__link[aria-current="page"] {
    padding-right: 12px;
    padding-left: 12px;
    background: #C5E60A;
    color: #111111;
  }

  .ibin-desktop-header-v3--hogaria .ibin-desktop-header-v3__link[aria-current="page"]::after {
    display: none;
  }

  @media (max-width: 1390px) {
    .ibin-desktop-header-v3__inner {
      grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
      gap: 20px;
      padding-right: 22px;
      padding-left: 22px;
    }

    .ibin-desktop-header-v3__nav { gap: 13px; }
    .ibin-desktop-header-v3__brand-name { font-size: 26px; }
    .ibin-desktop-header-v3__tagline { font-size: 9px; letter-spacing: .2em; }
    .ibin-desktop-header-v3__link { font-size: 14px; letter-spacing: .035em; }
    .ibin-desktop-header-v3__cta { padding-right: 15px; padding-left: 15px; font-size: 13px; }
  }
}
