/* Modal móvil de filtros del catálogo.
 * La estructura replica el panel de IU: cabecera fija, contenido desplazable y
 * acciones siempre visibles al pie. El escritorio conserva su columna lateral.
 */
[data-catalog-filter-modal][hidden] {
  display: none !important;
}

.catalog-filter-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(0 0 0 / 45%);
  color: #202124;
}

.catalog-filter-modal__panel {
  display: flex;
  width: min(100%, 48rem);
  height: 100%;
  max-height: 100dvh;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 24px rgb(0 0 0 / 18%);
}

.catalog-filter-modal__header {
  z-index: 1;
  display: flex;
  min-height: 5.5rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: #fff;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 10%), 0 2px 4px -2px rgb(0 0 0 / 10%);
}

.catalog-filter-modal__title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.15;
}

.catalog-filter-modal__close {
  position: relative;
  width: 3rem;
  height: 3rem;
  flex: 0 0 3rem;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: currentColor;
}

.catalog-filter-modal__close::before,
.catalog-filter-modal__close::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.25rem;
  height: 1px;
  background: currentColor;
  content: "";
}

.catalog-filter-modal__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.catalog-filter-modal__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.catalog-filter-modal__content {
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2rem 1.5rem 3.5rem;
  -webkit-overflow-scrolling: touch;
}

.catalog-filter-modal__filters {
  display: block !important;
}

.catalog-filter-modal__filters [data-element-type="accordion-item"] {
  cursor: pointer;
}

.catalog-filter-modal__filters [data-catalog-modal-panel][hidden] {
  display: none !important;
}

.catalog-filter-modal__filters label {
  max-width: 100%;
}

.catalog-filter-modal__filters input {
  flex: 0 0 auto;
}

.catalog-filter-modal__footer {
  z-index: 1;
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: #fff;
  box-shadow: 0 -4px 6px -1px rgb(0 0 0 / 10%), 0 -2px 4px -2px rgb(0 0 0 / 10%);
}

.catalog-filter-modal__action {
  display: inline-flex;
  min-height: 4rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--cta-color, #3559e8);
  border-radius: var(--input-border-radius, 0);
  padding: 0.75rem;
  font: inherit;
  font-size: clamp(0.68rem, 2.9vw, 0.85rem);
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
}

.catalog-filter-modal__action--reset {
  background: #fff;
  color: var(--btn-text-color-secondary, #202124);
}

.catalog-filter-modal__action--apply {
  flex-direction: column;
  background: var(--cta-color, #3559e8);
  color: var(--btn-text-color, #fff);
}

.catalog-filter-modal__action:hover {
  border-color: var(--cta-hover-color, #2446c8);
}

.catalog-filter-modal__action:focus-visible,
.catalog-filter-modal__close:focus-visible {
  outline: 2px solid var(--focus-ring-color, #202124);
  outline-offset: 2px;
}

@media (min-width: 48rem) {
  .catalog-filter-modal__panel {
    height: min(92dvh, 60rem);
  }
}

@media (min-width: 64rem) {
  .catalog-filter-modal {
    display: none !important;
  }
}

