/* =========================================
   PetSearch Variables & Design Tokens
   ========================================= */
:root {
  --ps-accent: #4d2dce;              /* Azul moderno (Action) */
  --ps-accent-hover: #1d4ed8;
  --ps-bg: #ffffff;
  --ps-surface: #ffffff;
  --ps-surface-2: #f9fafb;           /* Fondo suave */
  --ps-text: #1f2937;                /* Gris oscuro */
  --ps-text-muted: #6b7280;          /* Gris medio */
  --ps-border: #e5e7eb;              /* Borde suave */
  --ps-border-strong: #d1d5db;
  --ps-danger: #ef4444;              /* Rojo ofertas */
  --ps-warning: #f59e0b;             /* Naranja alertas */
  --ps-success: #10b981;
  --ps-radius: 14px;                 /* Bordes redondeados modernos */
  --ps-radius-sm: 10px;
  --ps-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.10), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  --ps-shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.08);
  --ps-z-index: 999999;
  --ps-focus: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

/* Respeta usuarios con movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================
   1. Overlay (Full Screen)
   ========================================= */
.petsearch-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--ps-z-index);
  display: none;
}

.petsearch-overlay--active {
  display: block;
}

.petsearch-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.petsearch-overlay__layer {
  position: relative;
  width: min(1080px, calc(100% - 32px));
  margin: 32px auto;
  background: var(--ps-surface);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: calc(var(--ps-radius) + 2px);
  box-shadow: var(--ps-shadow);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 64px);
  overflow: hidden;
  transform: translateY(18px);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease;
}

.petsearch-overlay--active .petsearch-overlay__layer {
  transform: translateY(0);
  opacity: 1;
}

/* =========================================
   2. Header & Buscador
   ========================================= */
.petsearch-overlay__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--ps-border);
  background: var(--ps-surface);
  position: sticky;
  top: 0;
  z-index: 2;
}

.petsearch-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.petsearch-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.petsearch-logo span {
  font-size: 15px;
  font-weight: 800;
  color: var(--ps-text);
  letter-spacing: -0.2px;
}

.petsearch-search-box {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.petsearch-search-box::before {
  content: "";
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  opacity: 0.55;
  background: currentColor;
  color: var(--ps-text-muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat center / contain;
}

.petsearch-overlay__input {
  width: 100%;
  border: 1px solid var(--ps-border);
  border-radius: 999px;
  padding: 12px 44px 12px 44px; /* espacio para icono y clear */
  font-size: 15px;
  outline: none;
  background: #fff;
  color: var(--ps-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.petsearch-overlay__input[type="search"] {
  -webkit-appearance: none;
}

.petsearch-overlay__input[type="search"]::-webkit-search-cancel-button,
.petsearch-overlay__input[type="search"]::-webkit-search-decoration,
.petsearch-overlay__input[type="search"]::-webkit-search-results-button,
.petsearch-overlay__input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  display: none;
}

.petsearch-overlay__input::placeholder {
  color: var(--ps-text-muted);
}

.petsearch-overlay__input:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: var(--ps-focus);
  background: #fff;
}

.petsearch-clear-btn {
  position: absolute;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--ps-text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.petsearch-clear-btn:hover {
  color: var(--ps-text);
  background: rgba(17, 24, 39, 0.06);
}

.petsearch-clear-btn:focus-visible {
  outline: none;
  box-shadow: var(--ps-focus);
}

.petsearch-overlay__close {
  border: 1px solid var(--ps-border);
  background: #fff;
  border-radius: 12px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.petsearch-overlay__close:hover {
  background: rgba(17, 24, 39, 0.04);
  border-color: var(--ps-border-strong);
}

.petsearch-overlay__close:active {
  transform: translateY(1px);
}

.petsearch-overlay__close:focus-visible {
  outline: none;
  box-shadow: var(--ps-focus);
}

/* =========================================
   3. Cuerpo & Resultados
   ========================================= */
.petsearch-overlay__body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  background: var(--ps-surface-2);
  overscroll-behavior: contain;
}

/* Scrollbar fina */
.petsearch-overlay__body::-webkit-scrollbar { width: 8px; }
.petsearch-overlay__body::-webkit-scrollbar-thumb {
  background: rgba(17, 24, 39, 0.18);
  border-radius: 999px;
}
.petsearch-overlay__body::-webkit-scrollbar-track { background: transparent; }

/* Sección */
.ps-section {
  margin-bottom: 18px;
}

.ps-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ps-section-title h3 {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--ps-text-muted);
  margin: 0;
  letter-spacing: 0.5px;
}

.ps-section-title a {
  font-size: 12px;
  color: var(--ps-accent);
  text-decoration: none;
  font-weight: 700;
}

.ps-section-title a:hover {
  color: var(--ps-accent-hover);
  text-decoration: underline;
}

/* Aviso de corrección / sugerencia */
.ps-correction {
  margin-bottom: 18px;
}
.ps-correction-notice {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  color: #1e40af;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.10);
}
.ps-correction-notice strong { font-weight: 800; }

/* Búsquedas Populares (Chips) */
.petsearch-popular h3 {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--ps-text-muted);
  margin: 0 0 12px 0;
  letter-spacing: 0.5px;
}
.petsearch-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ps-chip {
  background: #fff;
  border: 1px solid var(--ps-border);
  color: var(--ps-text);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
  user-select: none;
}
.ps-chip:hover {
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.25);
}
.ps-chip:active {
  transform: translateY(1px);
}

/* Secciones de resultados */
.ps-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.ps-section__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ps-text);
}

.ps-section__subtitle {
  font-size: 12px;
  color: var(--ps-text-muted);
  margin-top: -6px;
}

.ps-section__body--suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ps-suggestion {
  border: 1px solid var(--ps-border);
  background: #fff;
  color: var(--ps-text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.ps-suggestion:hover {
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.25);
}

.ps-suggestion__count {
  font-size: 11px;
  color: var(--ps-text-muted);
}

/* =========================================
   4. Tarjeta de Producto (Card)
   ========================================= */

/* Badges (oferta, nuevo, agotado) */
.ps-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  z-index: 2;
  background: rgba(17, 24, 39, 0.88); /* default */
  color: #fff;
  letter-spacing: 0.4px;
}

/* Variantes recomendadas (puedes asignarlas desde PHP/JS) */
.ps-badge--sale,
.ps-badge[data-variant="sale"],
.ps-badge[data-type="sale"] {
  background: var(--ps-danger);
}
.ps-badge--new,
.ps-badge[data-variant="new"],
.ps-badge[data-type="new"] {
  background: var(--ps-success);
}
.ps-badge--oos,
.ps-badge[data-variant="oos"],
.ps-badge[data-type="oos"],
.ps-badge--outofstock {
  background: #9ca3af;
}


.ps-card__fragment {
  font-size: 12px;
  color: var(--ps-text-muted);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ps-highlight {
  background: rgba(251, 191, 36, 0.35);
  color: inherit;
  border-radius: 4px;
  padding: 0 2px;
}

.ps-card__price del {
  color: var(--ps-text-muted);
  font-weight: 700;
  font-size: 12px;
}

.ps-card__price ins {
  text-decoration: none;
}

.ps-card__stock {
  font-size: 12px;
  color: var(--ps-text-muted);
}

/* Estado vacío */
.ps-no-results {
  text-align: center;
  padding: 26px 16px;
  border: 1px dashed var(--ps-border);
  border-radius: var(--ps-radius);
  background: #fff;
  color: var(--ps-text-muted);
}
.ps-no-results--compact {
  padding: 18px 16px;
  font-size: 13px;
}
.ps-no-results strong {
  display: block;
  font-size: 16px;
  color: var(--ps-text);
  margin-bottom: 6px;
}

/* =========================================
   5. Skeleton / Loading
   ========================================= */
.ps-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
}

.ps-skeleton-card {
  background: #fff;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  overflow: hidden;
  position: relative;
}

.ps-skeleton-media {
  aspect-ratio: 1 / 1;
  background: #f3f4f6;
}

.ps-skeleton-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ps-skeleton-line {
  height: 12px;
  border-radius: 8px;
  background: #f3f4f6;
  position: relative;
  overflow: hidden;
}

.ps-skeleton-line--short {
  width: 60%;
}

.ps-skeleton-line::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.75),
    rgba(255, 255, 255, 0)
  );
  animation: ps-shimmer 1.8s infinite;
}

@keyframes ps-shimmer {
  100% { transform: translateX(100%); }
}

/* Sentinel (Elemento invisible para Infinite Scroll) */
.ps-sentinel {
  height: 20px;
  width: 100%;
}

/* =========================================
   6. Responsive
   ========================================= */
@media (max-width: 920px) {
  .petsearch-overlay__layer {
    width: calc(100% - 24px);
    margin: 18px auto;
    max-height: calc(100vh - 36px);
  }
}

@media (max-width: 640px) {
  .petsearch-overlay__header {
    padding: 12px 12px;
    gap: 10px;
  }

  .petsearch-logo span {
    display: none;
  }

  .petsearch-overlay__input {
    padding: 12px 42px 12px 42px;
    font-size: 14px;
  }

  .petsearch-overlay__close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .petsearch-overlay__body {
    padding: 14px 12px;
  }

  .ps-skeleton-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

/* =========================================
   7. Compat: Tema/Plantillas (evita conflictos)
   ========================================= */
:where(.petsearch-overlay, .petsearch--elementor) button,
:where(.petsearch-overlay, .petsearch--elementor) input[type="button"],
:where(.petsearch-overlay, .petsearch--elementor) input[type="submit"] {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
}

:where(.petsearch-overlay, .petsearch--elementor) a {
  color: inherit;
  text-decoration: none;
}

/* =========================================
   3. Elementor Widget
   ========================================= */
.petsearch--elementor {
  position: relative;
  color: var(--ps-text);
}

.petsearch__bar {
  width: 100%;
  --ps-accent: #4D2DCE;
  --ps-radius: 999px;
  --ps-input-height: auto;
  --ps-bar-border-width: 1px;
  --ps-bar-border-color: var(--ps-border);
  --ps-bar-bg: #fff;
  --ps-bar-icon-color: var(--ps-text-muted);
  --ps-bar-icon-size: 2rem;
}

.petsearch__bar--full {
  width: 100%;
}

.petsearch__field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.petsearch__trigger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--ps-radius);
  border: var(--ps-bar-border-width) solid var(--ps-bar-border-color);
  background: var(--ps-bar-bg);
  color: var(--ps-bar-icon-color);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.petsearch__trigger:hover {
  background: var(--ps-surface-2);
  border-color: var(--ps-border-strong);
}

.petsearch__trigger:focus-visible {
  outline: none;
  box-shadow: var(--ps-focus);
}

.petsearch__trigger:active {
  transform: translateY(1px);
}

.petsearch__triggerIcon svg,
.petsearch__triggerIcon img,
.petsearch__triggerIcon i {
  width: 1em;
  height: 1em;
  font-size: inherit;
}

.petsearch__icon {
  position: absolute;
  left: 14px;
  color: var(--ps-bar-icon-color);
  font-size: var(--ps-bar-icon-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.petsearch__icon svg,
.petsearch__icon img,
.petsearch__triggerIcon svg,
.petsearch__triggerIcon img,
.petsearch__iconImage {
  width: 2rem;
  height: 2rem;
  display: block;
}

.petsearch__iconImage {
  background: var(--petsearch-icon-url) no-repeat center / contain;
}

.petsearch__input {
  width: 100%;
  border: var(--ps-bar-border-width) solid var(--ps-bar-border-color);
  border-radius: var(--ps-radius);
  padding: 12px 44px;
  font-size: 15px;
  height: var(--ps-input-height);
  line-height: 1.2;
  background: var(--ps-bar-bg);
  color: var(--ps-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.petsearch__input[type="search"] {
  -webkit-appearance: none;
}

.petsearch__input[type="search"]::-webkit-search-cancel-button,
.petsearch__input[type="search"]::-webkit-search-decoration,
.petsearch__input[type="search"]::-webkit-search-results-button,
.petsearch__input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  display: none;
}

.petsearch__input--has-icon {
  padding-left: 44px;
}

.petsearch__input--sm {
  padding: 10px 40px;
  font-size: 14px;
}

.petsearch__input--md {
  padding: 12px 44px;
  font-size: 15px;
}

.petsearch__input--lg {
  padding: 14px 48px;
  font-size: 16px;
}

.petsearch__input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--ps-accent) 55%, transparent);
  box-shadow: var(--ps-focus);
}

.petsearch__clear {
  position: absolute;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--ps-text-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.petsearch--shortcode .petsearch__trigger {
  display: none;
}

@media (max-width: 767px) {
  .petsearch--shortcode .petsearch__barSlot {
    display: none;
  }

  .petsearch--shortcode .petsearch__trigger {
    display: inline-flex;
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .petsearch--shortcode .petsearch__triggerIcon {
    font-size: var(--ps-bar-icon-size);
  }
}

.petsearch__input:not(:placeholder-shown) ~ .petsearch__clear {
  opacity: 1;
  pointer-events: auto;
}

.petsearch__clear:hover {
  color: var(--ps-text);
  background: rgba(17, 24, 39, 0.06);
}

.petsearch__clear:active {
  background: rgba(17, 24, 39, 0.12);
}

.petsearch__clear:focus-visible {
  outline: none;
  box-shadow: var(--ps-focus);
}

.petsearch__modal {
  position: fixed;
  inset: 0;
  z-index: var(--ps-z-index);
  display: none;
}

.petsearch--open .petsearch__modal {
  display: block;
}

.petsearch__modalBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.petsearch__modalDialog {
  position: relative;
  width: min(1140px, calc(100% - 48px));
  margin: 48px auto;
  background: var(--ps-surface);
  border-radius: calc(var(--ps-radius) + 2px);
  border: 1px solid var(--ps-border);
  box-shadow: var(--ps-shadow);
  max-height: calc(100vh - 96px);
  overflow: hidden;
}

.petsearch__modalHeader {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--ps-border);
  background: var(--ps-surface);
  position: sticky;
  top: 0;
  z-index: 2;
}

.petsearch__modalSearch {
  flex: 1;
}

.petsearch__modalSearch .petsearch__bar {
  width: 100%;
}

.petsearch__modalSearch .petsearch__input {
  border-radius: 999px;
  background: #fff;
}

.petsearch__modalSearch .petsearch__input.petsearch__input--has-icon {
  padding-left: 44px;
}

.petsearch__modalBody {
  padding: 0px 15px 20px 15px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--ps-surface-2);
}

.petsearch__panel {
  position: relative;
  padding: 0;
}

.petsearch__modalClose {
  border: 1px solid var(--ps-border);
  background: #fff;
  border-radius: 12px;
  padding: 8px 14px;
  min-width: 72px;
  min-height: 36px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.petsearch__modalClose:hover {
  background: var(--ps-surface-2);
  border-color: var(--ps-border-strong);
}

.petsearch__modalClose:active {
  transform: translateY(1px);
}

.petsearch__modalClose:focus-visible {
  outline: none;
  box-shadow: var(--ps-focus);
}

.petsearch__status {
  font-size: 14px;
  color: var(--ps-text-muted);
  margin-bottom: 12px;
}

.petsearch__chips {
  margin-bottom: 16px;
  display: grid;
  gap: 12px;
}

.petsearch__chips--horizontal .petsearch__chipsScroller {
  overflow-x: auto;
  padding-bottom: 4px;
}

.petsearch__chips--horizontal .petsearch-chips {
  flex-wrap: nowrap;
  width: max-content;
}

.petsearch__chips--horizontal .ps-chip {
  white-space: nowrap;
}

.petsearch__chipsGroup {
  display: grid;
  gap: 8px;
}

.petsearch__chipsTitle {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--ps-text-muted);
  letter-spacing: 0.4px;
}

.petsearch__sidebarSection {
  display: grid;
  gap: 10px;
}

.petsearch__sidebarTitle {
  font-size: 14px;
  font-weight: 600;
  color: var(--ps-text);
  margin-bottom: 10px;
}

.petsearch__popularList {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.petsearch__popularItem {
  border: none;
  background: transparent;
  color: var(--ps-text-muted);
  text-align: left;
  padding: 2px 0;
  cursor: pointer;
  font-size: 14px;
}

.petsearch__popularItem:hover {
  color: var(--ps-text);
}

.petsearch__popularItem:active {
  color: var(--ps-text);
}

.petsearch__popularItem:focus-visible {
  outline: none;
  box-shadow: var(--ps-focus);
  border-radius: 6px;
}

.petsearch__filters {
  display: grid;
  gap: 12px;
}

.petsearch__filtersBody {
  display: grid;
  gap: 12px;
}


.petsearch--elementor .petsearch__modalClose {
  background: #fff !important;
  color: var(--ps-text) !important;
}

.petsearch--elementor .petsearch__modalClose:hover,
.petsearch--elementor .petsearch__modalClose:active {
  background: var(--ps-surface-2) !important;
  color: var(--ps-text) !important;
}

.petsearch--elementor .petsearch__filtersClear {
  background: transparent !important;
  color: var(--ps-accent) !important;
}

.petsearch--elementor .petsearch__filtersClear:hover,
.petsearch--elementor .petsearch__filtersClear:active {
  background: transparent !important;
  color: var(--ps-accent-hover) !important;
  text-decoration: underline;
}

.petsearch--elementor .petsearch__filtersClose {
  background: #fff !important;
  border-color: var(--ps-border) !important;
  color: var(--ps-text) !important;
}

.petsearch--elementor .petsearch__filtersClose:hover,
.petsearch--elementor .petsearch__filtersClose:active {
  background: var(--ps-surface-2) !important;
  color: var(--ps-text) !important;
}

.petsearch--elementor .petsearch__filtersToggle {
  background: #fff !important;
  border: 1px solid var(--ps-border) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  color: var(--ps-text) !important;
  cursor: pointer !important;
  font-size: 12px !important;
  padding: 6px 12px !important;
}

.petsearch--elementor .petsearch__filtersToggle:hover,
.petsearch--elementor .petsearch__filtersToggle:active {
  background: var(--ps-surface-2) !important;
  border-color: var(--ps-border) !important;
  color: var(--ps-text) !important;
}

.petsearch--elementor .petsearch__popularItem {
  background: transparent !important;
  color: var(--ps-text-muted) !important;
}

.petsearch--elementor .petsearch__popularItem:hover,
.petsearch--elementor .petsearch__popularItem:active {
  background: transparent !important;
  color: var(--ps-text) !important;
}

.petsearch--elementor .petsearch__clear {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--ps-text-muted) !important;
}


.petsearch__priceRange {
  display: grid;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.petsearch__priceRange.is-disabled {
  opacity: 0.6;
}

.petsearch__priceValues {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--ps-text);
}

.petsearch__rangeInputs {
  position: relative;
  height: 20px;
}

.petsearch__rangeInputs input[type="range"] {
  -webkit-appearance: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 20px;
  border-radius: 999px;
  background: transparent;
  outline: none;
  pointer-events: none;
}

.petsearch__rangeInputs input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
  border: none;
}

.petsearch__rangeInputs input[type="range"]::-moz-range-track {
  height: 4px;
  background: transparent;
  border: none;
}

.petsearch__rangeInputs input[type="range"]::-moz-range-progress {
  background: transparent;
}

.petsearch__rangeInputs::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: #d6c9ff;
}

.petsearch__rangeInputs::after {
  content: '';
  position: absolute;
  left: var(--ps-range-min, 0%);
  right: calc(100% - var(--ps-range-max, 100%));
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: #4d2dce;
}

.petsearch__rangeInputs input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #1f0979;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  pointer-events: auto;
  margin-top: -8px;
}

.petsearch__rangeInputs input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #1f0979;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  pointer-events: auto;
}

.petsearch__rangeInputs input[type="range"][data-petsearch-range="min"] {
  z-index: 1;
}

.petsearch__rangeInputs input[type="range"][data-petsearch-range="max"] {
  z-index: 2;
}

.petsearch__resultsBody {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.petsearch__statusRow {
  font-size: 13px;
  color: var(--ps-text-muted);
}

.petsearch__resultsTitle {
  font-size: 14px;
  font-weight: 600;
  color: var(--ps-text);
}

.petsearch__footer {
  margin-top: 16px;
  text-align: center;
}

.petsearch__viewall {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--ps-border);
  text-decoration: none;
  color: var(--ps-text);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.petsearch__viewall:hover {
  border-color: var(--ps-border-strong);
  background: var(--ps-surface-2);
}

.petsearch__viewall:active {
  transform: translateY(1px);
}

.petsearch__viewall:focus-visible {
  outline: none;
  box-shadow: var(--ps-focus);
}

body.petsearch-modal-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .petsearch__input {
    font-size: 16px;
  }

  .petsearch__barSlot {
    display: none;
  }

  .petsearch__trigger {
    display: inline-flex;
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    line-height: 1;
  }

  .petsearch__trigger:hover,
  .petsearch__trigger:active {
    background: transparent;
    border-color: transparent;
  }

  .petsearch__trigger:active {
    transform: none;
  }

  .petsearch__trigger:focus-visible {
    box-shadow: none;
  }

  .petsearch__modalDialog {
    margin: 0;
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .petsearch__modalBody {
    padding: 0px 16px;
    max-height: calc(100vh - 80px);
  }

}
