/* ================================
   HERO EMGRAND – CARRUSEL + STICKY NAV
================================ */

/* Si tienes un header fijo, ajusta estas variables */
:root {
  --mg-header-h-desktop: 80px;
  --mg-header-h-mobile: 56px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.emg-hero {
  position: relative;
  width: 100%;
  max-width: 100%;
  color: #fff;
  background: #000;

  /* IMPORTANTÍSIMO: sticky se rompe con overflow hidden/clip en padres */
  overflow: visible !important;
}

/* Swiper sólo como fondo */
.emg-hero__swiper {
  width: 100%;
  position: relative;
  z-index: 0;
  height: 800px;
}

.emg-hero__slide {
  position: relative;
  min-height: 580px;
  background-size: cover;
  background-position: center;
}

/* Degradado negro a la izquierda (desktop) */
.emg-hero__slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.8) 28%,
    rgba(0, 0, 0, 0) 65%
  );
  z-index: 1;
}

/* Video de fondo */
.emg-hero__bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* OVERLAY encima de todo */
.emg-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: visible;
}

/* -----------------------------
   ZONA SUPERIOR
------------------------------ */
.emg-hero__top {
  position: relative;
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  height: 100%;
  padding-bottom: 100px;
}

.emg-hero__top-inner {
  max-width: 480px;
}

.emg-hero__eyebrow {
  font-family: var(--font-inter);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 8px;
  opacity: 0.9;
}
.emg-hero__title {
  text-transform: uppercase;
  margin: 0 0 16px;
  font-family: var(--font-geely);
  font-weight: 700;
  font-size: 64px;
  line-height: 120%;
}

.emg-hero__subtitle {
 font-family: var(--font-inter);
  line-height: 120%;
  margin: 0 0 20px;
  //max-width: 360px;
  font-size: 20px;
  color: rgba(255, 255, 255, 1);
  text-transform: uppercase;
}

.emg-hero__price {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.emg-hero__price-values {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.emg-hero__price-label {
  font-family: var(--font-inter);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  opacity: 0.8;
  color: #fff;
 
}

.emg-hero__price-usd,
.emg-hero__price-local {
  font-family: var(--font-geely);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  color: #fff;
}

.emg-hero__price-sep {
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 20px;
  opacity: 0.6;
  margin: 0 4px;
}

.emg-hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
  font-family: var(--font-geely);
  font-weight: 700;
  font-size: 16px;
  width: 126px;
  height: 48px;
}

.emg-hero__btn--header {
  width: 177px;
  height: 48px;
  font-weight: 700;
  font-size: 16px;
  line-height: 40px;
  letter-spacing: 0px;
  text-align: center;
  vertical-align: middle;
  max-width: 100%;
  white-space: nowrap;
}

.emg-hero__btn--light {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}
.emg-hero__btn--light:hover {
  background: #f5f5f5;
}

/* ================================
   STICKY NAV (FUERA DEL HERO)
================================ */
.emg-sticky-nav {
  position: sticky;
  
  top: 0;
  z-index: 99999;
  width: 100%;
  max-width: 100%;
  will-change: transform;
  margin-top: 0;
  border-top: 0.5px solid #ffffff;
  /* Disposición */
  display: flex;
  flex-direction: row;            /* Flujo: Horizontal */
  height: 80px;                   /* Altura: Ajustado (80px) */
  justify-content: space-between; /* Justificar: space-between */
  align-items: center;
  padding: 16px 80px;              /* Espaciado: Arriba/Abajo 16px, Derecha/Izquierda 80px */

  /* Color con opacidad */
  background: transparent; /* #0B0C0C al 25% */
}

.emg-sticky-nav__inner {
  width: 100%;
  margin: 0 auto;
  padding: 0px;
}

.emg-hero__bottom {
  padding: 14px 0;
  //background: #0b0c0c;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  position: relative;
}

.emg-hero__bottom > a {
  justify-self: end;
}

/* Botón marca + flecha (se usa en desktop y mobile) */
.emg-hero__nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: 0;
  padding: 0;
  color: #ffffff;
  cursor: default; /* desktop no abre */
}

.emg-hero__brand {
  font-family: var(--font-geely);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 24px;
  line-height: 40px;
  letter-spacing: 5px;
  vertical-align: middle;
  color: rgba(255, 255, 255, 1);

  max-width: 350px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Icono flecha (mobile) */
.emg-hero__nav-icon {
  display: none;
}

/* Navegación desktop */
.emg-hero__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}

.emg-hero__nav-link {
  text-decoration: none;
  color: #ffffff;
  opacity: 0.75;
  transition:
    opacity 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
  font-family: var(--font-inter);
  font-weight: 500;
  font-size: 16px;
  line-height: 22px;
}

.emg-hero__nav-link:hover {
  opacity: 1;
  color: #00a3ff;
}

.emg-hero__btn--outline {
  border-color: #ffffff;
  color: #ffffff;
  font-family: var(--font-inter);
  border-radius: 5px;
}
.emg-hero__btn--outline:hover {
  /* background: #ffffff;
  color: #000000; */
   background: rgba(25, 75, 255, 1);
  color: #fff;
}
/* Indicador de Scroll */
.emg-hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 104px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #fff;
  cursor: pointer;
  z-index: 10;
}

.emg-hero__scroll-label {
  font-family: var(--font-inter);
  font-size: 13px;
  opacity: 0.85;
}

.emg-hero__scroll-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: emg-scroll-bounce 1.6s ease-in-out infinite;
  position:relative;
}


@keyframes emg-scroll-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 1151px) {
  .emg-sticky-nav__inner {
    padding: 0px 16px;
  }
  .emg-hero__nav {
    gap: 15px;
  }
  .emg-hero__btn--header {
    font-size: 14px;
    width: 146px;
  }
  .emg-hero__brand {
    font-size: 20px;
  }
}
/* Tablet */
@media (max-width: 1024px) {
  .emg-hero__title {
    font-size: 48px;
  }
  .emg-hero__brand {
    max-width: 340px;
  }
  .emg-sticky-nav{
    padding: 3px 4px;
  }
}

@media (max-width: 1200px) {
  .emg-sticky-nav{
    padding: 16px 10px;
  }
}

@media (max-width: 1300px) {
  .emg-version__price-badge {
    top: 68.18% !important;
  }
  .emg-version__info {
    top: 70.94% !important;
  }
  .emg-sticky-nav{
    padding: 16px 10px;
  }

  .emg-hero__btn--header {
      font-size: 14px;
      width: 110px;
      height: 40px;
  }
}

/* Mobile */
@media (max-width: 1013px) {
  .emg-sticky-nav {
    top: 0;
  }

  .emg-hero__slide {
    //min-height: 580px;
     background-size: cover;
    background-position: center top;
  }

  .emg-hero__top-inner {
  max-width: 480px;
  padding-top: 50px;
  text-align: center;
}

  /* Degradado vertical mobile */
  .emg-hero__slide::before {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.9) 0%,
      rgba(0, 0, 0, 0.75) 40%,
      rgba(0, 0, 0, 0.95) 100%
    );
  }

  .emg-hero__top {
    max-width: 100%;
    margin: 0;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding-bottom: 44px;
    padding: 0 16px;
  }

  .emg-hero__title {
    font-size: 46px;
    line-height: 120%;
    font-family: var(--font-geely);
    font-weight: 700;
  }
  .emg-hero__subtitle {
    font-size: 14px;
    max-width: 100%;
    font-family: var(--font-inter);
    line-height: 120%;
    margin-bottom: 2px;
  }
  .emg-hero__price-label {
    font-family: var(--font-inter);
    font-weight: 400;
    font-size: 16px;
    line-height: 140%;
    opacity: 0.8;
    color: #fff;
}
.emg-hero__price {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}


  .emg-hero__btn--light {
    align-self: flex-start;
  }

  /* Barra sticky en mobile: layout compacto */
  .emg-hero__bottom {
    padding: 16px;
    /* grid-template-columns: 1fr auto;
    gap: 12px; */
  }

  .emg-hero__brand {
    font-size: 16px;
    line-height: 40px;
    letter-spacing: 1px;
  }

  /* Toggle habilitado en mobile */
  .emg-hero__nav-toggle {
    cursor: pointer;
    justify-content: flex-start;
  }

  .emg-hero__nav-icon {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(45deg); /* abajo */
    transition: transform 0.2s ease;
    margin-top: -2px;
  }

  .emg-hero__bottom.is-nav-open .emg-hero__nav-icon {
    transform: rotate(-135deg); /* arriba */
  }

  /* Menú desplegable */
  .emg-hero__nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 0;
    background: #ffffff;
    display: none;
    flex-direction: column;
    padding: 0;
    z-index: 5;
    gap: 0;
  }
  .emg-hero__bottom.is-nav-open .emg-hero__nav {
    display: flex;
  }

  .emg-hero__nav-link {
    color: #000000;
    opacity: 1;
    padding: 20px 25px;
    border-bottom: 1px solid #e3e3e3;
    font-size: 16px;
    line-height: 22px;
  }
  .emg-hero__nav-link:hover {
    background: red;
    color: blue;
  }

  .emg-hero__btn--outline {
    white-space: nowrap;
    padding-inline: 18px;
    font-size: 14px;
    line-height: 40px;
    width: 142px;
  }
}

/* Mobile pequeño */
@media (max-width: 480px) {
  .emg-hero__title {
    font-size: 40px;
  }
  .emg-sticky-nav__inner {
    padding: 0px;
    width: 100%;
  }

  .emg-sticky-nav{
    padding:0;
    display: flex;
    justify-content: space-between;

  }

  .emg-hero__brand {
    font-size: 16px;
    line-height: 40px;
    display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
  }

  .emg-hero__btn--light {
    font-size: 14px;
    line-height: 40px;
    width: 110px;
  }

  .emg-hero__btn--outline {
    font-size: 14px;
    line-height: 120%;
    font-weight: 700;
    font-family: var(--font-inter);
    width: fit-content;
    border-radius: 5px;
    background: #ffffff;
    color: rgba(11, 12, 12, 1);
  }
}

/* ================================
   HERO OCUPA HEADER + STICKY NAV
================================ */

.single-producto .mg-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.single-producto .emg-hero {
  margin-top: calc(-1 * var(--mg-header-h-desktop));
}

.single-producto .emg-hero__slide {
  min-height: 100vh;
    background-position: center 5%;

}

.single-producto .emg-hero__top {
  padding-top: calc(var(--mg-header-h-desktop) + 40px);
}

.single-producto .emg-sticky-nav {
  position: sticky;
  margin-top: -80px;
  background: rgba(11, 12, 12, 0.25);
   backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@media (max-width: 1013px) {
  .single-producto .mg-header {
    position: absolute;
  }
  .single-producto .emg-hero {
    margin-top: calc(-1 * var(--mg-header-h-mobile));
  }
  .single-producto .emg-hero__slide {
    //min-height: 100svh;
    height: 752px;
  }
  .single-producto .emg-hero__top {
    padding-top: calc(var(--mg-header-h-mobile) + 24px);
  }
  .single-producto .emg-sticky-nav {
    //top: var(--mg-header-h-mobile);
  }


   .emg-sticky-nav__ctas {
    gap: 8px;
  }

  .emg-sticky-nav__ctas .emg-hero__btn--outline {
    display: none; /* Ocultar Ficha Técnica en mobile */
  }

  .emg-sticky-nav__ctas .emg-hero__btn--light {
    background: #ffffff;
    color: #000000;
    border: 1px solid #ffffff;
    border-radius: 8px;
    font-size: 14px;
    width: auto;
    padding: 0 40px;
    height: 44px;
  }

  .emg-hero__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    //padding: 0 26px;
  }
}

.single-producto .mg-header .mg-nav__link,
.single-producto .mg-header .mg-nav__trigger,
.single-producto .mg-header .mg-btn--primary {
  color: #ffffff;
}


.single-producto .mg-header__bar:has(.mg-nav__item--has-mega.is-open) .mg-nav__link,
.single-producto .mg-header__bar:has(.mg-nav__item--has-mega.is-open) .mg-nav__trigger {
  color: #0b0c0c !important;
}

.single-producto .mg-header__bar:has(.mg-nav__item--has-mega.is-open) .custom-logo {
  filter: none !important;
}

.single-producto .mg-header__bar:has(.mg-nav__item--has-mega.is-open) .wp-block-button__link {
  color: #0b0c0c !important;
  border-color: #0b0c0c !important;
  background: transparent !important;
}
.single-producto .mg-header__bar:has(.mg-nav__item--has-mega.is-open) .wp-block-button__link:hover {
  background: rgba(25, 75, 255, 1) !important;
  border-color: rgba(25, 75, 255, 1) !important;
  color: #fff !important;
}

.single-producto .mg-header__bar:has(.mg-nav__item--has-mega.is-open) .mg-burger,
.single-producto .mg-header__bar:has(.mg-nav__item--has-mega.is-open) .mg-burger::before,
.single-producto .mg-header__bar:has(.mg-nav__item--has-mega.is-open) .mg-burger::after {
  background: #0b0c0c !important;
}





/* Logo también en blanco si es SVG */
.single-producto .mg-header .mg-header__brand svg path {
  fill: #ffffff;
}

/* Logo en blanco */
.single-producto .mg-header .custom-logo {
  filter: brightness(0) invert(1);
}

/* Links en blanco */
.single-producto .mg-header .mg-nav__link,
.single-producto .mg-header .mg-nav__trigger {
  color: #ffffff;
}

/* Botón Cotizar con borde blanco */
.single-producto .mg-header .wp-block-button__link {
  color: #ffffff !important;
  background: transparent !important;
  border: 1px solid #ffffff !important;
}

.single-producto .mg-header .wp-block-button__link:hover {
  color: #ffffff !important;
  background: rgba(25, 75, 255, 1) !important;
  border-color: rgba(25, 75, 255, 1) !important;
}

.single-producto .emg-hero__slide::before {
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.3) 35%,
    rgba(0, 0, 0, 0) 60%
  );
}

.emg-sticky-nav__ctas {
  display: flex;
  gap: 12px;
  align-items: center;
}

.single-producto .emg-hero__btn--light {
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
  border-radius: 5px;
  font-family: var(--font-inter)
}

.single-producto .emg-hero__btn--light:hover{
   background: rgba(25, 75, 255, 1);
  color: #fff;
}


.emg-hero__title-img-wrap {
  margin: 0 0 16px;
}

.emg-hero__title-img {
  display: block;
  height: auto;
  max-width: 100%;
}

@media (max-width: 1013px) {
  .emg-hero__title-img {
    margin: 0 auto;
    max-width: 280px;
  }
}
