/* =========================
   MÓDULO 3: PRODUCTOS
========================= */

.products-section {
  position: relative;
  width: 100%;
  padding: 100px 0 110px;
  background:
    radial-gradient(circle at top right, rgba(28, 118, 210, 0.08), transparent 34%),
    linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
  overflow: hidden;
}

.products-section::before {
  content: "";
  position: absolute;
  left: -120px;
  top: 160px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(28, 118, 210, 0.10), transparent 66%);
  pointer-events: none;
}

.products-container {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.products-header {
  max-width: 780px;
  margin: 0 auto 34px;
  text-align: center;
}

.products-header h2 {
  margin: 0;
  color: #12233f;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.products-header p {
  margin: 18px auto 0;
  color: #617089;
  font-size: 1.02rem;
  line-height: 1.7;
}

/* =========================
   TABS
========================= */

.products-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 auto 34px;
}

.product-tab {
  border: 1px solid rgba(28, 92, 168, 0.14);
  background: rgba(255, 255, 255, 0.78);
  color: #42617f;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.product-tab:hover,
.product-tab.active {
  color: #ffffff;
  background: linear-gradient(135deg, #1c76d2 0%, #1b5fb7 100%);
  border-color: rgba(28, 118, 210, 0.45);
  box-shadow: 0 12px 26px rgba(28, 118, 210, 0.20);
  transform: translateY(-2px);
}

/* =========================
   SLIDER / CARRUSEL
========================= */

.products-slider {
  position: relative;
}

.products-carousel {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 12px 6px 28px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.products-carousel::-webkit-scrollbar {
  display: none;
}

/* Flechas */
.products-arrow {
  position: absolute;
  top: 50%;
  z-index: 20;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(28, 92, 168, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: #1c76d2;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(28, 58, 102, 0.14);
  transform: translateY(-50%);
  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease,
    opacity 0.25s ease;
}

.products-arrow:hover {
  background: #1c76d2;
  color: #ffffff;
  transform: translateY(-50%) scale(1.06);
  box-shadow: 0 18px 42px rgba(28, 118, 210, 0.24);
}

.products-arrow-left {
  left: -18px;
}

.products-arrow-right {
  right: -18px;
}

.products-arrow.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* =========================
   PRODUCT CARD
========================= */

.product-card {
  position: relative;
  flex: 0 0 270px;
  height: 400px;
  min-height: 400px;
  border-radius: 28px;
  border: 1px solid rgba(22, 57, 101, 0.10);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 54px rgba(28, 58, 102, 0.10);
  overflow: hidden;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    opacity 0.3s ease;
}

.product-card:hover {
  transform: translateY(-9px);
  border-color: rgba(28, 118, 210, 0.28);
  box-shadow: 0 28px 72px rgba(28, 58, 102, 0.16);
}

.product-card.is-hidden {
  display: none;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(28, 118, 210, 0.10), transparent 42%),
    linear-gradient(315deg, rgba(0, 174, 239, 0.07), transparent 40%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.product-card:hover::before {
  opacity: 1;
}

/* =========================
   PRODUCT IMAGE
========================= */

.product-media {
  position: relative;
  height: 178px;
  min-height: 178px;
  margin: 18px 18px 0;
  padding: 16px;
  border-radius: 24px;
  background:
    radial-gradient(circle at center, rgba(28, 118, 210, 0.10), transparent 62%),
    linear-gradient(180deg, #f8fbff 0%, #edf5ff 100%);
  border: 1px solid rgba(28, 92, 168, 0.12);
  overflow: hidden;
  flex-shrink: 0;
}

.product-media::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.34) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  pointer-events: none;
  z-index: 2;
}

.product-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  transform: scale(1);
  transition: transform 0.45s ease;
}

.product-card:hover .product-media img {
  transform: scale(1.06);
}

/* =========================
   PRODUCT CONTENT
========================= */

.product-info {
  position: relative;
  z-index: 2;
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-info span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 28px;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #1b65b2;
  background: rgba(28, 118, 210, 0.08);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.product-info h3 {
  margin: 0 0 10px;
  color: #10213b;
  font-size: 1.24rem;
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -0.03em;
  min-height: 30px;
}

.product-info p {
  margin: 0;
  color: #60708a;
  font-size: 0.88rem;
  line-height: 1.52;
}

/* =========================
   RESPONSIVE MÓDULO 3
========================= */

@media (max-width: 768px) {
  .products-section {
    padding: 78px 0 88px;
  }

  .products-container {
    width: min(100% - 28px, 1180px);
  }

  .products-header {
    margin-bottom: 28px;
  }

  .products-header h2 {
    font-size: 2.05rem;
  }

  .products-header p {
    font-size: 0.96rem;
  }

  .products-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    margin-bottom: 28px;
    scrollbar-width: none;
  }

  .products-tabs::-webkit-scrollbar {
    display: none;
  }

  .product-tab {
    flex: 0 0 auto;
  }

  .products-arrow {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .products-arrow-left {
    left: -6px;
  }

  .products-arrow-right {
    right: -6px;
  }

  .product-card {
    flex: 0 0 78%;
    height: 395px;
    min-height: 395px;
  }

  .product-media {
    height: 175px;
    min-height: 175px;
  }
}

@media (max-width: 480px) {
  .products-section {
    padding: 68px 0 78px;
  }

  .products-header h2 {
    font-size: 1.8rem;
  }

  .product-card {
    flex: 0 0 84%;
    height: 390px;
    min-height: 390px;
    border-radius: 24px;
  }

  .product-media {
    height: 170px;
    min-height: 170px;
    margin: 16px 16px 0;
    border-radius: 22px;
  }

  .product-info {
    padding: 19px 20px 22px;
  }

  .product-info h3 {
    font-size: 1.18rem;
  }

  .product-info p {
    font-size: 0.86rem;
  }
}