.site-header .menu-drawer-actions { display: none; }
.site-header .main-nav .menu-nav-icon { display: inline-block; width: 18px; height: 18px; color: currentColor; }

@media (max-width: 1100px) {
  :root { --header-icons-offset: 0px; } /* si aun se ven altos/bajos, cambia este valor (ej. 6px o -4px) */

  .site-header { left: 0; }
  .site-header .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30px auto;
    align-items: center;
    column-gap: 8px;
  }
  .site-header .topbar > .brand {
    min-width: 0;
    width: fit-content;
    justify-self: start;
    margin: 0;
    padding-block: 0;
    align-self: center;
    line-height: 0;
  }
  .site-header .topbar > .brand img { display: block; max-width: 100%; }

  .site-header .header-search {
    flex: 0 0 30px;
    align-self: center;
    width: 30px;
    height: 30px;
    max-width: none;
    margin: 0;
    padding: 0;
    transform: translateY(var(--header-icons-offset));
  }
  .site-header .header-tools {
    display: flex;
    align-items: center;
    align-self: center;
    flex: 0 0 auto;
    min-width: 0;
    gap: 8px;
    height: auto;
    margin: 0;
    padding: 0 8px 0 0; /* espacio para que la burbuja no se corte */
    transform: translateY(var(--header-icons-offset));
  }
  .site-header .header-tools > a,
  .site-header .header-tools > .cuenta-dropdown {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
  }
  .site-header .header-tools .cuenta-dropdown-toggle {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
  }
  /* circulo del icono: mismo tamano para usuario, cotizacion y carrito */
  .site-header .header-tools .icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;
  }
  .site-header .header-tools .icon > svg { width: 18px; height: 18px; }
  /* burbuja del contador: no ocupa espacio, no mueve el icono */
  .site-header .header-tools .badge {
    position: absolute;
    top: -6px;
    right: -6px;
    margin: 0;
    transform: none;
  }
  .site-header .main-menu-bar { display: block; }
  .site-header .menu-inner { min-height: 52px; justify-content: flex-start; padding: 7px 20px; }
  .site-header .menu-toggle { display: inline-flex; margin-left: 0; }
  .site-header .main-nav,
  .site-header .main-nav.menu-abierto { display: none; }
  .site-header .menu-actions,
  .site-header .delivery-pill,
  .site-header .compact-brand,
  .site-header.header-scrolled .compact-brand { display: none; }

  .site-header.menu-open { z-index: 1000; }
  .site-header.menu-open .main-menu-bar {
    position: fixed;
    inset: 0;
    z-index: 1001;
    background: transparent;
    border: 0;
  }
  .site-header.menu-open .main-menu-bar::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    background: rgba(7, 25, 43, .56);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
  .site-header.menu-open .menu-inner {
    position: fixed;
    z-index: 1;
    inset: 0 auto 0 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px;
    grid-template-rows: 64px minmax(0, 1fr) auto auto;
    gap: 0;
    width: min(40vw, 420px);
    min-height: 0;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    transform: none;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, .2);
    border-radius: 0 18px 18px 0;
    background: #08738d;
    box-shadow: 16px 0 40px rgba(7, 19, 34, .24);
  }
  .site-header.menu-open .compact-brand,
  .site-header.menu-open.header-scrolled .compact-brand {
    display: inline-flex;
    grid-area: 1 / 1;
    align-items: center;
    width: 100%;
    height: 64px;
    min-width: 0;
    margin: 0;
    padding: 12px 20px;
  }
  .site-header.menu-open .compact-brand img {
    width: auto;
    height: 38px;
    max-width: 180px;
    filter: brightness(0) invert(1);
  }
  .site-header.menu-open .menu-toggle {
    display: inline-flex;
    grid-area: 1 / 2;
    align-self: stretch;
    justify-self: stretch;
    width: 52px;
    min-height: 64px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 0;
  }
  .site-header.menu-open .menu-toggle svg,
  .site-header.menu-open .menu-toggle span { display: none; }
  .site-header.menu-open .menu-toggle::after {
    content: "\00D7";
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: #fff;
    font: 300 32px/1 var(--shell-display, sans-serif);
  }
  .site-header.menu-open .main-nav,
  .site-header.menu-open .main-nav.menu-abierto {
    display: flex;
    grid-area: 2 / 1 / 3 / 3;
    align-self: stretch;
    align-items: stretch;
    justify-content: flex-start;
    flex-direction: column;
    gap: 0;
    width: 100%;
    min-height: 0;
    padding: 12px 18px;
    overflow-y: auto;
    background: transparent;
    font-size: 15px;
  }
  .site-header.menu-open .main-nav a,
  .site-header.menu-open .main-nav a:hover,
  .site-header.menu-open .main-nav a[aria-current="page"] {
    display: flex;
    align-items: center;
    min-height: 54px;
    padding: 10px 8px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .2);
    background: transparent;
    color: #fff;
    text-shadow: none;
  }
  .site-header.menu-open .main-nav a::before {
    content: none !important;
    display: none !important;
  }
  .site-header.menu-open .main-nav .menu-nav-icon {
    display: block;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    color: #fff;
  }
  .site-header.menu-open .main-nav a::after {
  content: none;
  display: none;
}
  .site-header.menu-open .menu-drawer-actions {
    display: flex;
    grid-area: 4 / 1 / 5 / 3;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px max(18px, env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255, 255, 255, .22);
    background: rgba(3, 71, 92, .2);
  }
  .site-header.menu-open .menu-actions,
  .site-header.menu-open.header-scrolled .menu-actions {
    position: relative;
    display: flex;
    grid-area: 3 / 1 / 4 / 3;
      justify-content: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 12px 18px;
    border-top: 1px solid rgba(255, 255, 255, .16);
    background: transparent;
  }
  .site-header.menu-open .menu-actions {
  align-items: center;
}
.site-header.menu-open .menu-actions > .menu-icon-link,
.site-header.menu-open .menu-actions .cuenta-dropdown-toggle {
  position: relative;
}
.site-header.menu-open .menu-actions .badge {
  position: absolute;
  top: -6px;
  right: -6px;
  margin: 0;
}
  .site-header.menu-open .menu-actions > .menu-icon-link,
  .site-header.menu-open .menu-actions .cuenta-dropdown-toggle {
    display: inline-flex;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
  }
  .site-header.menu-open .menu-actions .cuenta-dropdown {
    position: static;
  }
  .site-header.menu-open .menu-actions .cuenta-dropdown-panel {
    top: auto;
    right: auto;
    bottom: calc(100% + 8px);
    left: 50%;
    width: min(18rem, calc(100% - 2rem));
    transform: translate(-50%, -6px);
  }
  .site-header.menu-open .menu-actions .cuenta-dropdown.is-open .cuenta-dropdown-panel {
    transform: translate(-50%, 0);
  }
  .site-header.menu-open .menu-drawer-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: 12px;
    color: #fff;
    font: 600 14px var(--shell-display, sans-serif);
    text-align: center;
    text-decoration: none;
  }
  .site-header.menu-open .menu-drawer-delivery { background: rgba(255, 255, 255, .14); }
  .site-header.menu-open .menu-drawer-actions .flag {
    display: inline-flex;
    flex: none;
    width: 24px;
    height: 18px;
    overflow: hidden;
  }
  .site-header.menu-open .menu-drawer-actions .flag img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .site-header.menu-open .menu-drawer-account svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
  }
  body.mobile-menu-open { overflow: hidden; }
}

@media (max-width: 700px) {
  .site-header .topbar { justify-content: normal; align-items: center; }
  .site-header .topbar .cuenta-dropdown-panel {
    position: fixed;
    top: 68px;
    right: 8px;
    left: auto;
    box-sizing: border-box;
    width: min(18rem, calc(100vw - 1rem));
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
  }
  .site-header .header-search {
    flex: 0 0 30px;
    align-self: center;
    display: flex;
    align-items: center;
    width: 30px;
    height: 30px;
    position: static;
    margin: 0;
    transform: none;
  }
  .site-header .search-box {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    min-height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 136, 179, .12);
    color: var(--shell-deep);
  }
  .site-header .search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    min-height: 30px;
    max-height: 30px;
    box-sizing: border-box;
    padding: 0;
    border: 0;
    border-radius: 50%;
    line-height: 0;
    color: var(--shell-deep);
  }
  .site-header .header-search .search-box > .search-submit {
    flex: 0 0 30px;
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    height: 30px;
    min-height: 30px;
    max-height: 30px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    transform: none;
  }
  .site-header .search-submit svg { display: block; width: 16px; height: 16px; }
  .site-header .header-tools { margin-left: 0; }
  .site-header .menu-inner { min-height: 52px; padding: 7px 16px; }
  .site-header.menu-open .menu-inner {
    width: 74vw;
    min-width: min(280px, 74vw);
    max-width: 360px;
  }
}

@media (min-width: 701px) and (max-width: 1100px) {
  .site-header.menu-open .menu-inner { width: 38vw; }
}

@media (max-width: 700px) {
  :root { --search-offset: 0px; } /* ajuste fino solo para la lupa */

  .site-header .header-search {
    position: relative;
    top: 0;
    align-self: center;
    margin: 0;
    padding: 0;
    height: 30px;
    transform: translateY(var(--search-offset));
  }
  .site-header .search-box {
    position: static;
    align-self: center;
    margin: 0;
    top: 0;
    transform: none;
  }
}

@media (min-width: 701px) and (max-width: 1100px) {
  .site-header .topbar {
    grid-template-columns: minmax(0, 1fr) 40px auto;
  }
  .site-header .header-search,
  .site-header .search-box,
  .site-header .header-search .search-box > .search-submit {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
  }
  .site-header .header-search .search-box > .search-submit {
    flex-basis: 40px;
  }
  .site-header .header-search .search-box {
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 136, 179, .12);
  }
  .site-header .header-search .search-box input,
  .site-header .header-tools .account-link > span:not(.icon) {
    display: none;
  }
  .site-header .header-search .search-submit {
    flex: 0 0 40px;
    padding: 0;
  }
  .site-header .header-tools {
    gap: 10px;
    min-width: 0;
    padding-right: 10px;
  }
  .site-header .header-tools .icon {
    width: 40px;
    height: 40px;
  }
  .site-header .header-tools .icon > svg,
  .site-header .search-submit svg {
    width: 21px;
    height: 21px;
  }
}

.site-header.search-open { z-index: 1200; }
.site-header .header-search { position: relative; min-width: 0; }
.site-header .search-box { position: relative; }
.site-header .search-box input[data-buscador-input] { min-width: 0; }
.site-header .search-submit { position: relative; }
.site-header .search-spinner { display: none; width: 15px; height: 15px; border: 2px solid rgba(0, 118, 139, .24); border-top-color: var(--teal, #0088a3); border-radius: 50%; font-size: 0 !important; animation: buscador-giro .7s linear infinite; }
.site-header .search-box.is-loading .search-submit svg { display: none; }
.site-header .search-box.is-loading .search-spinner { display: block; }
.site-header .search-clear, .site-header .search-close { display: inline-grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--teal-fuerte, #006c84); font: 500 21px/1 var(--shell-display, sans-serif); cursor: pointer; }
.site-header .search-clear:hover, .site-header .search-close:hover { background: var(--cielo, #dff0f6); }
.site-header .search-clear[hidden], .site-header .search-close[hidden] { display: none !important; }
.site-header .search-close { display: none; }
.site-header .search-popover { position: absolute; top: calc(100% + 10px); left: 0; z-index: 1202; display: flex; box-sizing: border-box; flex-direction: column; width: 100%; max-height: min(72vh, 42rem); overflow: hidden; border: 1px solid var(--line-2, #d7e5e9); border-radius: 18px; background: #fff; box-shadow: 0 18px 44px rgba(9, 43, 62, .2); color: var(--shell-ink, #173861); }
.site-header .search-popover[hidden] { display: none !important; }
.site-header .search-results { min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.site-header .search-group { padding: 12px; }
.site-header .search-group + .search-group { border-top: 1px solid var(--line-2, #e1eaed); }
.site-header .search-group-title { margin: 0 0 8px; color: var(--muted, #71848d); font: 700 .72rem/1.3 var(--font-body, var(--shell-display, sans-serif)); }
.site-header .search-product { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 72px; padding: 8px; border-radius: 12px; color: inherit; text-decoration: none; }
.site-header .search-product:hover, .site-header .search-product[aria-selected="true"] { background: #f1f9fa; }
.site-header .search-product-image { display: grid; width: 56px; height: 56px; place-items: center; overflow: hidden; border-radius: 10px; background: #f4fafb; color: var(--teal-texto, #00768b); font: 700 .72rem var(--shell-mono, monospace); }
.site-header .search-product-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.site-header .search-image-placeholder { display: grid; width: 100%; height: 100%; place-items: center; }
.site-header .search-product-info { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.site-header .search-product-info strong { flex: 1 0 100%; min-width: 0; color: var(--shell-ink, #173861); font: 700 .88rem/1.3 var(--shell-display, sans-serif); overflow-wrap: anywhere; }
.site-header .search-product-info code { color: var(--muted, #6c8089); font: 400 .7rem/1.3 var(--shell-mono, monospace); overflow-wrap: anywhere; }
.site-header .search-brand-pill { max-width: 100%; padding: 2px 7px; overflow: hidden; border-radius: 999px; background: #edf5f5; color: #426971; font: 600 .65rem/1.4 var(--shell-display, sans-serif); text-overflow: ellipsis; white-space: nowrap; }
.site-header .search-product-price { color: var(--teal-fuerte, #006c84); font: 700 .77rem/1.3 var(--shell-display, sans-serif); text-align: right; white-space: nowrap; }
.site-header .search-product mark { border-radius: 3px; background: #d8f2ee; color: #075f68; }
.site-header .search-group-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.site-header .search-group-chips .search-group-title { flex: 1 0 100%; }
.site-header .search-chip { display: inline-flex; min-height: 34px; align-items: center; padding: 6px 11px; border: 1px solid var(--line-2, #d7e5e9); border-radius: 999px; background: #f7fbfc; color: var(--teal-fuerte, #006c84); font: 600 .75rem/1.3 var(--shell-display, sans-serif); text-decoration: none; }
.site-header .search-chip:hover, .site-header .search-chip[aria-selected="true"] { border-color: var(--teal, #0088a3); background: var(--cielo, #dff0f6); }
.site-header .search-state { margin: 0; padding: 20px 16px; color: var(--muted, #71848d); font: 500 .85rem/1.45 var(--shell-display, sans-serif); }
.site-header .search-state[hidden] { display: none !important; }
.site-header .search-all { display: block; flex: none; padding: 13px 16px; border-top: 1px solid var(--line-2, #e1eaed); background: #f7fbfc; color: var(--teal-fuerte, #006c84); font: 700 .82rem/1.35 var(--shell-display, sans-serif); text-align: center; text-decoration: none; }
.site-header .search-all:hover { background: var(--cielo, #dff0f6); }
.site-header .search-all[hidden] { display: none !important; }
.site-header .search-live { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

@keyframes buscador-giro { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
  .site-header.search-open { position: sticky; top: 0; z-index: 1200; }
  .site-header.search-open .topbar,
  .site-header.header-scrolled.search-open .topbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1201;
    display: flex;
    box-sizing: border-box;
    width: 100%;
    height: 68px;
    min-height: 68px;
    align-items: center;
    gap: 0;
    padding: 10px 14px;
    overflow: visible;
    border-bottom: 1px solid var(--line-2, #d7e5e9);
    background: #fff;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .site-header.search-open .topbar > .brand,
  .site-header.search-open .header-tools { display: none !important; }
  .site-header.search-open .header-search { position: static; flex: 1 1 auto; width: 100%; height: auto; max-width: none; margin: 0; padding: 0; transform: none; }
  .site-header.search-open .search-box { display: flex; width: 100%; height: 46px; min-height: 46px; align-items: center; gap: 8px; padding: 0 8px; border: 1px solid var(--line-2, #d7e5e9); border-radius: 14px; background: #fff; }
  .site-header.search-open .search-box input[data-buscador-input] { display: block !important; flex: 1 1 auto; width: 100%; min-width: 0; font-size: 16px; }
  .site-header.search-open .search-submit { display: inline-flex; flex: 0 0 30px; width: 30px; min-width: 30px; max-width: 30px; height: 30px; min-height: 30px; max-height: 30px; }
  .site-header.search-open .search-close { display: inline-grid; }
  .site-header.search-open .search-popover { position: fixed; top: var(--search-popover-top, 68px); right: 0; left: 0; width: 100vw; max-width: 100vw; max-height: calc(100dvh - var(--search-popover-top, 68px) - 8px); border-right: 0; border-left: 0; border-radius: 0 0 18px 18px; }
  .site-header.search-open .search-product { min-height: 72px; }
  .site-header.search-open .search-chip { min-height: 44px; }
}