/* HERO SECTION */

.hero-container {
  width: 100%;
  height: 100%;
  background-image: url(...);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 0 0 5% 5%;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

@media (min-width: 1280px) and (max-width: 1515px) {
  .hero-container {
    max-height: 95vh;
  }

  .contentProductHero h4 {
    font-size: clamp(1.2rem, 4vw, 1.8rem) !important;
  }
}

.imageBackground {
  position: absolute;
  width: 100vw;
  height: auto;
  z-index: -1;
}

.contentHero {
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.contentProductHero {
  margin: 0 0 0 8%;
  width: 100%;
}

.contentProductHero h2 {
  font-size: clamp(2.5rem, 10vw, 6rem);
  line-height: 1;
  letter-spacing: 4px;
  font-weight: 200;
  margin: 0 0 15px 0;
}

.contentProductHero h4 {
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  width: 100%;

  font-weight: 300;
  line-height: 1.3;
}

@media (min-width: 992px) {
  .contentProductHero h4 {
    max-width: 720px;
  }
}

.contentProductHero h4 strong,
.contentProductHero h4 b {
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.contentbuttons {
  /* Rules for contentbuttons (empty if none) */
}

.center-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
  padding-bottom: 0;
}

.center-buttons .buttonwhite,
.center-buttons .button-transparent {
  padding: 8px 24px;
}

@media (max-width: 498px) {
  .center-buttons {
    gap: 10px;
  }

  .center-buttons .buttonwhite,
  .center-buttons .button-transparent {
    padding: 8px 14px;
    font-size: 14px;
  }
}

@media (max-width: 375px) {

  .center-buttons .buttonwhite,
  .center-buttons .button-transparent {
    padding: 7px 12px;
    font-size: 13px;
  }
}

/* Pantallas intermedias: hero de 2 columnas — 2 botones por fila */
@media (min-width: 993px) and (max-width: 1400px) {
  .contentProductHero h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
  }

  .contentbuttons {
    padding-bottom: 20px;
  }

  .center-buttons {
    gap: 10px;
  }

  .center-buttons .buttonwhite,
  .center-buttons .button-transparent {
    flex: 0 0 calc(50% - 5px);
    padding: 9px 20px;
    font-size: 15px;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
  }
}

.right-side {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-right: 3vw;
  height: 100%;
  justify-content: flex-start;
  width: 100%;
  margin-left: 3%;
}

@media (max-width: 992px) {
  .right-side {
    margin-left: 0;
    margin-top: 40px;
  }
}

.white-square {
  position: relative;
  width: 34vw;
  max-width: 550px;
  aspect-ratio: 1 / 1;
  height: auto;

  @media (min-width: 992px) {
    margin-top: 4vh;
    margin-bottom: 8vh;
  }

  >img:first-of-type {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    /* Un pequeño borde suavizado ayuda al diseño */
  }
}

.deco-top-right {
  position: absolute !important;
  top: -30px !important;
  right: -30px !important;
  width: 130px !important;
  height: 130px !important;
  object-fit: contain !important;
  z-index: 10;
  pointer-events: none;
}

.deco-bottom-left {
  position: absolute !important;
  bottom: -30px !important;
  left: -30px !important;
  width: 130px !important;
  height: 130px !important;
  object-fit: contain !important;
  z-index: 10;
  pointer-events: none;
}

.buttonwhite {
  background-color: white;
  color: var(--primary-color);
  padding: 15px 30px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 19px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.buttonwhite:hover,
.buttonwhite:focus {
  transform: translateY(-5px);
  filter: brightness(0.95);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  outline: none;
}

@media (min-width: 900px) and (max-width: 1300px) {
  .contentProductHero h2 {
    font-size: clamp(2.5rem, 9vw, 6.25rem);
  }

  .contentProductHero h4 {
    font-size: clamp(1.2rem, 3vw, 2.2rem);
  }
}

@media (max-width: 992px) {
  .contentProductHero {
    margin: 0 5%;
    width: 90%;
  }

  .contentProductHero h4 {
    font-size: clamp(1.3rem, 4vw, 1.4rem);
    width: 100%;
  }

  .hero-container {
    border-radius: 0;
    min-height: 80vh;
  }

  .contentProductHero h2 {
    line-height: 1;
    font-size: clamp(2.5rem, 12vw, 6.25rem);
  }

  .contentHero {
    flex-direction: column;
  }

  .right-side {
    justify-content: center;
    margin-right: 0;
    width: 100%;
  }

  .white-square {
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .white-square>img:first-of-type {
    object-position: center center;
  }
}

@media (min-width: 993px) and (max-width: 1280px) {
  .hero-container {
    max-height: 100vh;
  }

  .contentProductHero h2 {
    font-size: 4rem;
    line-height: 1;
  }

  .contentProductHero h4 {
    font-size: 1.2rem;
    width: 100%;
  }

  .right-side {
    margin-right: 2%;
  }

  .white-square {
    width: 350px;
    height: 350px;
  }
}

@media (max-width: 425px) {
  .contentProductHero h2 {
    font-size: clamp(2.2rem, 12vw, 4.5rem);
  }

  .contentProductHero h4 {
    font-size: clamp(1.1rem, 4vw, 2.2rem);
    width: 100%;
  }

  .white-square {
    aspect-ratio: 1 / 1;
  }

  .deco-top-right,
  .deco-bottom-left {
    width: 70px !important;
    height: 70px !important;
  }
}

/* VIDEO MODAL */
.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 20px;
  backdrop-filter: blur(5px);
}

@media (max-width: 768px) {
  .video-modal {
    padding: 0;
  }
}

.video-modal.active {
  display: flex !important;
}

.video-modal-content {
  position: relative;
  width: 100%;
  max-width: 450px;
  /* Narrowed for story format */
  background: black;
  border-radius: 20px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: modalIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.video-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  color: white;
  font-size: 24px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100000;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.video-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.video-modal-container {
  width: 100%;
  aspect-ratio: 9 / 16;
  /* Portrait ratio */
  display: flex;
  background: #000;
}

.video-modal-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Fill the portrait container */
}

@media (max-height: 850px) {
  .video-modal-content {
    max-width: 350px;
  }
}

@media (max-width: 768px) {
  .video-modal-content {
    max-width: 85vw;
  }
}

@media (max-width: 1250px) {

  .deco-top-right,
  .deco-bottom-left {
    width: 90px !important;
    height: 90px !important;
  }

  .deco-top-right {
    top: -15px !important;
    right: -15px !important;
  }

  .deco-bottom-left {
    bottom: -15px !important;
    left: -15px !important;
  }
}

/* === HERO: jerarquía de botones (Comprar principal, el resto secundarios) === */
.contentbuttons .center-buttons .buttonwhite {
  flex: 1 0 100%;
  max-width: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin-bottom: 5px;
  padding: clamp(10px, 1.4vw, 16px) clamp(20px, 2.8vw, 40px);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background-color: #fff;
  color: var(--primary-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  position: relative;
  will-change: transform;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s ease;
}

/* Halo animado en pseudo-elemento: el hover puede transicionar sin saltos */
.contentbuttons .center-buttons .buttonwhite::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  animation: heroBuyPulse 3s ease-in-out infinite;
  transition: opacity 0.45s ease;
}

.contentbuttons .center-buttons .buttonwhite:hover,
.contentbuttons .center-buttons .buttonwhite:focus {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
}

.contentbuttons .center-buttons .buttonwhite:hover::after,
.contentbuttons .center-buttons .buttonwhite:focus::after {
  opacity: 0;
}

.contentbuttons .center-buttons .button-transparent {
  flex: 0 1 auto;
  box-sizing: border-box;
  padding: clamp(8px, 1.1vw, 10px) clamp(14px, 1.8vw, 20px);
  font-size: clamp(14px, 1.4vw, 18px);
  font-weight: 600;
  opacity: 1;
  justify-content: center;
  text-align: center;
  gap: 8px;
}

.contentbuttons .center-buttons .button-transparent svg {
  width: clamp(18px, 1.8vw, 22px);
  height: clamp(18px, 1.8vw, 22px);
}

@keyframes heroBuyPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }

  70% {
    box-shadow: 0 0 0 9px rgba(255, 255, 255, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

@media (max-width: 498px) {
  .contentbuttons .center-buttons .buttonwhite {
    max-width: 100%;
    padding: 16px 20px;
    font-size: 19px;
  }

  .contentbuttons .center-buttons .button-transparent {
    padding: 8px 12px;
    font-size: 14px;
  }
}

/* Estructura en dos filas */
.contentbuttons .center-buttons {
  flex-direction: column;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 16px;
}

.contentbuttons .buttons-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.contentbuttons .buttons-row--primary .buttonwhite {
  flex: 0 1 auto;
  min-width: 280px;
}

@media (max-width: 498px) {
  .contentbuttons .buttons-row--primary .buttonwhite {
    flex: 1 1 100%;
    min-width: 0;
  }
}

@media (max-width: 375px) {
  .contentbuttons .center-buttons .button-transparent {
    padding: 7px 10px;
    font-size: 13px;
  }
}

/* <=430px: los 3 botones secundarios en una sola fila, reduciéndose con el ancho */
@media (max-width: 430px) {
  .contentbuttons .buttons-row--secondary {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .contentbuttons .buttons-row--secondary .button-transparent {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    padding: 8px clamp(6px, 2.2vw, 10px);
    font-size: clamp(10.5px, 3.1vw, 13px);
    gap: 4px;
  }

  .contentbuttons .buttons-row--secondary .button-transparent svg {
    width: clamp(12px, 3.6vw, 16px);
    height: clamp(12px, 3.6vw, 16px);
    flex-shrink: 0;
  }
}