/* ─── OV Select ─── Modern searchable dropdown ─── */

.ovs {
  position: relative;
  width: 100%;
  font-family: 'Inter', sans-serif;
}

/* ── Trigger ──────────────────────────────────── */

.ovs__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  gap: 6px;
  transition: all 0.2s ease;
}

/* Light theme (shop horizontal filter) */
.ovs--light .ovs__trigger {
  padding: 9px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  color: #334155;
}

.ovs--light .ovs__trigger:hover {
  border-color: #05a9ff;
  box-shadow: 0 0 0 2px rgba(5, 169, 255, 0.08);
}

.ovs--light.ovs--open .ovs__trigger {
  border-color: #05a9ff;
  box-shadow: 0 0 0 3px rgba(5, 169, 255, 0.12);
}

/* Hero theme (front-page card) */
.ovs--hero .ovs__trigger {
  padding: 14px 18px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  font-size: 15px;
  color: #64748b;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.ovs--hero .ovs__trigger:hover {
  border-color: #05a9ff;
  background: #f8fafc;
}

.ovs--hero.ovs--open .ovs__trigger {
  border-color: #05a9ff;
  box-shadow: 0 0 0 3px rgba(5, 169, 255, 0.12);
}

/* ── Label ────────────────────────────────────── */

.ovs__label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #94a3b8;
}

.ovs__label--active {
  color: #1e293b;
  font-weight: 600;
}

.ovs--hero .ovs__label--active {
  color: #05a9ff;
}

/* ── Icons ────────────────────────────────────── */

.ovs__icons {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.ovs__chevron {
  display: flex;
  align-items: center;
  color: #94a3b8;
  transition: transform 0.25s ease;
}

.ovs--open .ovs__chevron {
  transform: rotate(180deg);
}

.ovs--has-value .ovs__chevron {
  color: #05a9ff;
}

.ovs__clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #94a3b8;
  transition: all 0.15s;
  cursor: pointer;
}

.ovs__clear:hover {
  background: #fee2e2;
  color: #ef4444;
}

.ovs__clear[hidden] { display: none; }

/* ── Dropdown ─────────────────────────────────── */

.ovs__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 9999;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  min-width: 200px;
}

.ovs--open .ovs__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.ovs__dropdown--above {
  top: auto;
  bottom: calc(100% + 6px);
  transform: translateY(8px) scale(0.98);
}

.ovs--open .ovs__dropdown--above {
  transform: translateY(0) scale(1);
}

/* ── Search ───────────────────────────────────── */

.ovs__search-wrap {
  display: flex;
  align-items: center;
  padding: 10px 12px 8px;
  border-bottom: 1px solid #f1f5f9;
  gap: 8px;
}

.ovs__search-icon {
  display: flex;
  color: #94a3b8;
  flex-shrink: 0;
}

.ovs__search {
  width: 100%;
  border: none;
  outline: none;
  font-size: 13px;
  color: #1e293b;
  background: transparent;
  font-family: inherit;
  padding: 0;
}

.ovs__search::placeholder {
  color: #cbd5e1;
}

/* ── List ─────────────────────────────────────── */

.ovs__list {
  list-style: none;
  margin: 0;
  padding: 4px;
  max-height: 220px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ovs__list::-webkit-scrollbar {
  width: 4px;
}

.ovs__list::-webkit-scrollbar-track {
  background: transparent;
}

.ovs__list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.ovs__opt {
  padding: 9px 12px;
  font-size: 13px;
  color: #334155;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.1s;
  user-select: none;
}

.ovs__opt:hover {
  background: #f0f9ff;
  color: #05a9ff;
}

.ovs__opt--active {
  background: #eff6ff;
  color: #05a9ff;
  font-weight: 600;
}

.ovs__opt--active::before {
  content: '✓ ';
  font-weight: 700;
}

.ovs__opt[hidden] { display: none; }

/* ── Empty state ──────────────────────────────── */

.ovs__empty {
  padding: 20px 12px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

.ovs__empty[hidden] { display: none; }

/* ── Disabled ─────────────────────────────────── */

.ovs--disabled .ovs__trigger {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.ovs--disabled {
  pointer-events: none;
}

/* ── Responsive ───────────────────────────────── */

@media (max-width: 768px) {
  .ovs__dropdown {
    position: fixed;
    top: auto !important;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 16px 16px 0 0;
    max-height: 60vh;
    transform: translateY(100%) !important;
  }

  .ovs--open .ovs__dropdown {
    transform: translateY(0) !important;
  }

  .ovs__list {
    max-height: 45vh;
  }

  .ovs__search-wrap {
    padding: 14px 16px 12px;
  }

  .ovs__opt {
    padding: 14px 16px;
    font-size: 15px;
  }
}
