.sp-categories {
  background: #f5f7fa;
  padding: 18px 0 14px;
}

.sp-categories__head {
  margin-bottom: 18px;
}

.sp-categories__title {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  color: #132f4a;
}

.sp-categories__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x;
}

.sp-categories__viewport::-webkit-scrollbar {
  display: none;
}

.sp-categories__track {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  grid-auto-flow: column;
  grid-auto-columns: 104px;
  gap: 18px 14px;
  width: max-content;
  padding: 2px 4px 6px;
}

.sp-categories__item {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
  text-decoration: none;
  color: #1d3552;
}

.sp-categories__item:focus {
  outline: none;
}

.sp-categories__item:focus-visible .sp-categories__icon-wrap,
.sp-categories__item.is-active .sp-categories__icon-wrap {
  box-shadow: 0 0 0 3px rgba(47, 109, 246, 0.22);
}

.sp-categories__icon-wrap {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #d8e4ff;
}

.sp-categories__item:nth-child(3n) .sp-categories__icon-wrap {
  background: #ffe1d8;
}

.sp-categories__item:nth-child(4n) .sp-categories__icon-wrap {
  background: #d8f3f0;
}

.sp-categories__item:nth-child(5n) .sp-categories__icon-wrap {
  background: #f7e8d0;
}

.sp-categories__icon {
  font-size: 34px;
  line-height: 1;
}

.sp-categories__name {
  text-align: center;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 700;
  color: #092f49;
  max-width: 98px;
}

.sp-categories__indicator {
  margin-top: 8px;
  height: 4px;
  width: 100%;
  border-radius: 999px;
  background: #d9e2eb;
  overflow: hidden;
  position: relative;
}

.sp-categories__indicator-thumb {
  display: block;
  height: 100%;
  width: 40px;
  border-radius: 999px;
  background: #2f6df6;
  transform: translateX(0);
  transition: transform .08s linear;
}

.sp-categories__submenu {
  margin-top: 14px;
  border: 1px solid #dbe3ec;
  border-radius: 14px;
  background: #ffffff;
  padding: 14px;
}

.sp-categories__submenu-all {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  color: #11304b;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.sp-categories__submenu-all::before {
  content: ">";
  margin-right: 10px;
  font-size: 16px;
  line-height: 1;
}

.sp-categories__submenu-grid {
  border-top: 1px solid #e8edf3;
  padding-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.sp-categories__submenu-link {
  display: block;
  color: #173753;
  text-decoration: none;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
}

.sp-categories__submenu-link::before {
  content: ">";
  margin-right: 8px;
  color: #2c4862;
}

.sp-categories__submenu-link:hover {
  color: #2f6df6;
}

@media (min-width: 992px) {
  .sp-categories__viewport {
    overflow: visible;
    touch-action: auto;
  }

  .sp-categories__track {
    width: 100%;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    grid-template-columns: repeat(8, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 22px 18px;
    padding: 2px 0 0;
  }

  .sp-categories__icon-wrap {
    width: 86px;
    height: 86px;
  }

  .sp-categories__name {
    max-width: 120px;
    font-size: 16px;
  }

  .sp-categories__indicator {
    display: none;
  }

  .sp-categories__submenu {
    margin-top: 18px;
    padding: 16px 20px 20px;
  }

  .sp-categories__submenu-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 20px;
  }
}

.sp-home-v2 {
  background: #f5f7fa;
  padding: 20px 0 40px;
}

.sp-home-block {
  margin: 22px 0 28px;
}

.sp-home-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.sp-home-block__title {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  color: #132f4a;
}

.sp-home-block__more {
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.sp-home-block__more:hover,
.sp-home-block__more:focus-visible {
  color: #163ea8;
  text-decoration: underline;
}

.sp-home-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: #1d4ed8 #b9c7d6;
}

.sp-home-row::-webkit-scrollbar {
  display: block;
  height: 8px;
}

.sp-home-row::-webkit-scrollbar-track {
  background: #b9c7d6;
  border-radius: 999px;
}

.sp-home-row::-webkit-scrollbar-thumb {
  background: #1d4ed8;
  border-radius: 999px;
}

.sp-home-card {
  min-width: 230px;
  max-width: 230px;
  background: #ffffff;
  border: 1px solid #e2e8ef;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  scroll-snap-align: start;
}

.sp-home-card__image-link {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #eef2f7;
}

/* Badge tienda/dealer: esquina superior izquierda */
.badge-store {
  position: absolute;
  top: 7px;
  left: 7px;
  background: rgba(15, 20, 50, 0.82);
  color: #fff;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.28);
  z-index: 2;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

/* Badge destacado: esquina inferior izquierda */
.badge-featured {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: linear-gradient(135deg, #f5a623, #f0860a);
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  box-shadow: 0 2px 6px rgba(245, 166, 35, 0.4);
  z-index: 2;
}

.sp-home-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sp-home-card__body {
  padding: 12px 12px 14px;
}

.sp-home-card__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 40px;
  color: #1d3552;
  text-decoration: none;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
}

.sp-home-card__price {
  margin-top: 8px;
  color: #122c45;
  font-size: 18px;
  font-weight: 700;
}

.sp-home-card__location {
  margin-top: 6px;
  color: #5f7083;
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-home-empty {
  color: #5f7083;
  font-size: 14px;
  margin: 6px 0 0;
}

/* Botón WhatsApp en tarjetas de dealer/tienda */
.sp-card-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  background: #25d366;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  text-decoration: none;
  transition: background .15s;
}
.sp-card-whatsapp:hover { background: #1ebe5c; color: #fff; }

@media (min-width: 992px) {
  .sp-home-row {
    overflow: visible;
    padding: 0;
    display: grid;
    scroll-snap-type: none;
  }

  .sp-home-row--5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .sp-home-row--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sp-home-card {
    min-width: 0;
    max-width: none;
    width: 100%;
  }

  html,
  body {
    scrollbar-width: thin;
    scrollbar-color: #1d4ed8 #d9e2eb;
  }

  body::-webkit-scrollbar {
    width: 10px;
  }

  body::-webkit-scrollbar-track {
    background: #d9e2eb;
    border-radius: 999px;
  }

  body::-webkit-scrollbar-thumb {
    background: #1d4ed8;
    border-radius: 999px;
  }
}
