/* ============================================================
   BUSCADORDECOCHES.NET — CSS FICHA DE DETALLE
   Archivo: /css/detail.css
============================================================ */


/* ── NAV ACCIONES (solo en detalle) ── */

.nav__detail-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.detail-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--g200);
  border-radius: var(--radius-pill);
  background: var(--white);
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--g600);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.detail-nav-btn:hover {
  border-color: var(--g300);
  color: var(--black);
}

.detail-nav-btn--fav:hover,
.detail-nav-btn--fav.is-saved {
  border-color: var(--red);
  color: var(--red);
}

.detail-nav-btn--fav.is-saved svg {
  fill: var(--red);
}


/* ── BREADCRUMB ── */

.breadcrumb-bar {
  background: var(--white);
  border-bottom: 1px solid var(--g200);
  padding: 8px 0;
}

.breadcrumb-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--g400);
  list-style: none;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--g500);
  text-decoration: none;
}

.breadcrumb a:hover { color: var(--red); }

.breadcrumb__ref {
  font-size: 0.7rem;
  color: var(--g400);
  white-space: nowrap;
  flex-shrink: 0;
}


/* ── BANNER VENDIDO ── */

.sold-banner {
  background: rgba(245, 130, 31, 0.08);
  border-bottom: 1px solid rgba(245, 130, 31, 0.2);
  padding: 10px 20px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.sold-banner a {
  font-weight: 700;
  color: var(--red);
  text-decoration: underline;
}


/* ── LAYOUT PRINCIPAL ── */

.detail-page {
  background: var(--g50);
  padding: 20px 0 100px; /* espacio para la sticky bar */
}

/* Layout Flexicar: galería izquierda (55%) + datos derecha (45%) */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

/* El nuevo layout tiene la galería+specs juntos a la izquierda */
.detail-main {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Bloque hero: galería izq + precio der lado a lado */
.detail-hero {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.detail-hero__gallery {
  min-width: 0;
}

.detail-hero__info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}


/* ══════════════════════════════════════
   GALERÍA
══════════════════════════════════════ */

/* ══════════════════════════════════════════════
   GALERÍA — Estilo Flexicar
   Foto grande 16:9 con cover, flechas grandes,
   carrusel automático, miniaturas debajo.
══════════════════════════════════════════════ */

.gallery {
  background: #111;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

/* Foto principal — 16:9 siempre */
.gallery__main {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  cursor: pointer;
  background: #111;
}

.gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;   /* Cover: llena todo el recuadro, bien centrado */
  display: block;
  transition: transform 0.4s ease;
  user-select: none;
}

.gallery__main:hover img {
  transform: scale(1.02);
}

.gallery__no-img {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  color: var(--g500);
  font-size: 0.875rem;
}

/* Flechas grandes — estilo Flexicar */
.gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 80px;
  border-radius: 4px;
  background: rgba(0,0,0,0.35);
  border: none;
  color: #fff;
  font-size: 2rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s;
  z-index: 10;
}

.gallery__nav:hover  { background: rgba(0,0,0,0.7); }
.gallery__nav--prev  { left: 0; border-radius: 0 4px 4px 0; }
.gallery__nav--next  { right: 0; border-radius: 4px 0 0 4px; }

/* Counter */
.gallery__counter {
  position: absolute;
  bottom: 10px;
  right: 12px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(4px);
}

/* Badges */
.gallery__badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
  z-index: 5;
}

.gbadge {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.gbadge--gold  { background: #f5a500; color: #fff; }
.gbadge--red   { background: var(--red); color: #fff; }
.gbadge--black { background: #111; color: #fff; }

/* Botón ampliar — esquina inferior derecha */
.gallery__fullscreen {
  position: absolute;
  bottom: 10px;
  right: 44px;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.15s;
  z-index: 10;
}

.gallery__fullscreen:hover { background: rgba(0,0,0,0.85); }

/* Favorito — estrella arriba a la derecha */
.gallery__fav {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: 1.5px solid rgba(255,255,255,0.25);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background 0.15s, color 0.15s;
  z-index: 10;
}

.gallery__fav:hover,
.gallery__fav--active { background: rgba(245,130,31,0.85); color: #fff; }

/* Miniaturas */
.gallery__thumbs {
  display: flex;
  gap: 3px;
  padding: 6px;
  background: #000;
  overflow-x: auto;
  scroll-behavior: smooth;
}

.gallery__thumbs::-webkit-scrollbar { height: 3px; }
.gallery__thumbs::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.gallery__thumb {
  flex-shrink: 0;
  width: 90px;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
  border: 2.5px solid transparent;
  cursor: pointer;
  padding: 0;
  background: none;
  transition: border-color 0.15s, opacity 0.15s;
  opacity: 0.55;
}

.gallery__thumb:hover { opacity: 0.85; }

.gallery__thumb--active {
  border-color: var(--red);
  opacity: 1;
}

.gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Indicador de auto-play */
.gallery__autoplay-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--red);
  width: 0%;
  transition: width linear;
  z-index: 5;
}


/* ── TÍTULO ── */

.detail-title-block {
  background: var(--white);
  border: 1px solid var(--g200);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.detail-title-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.detail-make {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.detail-title {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--black);
  line-height: 1.2;
}

.detail-version {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--g500);
  margin-top: 2px;
}

.detail-title-ref {
  font-size: 0.7rem;
  color: var(--g400);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 4px;
}

/* Tags rápidos */
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dtag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--g50);
  border: 1px solid var(--g200);
  border-radius: var(--radius-pill);
  font-size: 0.775rem;
  color: var(--g600);
}

.dtag--green {
  background: rgba(10,124,62,0.06);
  border-color: rgba(10,124,62,0.2);
  color: var(--green);
  font-weight: 600;
}

.dtag--blue {
  background: rgba(17,85,204,0.06);
  border-color: rgba(17,85,204,0.2);
  color: var(--blue);
  font-weight: 600;
}


/* ── SECCIONES GENÉRICAS ── */


/* ══════════════════════════════════════
   SPECS BAR — iconos estilo Flexicar
══════════════════════════════════════ */

.specs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--g200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.specs-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 16px;
  flex: 1;
  min-width: 90px;
  border-right: 1px solid var(--g100);
  text-align: center;
}

.specs-bar__item:last-child { border-right: none; }

.specs-bar__icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--g500);
}

.specs-bar__icon svg { width: 24px; height: 24px; }

.specs-bar__label {
  font-size: .65rem;
  color: var(--g400);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.specs-bar__value {
  font-size: .8125rem;
  font-weight: 800;
  color: var(--black);
  line-height: 1.2;
}

/* Consumo con gauge circular */
.specs-bar__gauge {
  position: relative;
  width: 42px;
  height: 42px;
}

.specs-bar__gauge svg {
  width: 42px;
  height: 42px;
  transform: rotate(-90deg);
}

.specs-bar__gauge-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .55rem;
  font-weight: 800;
  color: var(--black);
  line-height: 1;
  flex-direction: column;
}

.detail-specs,
.detail-description,
.detail-equipment,
.detail-location,
.detail-contact-form,
.detail-similar {
  background: var(--white);
  border: 1px solid var(--g200);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.detail-section-title {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--g100);
}


/* ── FICHA TÉCNICA ── */

.specs-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.spec-row {
  display: flex;
  flex-direction: column;
  padding: 9px 12px;
  border-right: 1px solid var(--g100);
  border-bottom: 1px solid var(--g100);
}

.spec-row:nth-child(even) { border-right: none; }
.spec-row:nth-last-child(-n+2) { border-bottom: none; }

.spec-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--g400);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
}

.spec-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--black);
}

.spec-value--green { color: var(--green); }
.spec-value--blue  { color: var(--blue); }


/* ── DESCRIPCIÓN ── */

.desc-text {
  font-size: 0.875rem;
  color: var(--g600);
  line-height: 1.7;
}

.desc-more-text {
  display: block;
  margin-top: 8px;
}

.desc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--red);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.desc-toggle:hover { text-decoration: underline; }


/* ── EQUIPAMIENTO ── */

.equip-category {
  margin-bottom: 16px;
}

.equip-category:last-child { margin-bottom: 0; }

.equip-category__title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 8px;
}

.equip-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.equip-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--g600);
}

.equip-item svg {
  color: var(--green);
  flex-shrink: 0;
}


/* ── UBICACIÓN ── */

.location-map-placeholder {
  background: var(--g100);
  border-radius: var(--radius-md);
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border: 1px solid var(--g200);
}

.map-mock {
  text-align: center;
  padding: 16px;
}

.map-mock__inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
}

.map-mock__pin {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.map-mock__inner strong {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--black);
  display: block;
  margin-bottom: 3px;
}

.map-mock__inner p {
  font-size: 0.8rem;
  color: var(--g500);
  line-height: 1.4;
}

.location-actions {
  display: flex;
  gap: 8px;
}


/* ── FORMULARIO DE CONTACTO ── */

.contact-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-form__field--full {
  grid-column: span 2;
}

.contact-form__label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--g600);
}

.contact-form__input {
  height: 40px;
  border: 1.5px solid var(--g200);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  font-size: 0.875rem;
  color: var(--black);
  background: var(--g50);
  outline: none;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.contact-form__input:focus {
  border-color: var(--red);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(245,130,31,.08);
}

.contact-form__input.is-invalid {
  border-color: var(--red);
  background: rgba(245,130,31,.04);
}

.contact-form__textarea {
  height: auto;
  padding: 8px 10px;
  resize: vertical;
  line-height: 1.5;
}

.contact-form__privacy {
  margin-bottom: 14px;
}

.contact-form__check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.775rem;
  color: var(--g500);
  cursor: pointer;
  line-height: 1.4;
}

.contact-form__check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--red);
  flex-shrink: 0;
  margin-top: 1px;
}

.contact-form__check a {
  color: var(--red);
  text-decoration: underline;
}

.contact-form__submit {
  width: 100%;
  justify-content: center;
}

/* Feedback del formulario */
.contact-form__feedback {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
}

.contact-form__feedback.success {
  background: rgba(10,124,62,.08);
  border: 1px solid rgba(10,124,62,.2);
  color: var(--green);
}

.contact-form__feedback.error {
  background: rgba(245,130,31,.06);
  border: 1px solid rgba(245,130,31,.2);
  color: var(--red);
}


/* ── ALERTA DE REPORTE ── */

.detail-report {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.775rem;
  color: var(--g400);
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--g200);
  border-radius: var(--radius-md);
}

.report-link {
  color: var(--g500);
  font-weight: 600;
  text-decoration: underline;
  margin-left: auto;
}

.report-link:hover { color: var(--red); }


/* ── SIMILARES ── */

.similar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sim-card {
  border: 1px solid var(--g200);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s, transform 0.15s;
}

.sim-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.sim-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.sim-card__thumb {
  position: relative;
  height: 120px;
  overflow: hidden;
  background: var(--g100);
}

.sim-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.sim-card:hover .sim-card__thumb img {
  transform: scale(1.04);
}

.sim-card__no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--g100), var(--g200));
}

.sim-card__price {
  position: absolute;
  bottom: 6px;
  left: 8px;
  background: rgba(17,17,17,.75);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 5px;
}

.sim-card__body {
  padding: 10px 12px;
}

.sim-card__make {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.sim-card__model {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--black);
  margin: 2px 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sim-card__specs {
  font-size: 0.7rem;
  color: var(--g500);
  line-height: 1.3;
}


/* ══════════════════════════════════════
   SIDEBAR DERECHO
══════════════════════════════════════ */

.detail-sidebar {
  position: sticky;
  top: 70px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Panel de precio */
.price-card {
  background: var(--white);
  border: 1px solid var(--g200);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-md);
}

.price-sold-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  background: rgba(245,130,31,.1);
  border: 1px solid rgba(245,130,31,.25);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--red);
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.price-old {
  font-size: 0.875rem;
  color: var(--g400);
  text-decoration: line-through;
  margin-bottom: 2px;
  min-height: 20px;
}

.price-main {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--black);
  line-height: 1;
  margin-bottom: 3px;
}

.price-note {
  font-size: 0.7rem;
  color: var(--g400);
  margin-bottom: 10px;
}

.price-saving {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(10,124,62,.07);
  border: 1px solid rgba(10,124,62,.2);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 12px;
}

.price-fin {
  background: rgba(17,85,204,.06);
  border: 1px solid rgba(17,85,204,.15);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.price-fin__val {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--blue);
}

.price-fin__label {
  font-size: 0.7rem;
  color: var(--blue);
  opacity: 0.7;
}

.price-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
}

.price-cta {
  width: 100%;
  justify-content: center;
}

.btn--whatsapp {
  background: #25D366;
  color: var(--white);
  border-color: #25D366;
}

.btn--whatsapp:hover {
  background: #1da851;
  border-color: #1da851;
}

/* Divisor */
.price-card hr {
  border: none;
  border-top: 1px solid var(--g100);
  margin: 12px 0;
}

/* Trust rows */
.price-trust {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 12px;
  border-top: 1px solid var(--g100);
}

.trust-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.775rem;
  color: var(--g600);
}

.trust-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
}


/* Tarjeta concesionario en sidebar */
.dealer-card-sidebar {
  background: var(--white);
  border: 1px solid var(--g200);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.dealer-card-sidebar__header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.dealer-card-sidebar__logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  border: 1px solid var(--g200);
  flex-shrink: 0;
}

.dealer-card-sidebar__logo-placeholder {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--g100);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.dealer-card-sidebar__name {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 2px;
}

.dealer-card-sidebar__type {
  font-size: 0.7rem;
  color: var(--g400);
}

.dealer-card-sidebar__rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
}

.stars { color: #f5a500; font-size: 0.8rem; }
.rating-val { font-size: 0.8rem; font-weight: 700; color: var(--black); }
.rating-count { font-size: 0.7rem; color: var(--g400); }

.dealer-card-sidebar__stats {
  font-size: 0.775rem;
  color: var(--g500);
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--g100);
}

.dealer-card-sidebar__cta {
  width: 100%;
  justify-content: center;
}

/* Herramientas sidebar */
.sidebar-tools {
  background: var(--white);
  border: 1px solid var(--g200);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}

.sidebar-tools__title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
}

.sidebar-tool-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  height: 32px;
  padding: 0 10px;
  background: none;
  border: 1px solid var(--g200);
  border-radius: var(--radius-sm);
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--g600);
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 5px;
  transition: border-color 0.15s, color 0.15s;
}

.sidebar-tool-btn:last-child { margin-bottom: 0; }

.sidebar-tool-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

/* Ad slots en sidebar */
.ad-slot--mpu {
  min-height: 180px;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  text-align: center;
  border-radius: var(--radius-lg);
}

.ad-slot--half {
  min-height: 300px;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  text-align: center;
  border-radius: var(--radius-lg);
}


/* ══════════════════════════════════════
   BARRA STICKY INFERIOR
══════════════════════════════════════ */

.sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--g200);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
  z-index: 50;
  transform: translateY(100%);
  transition: transform 0.25s ease;
}

.sticky-bar.is-visible {
  transform: translateY(0);
}

.sticky-bar__price {
  flex: 1;
  min-width: 0;
}

.sticky-bar__price strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--black);
  line-height: 1.1;
}

.sticky-bar__price small {
  font-size: 0.7rem;
  color: var(--g400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.sticky-bar__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.sticky-bar__btn {
  white-space: nowrap;
}


/* ══════════════════════════════════════
   LIGHTBOX
══════════════════════════════════════ */

.lightbox__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.95);
  z-index: 200;
  backdrop-filter: blur(8px);
  cursor: zoom-out;
}

.lightbox__overlay[hidden] { display: none !important; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 201;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.lightbox[hidden] { display: none !important; }

.lightbox__close,
.lightbox__nav,
.lightbox__img-wrap,
.lightbox__counter,
.lightbox__thumbs-wrap {
  pointer-events: auto;
}

.lightbox__close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 2px solid rgba(255,255,255,.35);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 300;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 10;
  transition: background .15s, transform .15s;
  pointer-events: auto;
}

.lightbox__close:hover {
  background: rgba(255,255,255,.3);
  transform: scale(1.1);
}

.lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 100px;
  background: rgba(255,255,255,.1);
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 10;
  transition: background .15s;
}

.lightbox__nav:hover { background: rgba(255,255,255,.2); }
.lightbox__nav--prev { left: 0; border-radius: 0 8px 8px 0; }
.lightbox__nav--next { right: 0; border-radius: 8px 0 0 8px; }

.lightbox__img-wrap {
  position: relative;
  width: calc(100vw - 140px);
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 80px rgba(0,0,0,.8);
  display: block;
}

.lightbox__counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.6);
  color: rgba(255,255,255,.8);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 99px;
  backdrop-filter: blur(4px);
}


/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */

@media (max-width: 900px) {

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
    order: -1; /* El precio va arriba en móvil */
  }

  .gallery__main { height: 260px; }

  .similar-grid {
    grid-template-columns: 1fr 1fr;
  }

  .specs-table {
    grid-template-columns: 1fr;
  }

  .spec-row:nth-child(even) { border-right: none; }
  .spec-row { border-right: none; }

  .equip-list {
    grid-template-columns: 1fr;
  }

  .nav__detail-actions { display: none; }

}

@media (max-width: 640px) {

  .similar-grid { grid-template-columns: 1fr; }

  .gallery__main { height: 220px; }

  .gallery__thumb { width: 60px; height: 40px; }

  .contact-form__grid {
    grid-template-columns: 1fr;
  }

  .contact-form__field--full { grid-column: span 1; }

  .detail-title { font-size: 1.1rem; }
}
