.busqueda-app {
  padding-top: var(--mp-header-offset);
  padding-bottom: 108px;
}

/* Altura compacta · busqueda.php (solo CTAs centrados en el header) */
body.busqueda-shell-page {
  --mp-header-offset: 92px;
}

body.busqueda-shell-page.busqueda-shell-page--logged {
  --mp-header-offset: 136px;
}

@media (min-width: 769px) {
  body.busqueda-shell-page {
    --mp-header-offset: 88px;
  }

  body.busqueda-shell-page.busqueda-shell-page--logged {
    --mp-header-offset: 128px;
  }
}

.modern-header.busqueda-header-simple {
  border-bottom: 1px solid var(--mp-border, rgba(123, 47, 190, 0.16));
}

.busqueda-header-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  padding-top: 10px;
  padding-bottom: 10px;
  width: 100%;
}

.busqueda-header-simple .busqueda-session-bar {
  text-align: center;
}

.busqueda-header-main-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 10px;
  min-height: 44px;
}

.busqueda-session-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  font-size: 0.86rem;
}

.busqueda-session-bar__hi {
  color: var(--mp-text-muted, #7d6ca5);
  font-weight: 600;
}

.busqueda-session-bar__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1rem;
}

.busqueda-session-bar__links a {
  color: #5f2294;
  font-weight: 700;
  text-decoration: none;
}

.busqueda-session-bar__links a:hover {
  text-decoration: underline;
}

.busqueda-cart-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: #ede4ff;
  color: #5f2294;
}

.busqueda-section {
  padding: 2px 0 10px;
}

.busqueda-shell {
  max-width: 980px;
}

.busqueda-context-card {
  margin-bottom: 12px;
}

.busqueda-search-card {
  background: linear-gradient(145deg, #ffffff 0%, #faf5ff 100%);
  border: 1px solid rgba(123, 47, 190, 0.2);
  border-radius: 24px;
  box-shadow: 0 14px 28px rgba(95, 34, 148, .1);
  padding: 20px;
  display: grid;
  gap: 18px;
}

.busqueda-hero {
  display: grid;
  gap: 6px;
}

.busqueda-title {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--mp-text);
}

.busqueda-subtitle {
  margin: 0;
  color: var(--mp-text-muted);
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.45;
}

.busqueda-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.busqueda-field .form-label {
  margin-bottom: 8px;
  color: var(--mp-text);
  font-size: .9rem;
  font-weight: 700;
}

.busqueda-select-wrapper {
  position: relative;
}

.busqueda-select-wrapper i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mp-text-muted);
  pointer-events: none;
}

.busqueda-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  min-height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(123, 47, 190, .22);
  background-color: #fff;
  color: var(--mp-text);
  padding: .88rem 2.6rem .88rem 2.35rem;
  font-size: .95rem;
  font-weight: 600;
  background-image: linear-gradient(45deg, transparent 50%, #7462a1 50%), linear-gradient(135deg, #7462a1 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 4px 12px rgba(96, 62, 139, .08);
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.busqueda-select:focus {
  outline: none;
  border-color: rgba(123, 47, 190, .48);
  box-shadow: 0 0 0 3px rgba(123, 47, 190, .12);
}

.busqueda-submit {
  border: 0;
  min-height: 54px;
  border-radius: 16px;
  padding: 0 1.25rem;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #7b2fbe 0%, #5f2294 100%);
  box-shadow: 0 8px 16px rgba(95, 34, 148, .24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.busqueda-submit:hover {
  filter: saturate(1.06);
}

.busqueda-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.busqueda-header-simple .busqueda-header-actions {
  flex: 1 1 100%;
  margin-left: 0 !important;
  margin-right: 0 !important;
  justify-content: center !important;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.busqueda-header-register-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 700;
  font-size: 0.875rem;
  border: 2px solid #d7cafc !important;
  color: #5f46e8 !important;
  background: #fff !important;
  text-decoration: none;
  text-align: center;
}

.busqueda-header-register-btn:hover {
  border-color: #b69cff !important;
  color: #4f36c4 !important;
}

/* Colores sólo en header de busqueda.php (no afecta landing u otras vistas) */
.modern-header.busqueda-header-simple .busqueda-header-login-btn {
  background: linear-gradient(135deg, #7b2fbe 0%, #5f2294 100%) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 8px 16px rgba(95, 34, 148, .24);
}

.modern-header.busqueda-header-simple .busqueda-header-login-btn:hover {
  color: #fff !important;
  filter: brightness(1.07);
}

.modern-header.busqueda-header-simple .busqueda-header-register-btn {
  border: 0 !important;
  color: #fff !important;
  /* #fff !important en .busqueda-header-register-btn base anulaba este fondo si no lleva también !important */
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%) !important;
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.45);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}

.modern-header.busqueda-header-simple .busqueda-header-register-btn:hover {
  border: 0 !important;
  color: #fff !important;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  filter: brightness(1.02);
}

.busqueda-header-login-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 0.875rem;
  box-shadow: 0 8px 16px rgba(95, 34, 148, .22);
  text-align: center;
}

.header.modern-header .busqueda-header-actions .busqueda-header-login-btn {
  display: inline-flex !important;
}

@media (max-width: 991px) {
  .header.modern-header .busqueda-header-actions .busqueda-header-login-btn {
    display: inline-flex !important;
  }
}

@media (max-width: 768px) {

  .busqueda-form {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .busqueda-submit {
    width: 100%;
  }

  .busqueda-search-card {
    padding: 16px;
    border-radius: 20px;
    gap: 14px;
  }

  .busqueda-title {
    font-size: 1.08rem;
  }

  .busqueda-subtitle {
    font-size: .84rem;
  }

  body.busqueda-shell-page {
    --mp-header-offset: 86px;
  }

  body.busqueda-shell-page.busqueda-shell-page--logged {
    --mp-header-offset: 130px;
  }

  .busqueda-header-simple .busqueda-header-actions {
    flex-wrap: nowrap !important;
    gap: 6px !important;
    justify-content: center !important;
  }

  /* Misma fila: mitad Pantalla cada uno, texto puede pasar a 2 líneas dentro del pill */
  .modern-header.busqueda-header-simple .busqueda-header-login-btn,
  .modern-header.busqueda-header-simple .busqueda-header-register-btn {
    flex: 1 1 0;
    min-width: 0;
    font-size: clamp(0.58rem, 2.35vw, 0.74rem) !important;
    line-height: 1.2;
    padding: 6px 7px !important;
    white-space: normal !important;
    word-break: break-word;
    text-align: center;
    border-radius: 999px !important;
    max-width: none !important;
    min-height: 0 !important;
  }

  .busqueda-session-bar {
    font-size: 0.8rem;
  }
}

@media (max-width: 420px) {
  .modern-header.busqueda-header-simple .busqueda-header-login-btn,
  .modern-header.busqueda-header-simple .busqueda-header-register-btn {
    font-size: clamp(0.55rem, 2.9vw, 0.68rem) !important;
    padding: 6px 5px !important;
    line-height: 1.18;
    border-radius: 14px !important;
  }
}

/* Nota bajo el buscador por ciudad (busqueda.php) */
.busqueda-map-intro {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  font-size: .86rem;
  color: var(--mp-text-muted, #5c4a6f);
  font-weight: 500;
  line-height: 1.45;
}

.busqueda-map-intro a {
  color: #5f2294;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
