/* Responsive rules for the refinements */

@media (max-width: 1050px) {
  .shop-page-section .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .collection-hero,
  .artist-intro,
  .exhibitions-hero {
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .collection-hero-stack {
    height: 540px;
  }

  .collection-browser {
    grid-template-columns: 1fr;
  }

  .collection-sticky {
    position: static;
  }

  .filter-pills.vertical {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .filter-pills.vertical button {
    width: auto;
    border: 1px solid var(--line);
    padding: 10px 15px;
  }

  .past-feature,
  .venue-inquiry,
  .artist-story {
    grid-template-columns: 1fr;
  }

  .past-feature-copy,
  .venue-inquiry-intro {
    position: static;
  }

  .exhibition-current-card {
    grid-template-columns: 1fr;
  }

  .artist-gallery figure {
    height: 500px;
  }
}

@media (max-width: 760px) {
  .home-latest {
    padding-bottom: 80px;
  }

  .shop-page-section .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-hover-hint {
    display: none;
  }

  .collection-hero,
  .artist-intro {
    padding-top: 50px;
  }

  .collection-hero-stack {
    height: 390px;
  }

  .collection-masonry {
    columns: 2;
  }

  .collection-browser {
    padding-left: 18px;
    padding-right: 18px;
  }

  .collection-item figcaption {
    opacity: 1;
    padding-top: 45px;
  }

  .collection-item figcaption small {
    display: none;
  }

  .exhibitions-hero {
    padding-top: 70px;
    padding-bottom: 70px;
    min-height: 0;
  }

  .exhibitions-hero img {
    height: 420px;
  }

  .vernissage-grid img,
  .vernissage-grid img:nth-child(3n) {
    height: 390px;
  }

  .past-compact {
    grid-template-columns: 1fr;
  }

  .venue-form {
    padding: 28px 18px;
  }

  .artist-portrait-wrap img {
    height: 520px;
  }

  .artist-story {
    gap: 65px;
  }

  .artist-gallery {
    grid-template-columns: 1fr 1fr;
  }

  .artist-gallery figure {
    height: 430px;
  }

  .artist-gallery figure:nth-child(2) {
    margin-top: 0;
  }

  .artist-gallery figure:nth-child(3) {
    grid-column: 1 / -1;
  }

  .social-link {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 480px) {
  .shop-page-section .product-grid {
    grid-template-columns: 1fr;
  }

  .collection-masonry {
    columns: 1;
  }

  .collection-hero-stack {
    height: 320px;
  }

  .collection-hero-stack img:nth-child(3) {
    display: none;
  }

  .vernissage-grid {
    grid-template-columns: 1fr;
  }

  .vernissage-grid img,
  .vernissage-grid img:nth-child(3n) {
    grid-column: auto;
    height: auto;
    max-height: 520px;
  }

  .artist-gallery {
    grid-template-columns: 1fr;
  }

  .artist-gallery figure,
  .artist-gallery figure:nth-child(3) {
    grid-column: auto;
    height: 480px;
  }
}

/* =========================
   Upcoming-Ausstellung
   ========================= */

.upcoming-note {
  margin-top: 58px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 0.35fr 0.65fr;
  gap: 35px;
}

.upcoming-note span {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
}

.upcoming-note p {
  margin: 0;
  color: var(--muted);
  max-width: 700px;
}

@media (max-width: 760px) {
  .upcoming-note {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* =========================
   Allgemeine Mobile-Regeln
   ========================= */

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

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

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  /* Allgemeine Abstände */

  .section,
  .closing-cta,
  .artist-intro,
  .artist-story,
  .commissions-hero,
  .commission-form-wrap {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Überschriften */

  h1 {
    font-size: clamp(2.2rem, 10vw, 3.6rem);
    line-height: 0.98;
    overflow-wrap: anywhere;
  }

  h2 {
    font-size: clamp(1.8rem, 8vw, 2.8rem);
    line-height: 1.05;
  }

  h3 {
    font-size: 1.25rem;
  }

  p {
    line-height: 1.55;
  }

  /* Header */

  .header-inner {
    padding: 14px 18px;
  }

  .brand {
    font-size: 1.25rem;
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .header-actions {
    gap: 8px;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
  }

  /* Startseiten-Hero */

  .hero {
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-height: auto;
    padding: 40px 20px 30px;
  }

  .hero-copy,
  .hero-art {
    width: 100%;
    max-width: none;
  }

  .hero-actions-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .hero-actions-row .btn {
    width: 100%;
    text-align: center;
  }

  .hero-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-art {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .hero-main {
    grid-column: 1 / -1;
  }

  .hero-main img,
  .hero-small img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .art-note {
    position: static;
    grid-column: 1 / -1;
    margin-top: 5px;
  }

  /* =========================================
     Laufband auf Tablet und Handy
     ========================================= */

  .marquee {
    width: 100%;
    overflow: hidden;
  }

  .marquee-track {
    display: flex !important;
    width: max-content !important;
    min-width: max-content !important;
    gap: 0 !important;
    will-change: transform;

    /* Auf dem Handy schneller als auf dem PC */
    animation: bucks-marquee-infinite 16s linear infinite !important;
  }

  .marquee .marquee-group,
  .marquee .marquee-group[aria-hidden="true"] {
    display: flex !important;
    visibility: visible !important;

    flex: 0 0 auto !important;
    width: max-content !important;
    min-width: max-content !important;

    justify-content: flex-start !important;
    align-items: center !important;

    /* Kleiner Abstand zwischen Text und Stern */
    gap: 4px !important;

    padding: 0 10px !important;
    box-sizing: border-box;
    white-space: nowrap;
  }

  .marquee .marquee-group span {
    flex: 0 0 auto;
    padding: 18px 5px !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.12em;
    white-space: nowrap;
  }

  .marquee .marquee-group i {
    flex: 0 0 auto;
    padding: 0 1px !important;
    font-style: normal;
  }

  /* Produktbereich */

  .section-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .product-card {
    width: 100%;
    min-width: 0;
  }

  .product-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
  }

  /* Über-mich-Seite */

  .artist-intro,
  .artist-story {
    display: flex;
    flex-direction: column;
    gap: 30px;
  }

  .artist-portrait-wrap,
  .artist-intro-copy,
  .artist-story-copy {
    width: 100%;
  }

  .artist-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Auftragsarbeiten */

  .commissions-hero {
    display: flex;
    flex-direction: column;
    gap: 30px;
  }

  .commissions-hero-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .commission-process {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .form-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .form-grid .full {
    grid-column: auto;
  }

  /* Footer */

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px 20px;
  }

  .footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  /* Warenkorb und Wunschliste */

  .drawer {
    width: min(100%, 420px);
  }

  /* Buttons */

  .btn {
    min-height: 48px;
    padding: 14px 18px;
  }

  /* Abschlussbereich Startseite */

  .closing-cta,
  .home-closing {
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 60px 20px;
    overflow: visible;
  }

  .closing-cta h2,
  .home-closing h2 {
    width: 100%;
    max-width: 100%;
    margin: 0 0 28px;
    font-size: clamp(2rem, 10vw, 3rem);
    line-height: 1.08;
    white-space: normal;
    overflow: visible;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .closing-cta > div,
  .home-closing > div {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .closing-cta .btn,
  .home-closing .btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 430px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .commissions-hero-images {
    grid-template-columns: 1fr;
  }

  .hero-art {
    grid-template-columns: 1fr;
  }

  .hero-main,
  .art-note {
    grid-column: auto;
  }
}

/* Animationen bei entsprechender Geräteeinstellung deaktivieren */

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none !important;
  }

  .product-hover-hint,
  .collection-item img {
    transition: none;
  }
}