*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ============= BOTÓN FLOTANTE ============= */

.filter-btn {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 40;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.32);

  background: radial-gradient(circle at 30% 20%, rgba(34, 197, 94, 0.22), transparent 34%),
    rgba(15, 23, 42, 0.92);
  color: #e5e7eb;

  font-size: 0.9rem;
  font-weight: 600;

  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(16px);

  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.filter-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.64);
}

.filter-btn-icon svg {
  display: block;
}

.filter-btn-text {
  display: none;
  white-space: nowrap;
}

.filter-count {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: #22c55e;
  color: #022c22;
  font-size: 0.7rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.32);
}

.filter-count.hidden {
  display: none;
}

body:not(.dark) .filter-btn {
  background: radial-gradient(circle at 30% 20%, rgba(34, 197, 94, 0.2), transparent 34%),
    rgba(255, 255, 255, 0.94);
  color: #0f172a;
  border-color: rgba(148, 163, 184, 0.36);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
}

/* ============= OVERLAY ============= */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.58);
  backdrop-filter: blur(5px);
  z-index: 1000;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease-out;
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

body:not(.dark) .overlay {
  background: rgba(15, 23, 42, 0.34);
}

/* ============= PANEL (BOTTOM SHEET / SIDEBAR) ============= */

.filter-card {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;

  display: flex;
  flex-direction: column;

  max-height: min(88vh, 780px);
  min-height: min(54vh, 460px);
  padding: 0.75rem 0.95rem max(0.95rem, env(safe-area-inset-bottom));

  border-radius: 24px 24px 0 0;
  border: 1px solid rgba(148, 163, 184, 0.24);

  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98)),
    rgba(15, 23, 42, 0.98);
  color: #e5e7eb;
  box-shadow: 0 -24px 60px rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(22px);

  transform: translateY(calc(100% + 18px));
  opacity: 0;
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease-out;
  will-change: transform, opacity;
  overscroll-behavior: contain;
}

.filter-card.active {
  transform: translateY(0);
  opacity: 1;
}

.filter-card.closing {
  transform: translateY(calc(100% + 18px));
  opacity: 0;
}

body.filters-open {
  overflow: hidden;
}

@supports (height: 100dvh) {
  .filter-card {
    max-height: min(88dvh, 780px);
  }
}


.filter-card__body {
  min-height: 0;
  overflow-y: auto;
  padding: 0.1rem 0.05rem 0.25rem;
  scrollbar-width: thin;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.filter-card__body::-webkit-scrollbar {
  width: 6px;
}

.filter-card__body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

@media (min-width: 900px) {
  .filter-card {
    left: auto;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 390px;
    max-height: min(82vh, 720px);
    min-height: auto;
    border-radius: 24px;
    padding: 0.95rem;
    box-shadow: 0 26px 70px rgba(2, 6, 23, 0.64);
  }
}

body:not(.dark) .filter-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98)),
    rgba(255, 255, 255, 0.98);
  color: #0f172a;
  border-color: rgba(226, 232, 240, 0.96);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.26);
}

/* ============= CABECERA ============= */

.drag-indicator {
  width: 54px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.36), rgba(226, 232, 240, 0.78), rgba(148, 163, 184, 0.36));
  margin: 0.1rem 0 0.85rem;
  align-self: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.24);
}

@media (min-width: 900px) {
  .drag-indicator {
    display: none;
  }
}


.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.filter-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.filter-subtitle {
  margin: 0.18rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #94a3b8;
}

body:not(.dark) .filter-subtitle {
  color: #64748b;
}

/* ============= SECCIONES ============= */

.filter-section {
  margin-top: 0.68rem;
  padding-top: 0.68rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.filter-section--search {
  margin-top: 0.15rem;
  padding-top: 0.15rem;
  border-top: 0;
}

body:not(.dark) .filter-section {
  border-top-color: rgba(226, 232, 240, 0.92);
}

.filter-section-title {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.42rem;
  font-weight: 800;
}

body:not(.dark) .filter-section-title {
  color: #64748b;
}

/* ============= BUSCADOR ============= */

.filter-search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.filter-search--premium {
  min-height: 48px;
  padding: 0.25rem 0.3rem 0.25rem 0.72rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(2, 6, 23, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.filter-search__icon {
  opacity: 0.82;
  font-size: 0.95rem;
}

.filter-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  color: #e5e7eb;
  font-size: 0.86rem;
  padding: 0.55rem 0.2rem;
}

.filter-search input::placeholder {
  color: #64748b;
}

.filter-search__button {
  border: 0;
  border-radius: 999px;
  padding: 0.48rem 0.72rem;
  background: #22c55e;
  color: #022c22;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(34, 197, 94, 0.2);
}

body:not(.dark) .filter-search--premium {
  background: #ffffff;
  border-color: rgba(226, 232, 240, 0.95);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

body:not(.dark) .filter-search input {
  color: #0f172a;
}

body:not(.dark) .filter-search input::placeholder {
  color: #94a3b8;
}

/* ============= CAMPOS ============= */

.filter-row {
  display: flex;
  align-items: center;
  gap: 0.66rem;
  padding: 0.28rem 0;
}

.filter-row--card {
  align-items: stretch;
  padding: 0.58rem;
  margin-bottom: 0.52rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.filter-row__icon,
.filter-row .icon {
  width: 2rem;
  height: 2rem;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 1rem;
  background: rgba(34, 197, 94, 0.11);
}

.filter-field {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.filter-field label {
  font-size: 0.72rem;
  color: #cbd5e1;
  font-weight: 700;
}

.filter-field__hint {
  font-size: 0.66rem;
  color: #64748b;
  margin-top: -0.02rem;
}

.filter-field select {
  width: 100%;
  margin-top: 0.32rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.62);
  color: #e5e7eb;
  font-size: 0.82rem;
  padding: 0.52rem 0.7rem;
  outline: none;
}

.filter-field select:focus,
.filter-search--premium:focus-within {
  border-color: rgba(34, 197, 94, 0.52);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

body:not(.dark) .filter-row--card {
  background: rgba(248, 250, 252, 0.94);
  border-color: rgba(226, 232, 240, 0.95);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.045);
}

body:not(.dark) .filter-row__icon,
body:not(.dark) .filter-row .icon {
  background: rgba(34, 197, 94, 0.1);
}

body:not(.dark) .filter-field label {
  color: #334155;
}

body:not(.dark) .filter-field__hint {
  color: #94a3b8;
}

body:not(.dark) .filter-field select {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(226, 232, 240, 0.95);
}

/* ============= BOTONES PEQUEÑOS ============= */

.icon-btn {
  border: none;
  border-radius: 999px;
  padding: 0.35rem 0.62rem;
  font-size: 0.78rem;
  background: rgba(148, 163, 184, 0.12);
  color: #e5e7eb;
  cursor: pointer;
}

.icon-btn.primary {
  background: #22c55e;
  color: #022c22;
}

body:not(.dark) .icon-btn {
  color: #0f172a;
  background: rgba(226, 232, 240, 0.8);
}

/* ============= MÁS FILTROS (COLLAPSIBLE) ============= */

.more-filters {
  width: 100%;
  margin-top: 0.1rem;
  padding: 0.62rem 0.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

body:not(.dark) .more-filters {
  color: #475569;
}

.more-filters-arrow {
  font-size: 0.72rem;
  opacity: 0.76;
}

.advanced-filters {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.25s ease;
}

.advanced-filters.expanded {
  max-height: 560px;
  opacity: 1;
}

/* ============= FOOTER ============= */

.filter-footer {
  margin-top: 0.72rem;
  display: flex;
  justify-content: space-between;
  gap: 0.58rem;
}

.filter-footer--sticky {
  flex: 0 0 auto;
  padding-top: 0.72rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.primary-btn,
.secondary-btn {
  flex: 1;
  border-radius: 999px;
  padding: 0.66rem 0.95rem;
  font-size: 0.82rem;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 800;
}

.primary-btn {
  background: #22c55e;
  color: #022c22;
  box-shadow: 0 12px 24px rgba(34, 197, 94, 0.22);
}

.secondary-btn {
  background: rgba(2, 6, 23, 0.46);
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

body:not(.dark) .filter-footer--sticky {
  border-top-color: rgba(226, 232, 240, 0.92);
}

body:not(.dark) .secondary-btn {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(226, 232, 240, 0.95);
}

/* Utilidad genérica */
.hidden {
  display: none !important;
}

/* ============= CHIPS DE FILTROS ACTIVOS ============= */

.filter-section--chips {
  padding-top: 0.58rem;
}

.filter-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
}

.filter-summary-title {
  font-size: 0.72rem;
  color: #cbd5e1;
  font-weight: 800;
}

.filter-summary-text {
  flex: 0 0 auto;
  font-size: 0.66rem;
  color: #94a3b8;
  font-weight: 700;
}

.active-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 1.75rem;
}

.filter-chip {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 0.36rem 0.55rem;
  font-size: 0.68rem;
  line-height: 1;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.36);
  color: #e5e7eb;
}

.filter-chip--active {
  cursor: pointer;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.28);
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.filter-chip--active:hover {
  transform: translateY(-1px);
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.42);
}

.filter-chip--empty {
  color: #94a3b8;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.08);
}

.filter-chip__label {
  color: #86efac;
}

.filter-chip__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-chip__close {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.28);
  color: #bbf7d0;
  font-size: 0.8rem;
  line-height: 1;
}

body:not(.dark) .filter-summary-title {
  color: #334155;
}

body:not(.dark) .filter-summary-text,
body:not(.dark) .filter-chip--empty {
  color: #64748b;
}

body:not(.dark) .filter-chip {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(226, 232, 240, 0.96);
}

body:not(.dark) .filter-chip--active {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.24);
}

body:not(.dark) .filter-chip__label {
  color: #15803d;
}

body:not(.dark) .filter-chip__close {
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
}


/* ============= FASE 4: BOTTOM SHEET MOBILE PREMIUM ============= */
@media (max-width: 899px) {
  .filter-card {
    left: 12px;
    right: 12px;
    width: auto;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    overflow-x: hidden;

    border-radius: 28px 28px 0 0;
    box-shadow: 0 -28px 72px rgba(2, 6, 23, 0.92);
  }

  .filter-footer--sticky {
    position: sticky;
    bottom: 0;
    z-index: 2;

    margin-left: 0;
    margin-right: 0;
    margin-bottom: calc(-1 * max(0.95rem, env(safe-area-inset-bottom)));

    width: 100%;
    box-sizing: border-box;

    padding: 0.72rem 0 max(0.95rem, env(safe-area-inset-bottom));

    background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.98));
    backdrop-filter: blur(16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .filter-card,
  .overlay {
    transition: none !important;
  }
}


/* ============= FASE 5: CATEGORÍAS VISUALES HORIZONTALES ============= */
.filter-section--categories {
  border-top: 0;
  margin-top: 0.2rem;
  padding-top: 0.15rem;
}

.category-strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.42rem;
}

.category-strip-header .filter-section-title {
  margin-bottom: 0;
}

.category-strip-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #64748b;
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.category-chips {
  display: flex;
  gap: 0.48rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.05rem 0.05rem 0.52rem;
  margin-inline: -0.05rem;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.category-chips::-webkit-scrollbar {
  display: none;
}

.category-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 38px;
  max-width: 190px;
  padding: 0.45rem 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.34);
  color: #cbd5e1;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.category-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 197, 94, 0.34);
}

.category-chip.active {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.22), rgba(16, 185, 129, 0.11));
  border-color: rgba(34, 197, 94, 0.46);
  color: #ecfdf5;
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.12);
}

.category-chip__icon {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
}

.category-chip__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.dark) .category-strip-hint {
  color: #94a3b8;
}

body:not(.dark) .category-chip {
  background: #ffffff;
  color: #334155;
  border-color: rgba(226, 232, 240, 0.96);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.045);
}

body:not(.dark) .category-chip.active {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(240, 253, 244, 0.96));
  border-color: rgba(34, 197, 94, 0.38);
  color: #166534;
}

body:not(.dark) .category-chip__icon {
  background: rgba(34, 197, 94, 0.1);
}

/* ============= FASE 7: SKELETON / LOADING DE FILTROS ============= */
.filter-loading {
  margin-top: 0.68rem;
  padding: 0.72rem;
  border-radius: 20px;
  border: 1px solid rgba(34, 197, 94, 0.16);
  background:
    radial-gradient(circle at 12% 20%, rgba(34, 197, 94, 0.14), transparent 34%),
    rgba(2, 6, 23, 0.32);
  overflow: hidden;
}

.filter-loading__header {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: #bbf7d0;
  margin-bottom: 0.58rem;
}

.filter-loading__dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.42);
  animation: filterLoadingPulse 1.25s ease-out infinite;
}

.filter-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

.filter-skeleton-pill,
.filter-skeleton-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
}

.filter-skeleton-pill {
  height: 1.7rem;
}

.filter-skeleton-pill--wide {
  width: 86%;
}

.filter-skeleton-card {
  grid-column: span 1;
  height: 3.15rem;
  border-radius: 18px;
}

.filter-skeleton-pill::after,
.filter-skeleton-card::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-105%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  animation: filterSkeletonShimmer 1.35s ease-in-out infinite;
}

.filter-card.is-loading-catalogs [data-filter-field="categorySelect"],
.filter-card.is-loading-catalogs [data-filter-field="subcategorySelect"],
.filter-card.is-loading-catalogs [data-filter-field="districtSelect"],
.filter-card.is-loading-catalogs [data-filter-field="priceRange"],
.filter-card.is-loading-catalogs [data-filter-field="businessType"] {
  opacity: 0.74;
}

.filter-card.is-loading-catalogs select[aria-busy="true"] {
  cursor: wait;
}

body:not(.dark) .filter-loading {
  background:
    radial-gradient(circle at 12% 20%, rgba(34, 197, 94, 0.12), transparent 34%),
    rgba(248, 250, 252, 0.94);
  border-color: rgba(34, 197, 94, 0.18);
}

body:not(.dark) .filter-loading__header {
  color: #166534;
}

body:not(.dark) .filter-skeleton-pill,
body:not(.dark) .filter-skeleton-card {
  background: rgba(203, 213, 225, 0.55);
}

@keyframes filterLoadingPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.42);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

@keyframes filterSkeletonShimmer {
  100% {
    transform: translateX(105%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .filter-loading__dot,
  .filter-skeleton-pill::after,
  .filter-skeleton-card::after {
    animation: none !important;
  }
}

/* ============= DRAG TO CLOSE BOTTOM SHEET ============= */

.drag-indicator,
.filter-header {
  touch-action: none;
  user-select: none;
}

.filter-card__body {
  touch-action: pan-y;
}

.filter-card.is-dragging {
  transition: none !important;
}

/* ============= FASE D1I: PREMIUM SELECT MODAL ============= */

.filter-native-select {
  display: none;
}

.premium-select-trigger {
  width: 100%;
  margin-top: 0.38rem;
  min-height: 46px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;

  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  padding: 0.62rem 0.76rem;

  background:
    radial-gradient(circle at 10% 10%, rgba(34, 197, 94, 0.13), transparent 35%),
    rgba(2, 6, 23, 0.52);

  color: #e5e7eb;
  font-size: 0.83rem;
  font-weight: 800;
  text-align: left;

  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 26px rgba(2, 6, 23, 0.16);

  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.premium-select-trigger:active {
  transform: scale(0.985);
}

.premium-select-trigger:hover {
  border-color: rgba(34, 197, 94, 0.38);
}

.premium-select-trigger.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.premium-select-trigger__value {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.premium-select-trigger__chevron {
  flex: 0 0 auto;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  font-size: 1.4rem;
  line-height: 1;
}

.premium-select-layer {
  position: fixed;
  inset: 0;
  z-index: 1400;

  display: flex;
  align-items: flex-end;
  justify-content: center;

  padding: 1rem 0.85rem max(1rem, env(safe-area-inset-bottom));

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease-out;
}

.premium-select-layer.active {
  opacity: 1;
  pointer-events: auto;
}

.premium-select-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(8px);
}

.premium-select-modal {
  position: relative;
  z-index: 1;

  width: min(100%, 520px);
  max-height: min(72dvh, 620px);

  display: flex;
  flex-direction: column;

  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.22);

  background:
    radial-gradient(circle at 14% 0%, rgba(34, 197, 94, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(30, 41, 59, 0.99), rgba(15, 23, 42, 0.99));

  color: #e5e7eb;
  box-shadow: 0 28px 90px rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(24px);

  transform: translateY(18px) scale(0.98);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.premium-select-layer.active .premium-select-modal {
  transform: translateY(0) scale(1);
}

.premium-select-header {
  flex: 0 0 auto;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;

  padding: 1rem 1rem 0.8rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.premium-select-eyebrow {
  margin: 0 0 0.18rem;
  color: #86efac;
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.premium-select-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.premium-select-close {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: rgba(148, 163, 184, 0.12);
  color: #e5e7eb;

  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
}

.premium-select-options {
  flex: 1;
  min-height: 0;
  overflow-y: auto;

  display: flex;
  flex-direction: column;
  gap: 0.5rem;

  padding: 0.85rem 1rem 1rem;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.premium-select-options::-webkit-scrollbar {
  width: 6px;
}

.premium-select-options::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.34);
  border-radius: 999px;
}

.premium-select-option {
  width: 100%;
  min-height: 48px;

  display: flex;
  align-items: center;
  gap: 0.72rem;

  padding: 0.72rem 0.78rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);

  background: rgba(2, 6, 23, 0.32);
  color: #cbd5e1;

  text-align: left;
  font-size: 0.84rem;
  font-weight: 800;

  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}

.premium-select-option:active {
  transform: scale(0.985);
}

.premium-select-option.active {
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.1)),
    rgba(2, 6, 23, 0.42);

  border-color: rgba(34, 197, 94, 0.42);
  color: #ecfdf5;
}

.premium-select-option__check {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: rgba(148, 163, 184, 0.12);
  color: #86efac;

  font-size: 0.82rem;
  font-weight: 900;
}

.premium-select-option.active .premium-select-option__check {
  background: rgba(34, 197, 94, 0.18);
}

.premium-select-option__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

body:not(.dark) .premium-select-trigger {
  background:
    radial-gradient(circle at 10% 10%, rgba(34, 197, 94, 0.12), transparent 35%),
    #ffffff;
  color: #0f172a;
  border-color: rgba(226, 232, 240, 0.95);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.055);
}

body:not(.dark) .premium-select-trigger__chevron {
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
}

body:not(.dark) .premium-select-backdrop {
  background: rgba(15, 23, 42, 0.38);
}

body:not(.dark) .premium-select-modal {
  background:
    radial-gradient(circle at 14% 0%, rgba(34, 197, 94, 0.13), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.99));
  color: #0f172a;
  border-color: rgba(226, 232, 240, 0.95);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.26);
}

body:not(.dark) .premium-select-header {
  border-bottom-color: rgba(226, 232, 240, 0.92);
}

body:not(.dark) .premium-select-close {
  background: rgba(226, 232, 240, 0.75);
  color: #0f172a;
}

body:not(.dark) .premium-select-option {
  background: #ffffff;
  color: #334155;
  border-color: rgba(226, 232, 240, 0.95);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.045);
}

body:not(.dark) .premium-select-option.active {
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(240, 253, 244, 0.96));
  border-color: rgba(34, 197, 94, 0.38);
  color: #166534;
}

body:not(.dark) .premium-select-option__check {
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
}
/* ============= FASE D1I-2: PREMIUM SELECT MODAL PRO ============= */

body.premium-select-open .filter-card {
  pointer-events: none;
}

body.premium-select-open .premium-select-layer {
  pointer-events: auto;
}

.premium-select-subtitle {
  margin: 0.2rem 0 0;
  max-width: 18rem;
  color: #94a3b8;
  font-size: 0.74rem;
  line-height: 1.35;
  font-weight: 650;
}

.premium-select-search {
  flex: 0 0 auto;
  margin: 0.82rem 1rem 0;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.15rem 0.72rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    radial-gradient(circle at 10% 20%, rgba(34, 197, 94, 0.1), transparent 34%),
    rgba(2, 6, 23, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.premium-select-search:focus-within {
  border-color: rgba(34, 197, 94, 0.46);
  box-shadow:
    0 0 0 3px rgba(34, 197, 94, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.premium-select-search__icon {
  flex: 0 0 auto;
  color: #86efac;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.86;
}

.premium-select-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #e5e7eb;
  font-size: 0.86rem;
  font-weight: 750;
  padding: 0.62rem 0;
}

.premium-select-search input::placeholder {
  color: #64748b;
}

.premium-select-empty {
  flex: 1;
  min-height: 11rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.25rem;
  color: #94a3b8;
  text-align: center;
}

.premium-select-empty__icon {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 197, 94, 0.1);
  font-size: 1.25rem;
}

.premium-select-empty strong {
  color: #e5e7eb;
  font-size: 0.92rem;
  font-weight: 900;
}

.premium-select-empty small {
  max-width: 15rem;
  line-height: 1.35;
  font-size: 0.74rem;
  font-weight: 650;
}

.premium-select-option:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.premium-select-option:not(.active):hover {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(15, 23, 42, 0.52);
}

body:not(.dark) .premium-select-subtitle {
  color: #64748b;
}

body:not(.dark) .premium-select-search {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(226, 232, 240, 0.95);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.045);
}

body:not(.dark) .premium-select-search input {
  color: #0f172a;
}

body:not(.dark) .premium-select-search input::placeholder {
  color: #94a3b8;
}

body:not(.dark) .premium-select-empty {
  color: #64748b;
}

body:not(.dark) .premium-select-empty strong {
  color: #0f172a;
}

body:not(.dark) .premium-select-option:not(.active):hover {
  background: rgba(248, 250, 252, 0.96);
  border-color: rgba(34, 197, 94, 0.26);
}

@media (max-width: 899px) {
  .premium-select-layer {
    padding-inline: 0.75rem;
  }

  .premium-select-modal {
    width: 100%;
    max-height: min(78dvh, 660px);
    border-radius: 30px;
  }

  .premium-select-options {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

/* ============= FASE D1I-3: SELECTOR PREMIUM LUXURY DETAILS ============= */

.premium-select-trigger.has-value {
  border-color: rgba(34, 197, 94, 0.36);
  background:
    radial-gradient(circle at 10% 10%, rgba(34, 197, 94, 0.18), transparent 36%),
    rgba(2, 6, 23, 0.58);
}

.premium-select-trigger.has-value .premium-select-trigger__chevron {
  background: rgba(34, 197, 94, 0.18);
  box-shadow: 0 8px 18px rgba(34, 197, 94, 0.12);
}

.premium-select-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.62rem 1rem 0;
}

.premium-select-count {
  min-width: 0;
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.premium-select-clear {
  flex: 0 0 auto;
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 999px;
  padding: 0.42rem 0.66rem;
  background: rgba(34, 197, 94, 0.1);
  color: #bbf7d0;
  font-size: 0.68rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.premium-select-clear:active {
  transform: scale(0.97);
}

.premium-select-clear.is-disabled,
.premium-select-clear:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.premium-select-option {
  position: relative;
  overflow: hidden;
}

.premium-select-option::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.045) 38%, transparent 72%);
  opacity: 0;
  transform: translateX(-18%);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.premium-select-option:hover::after,
.premium-select-option.active::after {
  opacity: 1;
  transform: translateX(0);
}

.premium-select-option__content {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
}

.premium-select-option__meta {
  display: block;
  color: #64748b;
  font-size: 0.66rem;
  line-height: 1.1;
  font-weight: 750;
}

.premium-select-option.active .premium-select-option__meta {
  color: #86efac;
}

.premium-select-option.is-empty-option {
  border-style: dashed;
  background:
    linear-gradient(135deg, rgba(148, 163, 184, 0.09), rgba(2, 6, 23, 0.22));
}

.premium-select-option:focus-visible,
.premium-select-close:focus-visible,
.premium-select-clear:focus-visible,
.premium-select-trigger:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(34, 197, 94, 0.18),
    0 12px 26px rgba(2, 6, 23, 0.2);
}

body:not(.dark) .premium-select-trigger.has-value {
  background:
    radial-gradient(circle at 10% 10%, rgba(34, 197, 94, 0.16), transparent 36%),
    #ffffff;
  border-color: rgba(34, 197, 94, 0.34);
}

body:not(.dark) .premium-select-count {
  color: #64748b;
}

body:not(.dark) .premium-select-clear {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.22);
  color: #166534;
}

body:not(.dark) .premium-select-option__meta {
  color: #94a3b8;
}

body:not(.dark) .premium-select-option.active .premium-select-option__meta {
  color: #15803d;
}

body:not(.dark) .premium-select-option.is-empty-option {
  background:
    linear-gradient(135deg, rgba(226, 232, 240, 0.55), rgba(255, 255, 255, 0.96));
}

@media (max-width: 899px) {
  .premium-select-toolbar {
    padding-inline: 0.95rem;
  }

  .premium-select-clear {
    padding-inline: 0.62rem;
  }

  .premium-select-option {
    min-height: 54px;
    border-radius: 20px;
  }
}


/* ============= FASE D1I-4: SEARCH INSIDE PREMIUM SELECT ============= */

.premium-select-search {
  position: sticky;
  top: 0;
  z-index: 2;
}

.premium-select-search input::-webkit-search-cancel-button {
  appearance: none;
}

.premium-select-search-clear {
  flex: 0 0 auto;
  width: 1.72rem;
  height: 1.72rem;
  border: 0;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: rgba(148, 163, 184, 0.16);
  color: #e5e7eb;

  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;

  transition: transform 0.16s ease, background 0.16s ease;
}

.premium-select-search-clear:active {
  transform: scale(0.92);
}

.premium-select-search-clear:hover {
  background: rgba(34, 197, 94, 0.18);
}

body:not(.dark) .premium-select-search-clear {
  background: rgba(226, 232, 240, 0.95);
  color: #0f172a;
}

body:not(.dark) .premium-select-search-clear:hover {
  background: rgba(34, 197, 94, 0.12);
}

/* ============= FASE D1I-5: SNAP HEIGHTS BOTTOM SHEET ============= */
@media (max-width: 899px) {
  .filter-card {
    height: min(68vh, 640px);
    min-height: 0;
    max-height: calc(100vh - 12px);
    transition:
      height 0.28s cubic-bezier(0.22, 1, 0.36, 1),
      max-height 0.28s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.26s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.22s ease-out;
  }

  .filter-card.active[data-sheet-state="compact"] {
    height: min(42vh, 430px);
    max-height: min(42vh, 430px);
  }

  .filter-card.active[data-sheet-state="mid"] {
    height: min(68vh, 640px);
    max-height: min(68vh, 640px);
  }

  .filter-card.active[data-sheet-state="expanded"] {
    height: calc(100vh - 12px);
    max-height: calc(100vh - 12px);
  }

  .filter-card.active[data-sheet-state="expanded"] .drag-indicator {
    width: 64px;
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.36), rgba(187, 247, 208, 0.82), rgba(34, 197, 94, 0.36));
  }

  .filter-card.active[data-sheet-state="compact"] .filter-card__body {
    mask-image: linear-gradient(180deg, #000 78%, transparent 100%);
  }

  .filter-card.active[data-sheet-state="expanded"] .filter-card__body {
    padding-bottom: 0.65rem;
  }
}

@supports (height: 100dvh) {
  @media (max-width: 899px) {
    .filter-card {
      height: min(68dvh, 640px);
      max-height: calc(100dvh - 12px);
    }

    .filter-card.active[data-sheet-state="compact"] {
      height: min(42dvh, 430px);
      max-height: min(42dvh, 430px);
    }

    .filter-card.active[data-sheet-state="mid"] {
      height: min(68dvh, 640px);
      max-height: min(68dvh, 640px);
    }

    .filter-card.active[data-sheet-state="expanded"] {
      height: calc(100dvh - 12px);
      max-height: calc(100dvh - 12px);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .filter-card {
    transition: none !important;
  }
}

/* ============= FASE D1I-6: CATEGORY VISUAL PREVIEW ============= */
.category-strip-header > div {
  min-width: 0;
}

.category-strip-subtitle {
  display: block;
  margin-top: 0.14rem;
  color: #64748b;
  font-size: 0.66rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.category-chip--luxury {
  position: relative;
  isolation: isolate;
  min-height: 52px;
  align-items: center;
  padding: 0.52rem 0.72rem 0.52rem 0.58rem;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 10%, rgba(34, 197, 94, 0.11), transparent 36%),
    rgba(2, 6, 23, 0.34);
}

.category-chip--luxury::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(14, 165, 233, 0.08));
  transition: opacity 0.16s ease;
}

.category-chip--luxury.active::before,
.category-chip--luxury:hover::before {
  opacity: 1;
}

.category-chip--luxury .category-chip__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(34, 197, 94, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.category-chip__content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  align-items: flex-start;
}

.category-chip__meta {
  max-width: 128px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #94a3b8;
  font-size: 0.62rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.category-chip--luxury.active .category-chip__meta {
  color: #bbf7d0;
}

body:not(.dark) .category-strip-subtitle {
  color: #94a3b8;
}

body:not(.dark) .category-chip--luxury {
  background:
    radial-gradient(circle at 12% 10%, rgba(34, 197, 94, 0.1), transparent 36%),
    #ffffff;
}

body:not(.dark) .category-chip--luxury::before {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.13), rgba(240, 253, 244, 0.94));
}

body:not(.dark) .category-chip__meta {
  color: #94a3b8;
}

body:not(.dark) .category-chip--luxury.active .category-chip__meta {
  color: #15803d;
}

body:not(.dark) .category-chip--luxury .category-chip__icon {
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.13), rgba(240, 253, 244, 0.95)),
    #ffffff;
}
