/* ==========================================================
   DISEÑO PROPIO DE LA PÁGINA DE YOEL (estructura)
   Cambia cómo se acomodan las secciones; el contenido y las
   funciones son los mismos. Funciona con el tema claro y el oscuro.
   ========================================================== */

/* ---------- 1. Header flotante tipo cápsula ---------- */
.main-header {
  top: 14px; width: calc(100% - 32px); max-width: 1288px; margin: 14px auto 0;
  border-radius: 999px; border: 1px solid var(--borde) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .18);
}
.main-header .header-inner { height: 70px; padding: 0 12px 0 26px; }
.navigation { gap: 6px; }
.navigation > li > a { padding: 10px 18px; border-radius: 999px; }
.navigation > li > a::after { display: none; }
.navigation > li:hover > a, .navigation > li.current > a { background: var(--verde-claro); color: var(--verde-osc); }
.dropdown2 > ul { top: calc(100% + 10px); }
.header-account .btn { padding: 12px 22px; }
:root { --header-h: 84px; }

/* ---------- 2. Portada dividida ---------- */
.home-hero.hero-split { padding: 56px 0 70px; background: transparent; overflow: visible; }
.home-hero.hero-split::after { display: none; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero-texto { position: relative; z-index: 2; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--verde-claro); color: var(--verde-osc); border: 1px solid rgba(42, 179, 13, .25); margin-bottom: 22px;
}
.hero-kicker i { font-size: 8px; color: var(--verde); animation: latido 1.6s ease-in-out infinite; }
@keyframes latido { 50% { opacity: .3; } }
.hero-split h1 { color: var(--oscuro); font-size: clamp(38px, 5.2vw, 66px); line-height: 1.05; max-width: 620px; }
.hero-sub { color: var(--gris); font-size: 18px; margin: 18px 0 26px; max-width: 520px; }
.hero-split .home-search {
  margin-top: 30px; max-width: none; grid-template-columns: 1fr 1fr; padding: 18px; border-radius: 24px;
}
.hero-split .home-search .btn { height: 50px; align-self: end; }

.hero-visual {
  position: relative; height: 580px; border-radius: 36px; overflow: hidden; isolation: isolate;
  box-shadow: 0 40px 90px rgba(0, 0, 0, .35); border: 1px solid var(--borde);
}
.hero-visual::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .55) 100%);
}
.hero-visual .hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-visual .hero-dots { z-index: 3; bottom: 22px; }
.hero-flota {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; border-radius: 18px;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #1b1e22;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .3); transition: transform .25s ease; animation: flotar 5s ease-in-out infinite;
}
.hero-flota:hover { transform: translateY(-4px) scale(1.02); color: #1b1e22; }
.hero-flota > i { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 18px; color: #fff; background: var(--grad-verde, var(--verde)); flex-shrink: 0; }
.hero-flota b { display: block; font-family: "Sora", sans-serif; font-size: 15px; color: #1b1e22; }
.hero-flota small { display: block; font-size: 13px; color: #5d6660; }
.hero-flota.f1 { top: 26px; left: 26px; }
.hero-flota.f2 { right: 26px; bottom: 64px; animation-delay: -2.5s; }
@keyframes flotar { 50% { transform: translateY(-8px); } }

/* ---------- 3. Ficha: galería a todo el ancho ---------- */
@media (min-width: 992px) {
  .detalle-grid { grid-template-columns: 1fr 390px; column-gap: 40px; row-gap: 0; }
  .detalle-grid > div:first-child { display: contents; }
  .detalle-grid .galeria-main { grid-column: 1 / -1; aspect-ratio: 21 / 9; }
  .detalle-grid .miniaturas { grid-column: 1 / -1; justify-content: center; margin-top: 14px; }
  .detalle-grid .specs, .detalle-grid .bloque { grid-column: 1; }
  .detalle-grid .specs { margin-top: 36px; grid-template-columns: repeat(3, 1fr); }
  .detalle-grid .caja-precio { grid-column: 2; grid-row: 2 / span 4; margin-top: 36px; }
  .detalle-grid:has(.miniaturas) .caja-precio { grid-row: 3 / span 4; }
}
@media (max-width: 991px) {
  /* En celular: galería, precio y botones, y después los datos */
  .detalle-grid { display: flex; flex-direction: column; gap: 0; }
  .detalle-grid > div:first-child { display: contents; }
  .detalle-grid .galeria-main { order: 1; }
  .detalle-grid .miniaturas { order: 2; min-width: 0; max-width: 100%; }
  .detalle-grid > div:first-child > * { min-width: 0; max-width: 100%; }
  .detalle-grid .caja-precio { order: 3; margin-top: 20px; }
  .detalle-grid .specs { order: 4; }
  .detalle-grid .bloque { order: 5; }
}

/* Barra fija de compra (solo celular) */
.barra-compra {
  position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 95; display: none; align-items: center; gap: 12px;
  padding: 10px 10px 10px 16px; border-radius: 20px; background: var(--card, #fff); border: 1px solid var(--borde);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35); transform: translateY(140%); transition: transform .3s ease;
}
.barra-compra.visible { transform: none; }
.bc-info { flex: 1; min-width: 0; }
.bc-info small { display: block; font-size: 12px; color: var(--gris-2); }
.bc-info b { display: block; font-family: "Sora", sans-serif; font-size: 14px; color: var(--oscuro); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra-compra .btn { padding: 12px 18px; font-size: 14px; }
@media (max-width: 991px) {
  .barra-compra { display: flex; }
  body.con-barra .wa-float { bottom: 96px; }
  body.con-barra .to-top { bottom: 164px; }
}

/* ---------- 4. Banners partidos: texto de un lado, foto del otro ---------- */
.banner { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; padding: 0; min-height: 400px; background: var(--card, #1b1e22); }
.banner::before { inset: 0 0 0 48%; border-radius: 0; }
.banner-vender::before { background-image: url("https://images.unsplash.com/photo-1503376780353-7e6692767b70?auto=format&fit=crop&w=1200&q=75"); background-position: center 60%; }
.banner-motos::before { background-image: url("https://images.unsplash.com/photo-1568772585407-9361f9bf3a87?auto=format&fit=crop&w=1200&q=75"); background-position: center 55%; }
.banner::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(48% - 90px); width: 230px; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--card, #1b1e22) 40%, transparent);
}
.banner-txt { grid-column: 1; position: relative; z-index: 1; padding: 56px; max-width: 560px; align-self: center; }
.banner h2 { color: #fff; }

/* ---------- 5. Stock en cuadrícula tipo catálogo ---------- */
.list-car-list-1.grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.list-car-list-1.grid .image-group { height: 210px; }
.list-car-list-1.grid .link-style-1 { font-size: 19px; }

/* ---------- Adaptación a pantallas chicas ---------- */
@media (max-width: 1199px) {
  .hero-visual { height: 500px; }
}
@media (max-width: 991px) {
  .main-header { border-radius: 22px; }
  .main-header .header-inner { height: 64px; padding: 0 10px 0 18px; }
  .hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-visual { order: -1; height: 300px; border-radius: 26px; }
  .hero-flota.f1 { top: 14px; left: 14px; }
  .hero-flota.f2 { right: 14px; bottom: 44px; }
}
@media (max-width: 767px) {
  .main-header { width: calc(100% - 20px); top: 10px; margin-top: 10px; }
  .home-hero.hero-split { padding: 26px 0 40px; }
  .hero-visual { height: 240px; }
  .hero-flota { padding: 8px 12px 8px 8px; gap: 8px; border-radius: 14px; }
  .hero-flota > i { width: 34px; height: 34px; font-size: 14px; border-radius: 10px; }
  .hero-flota b { font-size: 13px; }
  .hero-flota small { font-size: 11px; }
  .hero-sub { font-size: 16px; }
  .hero-split .home-search { grid-template-columns: 1fr; }
  .banner { grid-template-columns: 1fr; min-height: 0; }
  .banner::before { inset: 0 0 auto 0; height: 210px; }
  .banner::after { left: 0; right: 0; top: 150px; bottom: auto; width: auto; height: 60px; background: linear-gradient(180deg, transparent, var(--card, #1b1e22)); }
  .banner-txt { padding: 222px 24px 28px; }
}
