/* ==========================================================================
   Elit-Stal — mobile WOW (pakiet C)
   Aktywne gdy html ma klasę .mobile-wow (max-width: 900px)
   ========================================================================== */

@media (max-width: 900px) {
  :root {
    --mobile-bar-h: 64px;
    --mobile-nav-h: 72px;
    --mobile-safe-b: env(safe-area-inset-bottom, 0px);
  }

  html.mobile-wow body {
    padding-bottom: calc(var(--mobile-nav-h) + var(--mobile-safe-b) + 8px);
  }

  html.mobile-wow .mobile-action-bar {
    display: none !important;
  }

  html.mobile-wow body.mobile-menu-open {
    overflow: hidden;
    touch-action: none;
  }

  /* --- Full-screen menu --- */
  html.mobile-wow .site-header__nav {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    z-index: 200;
    flex: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: calc(var(--header-h) + 16px) 24px calc(var(--mobile-nav-h) + 40px);
    gap: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: radial-gradient(ellipse 120% 80% at 50% 0%, rgba(255, 119, 0, 0.12) 0%, transparent 55%),
      rgba(6, 12, 22, 0.98);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    transform: translateY(-8%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.45s var(--ease), opacity 0.4s var(--ease);
  }

  html.mobile-wow .site-header.is-open .site-header__nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  html.mobile-wow .site-header__nav a {
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    opacity: 0;
    transform: translateX(-16px);
    transition: color 250ms var(--ease), opacity 0.4s var(--ease), transform 0.45s var(--ease);
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  html.mobile-wow .site-header.is-open .site-header__nav a {
    opacity: 1;
    transform: translateX(0);
  }

  html.mobile-wow .site-header.is-open .site-header__nav a:nth-child(1) { transition-delay: 0.05s; }
  html.mobile-wow .site-header.is-open .site-header__nav a:nth-child(2) { transition-delay: 0.1s; }
  html.mobile-wow .site-header.is-open .site-header__nav a:nth-child(3) { transition-delay: 0.15s; }
  html.mobile-wow .site-header.is-open .site-header__nav a:nth-child(4) { transition-delay: 0.2s; }
  html.mobile-wow .site-header.is-open .site-header__nav a:nth-child(5) { transition-delay: 0.25s; }
  html.mobile-wow .site-header.is-open .site-header__nav a:nth-child(6) { transition-delay: 0.3s; }
  html.mobile-wow .site-header.is-open .site-header__nav a:nth-child(7) { transition-delay: 0.35s; }

  html.mobile-wow .mobile-menu__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 28px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.45s 0.35s var(--ease), transform 0.45s 0.35s var(--ease);
  }

  html.mobile-wow .site-header.is-open .mobile-menu__actions {
    opacity: 1;
    transform: translateY(0);
  }

  html.mobile-wow .mobile-menu__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    background: linear-gradient(135deg, #ff7700 0%, #ff9933 100%);
    color: #fff;
    box-shadow: 0 8px 32px rgba(255, 119, 0, 0.35);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  }

  html.mobile-wow .mobile-menu__cta:active {
    transform: scale(0.97);
  }

  html.mobile-wow .mobile-menu__phone {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--orange);
    text-decoration: none;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  html.mobile-wow .site-header__burger {
    z-index: 210;
  }

  /* --- Sticky action bar --- */
  html.mobile-wow .mobile-action-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(var(--mobile-nav-h) + var(--mobile-safe-b) + 6px);
    z-index: 180;
    display: flex;
    gap: 10px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(12, 20, 34, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    transform: translateY(120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s var(--ease), opacity 0.35s var(--ease);
  }

  html.mobile-wow .mobile-action-bar.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  html.mobile-wow .mobile-action-bar.is-hidden-form {
    transform: translateY(120%);
    opacity: 0;
    pointer-events: none;
  }

  html.mobile-wow .mobile-action-bar__btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.15s var(--ease), background 0.2s var(--ease);
  }

  html.mobile-wow .mobile-action-bar__btn:active {
    transform: scale(0.96);
  }

  html.mobile-wow .mobile-action-bar__btn--call {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
  }

  html.mobile-wow .mobile-action-bar__btn--quote {
    background: linear-gradient(135deg, #ff7700, #ff9933);
    color: #fff;
    flex: 1.2;
  }

  html.mobile-wow .mobile-action-bar__btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  /* --- Bottom navigation --- */
  html.mobile-wow .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 190;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    height: calc(var(--mobile-nav-h) + var(--mobile-safe-b));
    padding-bottom: var(--mobile-safe-b);
    background: rgba(8, 14, 26, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  html.mobile-wow .mobile-bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    min-height: 48px;
    min-width: 0;
    white-space: nowrap;
    transition: color 0.2s var(--ease), transform 0.15s var(--ease);
  }

  html.mobile-wow .mobile-bottom-nav__item[aria-label="Konfigurator"] {
    font-size: 0.56rem;
    letter-spacing: 0;
  }

  html.mobile-wow .mobile-bottom-nav__item:active {
    transform: scale(0.92);
  }

  html.mobile-wow .mobile-bottom-nav__item.is-active,
  html.mobile-wow .mobile-bottom-nav__item[aria-current="page"] {
    color: var(--orange);
  }

  html.mobile-wow .mobile-bottom-nav__item svg {
    width: 22px;
    height: 22px;
  }

  /* --- Swipe carousels --- */
  html.mobile-wow .mobile-carousel-wrap {
    position: relative;
    margin: 0 -18px;
    padding: 0 18px;
  }

  html.mobile-wow .mobile-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 18px 20px;
    margin: 0 -18px;
  }

  html.mobile-wow .mobile-carousel::-webkit-scrollbar {
    display: none;
  }

  html.mobile-wow .mobile-carousel > * {
    flex: 0 0 min(88vw, 340px);
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }

  html.mobile-wow .mobile-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
  }

  html.mobile-wow .mobile-carousel-dots button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
  }

  html.mobile-wow .mobile-carousel-dots button.is-active {
    background: var(--orange);
    transform: scale(1.25);
  }

  html.mobile-wow .mobile-carousel-counter {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray);
    margin-top: 6px;
  }

  /* --- Trust bar horizontal scroll --- */
  html.mobile-wow [class*="hero__trustbar-inner"],
  html.mobile-wow [class*="-trust__inner"] {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  html.mobile-wow [class*="hero__trustbar-inner"]::-webkit-scrollbar,
  html.mobile-wow [class*="-trust__inner"]::-webkit-scrollbar {
    display: none;
  }

  html.mobile-wow [class*="hero__trust-item"],
  html.mobile-wow [class*="-trust__stat"] {
    flex: 0 0 auto;
    scroll-snap-align: start;
    min-width: min(72vw, 260px);
  }

  /* --- Step configurator --- */
  html.mobile-wow .mobile-picker-steps {
    display: none;
  }

  html.mobile-wow .mobile-picker-steps.is-active {
    display: block;
  }

  html.mobile-wow .mobile-picker-progress {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
  }

  html.mobile-wow .mobile-picker-progress span {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.12);
    transition: background 0.3s;
  }

  html.mobile-wow .mobile-picker-progress span.is-done {
    background: rgba(255, 119, 0, 0.5);
  }

  html.mobile-wow .mobile-picker-progress span.is-current {
    background: var(--orange);
    box-shadow: 0 0 12px rgba(255, 119, 0, 0.5);
  }

  html.mobile-wow .mobile-picker-step-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #fff;
  }

  html.mobile-wow .mobile-picker-nav {
    display: flex;
    gap: 12px;
    margin-top: 24px;
  }

  html.mobile-wow .mobile-picker-nav button {
    flex: 1;
    min-height: 48px;
    border-radius: 12px;
    font-weight: 700;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: transform 0.15s;
  }

  html.mobile-wow .mobile-picker-nav button:active {
    transform: scale(0.97);
  }

  html.mobile-wow .mobile-picker-nav__back {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
  }

  html.mobile-wow .mobile-picker-nav__next {
    background: linear-gradient(135deg, #ff7700, #ff9933);
    color: #fff;
  }

  html.mobile-wow [data-shed-picker] > .shed-picker__group,
  html.mobile-wow [data-shel-picker] > .shel-picker__group,
  html.mobile-wow [data-shed-picker].mobile-steps-ready > .shed-picker__summary,
  html.mobile-wow [data-shel-picker].mobile-steps-ready > .shel-picker__summary,
  html.mobile-wow [data-shed-picker].mobile-steps-ready > .shed-btn,
  html.mobile-wow [data-shel-picker].mobile-steps-ready > .shel-btn {
    display: none;
  }

  html.mobile-wow [data-shed-picker].mobile-steps-ready .mobile-picker-steps,
  html.mobile-wow [data-shel-picker].mobile-steps-ready .mobile-picker-steps {
    display: block;
  }

  html.mobile-wow .shed-picker__opt,
  html.mobile-wow .shel-picker__opt {
    min-height: 48px;
    padding: 12px 16px;
  }

  /* --- Gallery lightbox --- */
  html.mobile-wow .mobile-lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 16px 80px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }

  html.mobile-wow .mobile-lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  html.mobile-wow .mobile-lightbox img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
  }

  html.mobile-wow .mobile-lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
  }

  html.mobile-wow .mobile-lightbox__nav {
    display: flex;
    gap: 24px;
    margin-top: 20px;
  }

  html.mobile-wow .mobile-lightbox__nav button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
  }

  html.mobile-wow [class*="gallery__item"] {
    cursor: pointer;
  }

  html.mobile-wow [class*="gallery__filters"] {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: none;
  }

  html.mobile-wow [class*="gallery__filter"] {
    flex-shrink: 0;
    scroll-snap-align: start;
    min-height: 44px;
  }

  /* --- Count-up stats --- */
  html.mobile-wow [class*="trust__number"] {
    font-variant-numeric: tabular-nums;
  }

  /* --- Micro-interactions --- */
  html.mobile-wow .mobile-tap,
  html.mobile-wow [class*="-btn"],
  html.mobile-wow [class*="model-card"],
  html.mobile-wow .offer-card {
    -webkit-tap-highlight-color: transparent;
  }

  html.mobile-wow [class*="-btn"]:active,
  html.mobile-wow [class*="model-card"]:active {
    transform: scale(0.98);
  }

  html.mobile-wow .site-header__cta {
    display: none;
  }

  html.mobile-wow .con-btn,
  html.mobile-wow .shed-btn,
  html.mobile-wow .shel-btn,
  html.mobile-wow .ken-btn,
  html.mobile-wow .gar-btn {
    min-height: 48px;
  }

  /* --- Section spacing --- */
  html.mobile-wow :root {
    --section-py: 64px;
  }

  /* --- Anti horizontal-scroll --- */
  html.mobile-wow,
  html.mobile-wow body {
    overflow-x: hidden;
    max-width: 100%;
  }

  html.mobile-wow .site-main,
  html.mobile-wow section {
    max-width: 100vw;
    overflow-x: clip;
  }

  /* Karuzele i paski scrollowane w poziomie mają prawo wystawać wewnętrznie */
  html.mobile-wow .mobile-carousel-wrap,
  html.mobile-wow [class*="hero__trustbar-inner"],
  html.mobile-wow [class*="-trust__inner"],
  html.mobile-wow [class*="gallery__filters"] {
    overflow-x: auto;
  }

  /* --- Trust cards: 2 kolumny na mobile --- */
  html.mobile-wow .trust__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  html.mobile-wow .trust-card__inner {
    padding: 20px 14px;
    height: 100%;
  }

  html.mobile-wow .trust-card__top {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  html.mobile-wow .trust-card__iconbox {
    width: 56px;
    height: 56px;
  }

  html.mobile-wow .trust-card__icon {
    width: 40px;
    height: 40px;
  }

  html.mobile-wow .trust-card__heading {
    font-size: 0.98rem;
    text-align: center;
  }

  html.mobile-wow .trust-card__text {
    font-size: 0.82rem;
    line-height: 1.5;
    text-align: center;
  }

  /* --- Sekcja kontakt (strona główna): karty w 1 kolumnie --- */
  html.mobile-wow .contact__grid,
  html.mobile-wow .contact__grid--3 {
    grid-template-columns: 1fr;
    max-width: 420px;
    width: 100%;
  }

  html.mobile-wow .contact-card {
    padding: 24px 20px;
  }

  html.mobile-wow .contact-card__value {
    word-break: break-word;
  }

  /* --- Hero mobile: mocniejszy --- */
  html.mobile-wow .hero {
    min-height: auto;
    padding-top: calc(var(--header-h) + 24px);
    padding-bottom: 8px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  html.mobile-wow .hero__container {
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 0;
    padding-bottom: 24px;
    min-height: 0;
    align-items: flex-start;
  }

  html.mobile-wow .hero__content {
    max-width: 100%;
  }

  html.mobile-wow .hero__title {
    font-size: clamp(2.1rem, 8.5vw, 2.9rem);
    line-height: 1.12;
    margin-bottom: 18px;
  }

  html.mobile-wow .hero__lead {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 26px;
    max-width: 100%;
  }

  html.mobile-wow .hero__cta {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 17px 24px;
    font-size: 1.05rem;
    border-radius: 12px;
  }

  html.mobile-wow .hero__trustbar {
    padding: 20px 20px 32px;
    position: relative;
    z-index: 4;
  }

  /* Sekcja "Dlaczego warto" nie może nachodzić na pasek zaufania na mobile */
  html.mobile-wow .trust {
    margin-top: 0;
  }

  html.mobile-wow .hero__fade {
    display: none;
  }

  html.mobile-wow .hero__trustbar-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px;
  }

  html.mobile-wow .hero__trust-item {
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.78rem;
    gap: 8px;
  }

  html.mobile-wow .hero__trust-item span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  html.mobile-wow .hero__trust-item svg {
    width: 18px;
    height: 18px;
  }

  /* Przewijanie do sekcji z uwzględnieniem stałego nagłówka */
  html.mobile-wow section[id],
  html.mobile-wow [id="oferta"],
  html.mobile-wow [id="kontakt"],
  html.mobile-wow [id="realizacje"] {
    scroll-margin-top: calc(var(--header-h) + 16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html.mobile-wow .site-header__nav a,
  html.mobile-wow .mobile-action-bar,
  html.mobile-wow .mobile-menu__actions {
    transition: none;
  }
}
