@media (max-width: 1100px) {
  .primary-nav { gap: .7rem; }
  .nav-link, .nav-trigger { font-size: .78rem; }
  .site-header .button { padding-inline: .8rem; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
  .footer-grid > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  :root { --header-h: 66px; }
  body { padding-bottom: var(--mobile-cta-h); }
  .site-header.is-scrolled { height: 62px; }
  .primary-nav, .site-header > .header-inner > .button { display: none; }
  .menu-toggle { display: block; }
  .mobile-nav {
    position: fixed; z-index: 999; top: var(--header-h); left: 0; right: 0;
    max-height: calc(100vh - var(--header-h) - var(--mobile-cta-h)); overflow: auto;
    background: var(--color-bg); border-bottom: 1px solid var(--color-border); padding: 1rem var(--gutter) 1.4rem;
  }
  .mobile-nav.is-open { display: block; }
  .mobile-nav a { display: block; min-height: 48px; padding: .7rem 0; border-bottom: 1px solid var(--color-border); text-decoration: none; font-weight: 750; }
  .mobile-nav .mobile-subnav { padding-left: 1rem; }
  .mobile-nav .mobile-subnav a { font-size: .9rem; font-weight: 650; }

  .hero-grid { min-height: 0; grid-template-columns: 1fr; }
  .hero-copy { order: 1; padding: clamp(2.7rem, 8vw, 4.2rem) var(--gutter); }
  .hero-media { order: 2; min-height: 0; aspect-ratio: 16/10; }
  .info-strip-grid { grid-template-columns: repeat(2, 1fr); }
  .info-item:nth-child(2) { border-right: 0; }
  .info-item:nth-child(-n+2) { border-bottom: 1px solid var(--color-border); }
  .feature-grid, .process-grid { grid-template-columns: repeat(2, 1fr); }
  .feature:nth-child(2), .process-step:nth-child(2) { border-right: 0; }
  .feature:nth-child(-n+2), .process-step:nth-child(-n+2) { border-bottom: 1px solid var(--color-border); }
  .heritage-grid, .split, .contact-layout { grid-template-columns: 1fr; }
  .heritage-media { min-height: 440px; }
  .home-gallery-head { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }
  .cta-panel { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :last-child { grid-column: auto; }

  .mobile-cta {
    position: fixed; z-index: 1400; left: 0; right: 0; bottom: 0; height: var(--mobile-cta-h);
    display: grid; grid-template-columns: 1fr 1.2fr; background: var(--color-bg); border-top: 1px solid var(--color-border);
    padding: .55rem .65rem;
  }
  .mobile-cta a { min-height: 46px; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .brand img { width: 134px; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card p { min-height: 0; }
  .editorial-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
  .gallery-tile--a, .gallery-tile--d { grid-column: 1 / -1; grid-row: span 2; }
  .gallery-tile--b, .gallery-tile--c, .gallery-tile--e, .gallery-tile--f { grid-column: span 1; grid-row: span 1; }
  .heritage-media { grid-template-columns: 1fr 1fr; min-height: 380px; }
  .heritage-media picture:first-child { grid-column: 1 / -1; grid-row: auto; }
  .feature-grid, .process-grid { grid-template-columns: 1fr; }
  .feature, .process-step { border-right: 0; border-bottom: 1px solid var(--color-border); }
  .feature:last-child, .process-step:last-child { border-bottom: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .field--full { grid-column: auto; }
  .detail-grid { grid-template-columns: 1fr; }
  .gallery-page-grid { grid-template-columns: repeat(2, 1fr); gap: .55rem; }
  .gallery-page-grid .gallery-item, .gallery-page-grid .gallery-item:nth-child(n) { grid-column: span 1; min-height: 180px; }
  .gallery-page-grid .gallery-item:nth-child(5n+1) { grid-column: 1 / -1; min-height: 260px; }
  .gallery-page-grid .gallery-tile { min-height: inherit; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .lightbox__stage { padding-inline: 3.2rem; }
}

@media (max-width: 1024px) {
  .brand-copy__line--primary { font-size: .66rem; }
  .brand-copy__line--secondary { font-size: .6rem; }
  .gallery-item--wide { grid-column: span 12; }
  .gallery-item--landscape,
  .gallery-item--portrait,
  .gallery-item--square,
  .gallery-item--tall { grid-column: span 6; }
  .media-row,
  .media-row--reverse {
    grid-template-columns: 1fr;
  }
  .media-row--reverse .media-row__copy,
  .media-row--reverse .media-row__media {
    order: initial;
  }
}

@media (max-width: 900px) {
  .brand-copy { display: none; }
  .mobile-cta {
    grid-template-columns: 1fr 1fr 1.1fr;
    padding: .5rem;
  }
}

@media (max-width: 680px) {
  .brand-mark img { width: 70px; }
  .gallery-page-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 110px;
  }
  .gallery-item--wide,
  .gallery-page-grid .gallery-item:nth-child(n) {
    grid-column: 1 / -1;
    grid-row: span 3;
  }
  .gallery-item--landscape,
  .gallery-item--portrait,
  .gallery-item--square,
  .gallery-item--tall {
    grid-column: span 1;
    grid-row: span 2;
  }
  .gallery-item--wide { grid-row: span 3; }
  .gallery-item__meta { padding: .65rem .75rem 0; }
  .image-slot,
  .image-placeholder { min-height: 260px; }
}

@media (max-width: 520px) {
  .mobile-cta {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .mobile-cta .button {
    font-size: .64rem;
    letter-spacing: .05em;
  }
}

/* V2 gallery final responsive override */
@media (max-width: 680px) {
  .gallery-page-grid .gallery-item.gallery-item--wide {
    grid-column: 1 / -1;
    grid-row: span 3;
  }
  .gallery-page-grid .gallery-item.gallery-item--landscape,
  .gallery-page-grid .gallery-item.gallery-item--portrait,
  .gallery-page-grid .gallery-item.gallery-item--square,
  .gallery-page-grid .gallery-item.gallery-item--tall {
    grid-column: span 1;
    grid-row: span 2;
  }
}

@media (max-width: 420px) {
  .gallery-page-grid { grid-auto-rows: 96px; }
  .gallery-page-grid .gallery-item.gallery-item--wide { grid-row: span 3; }
}

/* ========================================================================
   MARMA V7 – mobilní CTA výše nad spodní hranou + safe area
   ======================================================================== */
@media (max-width: 900px) {
  body {
    padding-bottom: calc(var(--mobile-cta-h) + 20px + env(safe-area-inset-bottom, 0px));
  }
  .mobile-cta {
    left: .65rem;
    right: .65rem;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    height: var(--mobile-cta-h);
    border: 1px solid var(--color-border);
    background: rgba(247, 244, 238, .97);
    box-shadow: 0 10px 28px rgba(47, 47, 47, .16);
  }
}
/* ===== MOBIL – text MARMA přesunutý z hero do headeru ===== */
@media (max-width: 900px) {

  /* Zobraz text vedle loga */
  .brand-copy {
    display: grid;
    gap: .12rem;
    max-width: 190px;
    line-height: 1.2;
  }

  /* Původní desktopové texty v headeru skryjeme */
  .brand-copy__line {
    display: none;
  }

  /* Mobilní text */
  .brand-copy::before {
    content: "MARMA LIBEREC";
    display: block;
    font-family: var(--font-sans);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .09em;
    color: var(--color-bronze);
  }

  .brand-copy::after {
    content: "ZAKÁZKOVÁ VÝROBA ZE DŘEVA";
    display: block;
    font-family: var(--font-sans);
    font-size: .58rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: .055em;
    color: var(--color-bronze);
  }

  /* Méně mezery mezi logem a textem */
  .brand {
    gap: .65rem;
    min-width: 0;
  }

  /* Hero už tento text nepotřebuje */
  .hero-copy > .eyebrow {
    display: none;
  }

  /* Po odstranění kickeru může hero začít trochu výš */
  .hero-copy {
    padding-top: 2.1rem;
  }
}

