:root {
  --verde-principal: #329540;
  --verde-oscuro: #164a49;
  --blanco: #fff;
  --negro: #000;
  --gris-claro: #f0f0f0;
  --gris-medio: #d3d3d3;
  --verde-claro: #90ee90;
  --beige-claro: #f5f5dc;
  --sombra-caja: rgba(0, 0, 0, 0.15);
  --dorado: #ffd700;
  --dorado-oscuro: #daa520;
  --degrade-verde: linear-gradient(
    135deg,
    var(--verde-oscuro) 0%,
    var(--verde-principal) 100%
  );
  --degrade-dorado: linear-gradient(
    to right,
    var(--dorado),
    var(--dorado-oscuro)
  );
}

body {
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
  background-color: var(--beige-claro);
  color: var(--negro);
  overflow-x: hidden;
}

.content {
  padding: 20px;
  margin: auto;
  max-width: 1400px;
}

.swiper {
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  background: var(--blanco);
  border-radius: 20px;
  margin-top: 30px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #ffffff 0%, #f8f8f8 100%);
}

.swiper::before,
.swiper::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  background: var(--degrade-verde);
  z-index: 10;
}

.swiper::before {
  top: 0;
}

.swiper::after {
  bottom: 0;
}

.swiper-wrapper {
  display: flex;
  justify-content: center;
  gap: 30px;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 15px 0;
}

.swiper-slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  border-radius: 18px;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  width: 100%;
  max-width: 400px;
  height: auto;
  min-height: 500px;
  perspective: 1200px;
  cursor: pointer;
  transform-style: preserve-3d;
  background: var(--degrade-verde);
  border: none;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transform: translateY(0);
  will-change: transform;
}

.swiper-slide::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 1;
  transition: all 0.5s ease;
  opacity: 0.6;
}

.swiper-slide:hover::before {
  opacity: 0.8;
  background: rgba(0, 0, 0, 0.4);
}

.swiper-slide::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    transparent 40%,
    rgba(0, 0, 0, 0.8) 100%
  );
  z-index: 2;
  opacity: 0.8;
}

.swiper-slide:hover {
  transform: translateY(-15px) scale(1.03);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.swiper-slide img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  z-index: 0;
  filter: brightness(0.85) contrast(1.1);
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 70%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 70%,
    rgba(0, 0, 0, 0) 100%
  );
  transform-origin: center bottom;
}

.swiper-slide:hover img {
  transform: scale(1.08);
  filter: brightness(0.7) contrast(1.2);
}

/* Badge de estado - Posición ajustada */
.sorteo-status-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.7em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 5;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.sorteo-status-badge.upcoming {
  background: rgba(255, 193, 7, 0.9);
  color: #333;
}

.sorteo-status-badge.active {
  background: rgba(40, 167, 69, 0.9);
  color: white;
  animation: pulse 2s infinite;
}

.sorteo-status-badge.finished {
  background: rgba(220, 53, 69, 0.9);
  color: white;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Información del sorteo - Sin blur */
.sorteo-info {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 25px;
  box-sizing: border-box;
  justify-content: flex-end;
  z-index: 3;
  text-align: center;
}

.sorteo-header {
  width: 100%;
  text-align: center;
  margin-bottom: 10px;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  transform: translateY(0);
}

.sorteo-info h3 {
  margin: 0 0 5px 0;
  font-weight: 700;
  color: var(--blanco);
  font-size: 1.6em;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
  transition: all 0.3s ease;
}

.swiper-slide:hover .sorteo-info h3 {
  letter-spacing: 2px;
}

.sorteo-info h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 30%;
  right: 30%;
  height: 3px;
  background: linear-gradient(
    to right,
    transparent,
    var(--dorado),
    transparent
  );
  transition: all 0.4s ease;
}

.swiper-slide:hover .sorteo-info h3::after {
  left: 20%;
  right: 20%;
}

/* Precio debajo del nombre */
.precio-tag {
  color: var(--dorado);
  font-weight: 800;
  font-size: 1.8em;
  margin: 5px 0 15px 0;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.swiper-slide:hover .precio-tag {
  transform: scale(1.05);
}

/* Descripción con fondo verde oscuro */
.sorteo-info p.descripcion {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  opacity: 0;
  z-index: 4;
  background: linear-gradient(to bottom, #0d2614, #1f4d2a, #0d2614);
  padding: 20px;
  box-sizing: border-box;
  border-radius: 12px;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 215, 0, 0.3);
  max-height: 220px;
  overflow-y: auto;
  color: var(--blanco);
  text-shadow: 1px 1px 2px var(--negro);
  font-size: 0.95em;
  line-height: 1.6;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.swiper-slide:hover .sorteo-info p.descripcion {
  opacity: 1;
}

/* Contenedor de tiempo - Oculto al mostrar descripción */
.time-container {
  width: 100%;
  margin: 15px 0;
  text-align: center;
  transition: all 0.3s ease;
}

.swiper-slide:hover .time-container {
  opacity: 0;
  visibility: hidden;
}

.time-label {
  font-size: 1.1em;
  color: var(--blanco);
  font-weight: 600;
  margin-bottom: 10px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.swiper-slide:hover .time-label {
  letter-spacing: 1px;
}

/* Countdown mejorado */
.countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 5;
}

.time-part {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 8px;
  border-radius: 10px;
  min-width: 55px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  position: relative;
}

.time-part::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--degrade-verde);
}

.time-part:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.time-part .value {
  font-size: 1.4em;
  font-weight: bold;
  color: var(--verde-oscuro);
  margin-bottom: 3px;
}

.time-part .label {
  font-size: 0.7em;
  color: var(--verde-oscuro);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Botón de compra - Estilo original */
.comprar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 30px;
  background: linear-gradient(
    to right,
    var(--verde-principal),
    var(--verde-oscuro)
  );
  color: var(--blanco);
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.4s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  font-weight: 600;
  font-size: 0.95em;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
  margin-top: 10px;
  margin-bottom: 10px;
  cursor: pointer;
}

.comprar-btn.disabled {
  background: var(--gris-medio);
  color: #666;
  cursor: not-allowed;
  box-shadow: none;
}

.comprar-btn:not(.disabled):hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  letter-spacing: 1.2px;
}

.comprar-btn:not(.disabled)::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    var(--verde-oscuro),
    var(--verde-principal)
  );
  transition: all 0.6s ease;
  z-index: -1;
}

.comprar-btn:not(.disabled):hover::before {
  left: 0;
}

.comprar-btn:not(.disabled):active {
  transform: translateY(1px);
}

/* Estilo para cuando no hay sorteos */
.swiper-slide.no-sorteos-active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  background: var(--degrade-verde);
  border-radius: 16px;
  min-height: 500px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.swiper-slide.no-sorteos-active:hover {
  transform: translateY(-5px);
}

.no-sorteos-icon {
  margin-bottom: 30px;
  width: 120px;
  height: 120px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  position: relative;
}

.swiper-slide.no-sorteos-active h3 {
  font-size: 1.8em;
  font-weight: 700;
  color: var(--blanco);
  margin-bottom: 20px;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.swiper-slide.no-sorteos-active p {
  font-size: 1.1em;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 28px 0;
  line-height: 1.6;
  max-width: 520px;
  font-weight: 300;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: center;
  margin-top: 10px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 12px;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-links a:hover {
  transform: scale(1.1);
  background-color: rgba(255, 255, 255, 0.2);
}

.coming-soon {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 80%;
  max-width: 400px;
}

.coming-soon p {
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  font-weight: 300;
}

/* Flechas de navegación */
.swiper-button-next,
.swiper-button-prev {
  color: var(--blanco);
  background: rgba(50, 149, 64, 0.8);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.4em;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  top: 50%;
  transform: translateY(-50%) scale(0.9);
  z-index: 20;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 1.4em;
  font-weight: bold;
}

.swiper-button-next {
  right: 15px;
}

.swiper-button-prev {
  left: 15px;
}

.swiper:hover .swiper-button-next,
.swiper:hover .swiper-button-prev {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) scale(1);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: rgba(22, 74, 73, 0.9);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.swiper-button-disabled {
  opacity: 0.2 !important;
  transform: translateY(-50%) scale(0.8) !important;
  cursor: not-allowed;
}

/* Media Queries para móviles */
@media (max-width: 768px) {
  .swiper {
    padding: 20px 10px;
    border-radius: 15px;
  }

  .swiper-slide {
    max-width: 90%;
    min-height: 450px;
  }

  .swiper-slide img {
    height: 230px;
  }

  .sorteo-info h3 {
    font-size: 1.3em;
  }

  .precio-tag {
    font-size: 1.5em;
  }

  .countdown {
    gap: 8px;
  }

  .time-part {
    min-width: 50px;
    padding: 8px 5px;
  }

  .time-part .value {
    font-size: 1.2em;
  }

  .comprar-btn {
    padding: 10px 25px;
    font-size: 0.9em;
  }

  .swiper-button-next,
  .swiper-button-prev {
    width: 40px;
    height: 40px;
    font-size: 1.2em;
  }
}

@media (max-width: 480px) {
  .swiper-slide {
    max-width: 95%;
    min-height: 420px;
  }

  .swiper-slide img {
    height: 200px;
  }

  .sorteo-info {
    padding: 20px;
  }

  .sorteo-info h3 {
    font-size: 1.2em;
  }

  .precio-tag {
    font-size: 1.3em;
  }

  .countdown {
    gap: 6px;
  }

  .time-part {
    min-width: 45px;
    padding: 6px 3px;
  }

  .time-part .value {
    font-size: 1em;
  }

  .time-part .label {
    font-size: 0.65em;
  }

  .comprar-btn {
    padding: 8px 20px;
    font-size: 0.8em;
  }

  .sorteo-info p.descripcion {
    padding: 15px;
    font-size: 0.85em;
  }

  .swiper-slide.no-sorteos-active {
    padding: 30px 20px;
  }

  .swiper-slide.no-sorteos-active h3 {
    font-size: 1.5em;
  }

  .swiper-slide.no-sorteos-active p {
    font-size: 1em;
  }
}
