.wcar * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.wcar {
  width: 100%;
}

.wcar-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 4px;
}

.wcar-track {
  display: flex;
  gap: 16px;
  transition: transform 0.5s ease-in-out;
  will-change: transform;
}

.wcar-item {
  flex: 0 0 auto;
  position: relative;
  height: 300px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

/* Capa de imagen: permite el zoom en hover sin romper el layout */
.wcar-item-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
  z-index: 0;
}

/* Velo oscuro que aparece al pasar el ratón */
.wcar-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.wcar-item:hover .wcar-item-bg {
  transform: scale(1.08);
}

.wcar-item:hover::after {
  opacity: 1;
}

/* Título centrado con velo semitransparente (sólo en el slider) */
.wcar-caption {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 14px 18px;
  color: #fff;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  background: rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.wcar-arrow svg,
.wcar-lb-nav svg,
.wcar-lb-close svg,
.wcar-lb-download svg {
  display: block;
  pointer-events: none;
}

/* Flechas laterales estilo WEG */
.wcar-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 30, 30, 0.6);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s ease, opacity 0.25s ease;
}

.wcar-arrow:hover {
  background: rgba(0, 0, 0, 0.85);
}

.wcar-arrow:disabled {
  opacity: 0.25;
  cursor: default;
}

.wcar-prev {
  left: 8px;
}

.wcar-next {
  right: 8px;
}

/* ===================== LIGHTBOX / POPUP ===================== */
.wcar-lb {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.wcar-lb.is-open {
  display: flex;
}

.wcar-lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.04), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.04), transparent 40%);
}

.wcar-lb-dialog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1000px;
  background: #0b0b0b;
  border: 8px solid #1c1c1c;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  animation: wcarZoom 0.25s ease;
}

@keyframes wcarZoom {
  from { transform: scale(0.94); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.wcar-lb-topbar {
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wcar-lb-counter {
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.wcar-lb-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 7;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.wcar-lb-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.wcar-lb-stage {
  position: relative;
  background: #000;
}

.wcar-lb-img {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: #000;
}

.wcar-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.wcar-lb-nav:hover {
  background: rgba(0, 0, 0, 0.9);
}

.wcar-lb-prev { left: 14px; }
.wcar-lb-next { right: 14px; }

.wcar-lb-info {
  padding: 18px 22px 22px;
  color: #fff;
}

.wcar-lb-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.wcar-lb-desc {
  font-size: 14px;
  font-style: italic;
  line-height: 1.5;
  color: #cfcfcf;
  margin-bottom: 12px;
}

.wcar-lb-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #2f7be0;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.wcar-lb-download:hover {
  text-decoration: underline;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .wcar-item {
    height: 240px;
  }

  .wcar-caption {
    font-size: 16px;
  }

  .wcar-lb-info {
    padding: 14px 16px 18px;
  }
}
