:root {
  --page-margin: clamp(60px, 11.25vw, 180px);
}

/* ── HERO SECTION ── */
.nm-hero {
  display: flex;
  flex-direction: column;
  background: #fff;
  position: relative;
  height: calc(100vh - var(--hh, var(--header-h, 52px)));
  height: calc(100dvh - var(--hh, var(--header-h, 52px)));
}

.nm-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: clamp(20px, 4vh, 80px) var(--page-margin) clamp(6px, 1vh, 20px);
  gap: clamp(20px, 3vw, 40px);
  max-width: 2200px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  min-height: 0;
}

/* Left: copy */
.nm-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.nm-title {
  font-family: 'Cocogoose', 'Poppins', sans-serif;
  font-size: clamp(20.4px, 2.55vw, 44.5px);
  font-weight: 700;
  color: #272022;
  text-transform: uppercase;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0;
}

.nm-title span {
  color: #EC690D;
}

.nm-desc {
  font-family: 'Helvetica Neue Light', 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(15.3px, 1.53vw, 25.2px) !important;
  color: #272022;
  line-height: 1.20 !important;
  letter-spacing: 0.03em;
  margin: 4px 0 20px;
}

.nm-btn {
  display: inline-flex;
  width: fit-content;
  background: #EC690D;
  color: #fff;
  font-family: 'Helvetica Neue Roman', 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(12px, 1vw, 15px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 14px 24px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s;
  white-space: nowrap;
}

.nm-btn:hover {
  background: #d45c0a;
}

/* Right: rotating image */
.nm-img-wrap {
  position: relative;
  width: 100%;
  max-width: min(1035px, 55vh);
  aspect-ratio: 1 / 1;
  justify-self: center;
}

.nm-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}

.nm-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.nm-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.nm-slide[data-brand="mt"] img {
  transform: scale(1.25);
}

.nm-slide[data-brand="cw"] img {
  transform: scale(1.20);
}

/* ── BRAND BAR ── */
.nm-brand-bar {
  width: 100%;
  border-top: 1px solid rgba(39, 32, 34, 0.12);
  overflow: hidden;
  padding: clamp(12px, 2vh, 28px) 0;
  background: #fff;
  position: relative;
  margin-top: 0;
}

.nm-brand-track {
  display: flex;
  align-items: center;
  gap: 0;
  width: max-content;
  animation: nm-scroll 22s linear infinite;
}

.nm-brand-track:hover {
  animation-play-state: paused;
}

@keyframes nm-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.nm-brand-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 72px;
  border-right: 1px solid rgba(39, 32, 34, 0.12);
  flex-shrink: 0;
  height: 64px;
}

.nm-brand-item:first-child {
  border-left: 1px solid rgba(39, 32, 34, 0.12);
}

.nm-brand-item img {
  height: 64px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.55;
  transition: opacity 0.3s;
}

.nm-brand-item:hover img {
  filter: grayscale(0);
  opacity: 1;
}

.nm-brand-item[data-brand="mt"] img {
  height: 46px;
}

.nm-brand-item[data-brand="wang"] img {
  height: 46px;
}

.nm-brand-item.selected img {
  filter: grayscale(0);
  opacity: 1;
}

.nm-brand-item {
  cursor: pointer;
}

@media (max-width: 780px) {
  .nm-hero {
    height: calc(100vh - var(--hh, var(--header-h, 48px))) !important;
    height: calc(100dvh - var(--hh, var(--header-h, 48px))) !important;
    min-height: calc(100dvh - var(--hh, var(--header-h, 48px))) !important;
    max-height: calc(100dvh - var(--hh, var(--header-h, 48px))) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    position: relative !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .nm-hero-inner {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    padding: clamp(6px, 1.8vh, 16px) 20px 0 !important;
    margin: 0 auto !important;
    text-align: center !important;
    gap: 0 !important;
    overflow: hidden !important;
  }

  .nm-copy {
    align-items: center !important;
    flex-shrink: 0 !important;
  }

  .nm-title {
    font-size: clamp(17px, 4.9vw, 22.3px) !important;
    line-height: 1.1 !important;
    margin: 0 !important;
  }

  .nm-desc {
    font-size: clamp(10.8px, 2.9vw, 12.6px) !important;
    line-height: 1.35 !important;
    margin: 8px 0 12px !important;
    max-width: 320px !important;
  }

  .nm-btn {
    font-size: 12px !important;
    padding: 10px 24px !important;
    letter-spacing: 0.05em !important;
    align-self: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .nm-img-wrap {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: 38dvh !important;
    max-width: min(250px, 66vw) !important;
    aspect-ratio: 1 / 1 !important;
    margin: 4px auto 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
  }

  .nm-brand-bar {
    flex-shrink: 0 !important;
    width: 100% !important;
    background: #fff !important;
    border-top: 1px solid rgba(39, 32, 34, 0.08) !important;
    border-bottom: none !important;
    padding: 8px 0 max(8px, env(safe-area-inset-bottom)) 0 !important;
    position: relative !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin: auto 0 0 0 !important;
    z-index: 10 !important;
    box-sizing: border-box !important;
  }

  .nm-brand-item {
    height: 38px !important;
    padding: 0 18px !important;
  }

  .nm-brand-item img {
    max-height: 22px !important;
  }

  .nm-brand-item[data-brand="arqons"] img {
    max-height: 10px !important;
  }
}

/* Chinawok overlay: el contenedor de fotos ocupa 100% y el inner se mueve con transform */
#nm-detail-photos {
  width: 100% !important;
}

#nm-detail-photos-inner {
  will-change: transform;
}

/* ── FORMULARIO ── */
#quiero-franquiciar-form {
  background: #EC690D;
  padding: 72px calc(var(--page-margin, 180px) + 60px);
}

/* ── Entrada de la página ── */
@keyframes nmFadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes nmFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.nm-hero .nm-title {
  animation: nmFadeUp 800ms cubic-bezier(.22, 1, .36, 1) 100ms both;
}

.nm-hero .nm-desc {
  animation: nmFadeUp 800ms cubic-bezier(.22, 1, .36, 1) 250ms both;
}

.nm-hero .nm-btn {
  animation: nmFadeUp 800ms cubic-bezier(.22, 1, .36, 1) 400ms both;
}

.nm-hero .nm-img-wrap {
  animation: nmFadeIn 1000ms cubic-bezier(.22, 1, .36, 1) 300ms both;
}

.nm-hero .nm-brand-bar {
  animation: nmFadeUp 900ms cubic-bezier(.22, 1, .36, 1) 650ms both;
}

@media (prefers-reduced-motion: reduce) {

  .nm-hero .nm-title,
  .nm-hero .nm-desc,
  .nm-hero .nm-btn,
  .nm-hero .nm-img-wrap,
  .nm-hero .nm-brand-bar {
    animation: none;
  }
}

.nm-fade {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 900ms cubic-bezier(.22, 1, .36, 1), transform 900ms cubic-bezier(.22, 1, .36, 1);
}

.nm-fade.nm-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .nm-fade {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 780px) {
  .nm-hero-inner {
    padding-top: 32px !important;
  }
}

@media (max-width: 780px) {
  .nm-img-wrap {
    transform: translateY(12px) !important;
  }
}

@media (max-width: 780px) {
  .nm-slide[data-brand="ilfornaio"] img {
    transform: translateY(18px) !important;
  }
}

/* Botón "Más información" bloqueado en marcas sin página propia */
.nm-btn.nm-btn--disabled {
  opacity: .35;
  pointer-events: none;
  cursor: default;
  transition: opacity .3s ease;
}

/* Móvil: platos más grandes y cambio de imagen suave (sale una, luego entra la otra) */
@media (max-width: 779px) {
  .nm-img-wrap {
    max-width: min(310px, 84vw) !important;
    max-height: 43dvh !important;
  }

  .nm-slide {
    transition: opacity 500ms ease 0s !important;
  }

  .nm-slide.active {
    transition: opacity 900ms ease 350ms !important;
  }
}

/* Móvil: bloque más abajo y platos centrados en su recuadro */
@media (max-width: 779px) {
  .nm-hero .nm-hero-inner {
    padding-top: 56px !important;
  }

  .nm-hero .nm-slide {
    align-items: center !important;
    justify-content: center !important;
  }

  .nm-hero .nm-slide img {
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    object-position: center center !important;
  }

  .nm-hero .nm-slide[data-brand="ilfornaio"] img {
    transform: none !important;
  }
}

/* Móvil: el botón no queda tapado por la imagen que sigue */
@media (max-width: 779px) {
  .nm-hero .nm-copy {
    position: relative !important;
    z-index: 5 !important;
    padding-bottom: 14px !important;
  }

  .nm-hero .nm-img-wrap {
    margin-top: 12px !important;
  }
}

/* Móvil: textos del hero un poco más abajo y carrusel de platos más grande */
@media (max-width: 779px) {
  .nm-hero .nm-hero-inner {
    padding-top: 76px !important;
  }

  .nm-hero .nm-img-wrap {
    max-width: min(370px, 98vw) !important;
    max-height: 50dvh !important;
  }
}

/* Móvil: textos del hero aún más abajo y carrusel de platos a todo el ancho */
@media (max-width: 779px) {
  .nm-hero .nm-hero-inner {
    padding-top: 94px !important;
  }

  .nm-hero .nm-img-wrap {
    width: 90vw !important;
    max-width: 90vw !important;
    max-height: 56dvh !important;
    margin: -8px calc(50% - 45vw) 0 !important;
  }
}

/* Móvil: carrusel de logos de abajo más grande */
@media (max-width: 779px) {
  .nm-hero .nm-brand-item {
    height: 54px !important;
    padding: 0 24px !important;
  }

  .nm-hero .nm-brand-item img {
    max-height: 34px !important;
  }

  .nm-hero .nm-brand-item[data-brand="arqons"] img {
    max-height: 15px !important;
  }
}

/* Móvil: cada plato centrado según su contenido real (los archivos traen el plato algo desplazado dentro de la imagen) */
@media (max-width: 779px) {
  .nm-hero .nm-slide[data-brand="cw"] img        { transform: translate(-2.9%, 0) scale(1.2) !important; }
  .nm-hero .nm-slide[data-brand="mt"] img        { transform: translate(0.5%, -1.9%) scale(1.25) !important; }
  .nm-hero .nm-slide[data-brand="ilfornaio"] img { transform: translate(2.9%, -0.7%) !important; }
  .nm-hero .nm-slide[data-brand="wang"] img      { transform: translate(0, -4.6%) !important; }
  .nm-hero .nm-slide[data-brand="arqons"] img    { transform: translate(1%, -1.3%) scale(1.35) !important; }
}

/* Hero: el carrusel muestra solo los logos de las marcas (sin platos) */
.nm-hero .nm-img-wrap.nm-logos .nm-slide {
  align-items: center !important;
  justify-content: center !important;
}

.nm-hero .nm-img-wrap.nm-logos .nm-slide img {
  width: auto !important;
  height: auto !important;
  max-width: min(62%, 420px) !important;
  max-height: 34% !important;
  object-fit: contain !important;
  transform: none !important;
  margin: 0 auto !important;
}

.nm-hero .nm-img-wrap.nm-logos .nm-slide[data-brand="arqons"] img {
  max-width: min(70%, 460px) !important;
}

@media (max-width: 779px) {
  .nm-hero .nm-img-wrap.nm-logos .nm-slide img {
    max-width: 66% !important;
    max-height: 30% !important;
  }

  .nm-hero .nm-img-wrap.nm-logos .nm-slide[data-brand="arqons"] img {
    max-width: 74% !important;
  }
}

/* Móvil: hero de logos — texto y logo repartidos en la pantalla, logo centrado entre el botón y la barra */
@media (max-width: 779px) {
  .nm-hero .nm-hero-inner {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-evenly !important;
    align-items: center !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    min-height: 0 !important;
  }

  .nm-hero .nm-copy {
    margin: 0 !important;
  }

  .nm-hero .nm-img-wrap.nm-logos {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 30dvh !important;
    max-height: 30dvh !important;
    margin: 0 !important;
  }

  .nm-hero .nm-img-wrap.nm-logos .nm-slide img {
    max-width: 62% !important;
    max-height: 72% !important;
  }

  .nm-hero .nm-img-wrap.nm-logos .nm-slide[data-brand="arqons"] img {
    max-width: 72% !important;
  }
}

@media (max-width: 779px) {
  .nm-hero .nm-img-wrap.nm-logos {
    height: 21dvh !important;
    max-height: 21dvh !important;
  }

  .nm-hero .nm-img-wrap.nm-logos .nm-slide img {
    max-height: 100% !important;
  }
}

@media (max-width: 779px) {
  /* El área de texto + logo termina donde empieza la barra de logos (71px) */
  .nm-hero .nm-hero-inner {
    padding-bottom: 83px !important;
  }

  .nm-hero .nm-copy {
    padding-bottom: 0 !important;
  }

  .nm-hero .nm-img-wrap.nm-logos {
    flex: 0 0 auto !important;
  }
}

/* Móvil: el logo ocupa el espacio libre entre el botón y la barra (sin bandas blancas) */
@media (max-width: 779px) {
  .nm-hero .nm-hero-inner {
    justify-content: flex-start !important;
    padding-top: 36px !important;
    padding-bottom: 71px !important;
  }

  .nm-hero .nm-img-wrap.nm-logos {
    flex: 1 1 auto !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
  }

  .nm-hero .nm-img-wrap.nm-logos .nm-slide img {
    max-width: 82% !important;
    max-height: 62% !important;
  }

  .nm-hero .nm-img-wrap.nm-logos .nm-slide[data-brand="arqons"] img {
    max-width: 86% !important;
  }
}

/* Móvil: texto + logo como un solo bloque centrado verticalmente */
@media (max-width: 779px) {
  .nm-hero .nm-hero-inner {
    justify-content: center !important;
    gap: clamp(36px, 7dvh, 72px) !important;
    padding-top: 12px !important;
    padding-bottom: 83px !important;
  }

  .nm-hero .nm-img-wrap.nm-logos {
    flex: 0 0 auto !important;
    height: 30dvh !important;
    max-height: 30dvh !important;
  }

  .nm-hero .nm-img-wrap.nm-logos .nm-slide img {
    max-width: 82% !important;
    max-height: 100% !important;
  }
}

/* Móvil: logo con su tamaño anterior (no agrandado) */
@media (max-width: 779px) {
  .nm-hero .nm-img-wrap.nm-logos {
    height: 21dvh !important;
    max-height: 21dvh !important;
  }

  .nm-hero .nm-img-wrap.nm-logos .nm-slide img {
    max-width: 62% !important;
    max-height: 100% !important;
  }

  .nm-hero .nm-img-wrap.nm-logos .nm-slide[data-brand="arqons"] img {
    max-width: 72% !important;
  }
}

/* Móvil: bloque de texto más arriba; el logo (mismo tamaño) queda centrado en el espacio restante */
@media (max-width: 779px) {
  .nm-hero .nm-hero-inner {
    justify-content: flex-start !important;
    gap: 0 !important;
    padding-top: 7dvh !important;
  }

  .nm-hero .nm-img-wrap.nm-logos {
    flex: 1 1 auto !important;
    height: auto !important;
    max-height: none !important;
  }

  .nm-hero .nm-img-wrap.nm-logos .nm-slide img {
    max-height: 21dvh !important;
  }
}

@media (max-width: 779px) {
  .nm-hero .nm-hero-inner {
    padding-bottom: 39px !important;
  }
}

@media (max-width: 779px) {
  /* Logo un poco más arriba (más cerca del botón) */
  .nm-hero .nm-img-wrap.nm-logos {
    transform: translateY(-6dvh) !important;
  }
}

/* Logo rotativo del hero un poco más grande (no la barra de logos) */
.nm-hero .nm-img-wrap.nm-logos .nm-slide img {
  max-width: min(72%, 480px) !important;
  max-height: 40% !important;
}

.nm-hero .nm-img-wrap.nm-logos .nm-slide[data-brand="arqons"] img {
  max-width: min(80%, 520px) !important;
}

@media (max-width: 779px) {
  .nm-hero .nm-img-wrap.nm-logos .nm-slide img {
    max-width: 72% !important;
    max-height: 24dvh !important;
  }

  .nm-hero .nm-img-wrap.nm-logos .nm-slide[data-brand="arqons"] img {
    max-width: 82% !important;
  }
}

/* Logo rotativo del hero: un poco más grande aún */
.nm-hero .nm-img-wrap.nm-logos .nm-slide img {
  max-width: min(82%, 540px) !important;
  max-height: 46% !important;
}

.nm-hero .nm-img-wrap.nm-logos .nm-slide[data-brand="arqons"] img {
  max-width: min(88%, 580px) !important;
}

@media (max-width: 779px) {
  .nm-hero .nm-img-wrap.nm-logos .nm-slide img {
    max-width: 82% !important;
    max-height: 27dvh !important;
  }

  .nm-hero .nm-img-wrap.nm-logos .nm-slide[data-brand="arqons"] img {
    max-width: 88% !important;
  }
}

/* Desktop: logo rotativo del hero un poco más a la izquierda */
@media (min-width: 780px) {
  .nm-hero .nm-img-wrap.nm-logos .nm-slide img {
    translate: -17% 0;
  }
}
