/* Frozen portrait mobile design extracted from mobile final. */
@media (max-width: 700px) and (orientation: portrait) {

  /* ── Gradiente de transición: process (graphite) → style-explorer (ink) ── */
  /* El degradado vive en ::before de style-explorer para que el texto quede
     en el mismo contexto de apilamiento y se pueda poner encima sin conflicto */
  .style-explorer-section {
    border-top: none !important;
    position: relative;
  }
  .style-explorer-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 72px;
    background: linear-gradient(to bottom, var(--graphite), transparent);
    pointer-events: none;
    z-index: 0;
  }

  /* Transición suave style-explorer → estimate */
  .estimate-section {
    border-top: none !important;
    position: relative;
  }
  .estimate-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 72px;
    background: linear-gradient(to bottom, var(--ink), var(--graphite));
    pointer-events: none;
    z-index: 0;
  }

  /* Transición suave estimate → map */
  .map-section {
    border-top: none !important;
    position: relative;
    overflow: visible;
    transform: translateY(-60px);
    margin-bottom: -60px;
  }
  .map-section::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--ink));
    pointer-events: none;
    z-index: 3;
  }

  /* FAQ — mismo fondo que map-section */
  .faq-section {
    background: var(--ink) !important;
    overflow: visible !important;
  }
  .faq-body {
    transform: translateY(-50px);
    margin-bottom: -50px;
  }
  /* Vignette de 4 lados — funde la imagen con el fondo --ink */
  .faq-body-fade {
    background:
      linear-gradient(to bottom, var(--ink) 0%, transparent 22%, transparent 72%, var(--ink) 100%),
      linear-gradient(to right,  var(--ink) 0%, transparent 35%, transparent 65%, var(--ink) 100%);
  }
  .faq-header {
    background: var(--ink) !important;
    overflow: visible !important;
  }
  .faq-heading,
  .faq-intro {
    transform: translateY(-60px);
    position: relative;
    z-index: 1;
  }
  .faq-header-ghost {
    font-size: clamp(90px, 28vw, 115px);
    transform: translateY(calc(-22% - 80px));
    max-width: 100vw;
    overflow: hidden;
  }
  .map-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 72px;
    background: linear-gradient(to bottom, var(--graphite), var(--ink));
    pointer-events: none;
    z-index: 1;
  }
  .map-section .map-copy {
    position: relative;
    z-index: 2;
  }
  .map-section .map-frame {
    position: relative;
    z-index: 2;
    height: 300px !important;
    max-height: 300px !important;
    overflow: hidden !important;
    border-radius: 0;
    margin: 0;
  }
  .map-section .map-frame::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--ink));
    pointer-events: none;
    z-index: 2;
  }
  .map-section #gtaMap {
    min-height: 0 !important;
    height: 100% !important;
    width: 100% !important;
  }

  /* map-stats — dos columnas en portrait */
  .map-stats {
    flex-direction: column;
    gap: 0;
    padding: 4px 0;
    border-top: 1px solid rgba(248, 245, 238, 0.08);
    border-bottom: 1px solid rgba(248, 245, 238, 0.08);
    margin-bottom: 24px;
  }
  .map-stat-divider { display: none; }
  .map-stat {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 13px 0;
    border-bottom: 1px solid rgba(248, 245, 238, 0.06);
    flex: none;
  }
  .map-stat:last-of-type { border-bottom: none; }

  /* Col izquierda: número — col derecha: label */
  .map-stat .map-stat-number { text-align: left; }
  .map-stat .map-stat-label  { text-align: right; }

  /* Stat 2 (nth-child 3 porque hay divider entre cada stat):
     izquierda: label — derecha: número */
  .map-stats > div:nth-child(3) .map-stat-number { order: 2; text-align: right; }
  .map-stats > div:nth-child(3) .map-stat-label  { order: 1; text-align: left; }

  .map-stat-number { font-size: 30px; }
  .map-stat-label  { font-size: 11px; letter-spacing: .05em; }

  /* Subir título, subtítulo y botón 50px — encima del degradado */
  .style-explorer-head {
    transform: translateY(-50px);
    position: relative;
    z-index: 1;
  }

  /* Ocultar drums — reemplazados por pickers horizontales */
  .sxp-left,
  .sxp-right {
    display: none;
  }

  /* Subir columna central */
  .sxp-center {
    transform: translateY(-95px);
  }

  /* Forzar siempre 3 líneas: "Every great bathroom" / "starts with a" / [palabra] */
  .sxp-cycle-word {
    display: block;
  }

  /* ── Selector horizontal de estilos ── */
  .sxp-active-label {
    display: block;
    margin-top: 16px;
    position: relative;
    overflow: hidden;
  }

  /* Fades de borde para indicar scroll */
  .sxp-active-label::before,
  .sxp-active-label::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
  }
  .sxp-active-label::before {
    left: 0;
    background: linear-gradient(to right, var(--ink), transparent);
  }
  .sxp-active-label::after {
    right: 0;
    background: linear-gradient(to left, var(--ink), transparent);
  }

  /* Track scrollable */
  .sxp-hscroll-track {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    align-items: center;
    padding: 8px 0;
  }
  .sxp-hscroll-track::-webkit-scrollbar {
    display: none;
  }

  /* Spacers: permiten centrar el primer y último ítem */
  .sxp-hscroll-track::before,
  .sxp-hscroll-track::after {
    content: '';
    display: block;
    flex: 0 0 50vw;
    min-width: 50vw;
  }

  /* Ítem individual */
  .sxp-hscroll-item {
    flex: 0 0 auto;
    font-family: var(--display);
    font-size: 16px;
    font-weight: 600;
    color: var(--porcelain);
    letter-spacing: -0.01em;
    padding: 6px 12px;
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    opacity: 0.22;
    transition: opacity 0.35s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    line-height: 1;
  }

  .sxp-hscroll-item.is-active {
    opacity: 1;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
  }

  /* ── Picker horizontal de paletas — fuera del layout, bajo la imagen ── */
  .sxp-palette-label {
    display: block;
    position: relative;
    overflow: hidden;
    transform: translateY(-105px);
    margin-top: 10px;
    margin-bottom: -105px;
  }
  .sxp-palette-label::before,
  .sxp-palette-label::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
  }
  .sxp-palette-label::before { left: 0; background: linear-gradient(to right, var(--ink), transparent); }
  .sxp-palette-label::after  { right: 0; background: linear-gradient(to left,  var(--ink), transparent); }

  .sxp-pal-track {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    align-items: center;
    padding: 6px 0;
  }
  .sxp-pal-track::-webkit-scrollbar { display: none; }
  .sxp-pal-track::before,
  .sxp-pal-track::after {
    content: '';
    display: block;
    flex: 0 0 50vw;
    min-width: 50vw;
  }

  .sxp-pal-item {
    flex: 0 0 auto;
    font-family: var(--display);
    font-size: 16px;
    font-weight: 600;
    color: var(--porcelain);
    letter-spacing: -0.01em;
    padding: 4px 10px;
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    opacity: 0.22;
    transition: opacity 0.35s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    line-height: 1;
  }
  .sxp-pal-item.is-active {
    opacity: 1;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
  }

  /* estimate-trust-col — position:relative sin transform,
     para no crear stacking context que aplana los rotateX de hijos */
  .estimate-trust-col {
    top: -50px;
    left: 10px;
    margin-bottom: -50px;
  }

  /* estimate-title */
  .estimate-title {
    transform: translateY(0px);
  }

  /* estimate-steps — 10px derecha, 10px arriba */
  .estimate-steps {
    transform: translateX(10px) translateY(-10px);
  }

  /* estimate-btn — 10px derecha */
  .estimate-btn {
    transform: translateX(10px);
  }

  /* estimate-lower-band — más alto, imágenes más grandes */
  .estimate-lower-band {
    transform: translateX(10px);
    height: 340px !important;
  }
  .estimate-lower-band .marquee-wrap {
    gap: 12px;
    padding: 12px;
  }

  /* Botón cerrar inferior del estimate-result — sticky al fondo del sheet */
  .er-close-bottom {
    display: flex;
    justify-content: center;
    position: sticky;
    bottom: 0;
    padding: 16px 24px 36px;
    background: linear-gradient(to bottom, transparent, rgba(12, 13, 14, 0.98) 35%);
    pointer-events: auto;
    z-index: 2;
  }
  .er-close-bottom-btn {
    font-family: var(--display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--porcelain);
    background: rgba(247, 245, 239, 0.1);
    border: 1px solid rgba(247, 245, 239, 0.22);
    border-radius: 999px;
    padding: 12px 40px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    position: relative;
    z-index: 3;
  }
  .er-close-bottom-btn:active {
    background: rgba(247, 245, 239, 0.18);
    border-color: rgba(247, 245, 239, 0.4);
  }

  /* Hero: espacio bajo el logo para el contenido */
  .hero {
    align-items: start !important;
    padding-top: 175px !important;
    padding-bottom: 48px !important;
  }

  /* Imagen/video de fondo desplazado 275px a la derecha */
  .hero-media {
    transform: translateX(275px);
    width: calc(100% + 275px);
  }

  /* Language switcher: encima del logo, esquina superior derecha — fixed para superponer al header */
  .hero-lang-switch {
    display: flex !important;
    align-items: center;
    gap: 0;
    position: fixed;
    top: 36px;
    right: 18px;
    z-index: 35;
    padding: 5px 10px;
    background: rgba(16, 20, 22, .45);
    border: 1px solid rgba(247, 245, 239, .16);
    border-radius: 999px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .hero-lang-switch a {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    color: rgba(247, 245, 239, .55);
    text-decoration: none;
    padding: 2px 8px;
    border-radius: 999px;
    transition: color .2s, background .2s;
  }

  .hero-lang-switch a.is-active {
    color: var(--brass);
    background: rgba(196, 149, 50, .12);
  }

  .hero-lang-sep {
    width: 1px;
    height: 12px;
    background: rgba(247, 245, 239, .18);
    flex-shrink: 0;
  }

  /* Ticker de materiales: oculto en mobile portrait */
  .hero-materials { display: none !important; }

  /* Quitar botón "See transformations" */
  .hero-actions .button-ghost { display: none; }

  /* Toggle ON/OFF: fluye entre CTA y teléfono — posición natural en el contenido */
  .hero-mode-toggle {
    display: inline-flex !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    margin: 14px auto 0;
    z-index: 3;
    padding: 8px 10px;
    gap: 6px;
  }

  .toggle-icon {
    width: 44px;
    height: 44px;
  }

  .toggle-icon svg {
    width: 20px;
    height: 20px;
  }

  .hero-mode-toggle button {
    min-width: 58px;
    min-height: 38px;
    font-size: 12px;
    padding: 0 16px;
  }

  .toggle-sep {
    height: 22px;
    margin-right: 4px;
  }

  /* Process section: botón debajo del testimonial, alineado a la derecha */
  .process-header {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }
  .process-header-left {
    display: contents;
  }
  .process-header-h2 {
    order: 1;
  }
  .process-header-right {
    order: 2;
  }
  .process-header-cta {
    order: 3;
    align-self: flex-end;
    margin-top: 0 !important;
    transform: translateY(-6px);
  }

  /* ── Process cards: slider horizontal ── */

  /* Cancelar la animación de reveal — las tarjetas se muestran de inmediato */
  /* Aplicar el mismo estilo brass tint de la tarjeta 1 a todas */
  .process-col {
    opacity: 1 !important;
    transform: none !important;
    transition: background .35s var(--ease) !important;
    background: rgba(196, 149, 50, .025) !important;
  }

  .process-slider-wrap {
    position: relative;
    overflow: hidden;
  }

  .process-cols {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    border-top: none !important;
    transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
  }

  .process-col,
  .process-col:nth-child(even),
  .process-col:nth-child(5) {
    flex: 0 0 100% !important;
    min-width: 100% !important;
    border-right: none !important;
    border-bottom: none !important;
  }

  /* Flechas */
  .process-slider-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 42%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(16, 20, 22, .6);
    border: 1px solid rgba(247, 245, 239, .2);
    border-radius: 50%;
    color: var(--porcelain);
    cursor: pointer;
    z-index: 5;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background .2s, border-color .2s;
  }

  .process-slider-btn:active {
    background: rgba(196, 149, 50, .3);
    border-color: rgba(196, 149, 50, .5);
  }

  .process-slider-prev { left: 10px; }
  .process-slider-next { right: 10px; }

  .process-slider-btn[disabled] {
    opacity: 0.3;
    pointer-events: none;
  }

  /* Dots */
  .process-slider-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    padding: 18px 0 4px;
  }

  .process-slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(247, 245, 239, .22);
    transition: background .25s, transform .25s;
    cursor: pointer;
  }

  .process-slider-dot.is-active {
    background: var(--brass);
    transform: scale(1.35);
  }
}
