.imf-cl-wrap,
.imf-cl-buscador-wrap { font-family: 'Inter', sans-serif; color: #1A1A1A; }

/* El tema aplica su propio outline (rosa) a cualquier contenedor que tenga
   un hijo con foco, vía :focus-within — se anula acá; el feedback visual de
   foco real lo da cada control (buscador, sort, input) por su cuenta. */
.imf-cl-wrap, .imf-cl-wrap *,
.imf-cl-buscador-wrap, .imf-cl-buscador-wrap * {
  outline: none !important;
}

/* Foco de teclado propio (accesibilidad) usando box-shadow en vez de outline,
   para no volver a disparar el mismo bug del tema. */
.imf-cl-wrap button:focus-visible,
.imf-cl-wrap a:focus-visible,
.imf-cl-buscador-wrap button:focus-visible,
.imf-cl-buscador-wrap select:focus-visible {
  box-shadow: 0 0 0 2px rgba( 233, 78, 27, .45 ) !important;
}

/* ── Widget A: buscador + orden (bloque independiente) ── */
.imf-cl-buscador-wrap {
  display: flex;
  flex-wrap: nowrap; /* se mantienen en la misma fila salvo en mobile real (ver media query abajo) */
  align-items: center;
  gap: 10px;
}
@media (max-width: 480px) {
  .imf-cl-buscador-wrap { flex-wrap: wrap; flex-direction: column; align-items: stretch; }
}

.imf-cl-buscador {
  display: flex;
  align-items: center;
  background: #F5F5F5 !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  border-radius: 10px;
  height: 44px;
  padding: 0 14px;
  min-width: 0;
  flex: 1 1 auto; /* se achica libremente en columnas angostas en vez de forzar 288px y saltar de línea */
  transition: border-color .15s, background .15s;
}
.imf-cl-buscador:focus-within { border-color: #E94E1B !important; background: #fff !important; }
.imf-cl-buscador svg { width: 16px; height: 16px; color: #5A5A5A; flex-shrink: 0; }
.imf-cl-q {
  flex: 1; min-width: 0; border: none !important; background: transparent !important; box-shadow: none !important; outline: none;
  padding: 0 10px; font-size: 14px; font-family: inherit; color: #1A1A1A !important;
}

.imf-cl-sort {
  height: 44px;
  flex: 0 1 auto;
  min-width: 0;
  background: #F5F5F5 !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  color: #1A1A1A !important;
  outline: none;
  cursor: pointer;
}
.imf-cl-sort:focus { border-color: #E94E1B !important; }

/* ── Layout: sidebar + resultados ── */
.imf-cl-layout { display: grid; grid-template-columns: 248px 1fr; gap: 40px; min-width: 0; }
@media (max-width: 1024px) { .imf-cl-layout { grid-template-columns: 1fr; } }

.imf-cl-aside { min-width: 0; }
.imf-cl-aside-desktop { display: none; }
@media (min-width: 1025px) {
  .imf-cl-aside {
    position: sticky;
    top: 96px;
    align-self: start;
    /* Si al desplegar "Mostrar más" el sidebar queda más alto que la pantalla,
       scrollea DENTRO de sí mismo en vez de quedar pegado tapando el resto
       del filtro (que si no, queda fuera del viewport hasta scrollear toda
       la grilla de productos para "soltar" el sticky). */
    max-height: calc( 100vh - 96px - 24px );
    overflow-y: auto;
  }
  .imf-cl-aside-desktop { display: block; }
}

.imf-cl-chips-m {
  display: flex;
  flex-wrap: wrap; /* antes era scroll horizontal — con nombres largos se cortaba en la orilla sin avisar bien */
  gap: 8px;
  margin-bottom: 16px;
  max-width: 100%;
}
@media (min-width: 1025px) { .imf-cl-chips-m { display: none; } }
.imf-cl-chip-m {
  border: 1px solid #E5E5E5 !important; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 500;
  color: #5A5A5A !important; background: #fff !important; box-shadow: none !important; white-space: nowrap; transition: .15s; flex-shrink: 0;
}
.imf-cl-chip-m.on {
  background: #1A1A1A !important; border-color: #1A1A1A !important; color: #fff !important; font-weight: 600;
}

.imf-cl-label {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: #1A1A1A; margin-bottom: 14px;
}

.imf-cl-groups { display: flex; flex-direction: column; gap: 2px; }
.imf-cl-g-btn {
  width: 100%; display: flex; align-items: center; justify-content: flex-start; gap: 8px; text-align: left;
  padding: 8px 12px; border-radius: 10px; font-size: 13.5px; background: none !important; border: none !important;
  box-shadow: none !important; cursor: pointer; font-family: inherit; color: #1A1A1A !important;
  transition: background .15s, color .15s;
}
.imf-cl-g-btn:hover { background: #F5F5F5 !important; color: #1A1A1A !important; }
.imf-cl-g-btn.on,
.imf-cl-g-btn.on:hover { background: #1A1A1A !important; color: #fff !important; font-weight: 600; }

.imf-cl-g-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.imf-cl-g-count { flex-shrink: 0; font-size: 12px; color: #5A5A5A !important; font-variant-numeric: tabular-nums; }
.imf-cl-g-btn.on .imf-cl-g-count { color: rgba(255,255,255,.55) !important; }

.imf-cl-groups-extra { display: flex; flex-direction: column; gap: 2px; }
.imf-cl-groups-extra[hidden] { display: none; }

.imf-cl-groups-toggle {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 6px; padding: 8px 12px; border-radius: 10px; background: none !important; border: none !important;
  box-shadow: none !important; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 600;
  color: #E94E1B !important; transition: background .15s;
}
.imf-cl-groups-toggle:hover { background: #F5F5F5 !important; }
.imf-cl-groups-toggle svg { width: 14px; height: 14px; flex-shrink: 0; transition: transform .2s; }
.imf-cl-groups-toggle.is-open svg { transform: rotate( 180deg ); }

.imf-cl-off-block { margin-top: 28px; padding-top: 24px; border-top: 1px solid #E5E5E5; }
.imf-cl-off-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.imf-cl-off-val {
  font-size: 12.5px; font-weight: 700; color: #fff; background: #E94E1B;
  padding: 3px 9px; border-radius: 999px; font-variant-numeric: tabular-nums;
}

input[type=range].imf-cl-off {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 999px; background: #E8E8E4; outline: none;
}
input[type=range].imf-cl-off::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #E94E1B; cursor: pointer;
  border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
input[type=range].imf-cl-off::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: #E94E1B; cursor: pointer; border: 3px solid #fff;
}

.imf-cl-reset {
  margin-top: 24px; font-size: 13px; color: #5A5A5A !important; cursor: pointer;
  background: none !important; border: none !important; box-shadow: none !important; border-radius: 0 !important;
  display: inline-flex; align-items: center; gap: 6px; font-family: inherit; padding: 0 !important; transition: color .15s;
}
.imf-cl-reset:hover { color: #E94E1B !important; background: none !important; }
.imf-cl-reset svg { width: 14px; height: 14px; }

/* ── Resultados ── */
.imf-cl-results-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.imf-cl-count { font-size: 13.5px; color: #5A5A5A; margin: 0; }
.imf-cl-count b { color: #1A1A1A; font-variant-numeric: tabular-nums; }
.imf-cl-active { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.imf-cl-active-chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: #F5F5F5 !important; border: none !important; box-shadow: none !important; color: #1A1A1A !important;
  font-size: 12.5px; padding: 4px 10px; border-radius: 999px; transition: background .15s; font-family: inherit;
}
.imf-cl-active-chip:hover { background: #E5E5E5 !important; }
.imf-cl-active-chip svg { width: 12px; height: 12px; }

.imf-cl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 768px)  { .imf-cl-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 1280px) { .imf-cl-grid { grid-template-columns: repeat(4, 1fr); } }

.imf-cl-group-header { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.imf-cl-group-header:first-child { margin-top: 0; }
.imf-cl-group-header h3 { font-size: 15px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.imf-cl-group-header span { font-size: 12px; color: #5A5A5A; font-variant-numeric: tabular-nums; }
.imf-cl-group-header i { flex: 1; height: 1px; background: #E5E5E5; }

.imf-cl-card {
  background: #fff; border: 1px solid #E5E5E5; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.imf-cl-card:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -18px rgba(26,26,26,.28); border-color: #1A1A1A; }

.imf-cl-card-img { position: relative; display: block; aspect-ratio: 4 / 3; background: #F5F5F5; }
.imf-cl-card-img img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.imf-cl-no-img { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(160deg,#F7F7F5,#ECECE8); }
.imf-cl-no-img svg { width: 34%; height: 34%; color: #C9C9C3; }

.imf-cl-off-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2; background: #E94E1B; color: #fff; font-size: 13px; font-weight: 800;
  padding: 4px 10px; border-radius: 10px; font-variant-numeric: tabular-nums;
}

.imf-cl-card-body { padding: 14px; display: flex; flex-direction: column; flex: 1; }
.imf-cl-family { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: #5A5A5A; font-weight: 600; }
.imf-cl-name {
  margin-top: 6px; font-size: 13.5px; font-weight: 600; line-height: 1.35; color: #1A1A1A !important; text-decoration: none !important;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px;
}
.imf-cl-name:hover { color: #E94E1B !important; }
.imf-cl-sku { font-size: 11px; color: #5A5A5A; margin-top: 4px; font-variant-numeric: tabular-nums; }
.imf-cl-price-old {
  font-size: 12.5px; color: #5A5A5A; text-decoration: line-through; text-decoration-color: #B9B9B3;
  margin-top: 12px; font-variant-numeric: tabular-nums;
}
.imf-cl-price-new { font-size: 21px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.imf-cl-iva { font-size: 11.5px; color: #5A5A5A; }

.imf-cl-add-wrap { margin-top: 12px; }
.imf-cl-add {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #1A1A1A !important; color: #fff !important; font-weight: 600; font-size: 13.5px; height: 44px;
  border-radius: 10px; border: none !important; box-shadow: none !important; text-align: center; text-decoration: none !important;
  cursor: pointer; font-family: inherit; transition: background .15s;
}
.imf-cl-add:hover { background: #E94E1B !important; }
.imf-cl-add svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Botón "Ver opciones" para productos con más de una variante (mismo alto/forma que Agregar) */
.imf-cl-add-wrap a.button {
  width: 100%; display: flex !important; align-items: center; justify-content: center;
  background: #1A1A1A !important; color: #fff !important; font-weight: 600; font-size: 13.5px; height: 44px;
  border-radius: 10px !important; box-shadow: none !important; text-decoration: none !important;
  transition: background .15s;
}
.imf-cl-add-wrap a.button:hover { background: #E94E1B !important; }

.imf-cl-empty { text-align: center; padding: 80px 0; }
.imf-cl-empty svg { width: 48px; height: 48px; color: #5A5A5A; margin: 0 auto 16px; }
.imf-cl-empty p { margin: 0; font-weight: 600; }
.imf-cl-empty-sub { font-weight: 400 !important; font-size: 13.5px; color: #5A5A5A; margin-top: 4px !important; }

.imf-cl-more-wrap { text-align: center; margin-top: 40px; }
.imf-cl-more {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid #1A1A1A !important; background: none !important; box-shadow: none !important;
  font-weight: 600; font-size: 14px; padding: 0 28px; height: 48px; border-radius: 10px; font-family: inherit;
  color: #1A1A1A !important; transition: background .15s, color .15s;
}
.imf-cl-more:hover {
  background: #1A1A1A !important; color: #fff !important; border-color: #1A1A1A !important;
}
.imf-cl-more svg { width: 16px; height: 16px; }
.imf-cl-more[hidden] { display: none; }
