/* Colores y medidas: ajusta aquí para que coincidan con tu Kit de Elementor */
.sp-slider {
  --sp-card-bg: #1b1d22;
  --sp-text: #ffffff;
  --sp-muted: #c9c9cf;
  --sp-accent: #e8a94a;
  --sp-track: #3a3b40;
  --sp-radius: 6px;
  --sp-img-bg: #111318;   /* fondo detrás de la imagen del producto (oscuro) */
  --sp-img-pad: 8px;      /* margen interno para que la carta no toque el borde */
  position: relative;
  width: 100%;
}

.sp-slider .swiper { overflow: hidden; }

/* Cada slide es una página con cuadrícula de productos */
.sp-page {
  display: grid;
  grid-template-columns: repeat(var(--sp-cols, 4), minmax(0, 1fr));
  column-gap: var(--sp-gap, 24px);
  row-gap: calc(var(--sp-gap, 24px) * 1.25);
}
/* Antes de que cargue el JS (o si falla), se ve como cuadrícula simple */
.sp-slider:not(.sp-ready) .swiper-wrapper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 767px) {
  .sp-slider:not(.sp-ready) .swiper-wrapper { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
/* Si todo cabe en una página, se ocultan barra y flechas */
.sp-slider.sp-single .sp-controls { display: none; }

.sp-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  padding: 10px 10px 16px;
  background: var(--sp-card-bg);
  border-radius: 2px;
  text-align: center;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.sp-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.35); }

.sp-card__img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: var(--sp-radius);
  background: var(--sp-img-bg, #111318);
}
.sp-card__img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  margin: 0 !important;
}

.sp-card__cat   { font-size: 11px; color: var(--sp-muted); line-height: 1.3; }
.sp-card__title { font-size: 14px; font-weight: 700; color: var(--sp-text); line-height: 1.3; }
.sp-card__price { font-size: 12px; font-weight: 600; color: var(--sp-accent); }
.sp-card__price del { opacity: .6; margin-right: 4px; }
.sp-card__price ins { text-decoration: none; }

/* Barra de progreso + flechas */
.sp-controls {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 48px;
}
.sp-slider .sp-progress.swiper-pagination-progressbar {
  position: relative;
  flex: 1;
  height: 3px;
  top: auto; left: auto;
  background: var(--sp-track);
}
.sp-slider .sp-progress .swiper-pagination-progressbar-fill { background: var(--sp-accent); }

.sp-nav { display: flex; gap: 12px; flex-shrink: 0; }
.sp-nav button {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #111;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, opacity .2s ease;
}
.sp-nav button:hover { background: var(--sp-accent); color: #111; }
.sp-nav button.swiper-button-disabled { opacity: .35; cursor: default; }
.sp-nav button:focus-visible { outline: 2px solid var(--sp-accent); outline-offset: 2px; }

@media (max-width: 767px) {
  .sp-controls { margin-top: 28px; gap: 16px; }
  .sp-card__title { font-size: 13px; }
}

/* ===== Cuadrícula de categorías ===== */
.sp-cat-grid {
  --sp-card-bg: #1b1d22;
  --sp-text: #ffffff;
  --sp-accent: #e8a94a;
  --sp-radius: 6px;
  --sp-img-bg: #111318;   /* fondo detrás de la imagen del producto (oscuro) */
  --sp-img-pad: 8px;
  display: grid;
  grid-template-columns: repeat(var(--sp-cols, 4), minmax(0, 1fr));
  gap: 24px;
}
/* Categorías: la imagen se muestra completa */
.sp-cat-grid .sp-card__img { background: var(--sp-img-bg); padding: var(--sp-img-pad); }
.sp-cat-grid .sp-card__img img { object-fit: contain; }
.sp-card--cat { padding: 12px 12px 0; }
.sp-card--cat .sp-card__img { margin-bottom: 0; }
.sp-card--cat .sp-card__title {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 84px;
  font-size: 15px;
  transition: color .2s ease;
}
.sp-card--cat:hover .sp-card__title { color: var(--sp-accent); }

@media (max-width: 1024px) {
  .sp-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (max-width: 767px) {
  .sp-cat-grid { gap: 14px; }
  .sp-card--cat { padding: 8px 8px 0; }
  .sp-card--cat .sp-card__title { min-height: 56px; font-size: 14px; }
}

/* ===== Eventos ===== */
.sp-eventos {
  --sp-text: #ffffff;
  --sp-muted: #c9c9cf;
  --sp-accent: #e8a94a;
  --sp-border: #2c2e35;
  display: grid;
  grid-template-columns: repeat(var(--sp-cols, 4), minmax(0, 1fr));
  gap: 52px;
  align-items: start;
}
.sp-evento {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--sp-border);
  border-radius: 6px;
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease;
}
.sp-evento--img-arriba { flex-direction: column-reverse; }

/* Línea dorada arriba a la izquierda al pasar el mouse */
.sp-evento::before {
  content: "";
  position: absolute;
  top: 22px; left: 8px;
  width: 0; height: 2px;
  background: var(--sp-accent);
  transition: width .25s ease;
}
.sp-evento:hover { border-color: #44464e; transform: translateY(-3px); }
.sp-evento:hover::before { width: 16px; }

.sp-evento__body {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 22px 22px;
}
.sp-evento__title {
  color: var(--sp-text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}
.sp-evento__date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--sp-muted);
}
.sp-evento__date svg { color: var(--sp-accent); flex-shrink: 0; }

.sp-evento__img { display: block; aspect-ratio: 2 / 1; overflow: hidden; }
.sp-evento__img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  margin: 0 !important;
  transition: transform .4s ease;
}
.sp-evento:hover .sp-evento__img img { transform: scale(1.04); }

@media (max-width: 1024px) {
  .sp-eventos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}
@media (max-width: 767px) {
  .sp-eventos { grid-template-columns: 1fr; gap: 18px; }
  .sp-evento--img-arriba { flex-direction: column; }   /* en celular todas iguales */
}

/* Productos: la imagen se muestra completa (cartas verticales, cajas, etc.) */
.sp-slider .sp-card__img { background: var(--sp-img-bg); padding: var(--sp-img-pad); }
.sp-slider .sp-card__img img { object-fit: contain; }
