/* ═══════════════════════════════════════════
   Home v3 — Mobile first  |  Prefijo: v3-
═══════════════════════════════════════════ */

body {
  padding-top: 3rem !important;
  background: #f7f7f7;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  color: #1a1a1a;
}

.v3-main {
  width: 100%;
}

/* ── HERO ─────────────────────────────────── */

.v3-hero {
  background: linear-gradient(
    170deg,
    color-mix(in srgb, var(--color-primario) 16%, white) 0%,
    #f7f7f7 72%
  );
  width: 100%;
  padding: 36px 0 40px;
}

/* Contenedor centrado del hero */
.v3-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 16px 0 16px;
  width: 100%;
  box-sizing: border-box;
}

.v3-hero-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: var(--color-primario);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.v3-hero-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.v3-hero-accent {
  color: var(--color-primario);
}

.v3-hero-sub {
  font-size: 13px;
  color: #777;
  margin-bottom: 22px;
}

/* Search bar */
.v3-search-form {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 6px 6px 6px 14px;
  width: 100%;
  max-width: 480px;
  margin-bottom: 18px;
  gap: 8px;
  cursor: pointer;
  box-sizing: border-box;
}

.v3-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
  color: #aaa;
  min-width: 0;
  cursor: pointer;
  pointer-events: none;
}

.v3-search-btn {
  flex-shrink: 0;
  background: var(--color-primario);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.v3-search-btn:hover {
  opacity: 0.88;
}

/* Hero category pills */
.v3-hero-cats {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.v3-hero-cat {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 12px;
  font-weight: 500;
  color: #444;
  text-decoration: none;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}

.v3-hero-cat:hover {
  background: var(--color-primario);
  color: #fff;
  border-color: var(--color-primario);
}

/* ── SECTION HEADER ───────────────────────── */

.v3-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.v3-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.v3-title-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-secundario, #ffcc00);
  flex-shrink: 0;
}

.v3-see-all {
  font-size: 13px;
  color: var(--color-primario);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}

/* ── CARRUSEL OFERTAS — MOBILE: scroll horizontal ── */

.v3-offers {
  padding: 20px 14px;
}

.v3-carousel {
  display: flex;
  flex-direction: row;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.v3-carousel::-webkit-scrollbar {
  display: none;
}

/* Mobile: cada card muestra su contenido completo */
.v3-car-item {
  flex: 0 0 78%;
  scroll-snap-align: start;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  opacity: 0.6;
  transition: background 0.3s ease, opacity 0.3s ease;
}

.v3-car-item.active {
  background: var(--color-primario);
  opacity: 1;
}

/* Imagen */
.v3-car-img {
  width: 100%;
  height: 130px;
  object-fit: contain;
  padding: 10px;
  flex-shrink: 0;
}

.v3-car-item.active .v3-car-img {
  background: rgba(255, 255, 255, 0.08);
}

/* Badge — visible siempre en mobile */
.v3-car-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #ffcc00;
  color: #1a1a1a;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  pointer-events: none;
}

/* Info — siempre visible en mobile */
.v3-car-info {
  padding: 4px 14px 14px;
  overflow: hidden;
}

.v3-car-name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #1a1a1a;
}

.v3-car-item.active .v3-car-name {
  color: #fff;
}

.v3-car-price-old {
  font-size: 10px;
  text-decoration: line-through;
  opacity: 0.6;
  line-height: 1.3;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
}

.v3-car-item.active .v3-car-price-old {
  color: #fff;
}

.v3-car-price-sale {
  font-size: 16px;
  font-weight: 800;
  color: var(--color-primario);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v3-car-item.active .v3-car-price-sale {
  color: #fff;
}

.v3-car-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.v3-car-cta {
  display: none;
}

.v3-car-item.active .v3-car-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.45);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

/* Dots */
.v3-car-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.v3-car-dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: #ddd;
  cursor: pointer;
  transition:
    background 0.25s,
    width 0.25s;
}

.v3-car-dot.active {
  background: var(--color-primario);
  width: 18px;
}
