/* Mawecars · «Disponible bajo pedido» y galería de clientes (noviembre 2026). */

/* ── Franja horizontal «Disponible bajo pedido» ─────────────────────────────
   A pie de foto. Distinta de las bandas diagonales de Reservado / Vendido, que no cambian. */
.order-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  background: linear-gradient(90deg, rgba(144, 11, 29, .95), rgba(183, 14, 37, .97) 50%, rgba(144, 11, 29, .95));
  border-top: 1px solid rgba(255, 255, 255, .32);
  box-shadow: 0 -6px 18px rgba(0, 0, 0, .16);
  color: #fff;
  pointer-events: none;
}
.order-band > span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1.4;
  text-transform: uppercase;
  text-align: center;
}
.gallery-main .order-band { min-height: 46px; padding-block: 11px; }
.gallery-main .order-band > span { font-size: 13px; letter-spacing: .2em; }
.stock-pill.on_request { background: #e8eefb; color: #1e478c; }

/* ── Galería de clientes ─────────────────────────────────────────────────── */
.customers-section { padding-bottom: 72px; }
.customer-wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(150px, 15vw, 210px);
  grid-auto-flow: dense;
  gap: 16px;
}
.customer-tile {
  position: relative;
  margin: 0;
  min-width: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #e7e8ec;
  isolation: isolate;
}
.customer-tile.is-portrait { grid-row: span 2; }
.customer-tile.is-feature { grid-column: span 2; grid-row: span 2; }
.customer-open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.customer-open img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}
.customer-tile:hover .customer-open img { transform: scale(1.045); }
.customer-tile figcaption {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 48px 18px 16px;
  background: linear-gradient(to top, rgba(10, 11, 14, .84), rgba(10, 11, 14, .38) 62%, transparent);
  color: #fff;
  pointer-events: none;
}
.customer-tile figcaption strong { font-size: 16px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.customer-tile.is-feature figcaption { padding: 70px 26px 22px; }
.customer-tile.is-feature figcaption strong { font-size: 24px; }
.customer-car { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; opacity: .92; }
.customer-car .icon { width: 15px; height: 15px; flex-shrink: 0; }
.customer-tile q {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.5;
  opacity: .86;
}
.customer-tile:not(.is-feature):not(.is-portrait) q { display: none; }
.customer-tile time,
.customer-lightbox time {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .78;
}
.customer-tile time::before,
.customer-lightbox time::before { content: ""; width: 18px; height: 2px; background: #ff4d63; border-radius: 2px; }

/* Pocas fotos: tarjetas centradas en lugar del mosaico. */
.customer-wall.is-few { display: flex; flex-wrap: wrap; justify-content: center; }
.customer-wall.is-few .customer-tile { flex: 1 1 280px; max-width: 410px; aspect-ratio: 4 / 5; }
.customer-wall.is-few .customer-tile q { display: -webkit-box; }

/* Aparición suave al hacer scroll (solo con JS y sin «reducir movimiento»). */
.customer-wall.is-animated .customer-tile {
  opacity: 0;
  transform: translateY(22px) scale(.985);
  transition: opacity .7s ease var(--d, 0ms), transform .8s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms);
}
.customer-wall.is-animated .customer-tile.in { opacity: 1; transform: none; }
.customer-more { margin-top: 34px; text-align: center; }

/* Visor de fotos de clientes. */
.customer-lightbox[open] { flex-direction: column; gap: 18px; }
.customer-lightbox > img { max-height: calc(100dvh - 210px); border-radius: 8px; }
.lightbox button[hidden] { display: none; }
.lightbox-caption { display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 640px; text-align: center; }
.lightbox-caption strong { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.lightbox-caption .customer-car { justify-content: center; font-size: 13px; }
.lightbox-caption q { font-size: 14px; line-height: 1.6; opacity: .9; }
.lightbox-caption time { justify-content: center; }

@media (max-width: 1150px) {
  .customer-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: clamp(140px, 20vw, 200px); }
}
@media (max-width: 650px) {
  .order-band { padding: 7px 10px; }
  .gallery-main .order-band { min-height: 40px; padding-block: 9px; }
  .order-band > span { font-size: 10px; letter-spacing: .13em; }
  .gallery-main .order-band > span { font-size: 11px; }
  .customers-section { padding-bottom: 48px; }
  .customer-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 30vw; gap: 10px; }
  .customer-tile { border-radius: 10px; }
  .customer-tile figcaption { padding: 30px 10px 9px; }
  .customer-tile figcaption strong { font-size: 13px; }
  .customer-car { font-size: 10px; }
  .customer-tile q, .customer-tile time { display: none !important; }
  .customer-tile.has-name:not(.is-feature) .customer-car { display: none; }
  .customer-tile.is-feature figcaption { padding: 44px 14px 12px; }
  .customer-tile.is-feature figcaption strong { font-size: 17px; }
  .customer-wall.is-few .customer-tile { flex-basis: 100%; max-width: none; }
  .customer-wall.is-few .customer-tile q, .customer-wall.is-few .customer-tile time { display: flex !important; }
  .customer-wall.is-few .customer-tile figcaption { padding: 48px 16px 14px; }
  .customer-wall.is-few .customer-tile figcaption strong { font-size: 17px; }
  .customer-lightbox { padding: 64px 14px 100px !important; }
  .customer-lightbox > img { max-height: calc(100dvh - 300px); }
  .customer-lightbox .lightbox-prev, .customer-lightbox .lightbox-next { top: auto; bottom: 24px; }
  .customer-lightbox .lightbox-prev { left: calc(50% - 112px); }
  .customer-lightbox .lightbox-next { right: calc(50% - 112px); }
  .customer-lightbox .lightbox-count { bottom: 38px; }
  .lightbox-caption strong { font-size: 16px; }
  .lightbox-caption q { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .customer-open img { transition: none; }
  .customer-tile:hover .customer-open img { transform: none; }
}

/* ══ Tarjeta de vehículo: contenido centrado, etiqueta DGT oficial y animaciones ══ */
.mw-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.vehicle-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(20, 21, 24, .04);
  transition: transform .5s cubic-bezier(.2, .7, .2, 1), box-shadow .5s, border-color .3s;
}
.vehicle-card[hidden] { display: none; }
.vehicle-card::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--red);
  transform: translateX(-50%);
  transition: width .5s cubic-bezier(.2, .7, .2, 1);
}
.card-photo > a img { transition: transform 1s cubic-bezier(.2, .7, .2, 1); }
.card-photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 45%;
  background: linear-gradient(to top, rgba(10, 11, 14, .3), transparent);
  pointer-events: none;
}
.card-photo .card-dgt {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 3;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
  pointer-events: none;
  transition: transform .6s cubic-bezier(.34, 1.56, .64, 1);
}
.card-nodgt,
.photo-count {
  position: absolute;
  bottom: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  pointer-events: none;
}
.card-nodgt { left: 14px; background: rgba(255, 255, 255, .94); color: #292c32; }
.photo-count { right: 14px; background: rgba(17, 18, 22, .62); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.photo-count .icon { width: 14px; height: 14px; }
.card-photo.has-band .card-dgt,
.card-photo.has-band .card-nodgt,
.card-photo.has-band .photo-count { bottom: 46px; }

.card-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px 22px 24px;
  text-align: center;
}
.card-brand { justify-content: center; gap: 8px; margin-bottom: 6px; color: var(--red); letter-spacing: .16em; }
.card-copy h3 { font-size: 25px !important; line-height: 1.15; margin-bottom: 6px !important; }
.card-copy h3 a {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 50% 100% / 0 2px no-repeat;
  transition: background-size .45s cubic-bezier(.2, .7, .2, 1);
}
.card-copy h3 a:hover,
.card-copy h3 a:focus-visible { background-size: 100% 2px; }
.card-version { margin-bottom: 18px !important; }
.car-specs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0 0 20px;
  padding: 14px 0;
  list-style: none;
  border-block: 1px solid var(--line);
  font-size: 12px;
}
.car-specs > li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0 4px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.3;
}
.car-specs > li + li { border-left: 1px solid var(--line); }
.car-specs .icon { width: 18px; height: 18px; color: var(--red); transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.car-specs > li:nth-child(2) .icon { transition-delay: .04s; }
.car-specs > li:nth-child(3) .icon { transition-delay: .08s; }
.car-specs > li:nth-child(4) .icon { transition-delay: .12s; }
.car-specs span { overflow-wrap: anywhere; }
.card-price { display: flex; flex-direction: column; align-items: center; margin-top: auto; }
.card-price small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.card-price strong { color: var(--ink); font-size: 30px; font-weight: 800; letter-spacing: -.045em; line-height: 1.25; }
.card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: background-color .3s, border-color .3s, color .3s;
}
.card-cta .icon { width: 16px; height: 16px; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.card-cta:hover,
.card-cta:focus-visible { background: var(--red); border-color: var(--red); color: #fff; }
.card-cta:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
@media (hover: hover) {
  .vehicle-card:hover { transform: translateY(-6px); border-color: #d9dbe0; box-shadow: 0 24px 44px -20px rgba(27, 27, 36, .32); }
  .vehicle-card:hover::after { width: 46%; }
  .vehicle-card:hover .card-photo > a img { transform: scale(1.06); }
  .vehicle-card:hover .card-photo .card-dgt { transform: rotate(-10deg) scale(1.08); }
  .vehicle-card:hover .car-specs .icon { transform: translateY(-3px); }
  .vehicle-card:hover .card-cta { background: var(--red); border-color: var(--red); color: #fff; }
  .vehicle-card:hover .card-cta .icon { transform: translate(3px, -3px); }
}

/* Con pocos coches, la rejilla se centra en lugar de dejar huecos a la derecha. */
@media (min-width: 951px) {
  .vehicle-grid:not(:has(> .vehicle-card:nth-of-type(3))) { grid-template-columns: repeat(auto-fit, minmax(0, calc((100% - 56px) / 3))); justify-content: center; }
}
@media (min-width: 651px) and (max-width: 950px) {
  .vehicle-grid:not(:has(> .vehicle-card:nth-of-type(2))) { grid-template-columns: minmax(0, calc((100% - 20px) / 2)); justify-content: center; }
}

/* Aparición escalonada al hacer scroll (la activa site.js; sin JS o con «reducir movimiento» todo se ve normal). */
.reveal { opacity: 0; transform: translateY(26px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .7s ease var(--d, 0ms), transform .85s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms); }

/* ══ Ficha del vehículo ══ */
@keyframes mw-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes mw-pop { from { opacity: 0; transform: translateY(8px) scale(.94); } to { opacity: 1; transform: none; } }
.detail-heading {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 18px auto 34px;
  text-align: center;
}
.detail-heading > div:first-child { display: flex; flex-direction: column; align-items: center; animation: mw-rise .75s cubic-bezier(.2, .7, .2, 1) both; }
.detail-heading h1 { font-size: clamp(36px, 4.6vw, 62px) !important; line-height: 1.04; letter-spacing: -.05em; margin-bottom: 10px !important; overflow-wrap: anywhere; }
.detail-heading p { max-width: 640px; font-size: 15px; }
.detail-facts { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; max-width: 900px; }
.detail-facts > * { animation: mw-pop .55s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(.18s + var(--i, 0) * 55ms); }
.detail-facts .stock-pill { margin: 0; padding: 8px 14px; font-size: 12px; }
.detail-facts .fact {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.detail-facts .fact .icon { width: 16px; height: 16px; color: var(--red); }
.detail-facts .fact-dgt { padding-left: 5px; }
.detail-facts .fact-dgt .dgt-label { width: 26px; height: 26px; }

.detail-gallery { animation: mw-rise .8s .1s cubic-bezier(.2, .7, .2, 1) both; }
.gallery-main { border-radius: 16px; box-shadow: 0 18px 40px -24px rgba(20, 21, 24, .45); }
.gallery-open { cursor: zoom-in; }
#gallery-main-image { transition: opacity .22s ease, transform 1.2s cubic-bezier(.2, .7, .2, 1); }
#gallery-main-image.is-fading { opacity: .2; }
.gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  cursor: pointer;
  opacity: 0;
  transform: scale(.85);
  transition: opacity .3s, transform .3s, background-color .2s, color .2s;
}
.gallery-nav.prev { left: 16px; }
.gallery-nav.next { right: 16px; }
.gallery-nav .icon { width: 20px; height: 20px; }
.gallery-main:hover .gallery-nav,
.gallery-nav:focus-visible { opacity: 1; transform: none; }
.gallery-nav:hover { background: var(--red); color: #fff; }
.gallery-dgt {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 3;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .32);
  pointer-events: none;
}
.gallery-hint {
  z-index: 3;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(17, 18, 22, .66);
  color: #fff;
  font-size: 12px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.gallery-hint .icon { width: 15px; height: 15px; }
.gallery-main.has-band .gallery-dgt,
.gallery-main.has-band .gallery-hint { bottom: 60px; }
.gallery-thumbs { position: relative; padding-bottom: 4px; scrollbar-width: thin; }
.gallery-thumb { border-radius: 9px; opacity: .62; transition: opacity .25s, border-color .25s, transform .25s; }
.gallery-thumb:hover { opacity: 1; transform: translateY(-2px); }
.gallery-thumb.active { opacity: 1; }

.purchase-panel { overflow: hidden; border-radius: 16px; text-align: center; animation: mw-rise .8s .2s cubic-bezier(.2, .7, .2, 1) both; }
.purchase-panel::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--red-dark), var(--red), #e0364b); }
.purchase-panel .price-label { font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.purchase-panel .detail-price { font-size: clamp(40px, 3.6vw, 52px); margin: 6px 0 10px; }
.panel-location { justify-content: center; text-align: left; }
.purchase-panel .share-vehicle { display: flex; justify-content: center; width: 100%; margin-top: 6px; }

.detail-section { padding-top: 36px; }
.detail-section h2 { text-align: center; }
.detail-section > p { max-width: 680px; margin-inline: auto; text-align: center; }
.detail-section h2::after { content: ""; display: block; width: 38px; height: 3px; margin: 12px auto 0; border-radius: 3px; background: var(--red); }
.technical-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.technical-grid > div {
  display: flex;
  flex: 0 1 calc((100% - 36px) / 4);
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 18px 10px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: center;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s, border-color .35s;
}
.technical-grid dt { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
.technical-grid dt .icon { box-sizing: content-box; width: 20px; height: 20px; padding: 10px; border-radius: 50%; background: #fbeaec; color: var(--red); transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.technical-grid dt .dgt-label { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 3px 10px rgba(0, 0, 0, .18); }
.technical-grid dd { margin: 4px 0 0; font-size: 15px; font-weight: 800; line-height: 1.4; overflow-wrap: anywhere; }
.equipment-list { gap: 10px; }
.equipment-list > li { padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-weight: 600; line-height: 1.5; }
.equipment-list .icon { box-sizing: content-box; flex-shrink: 0; width: 14px; height: 14px; padding: 4px; border-radius: 50%; background: #fbeaec; }
@media (hover: hover) {
  .gallery-main:hover #gallery-main-image { transform: scale(1.025); }
  .technical-grid > div:hover { transform: translateY(-3px); border-color: #d9dbe0; box-shadow: 0 14px 28px -18px rgba(27, 27, 36, .35); }
  .technical-grid > div:hover dt .icon { transform: scale(1.1) rotate(-6deg); }
}
@media (hover: none) {
  .gallery-nav { opacity: 1; transform: none; }
}
@media (max-width: 950px) {
  .purchase-panel { position: relative; top: auto; }
  .technical-grid > div { flex-basis: calc((100% - 24px) / 3); }
}
@media (max-width: 650px) {
  .card-copy { padding: 20px 18px 22px; }
  .card-copy h3 { font-size: 26px !important; }
  .card-photo .card-dgt { left: 12px; bottom: 12px; width: 42px; height: 42px; }
  .card-nodgt, .photo-count { bottom: 12px; }
  .card-nodgt { left: 12px; }
  .photo-count { right: 12px; }
  .card-photo.has-band .card-dgt,
  .card-photo.has-band .card-nodgt,
  .card-photo.has-band .photo-count { bottom: 44px; }
  .detail-heading { margin: 10px auto 22px; gap: 14px; }
  .detail-heading h1 { font-size: 32px !important; }
  .detail-heading p { font-size: 13px; }
  .detail-facts { gap: 6px; }
  .detail-facts .stock-pill { padding: 6px 11px; font-size: 11px; }
  .detail-facts .fact { min-height: 30px; padding: 5px 11px; font-size: 11px; }
  .detail-facts .fact-dgt { padding-left: 4px; }
  .detail-facts .fact-dgt .dgt-label { width: 22px; height: 22px; }
  .gallery-main { border-radius: 12px; }
  .gallery-nav { width: 38px; height: 38px; margin-top: -19px; }
  .gallery-nav.prev { left: 8px; }
  .gallery-nav.next { right: 8px; }
  .gallery-dgt { left: 12px; bottom: 12px; width: 48px; height: 48px; }
  .gallery-main.has-band .gallery-dgt,
  .gallery-main.has-band .gallery-hint { bottom: 52px; }
  .purchase-panel .detail-price { font-size: 38px; }
  .technical-grid { gap: 10px; }
  .technical-grid > div { flex-basis: calc((100% - 10px) / 2); padding: 14px 8px; }
  .technical-grid dt .icon { width: 18px; height: 18px; padding: 8px; }
  .technical-grid dt .dgt-label { width: 36px; height: 36px; }
  .technical-grid dd { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .vehicle-card, .vehicle-card::after, .card-photo img, .card-photo .card-dgt, .car-specs .icon, .card-cta, .card-cta .icon,
  #gallery-main-image, .gallery-nav, .gallery-thumb, .technical-grid > div, .technical-grid dt .icon { transition: none !important; }
  .detail-heading > div:first-child, .detail-facts > *, .detail-gallery, .purchase-panel { animation: none !important; }
  .vehicle-card:hover, .vehicle-card:hover .card-photo img, .vehicle-card:hover .card-photo .card-dgt, .vehicle-card:hover .car-specs .icon,
  .technical-grid > div:hover, .technical-grid > div:hover dt .icon, .gallery-main:hover #gallery-main-image { transform: none !important; }
}
