/* INICIO: BASE */
.rlpc-catalog {
  --rlpc-red: #e30613;
  --rlpc-red-dark: #bd0711;
  --rlpc-navy: #020b3b;
  --rlpc-text: #111827;
  --rlpc-muted: #64748b;
  --rlpc-line: #e5e9ef;
  --rlpc-soft: #f5f7fa;
  --rlpc-white: #fff;
  position: relative;
  left: 50%;
  width: 100vw;
  max-width: none;
  margin-left: -50vw;
  color: var(--rlpc-text);
  background: var(--rlpc-white);
  font-family: "Baloo Thambi 2", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.rlpc-catalog img {
  display: block;
  max-width: 100%;
}

.rlpc-catalog a {
  color: inherit;
  text-decoration: none;
}

.rlpc-catalog button,
.rlpc-catalog select,
.rlpc-catalog input {
  font: inherit;
}

.rlpc-container {
  width: 100%;
  max-width: none;
  margin-inline: auto;
  padding-inline: clamp(18px, 3vw, 64px);
}

/* INICIO: CABECERA */
.rlpc-heading {
  padding: 46px 0 44px;
  text-align: center;
}

.rlpc-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--rlpc-red);
  font-size: .76rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .09em;
}

.rlpc-heading h1 {
  margin: 0;
  font-size: clamp(2.25rem, 9vw, 4rem);
  font-weight: 850;
  line-height: 1.02;
  letter-spacing: -.035em;
}

.rlpc-description {
  max-width: 720px;
  margin: 16px auto 0;
  color: var(--rlpc-muted);
  line-height: 1.65;
}

/* INICIO: LAYOUT */
.rlpc-layout {
  display: grid;
  gap: 28px;
  padding-bottom: 72px;
}

.rlpc-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10002;
  width: min(88vw, 360px);
  overflow-y: auto;
  padding: 24px;
  background: #fff;
  box-shadow: 18px 0 45px rgba(15, 23, 42, .18);
  transform: translateX(-105%);
  transition: transform 240ms ease;
}

.rlpc-sidebar.is-open {
  transform: translateX(0);
}

.rlpc-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  visibility: hidden;
  background: rgba(2, 11, 59, .38);
  opacity: 0;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.rlpc-overlay.is-active {
  visibility: visible;
  opacity: 1;
}

body.rlpc-no-scroll {
  overflow: hidden;
}

.rlpc-sidebar-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rlpc-line);
}

.rlpc-sidebar-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--rlpc-red);
  font-size: .72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.rlpc-sidebar-head h2 {
  margin: 0;
  font-size: 1.65rem;
}

.rlpc-sidebar-close {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  background: var(--rlpc-soft);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.rlpc-sidebar-close svg,
.rlpc-filter-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

/* INICIO: FILTROS */
.rlpc-filter-form {
  display: grid;
  gap: 0;
}

.rlpc-filter-group {
  margin: 0;
  padding: 20px 0;
  border: 0;
  border-bottom: 1px solid var(--rlpc-line);
}

.rlpc-filter-group legend {
  width: 100%;
  margin-bottom: 13px;
  padding: 0;
  font-size: .92rem;
  font-weight: 850;
}

.rlpc-options {
  display: grid;
  gap: 10px;
}

.rlpc-check {
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  color: #374151;
  font-size: .84rem;
  cursor: pointer;
}

.rlpc-check input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--rlpc-red);
}

.rlpc-check small {
  color: #9aa2ae;
  font-size: .72rem;
}

.rlpc-filter-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding-top: 22px;
}

.rlpc-filter-actions button,
.rlpc-filter-actions a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 850;
}

.rlpc-filter-actions button {
  color: #fff;
  background: var(--rlpc-red);
  border: 0;
  cursor: pointer;
}

.rlpc-filter-actions a {
  color: var(--rlpc-red);
  background: #fff;
  border: 1px solid #f2b8bd;
}

/* INICIO: CONTROLES MÓVILES */
.rlpc-mobile-actions {
  display: grid;
  grid-template-columns: 1fr minmax(150px, .72fr);
  gap: 10px;
  margin-bottom: 22px;
}

.rlpc-filter-toggle,
.rlpc-mobile-order select,
.rlpc-select-wrap select {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  background: #fff;
  border: 1px solid #d8dee6;
  border-radius: 8px;
}

.rlpc-filter-toggle {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--rlpc-navy);
  border-color: var(--rlpc-navy);
  font-size: .82rem;
  font-weight: 850;
  cursor: pointer;
}

/* INICIO: TOOLBAR */
.rlpc-toolbar {
  display: none;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--rlpc-line);
}

.rlpc-result-count {
  margin: 0;
  color: var(--rlpc-muted);
  font-size: .84rem;
}

.rlpc-toolbar-controls {
  display: flex;
  gap: 10px;
}

.rlpc-select-wrap select {
  min-width: 160px;
  color: #374151;
  font-size: .8rem;
}

/* INICIO: GRID */
.rlpc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  justify-content: start;
}

.rlpc-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--rlpc-line);
  border-radius: 14px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.rlpc-card:hover {
  border-color: #d3d9e1;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
  transform: translateY(-3px);
}

.rlpc-card-image {
  position: relative;
  display: grid;
  aspect-ratio: 1 / 1;
  place-items: center;
  padding: 18px;
  background: #fff;
}

.rlpc-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rlpc-sale {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 8px;
  color: #fff;
  background: var(--rlpc-red);
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 850;
}

.rlpc-card-body {
  display: flex;
  min-height: 188px;
  flex: 1;
  flex-direction: column;
  padding: 0 12px 12px;
}

.rlpc-card-category {
  display: block;
  margin-bottom: 5px;
  overflow: hidden;
  color: var(--rlpc-red);
  font-size: .65rem;
  font-weight: 850;
  text-overflow: ellipsis;
  text-transform: uppercase;
  letter-spacing: .045em;
  white-space: nowrap;
}

.rlpc-card-title {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  font-size: .82rem;
  font-weight: 750;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rlpc-card-title:hover {
  color: var(--rlpc-red);
}

.rlpc-card-price {
  margin: 10px 0;
  font-size: 1.02rem;
  font-weight: 850;
  line-height: 1.2;
}

.rlpc-card-price del {
  margin-right: 5px;
  color: #929aa6;
  font-size: .72em;
}

.rlpc-card-price ins {
  text-decoration: none;
}

.rlpc-card-footer {
  display: grid;
  gap: 9px;
  margin-top: auto;
}

.rlpc-card-stock {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: .67rem;
  font-weight: 850;
}

.rlpc-card-stock.is-in-stock {
  color: var(--rlpc-red);
  background: #fdebed;
}

.rlpc-card-stock.is-out-of-stock {
  color: #7b8491;
  background: #edf0f3;
}

.rlpc-card-button {
  display: inline-flex;
  min-height: 41px;
  align-items: center;
  justify-content: center;
  padding: 9px 10px;
  color: #fff !important;
  background: var(--rlpc-red);
  border-radius: 8px;
  font-size: .74rem;
  font-weight: 850;
  text-align: center;
}

.rlpc-card-button:hover {
  background: var(--rlpc-red-dark);
}

/* INICIO: PAGINACIÓN Y VACÍO */
.rlpc-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 36px;
}

.rlpc-pagination .page-numbers {
  display: grid;
  min-width: 42px;
  height: 42px;
  place-items: center;
  padding: 0 10px;
  background: #fff;
  border: 1px solid var(--rlpc-line);
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 800;
}

.rlpc-pagination .current,
.rlpc-pagination .page-numbers:hover {
  color: #fff;
  background: var(--rlpc-red);
  border-color: var(--rlpc-red);
}

.rlpc-empty {
  display: grid;
  min-height: 380px;
  place-items: center;
  align-content: center;
  padding: 38px 20px;
  background: var(--rlpc-soft);
  border-radius: 16px;
  text-align: center;
}

.rlpc-empty-icon {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  color: var(--rlpc-red);
  background: #fff;
  border-radius: 50%;
}

.rlpc-empty-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.rlpc-empty h2 {
  margin: 18px 0 6px;
  font-size: 1.6rem;
}

.rlpc-empty p {
  max-width: 430px;
  margin: 0;
  color: var(--rlpc-muted);
}

.rlpc-empty a {
  margin-top: 18px;
  padding: 10px 15px;
  color: #fff;
  background: var(--rlpc-red);
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 850;
}

/* INICIO: TABLET */
@media (min-width: 700px) {
  .rlpc-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 270px));
    gap: 18px;
  }

  .rlpc-card-body {
    padding: 0 16px 16px;
  }

  .rlpc-card-title {
    font-size: .9rem;
  }

  .rlpc-card-price {
    font-size: 1.15rem;
  }
}

/* INICIO: ESCRITORIO */
@media (min-width: 1024px) {
  .rlpc-heading {
    padding: 42px 0 52px;
  }

  .rlpc-mobile-actions {
    display: none;
  }

  .rlpc-layout {
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: clamp(28px, 3vw, 52px);
  }

  .rlpc-sidebar {
    position: sticky;
    top: 24px;
    z-index: 1;
    width: auto;
    max-height: calc(100vh - 48px);
    padding: 0 8px 12px 0;
    box-shadow: none;
    transform: none;
  }

  .rlpc-sidebar-head {
    margin-bottom: 4px;
  }

  .rlpc-sidebar-close,
  .rlpc-overlay {
    display: none;
  }

  .rlpc-toolbar {
    display: flex;
  }

  .rlpc-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 285px));
    gap: 22px;
    justify-content: start;
  }

  .rlpc-card-image {
    padding: 22px;
  }

  .rlpc-card-body {
    min-height: 210px;
  }

  .rlpc-card-footer {
    grid-template-columns: 1fr;
  }
}

/* INICIO: ACCESIBILIDAD */
.rlpc-filter-toggle:focus-visible,
.rlpc-sidebar-close:focus-visible,
.rlpc-filter-actions button:focus-visible,
.rlpc-filter-actions a:focus-visible,
.rlpc-card-button:focus-visible,
.rlpc-pagination .page-numbers:focus-visible,
.rlpc-select-wrap select:focus-visible,
.rlpc-mobile-order select:focus-visible {
  outline: 3px solid rgba(227, 6, 19, .28);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .rlpc-catalog *,
  .rlpc-catalog *::before,
  .rlpc-catalog *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}


/* INICIO: COMPATIBILIDAD CON CONTENEDORES DE ELEMENTOR */
.elementor-widget-shortcode:has(.rlpc-catalog),
.elementor-shortcode:has(.rlpc-catalog) {
  width: 100%;
  max-width: none;
}

.elementor-widget-shortcode:has(.rlpc-catalog) > .elementor-widget-container {
  width: 100%;
  max-width: none;
  overflow: visible;
}


/* INICIO: TARJETAS COMPACTAS DE CATÁLOGO */
@media (min-width: 1024px) {
  .rlpc-results {
    min-width: 0;
  }

  .rlpc-card {
    width: 100%;
    max-width: 285px;
  }

  .rlpc-card-image {
    min-height: 250px;
    max-height: 285px;
  }

  .rlpc-card-body {
    min-height: 205px;
  }
}

@media (min-width: 1500px) {
  .rlpc-grid {
    grid-template-columns: repeat(auto-fill, minmax(255px, 280px));
  }
}


/* INICIO: CONTENCIÓN ESTRICTA DE IMÁGENES */
.rlpc-card {
  position: relative;
  contain: layout paint;
}

.rlpc-card-image {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
}

.rlpc-card-image img,
.rlpc-card-image .attachment-woocommerce_thumbnail,
.rlpc-card-image .woocommerce-placeholder {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  object-position: center !important;
  transform: none !important;
}

.rlpc-card-image picture,
.rlpc-card-image picture img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
}

@media (min-width: 1024px) {
  .rlpc-card-image {
    height: 285px;
    min-height: 285px;
    max-height: 285px;
  }
}

@media (min-width: 700px) and (max-width: 1023px) {
  .rlpc-card-image {
    height: 250px;
    min-height: 250px;
    max-height: 250px;
  }
}

@media (max-width: 699px) {
  .rlpc-card-image {
    aspect-ratio: 1 / 1;
    min-height: 0;
    max-height: none;
  }
}

.rlpc-catalog.rlpc-catalog--has-filters .rlpc-layout {
  display: grid !important;
}

.rlpc-catalog.rlpc-catalog--has-filters .rlpc-sidebar {
  display: block !important;
}

.rlpc-catalog.rlpc-catalog--has-filters .rlpc-overlay {
  display: block !important;
}

.rlpc-catalog.rlpc-catalog--has-filters .rlpc-filter-toggle {
  display: inline-flex !important;
}

.rlpc-catalog.rlpc-catalog--no-filters .rlpc-layout {
  display: block !important;
}

.rlpc-catalog .rlpc-mobile-actions--ordering-only {
  grid-template-columns: minmax(150px, 260px);
  justify-content: end;
}

.rlpc-catalog .rlpc-filter-group:first-of-type {
  padding-top: 8px;
}

.rlpc-catalog .rlpc-filter-group:last-of-type {
  border-bottom: 0;
}

.rlpc-catalog .rlpc-check span {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (min-width: 1024px) {
  .rlpc-catalog.rlpc-catalog--has-filters .rlpc-layout {
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) !important;
    gap: clamp(28px, 3vw, 52px);
  }

  .rlpc-catalog.rlpc-catalog--has-filters .rlpc-sidebar {
    display: block !important;
  }

  .rlpc-catalog.rlpc-catalog--has-filters .rlpc-overlay,
  .rlpc-catalog.rlpc-catalog--has-filters .rlpc-filter-toggle {
    display: none !important;
  }

  .rlpc-catalog.rlpc-catalog--no-filters .rlpc-results {
    width: 100%;
  }
}
