/* Listado de productos: filtros, barra, chips y vista en lista. */

.e-con-inner:has(> .elementor-widget .of-resultados):has(> .elementor-widget .of-archivo-barra) {
  box-sizing: border-box;
  padding: 14px 24px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(28, 64, 86, .06);
}

.of-resultados {
  margin: 0;
  color: #6b7c86;
  font-size: 15px;
  font-weight: 400;
  font-family: "Kanit", sans-serif;
}

.of-archivo-barra {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.of-orden {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8a97a3;
  font-family: "Kanit", sans-serif;
  font-size: 14px;
}

.of-orden__etiqueta {
  color: #8a97a3;
  white-space: nowrap;
}

.of-orden .woocommerce-ordering {
  margin: 0;
}

.of-orden select {
  min-width: 132px;
  padding: 8px 34px 8px 14px;
  border: 0;
  border-radius: 10px;
  background-color: #f3f5f6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%231C4056' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1.5 1.5L6 6l4.5-4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  color: #1c4056;
  font-family: "Kanit", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.of-orden select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(38, 191, 184, .16);
}

.of-vista {
  display: flex;
  align-items: center;
  gap: 4px;
}

.of-vista__boton {
  display: grid;
  place-items: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #1c4056 !important;
  cursor: pointer;
}

.of-vista__boton:hover,
.of-vista__boton:focus {
  border: 0 !important;
  background: #f3f5f6 !important;
  color: #1c4056 !important;
}

.of-vista__boton svg {
  display: block;
  fill: none;
  stroke: currentColor;
}

.of-vista__boton.is-activa,
.of-vista__boton.is-activa:hover,
.of-vista__boton.is-activa:focus {
  border: 0 !important;
  background: #eef1f3 !important;
  color: #26bfb8 !important;
}

.of-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.of-chips__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--of-teal, #26BFB8);
  color: #fff;
  font-size: 13px;
  font-weight: 300;
  text-decoration: none;
  font-family: 'Kanit', sans-serif;
}

.of-chips__item span {
  font-size: 16px;
  line-height: 1;
}

.of-chips__limpiar {
  color: #26BFB8;
  font-size: 13px;
  font-weight: 500;
}

.of-filtros {
  display: grid;
  gap: 4px;
  padding: 15px;
  background-color: #FFFFFF;
  border-radius: 20px;
  font-family: 'Kanit', sans-serif;
}

.of-filtros__titulo {
  margin: 0 0 12px;
  color: var(--of-azul, #1c4056);
  font-size: 22px;
  font-weight: 700;
}

.of-filtros__bloque {
  border-bottom: 1px solid var(--of-borde, #dfe6e6);
}

.of-filtros__cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  color: var(--of-azul, #1c4056);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  list-style: none;
  text-transform: uppercase;
  cursor: pointer;
}

.of-filtros__cabecera::-webkit-details-marker {
  display: none;
}

.of-filtros__cabecera::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s ease;
}

.of-filtros__bloque[open] > .of-filtros__cabecera::after {
  transform: rotate(-135deg);
}

.of-filtros__cuerpo {
  display: grid;
  gap: 10px;
  padding: 0 0 16px;
}

.of-filtros__opcion {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--of-azul, #1c4056);
  font-size: 14px;
  cursor: pointer;
}

.of-filtros__opcion input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.of-filtros__caja {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 1.5px solid #c8d2d2;
  border-radius: 4px;
  background: #fff;
}

.of-filtros__opcion input:checked + .of-filtros__caja {
  border-color: var(--of-teal, #26BFB8);
  background: var(--of-teal, #26BFB8);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='M2 6.2l2.6 2.6L10 3.4'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 12px;
}

.of-filtros__opcion--cat {
  --cat-color: var(--of-teal, #26BFB8);
}

.of-filtros__icono {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  object-fit: contain;
  color: var(--cat-color);
}

.of-filtros__icono--svg {
  display: grid;
  place-items: center;
}

.of-filtros__icono--svg svg {
  display: block;
  width: 22px;
  height: 22px;
  overflow: visible;
  fill: none;
}

.of-filtros__icono--svg svg [fill]:not([fill="none"]) {
  fill: currentColor;
}

.of-filtros__icono--svg svg [stroke]:not([stroke="none"]) {
  stroke: currentColor;
}

.of-filtros__opcion--cat .of-filtros__nombre {
  color: var(--cat-color);
  flex: 1 1 auto;
  min-width: 0;
}

.of-filtros__opcion--cat input:checked + .of-filtros__caja {
  border-color: var(--cat-color);
  background-color: var(--cat-color);
}

.of-filtros__nombre {
  flex: 1 1 auto;
  min-width: 0;
}

.of-filtros__cuenta {
  margin-left: auto;
  color: #9aa7ad;
}

.of-filtros__limpiar {
  margin-top: 16px;
  color: #26BFB8;
  font-size: 14px;
}

.of-precio-rango {
  display: grid;
  gap: 14px;
}

.of-precio-rango__via {
  position: relative;
  height: 6px;
  margin: 12px 0 4px;
  border-radius: 999px;
  background: #e6eeee;
}

.of-precio-rango__progreso {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: inherit;
  background: var(--of-teal, #26BFB8);
}

.of-precio-rango__control {
  position: absolute;
  left: 0;
  width: 100%;
  margin: 0;
  background: none;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
}

.of-precio-rango {
  position: relative;
}

.of-precio-rango__control::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: var(--of-teal, #26BFB8);
  pointer-events: auto;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.of-precio-rango__control::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: var(--of-teal, #26BFB8);
  pointer-events: auto;
  cursor: pointer;
}

.of-precio-rango__control--min,
.of-precio-rango__control--max {
  top: 6px;
}

.of-precio-rango__campos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.of-precio-rango__campos label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--of-borde, #dfe6e6);
  border-radius: 10px;
  color: var(--of-azul, #1c4056);
  font-size: 14px;
}

.of-precio-rango__campos input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
}

.of-precio-rango__aplicar {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--of-teal, #26BFB8);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--of-teal, #26BFB8);
}

.of-precio-rango__aplicar:hover {
  background: #ffffff;
  border-color: var(--of-teal, #26BFB8);
  color: var(--of-teal, #26BFB8);
}

.of-nuevo {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  background: #f6d35b;
  color: #1c4056;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.3;
  text-transform: uppercase;
}

.card-producto {
  position: relative;
}

/* Vista lista: el Loop Grid del archivo debe llevar la clase of-loop-productos */
body.of-vista-lista .of-loop-productos .elementor-grid,
body.of-vista-lista .of-loop-productos .e-loop-container,
body.of-vista-lista .of-loop-productos .swiper-wrapper {
  display: grid !important;
  grid-template-columns: 1fr !important;
}

body.of-vista-lista .of-loop-productos .e-loop-item {
  width: 100%;
}

body.of-vista-lista .of-loop-productos .card-producto {
  overflow: hidden;
}

body.of-vista-lista .of-loop-productos .card-producto.e-con-boxed > .e-con-inner {
  display: grid !important;
  grid-template-columns: 148px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "imagen titulo"
    "imagen pie";
  align-items: stretch;
  min-height: 176px;
  position: relative;
}

body.of-vista-lista .of-loop-productos .card-producto .zona-imagen {
  grid-area: imagen;
  align-self: center;
  width: auto !important;
  max-width: none;
  padding: 12px !important;
  border-radius: 16px !important;
}

body.of-vista-lista .of-loop-productos .card-producto .product-image-background-container {
  min-height: 120px !important;
  height: 120px;
}

body.of-vista-lista .of-loop-productos .card-producto .product-image-background-container .of-product-bg {
  height: 100%;
}

body.of-vista-lista .of-loop-productos .card-producto .elementor-widget-woocommerce-product-title {
  grid-area: titulo;
  align-self: start;
  padding: 18px 58px 0 8px !important;
}

body.of-vista-lista .of-loop-productos .card-producto .card-producto__pie,
body.of-vista-lista .of-loop-productos .card-producto .card-producto__pie .elementor-widget-shortcode,
body.of-vista-lista .of-loop-productos .card-producto .card-producto__pie .elementor-shortcode,
body.of-vista-lista .of-loop-productos .card-producto .oferfarma-producto-pie {
  display: contents;
}

body.of-vista-lista .of-loop-productos .card-producto .oferfarma-precio {
  grid-area: pie;
  align-self: end;
  padding: 0 58px 14px 8px;
}

body.of-vista-lista .of-loop-productos .card-producto .oferfarma-precio.sin-oferta,
body.of-vista-lista .of-loop-productos .card-producto .oferfarma-precio.tiene-oferta ins {
  font-size: 40px;
}

body.of-vista-lista .of-loop-productos .card-producto .circulo-promo {
  grid-area: pie;
  justify-self: start;
  align-self: end;
}

body.of-vista-lista .of-loop-productos .card-producto .btn-carrito {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 4;
  align-self: auto;
  margin: 0;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

@media (max-width: 767px) {
  .e-con-inner:has(> .elementor-widget .of-resultados):has(> .elementor-widget .of-archivo-barra) {
    padding: 12px 16px;
  }

  .of-archivo-barra {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }

  body.of-vista-lista .of-loop-productos .card-producto.e-con-boxed > .e-con-inner {
    grid-template-columns: 110px minmax(0, 1fr);
    min-height: 0;
  }

  body.of-vista-lista .of-loop-productos .card-producto .product-image-background-container {
    min-height: 96px !important;
    height: 96px;
  }

  body.of-vista-lista .of-loop-productos .card-producto .oferfarma-precio.sin-oferta,
  body.of-vista-lista .of-loop-productos .card-producto .oferfarma-precio.tiene-oferta ins {
    font-size: 32px;
  }
}
