/* Que el dropdown no se corte */
.site-header,
.site-header-mobile,
.balinot-header,
.balinot-header__inner,
.balinot-header__right,
.balinot-header__search,
.balinot-mobile__search {
  overflow: visible !important;
}

/* Search dropdown */
.balinot-header__search,
.balinot-mobile__search {
  position: relative;
}

.balinot-search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: auto;
  right: 0;
  width: min(360px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  border-radius: var(--balinot-nav-radius-2xs, 12px);
  box-sizing: border-box;
  overflow: hidden;

  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 0.12s ease,
    transform 0.12s ease;

  z-index: 999999 !important; /* por encima de todo */
}

.balinot-search-results.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.balinot-search-results__header,
.balinot-search-results__footer,
.balinot-search-empty {
  padding: 14px 16px;
}

.balinot-search-results__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.balinot-search-results__eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.55);
}

.balinot-search-results__summary {
  font-size: 12px;
  line-height: 1.4;
  color: #0f172a;
}

.balinot-search-results__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.balinot-search-results__item + .balinot-search-results__item {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.balinot-search-result {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  text-decoration: none;
  color: inherit;
}

.balinot-search-result:hover {
  background: rgba(15, 23, 42, 0.03);
}

.balinot-search-result__thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--balinot-nav-radius-xs, 14px);
  background: #f8fafc;
  overflow: hidden;
}

.balinot-search-result__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.balinot-search-result__thumb.is-empty {
  border: 1px dashed rgba(15, 23, 42, 0.12);
}

.balinot-search-result__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.balinot-search-result__title {
  font-size: 13px;
  line-height: 1.4;
  color: #0f172a;
}

.balinot-search-result__price {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(15, 23, 42, 0.72);
}

.balinot-search-result__price del {
  color: rgba(100, 116, 139, 0.85);
}

.balinot-search-result__price ins {
  padding: 0;
  background: transparent;
  color: #0f172a;
  font-weight: 700;
  text-decoration: none;
}

.balinot-search-result__price .amount {
  white-space: nowrap;
}

.balinot-search-results__footer {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.balinot-search-results__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--balinot-nav-radius-pill, 9999px);
  background: #0f172a;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

.balinot-search-results__link.is-secondary {
  background: transparent;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.balinot-search-empty {
  display: grid;
  gap: 10px;
}

.balinot-search-empty__title {
  font-size: 13px;
  line-height: 1.4;
  color: #0f172a;
}

.balinot-search-empty__body {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(15, 23, 42, 0.72);
}

.balinot-search-empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 782px) {
  .balinot-search-results {
    width: min(100vw - 32px, 420px);
    max-width: none;
  }

  .balinot-search-result {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
  }

  .balinot-search-result__thumb {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 1024px) {
  .balinot-mobile__search .balinot-search-results {
    position: static;
    width: 100%;
    max-width: 100%;
    margin-top: 12px;
    display: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .balinot-mobile__search .balinot-search-results.is-open {
    display: block;
  }
}
