/* ============================================================
   reset & base
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  /* Kein "scroll-behavior: smooth": das verzoegert bei Seitenwechseln
     (Kategorie-Filter, Paginierung) den Sprung zum Anker um ~1 Sekunde.
     Ohne smooth springt der Browser sofort und zuverlaessig zum Ziel. */
}

/* Sprungziele etwas tiefer ansetzen, damit die fixe Navigation (64px hoch)
   den Anfang des Bereichs nicht ueberdeckt. Gilt fuer alle Anker-Links. */
#kategorien,
#produkte,
#suche {
  scroll-margin-top: 72px;
}

body {
  font-family:
    "Space Grotesk",
    system-ui,
    -apple-system,
    sans-serif;
  background: #fff;
  color: #000;
  text-transform: lowercase;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button,
input {
  font-family: inherit;
  font-size: inherit;
  text-transform: lowercase;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
}

/* ============================================================
   layout helpers
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-align: center;
  padding: 48px 0 28px;
  color: #000;
}

/* Kurze, feine Linie ueber dem Label als ruhiger "Section-Marker".
   currentColor -> uebernimmt automatisch die Textfarbe (schwarz oder weiss). */
.section-label::before {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  margin: 0 auto 16px;
  background: currentColor;
  opacity: 0.85;
}

.section-label--light {
  color: #fff;
}

/* ============================================================
   buttons
   ============================================================ */
.btn {
  display: inline-block;
  font-size: 16px;
  text-align: center;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}

.btn--dark {
  border-color: #fff;
  color: #fff;
}

/* ============================================================
   nav
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 24px;
  height: 64px;
}

/* Schwarzer Verlauf hinter der Navigation: oben deckend,
   faded etwa auf Hoehe des Nav-Textes komplett aus.
   So bleibt die weisse Schrift immer lesbar. */
.nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.65) 0%,
    rgba(0, 0, 0, 0.6) 20%,
    rgba(0, 0, 0, 0.5) 38%,
    rgba(0, 0, 0, 0.35) 55%,
    rgba(0, 0, 0, 0.18) 72%,
    rgba(0, 0, 0, 0.07) 86%,
    rgba(0, 0, 0, 0) 100%
  );
}

.nav__logo {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 9px;
}

/* Bildmarke (Dreieck) – gibt die Hoehe vor. */
.nav__logo-mark {
  height: 38px;
  width: auto;
  object-fit: contain;
}

/* Wortmarke "arctic" rechts daneben – kleiner, optisch mittig ausgerichtet. */
.nav__logo-text {
  height: 13px;
  width: auto;
  object-fit: contain;
}

.nav__actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav__action {
  font-size: 16px;
  color: #fff;
}

/* Aktiver Nav-Link: unterstrichen, damit man sieht, auf welcher Seite man ist.
   text-underline-offset schiebt die Linie etwas nach unten (besser lesbar). */
.nav__action--active {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.nav__cart {
  display: flex;
  align-items: center;
}

.shopping-cart-icon {
  height: 16px;
  /* Feste Breite per Seitenverhaeltnis – sonst greift die globale Regel
     img { width: 100% } und das Icon wird auf schmalen Screens viel zu breit. */
  width: auto;
}
/* ============================================================
   hero
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 480px;
  overflow: hidden;
}

/* Zentrierte Hero-Gruppe: Titel + Unterzeile + Buttons als ein Block,
   genau in der Mitte des Videos.
   WICHTIG: Wir zentrieren mit Flexbox (inset: 0) und NICHT mit "transform".
   "transform" wuerde einen eigenen Stacking-Context erzeugen, wodurch
   mix-blend-mode: difference nicht mehr mit dem Video dahinter mischt. */
.hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* flex-end: Gruppe am unteren Rand ausrichten, padding-bottom schiebt
     sie ins untere Drittel statt ganz ans Ende. */
  justify-content: flex-end;
  text-align: center;
  gap: 26px;
  padding: 0 24px 18vh;
}

/* Grosser Hero-Titel. Weiss + difference-Modus = invertiert automatisch
   je nach hellem/dunklem Videohintergrund. */
.hero__statement {
  margin: 0;
  color: #fff;
  mix-blend-mode: difference;
  font-size: clamp(2.75rem, 11vw, 9rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.03em;
}

/* Kurze Unterzeile unter dem Titel. */
.hero__subline {
  margin: 0;
  color: #fff;
  mix-blend-mode: difference;
  font-size: clamp(0.95rem, 1.6vw, 1.3rem);
  letter-spacing: 0.02em;
  max-width: 34ch;
}

.hero__credit {
  position: absolute;
  bottom: 12px;
  right: 16px;
  font-size: 10px;
  color: #fff;
  opacity: 0.5;
  mix-blend-mode: difference;
  letter-spacing: 0.03em;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Die zwei CTA-Buttons liegen jetzt zentriert nebeneinander unter der
   Unterzeile (Teil der hero__content-Gruppe). */
.hero__buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
}

/* Gemeinsame Basis für beide Hero-Buttons: difference-Modus invertiert
   Farben automatisch je nach Videohintergrund (hell/dunkel). */
.hero__buttons .btn {
  font-size: 16px;
  padding: 11px 28px;
  mix-blend-mode: difference;
}

/* "shop now" – primär: schwarz gefüllt, maximaler Kontrast. */
.hero__buttons a:first-child {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* "new arrivals" – sekundär: weiss gefüllt, weniger Gewicht. */
.hero__buttons a:last-child {
  background: #fff;
  color: #000;
  border-color: #fff;
  font-size: 14px;
  padding: 9px 24px;
}

/* ============================================================
   find your gear
   ============================================================ */
.find-gear {
  padding-bottom: 48px;
}

.find-gear__search-wrap {
  max-width: 480px;
  margin: 0 auto 16px;
  padding: 0 24px;
}

.find-gear__search {
  display: flex;
  align-items: center;
  border: 1px solid #000;
  border-radius: 999px;
  padding: 8px 16px;
  gap: 8px;
}

.find-gear__input {
  flex: 1;
  font-size: 12px;
  color: #000;
}

.find-gear__input::placeholder {
  color: #999;
}

.find-gear__btn {
  display: flex;
  align-items: center;
  padding: 0;
  color: #000;
}

.find-gear__filters {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto 24px;
}

.find-gear__filter-icon {
  display: flex;
  align-items: center;
  color: #000;
  padding: 4px;
}

.find-gear__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  border: 1px solid #ccc;
  border-radius: 999px;
  padding: 4px 12px;
  color: #555;
}

/* product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-card__img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.product-card__placeholder {
  width: 100%;
  height: 100%;
  background: #fff;
}

.product-card__name {
  font-size: 11px;
  color: #000;
}

.product-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-card__price {
  font-size: 11px;
  color: #555;
}

.product-card__farben {
  display: flex;
  gap: 4px;
}

.product-card__farbkreis {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

/* ============================================================
   categories
   ============================================================ */
.categories {
  background: #111;
  padding-top: 24px;
  padding-bottom: 24px;
}

/* Suchleiste liegt jetzt im dunklen Kategorien-Abschnitt: weisse Linie und
   Schrift, damit sie auf dem dunklen Hintergrund (#111) gut lesbar ist. */
.categories .find-gear__search-wrap {
  margin-top: 28px;
  margin-bottom: 0;
}

.categories .find-gear__search {
  border-color: #fff;
}

.categories .find-gear__input,
.categories .find-gear__btn {
  color: #fff;
}

.categories .find-gear__input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* Der weisse Produkt-Abschnitt hat keine Ueberschrift mehr -> etwas
   Innenabstand oben, damit das Grid nicht direkt am dunklen Abschnitt klebt. */
#produkte {
  padding-top: 40px;
}

/* Hinweiszeile ueber dem Grid, wenn nach Kategorie gefiltert wird */
.find-gear__filter {
  font-size: 13px;
  margin-bottom: 16px;
}

.find-gear__leer {
  font-size: 14px;
  color: #555;
}

/* Seiten-Navigation (Paginierung) unter dem Produktgrid */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.pagination__link {
  border: 1px solid #111;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  color: #111;
  text-decoration: none;
}

.pagination__link:hover {
  background: #111;
  color: #fff;
}

.pagination__info {
  font-size: 13px;
  color: #555;
}

.categories__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.categories__tile {
  position: relative;
  overflow: hidden;
  aspect-ratio: 5 / 2;
  display: block;
}

.categories__tile img {
  filter: grayscale(100%) brightness(0.55);
  transition: transform 0.4s ease;
}

.categories__tile:hover img {
  transform: scale(1.04);
}

.categories__label {
  position: absolute;
  bottom: 16px;
  left: 16px;
  font-size: 12px;
  color: #fff;
}

/* Hinweis: Die Styles fuer das Snowboarder-Minispiel liegen jetzt in
   assets/css/game.css und werden nur auf der Startseite geladen. */

/* ============================================================
   join the club
   ============================================================ */
.join {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.join__bg {
  position: absolute;
  inset: 0;
  filter: grayscale(100%) brightness(0.45);
}

.join__content {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 48px 40px;
  gap: 40px;
}

.join__heading {
  font-size: clamp(18px, 3vw, 28px);
  color: #fff;
  white-space: nowrap;
}

/* Kurzer Erklaertext unter der Ueberschrift "join the club". */
.join__subline {
  font-size: 14px;
  color: #ddd;
  margin-top: 8px;
  max-width: 420px;
}

.join__form {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.join__input {
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  padding: 6px 0;
  font-size: 12px;
  color: #fff;
  background: transparent;
  width: 220px;
}

.join__input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================================
   footer
   ============================================================ */
.footer {
  background: #000;
  padding: 24px 0 36px;
  color: #fff;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__brand {
  height: 72px;
  display: flex;
  align-items: center;
}

.footer__logo-img {
  height: 52px;
  width: auto;
  /* Seitenverhaeltnis der Logo-SVG fest angeben. Die SVG hat nur eine
     viewBox (keine width/height), darum kennt der Browser die Breite sonst
     erst nach dem Laden -> kurzzeitig 0 Pixel breit. Mit aspect-ratio steht
     die Breite sofort fest und das Logo wird zuverlaessig angezeigt. */
  aspect-ratio: 63.55 / 73.93;
  object-fit: contain;
}

.footer__legal {
  font-size: 11px;
  color: #555;
}

.footer__links {
  display: flex;
  gap: 28px;
  margin-bottom: 20px;
}

.footer__social {
  display: flex;
  align-items: right;
  gap: 14px;
}

.footer__social a {
  display: flex;
  align-items: right;
  color: #000;
}

.footer__copy {
  font-size: 10px;
  text-align: center;
  color: #555;
  margin-top: 10px;
}

/* Hinweiszeile (Schulprojekt) + Namen, mittig unter der Hauptzeile.
   Duenne Trennlinie oben grenzt sie vom Rest des Footers ab. */
.footer__bottom {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #222;
  text-align: center;
}

.footer__disclaimer {
  font-size: 11px;
  color: #888;
}

.footer__team {
  font-size: 11px;
  color: #555;
  margin-top: 6px;
}

/* ============================================================
   responsive — 768px
   ============================================================ */
@media (max-width: 768px) {
  /* Auf Mobile das Logo nach links und die Aktionen nach rechts schieben
     (statt Logo zentriert). So entsteht Platz, damit "new arrivals"
     neben "search" und Warenkorb in die Leiste passt. */
  .nav {
    display: flex;
    align-items: center;
  }

  /* Auf dem schmalen Handy nur die Bildmarke zeigen (Wortmarke ausblenden),
     damit genug Platz fuer "new arrivals" + "search" + Warenkorb bleibt. */
  .nav__logo-text {
    display: none;
  }

  /* Aktionen nach rechts schieben; Schrift und Abstaende etwas kleiner,
     damit alles nebeneinander passt. */
  .nav__actions {
    margin-left: auto;
    gap: 10px;
  }

  .nav__action {
    font-size: 14px;
  }

  .nav .btn {
    font-size: 14px;
    padding: 6px 14px;
  }

  .hero {
    height: 100svh;
    min-height: 480px;
  }

  .hero__content {
    gap: 18px;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .categories__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .categories__tile {
    aspect-ratio: 3 / 2;
  }

  .join__content {
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 24px;
    gap: 24px;
  }

  .join__form {
    align-items: flex-start;
  }

  .join__input {
    width: 100%;
    min-width: 200px;
  }

  .footer__inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  /* Auf Mobile ist das Bild full-width gestapelt – 3/4 waere zu hoch. */
  .product__main-img {
    aspect-ratio: 3 / 2;
  }

}


/* ============================================================
   Produktkarten als Link (Bild + Hover)
   ============================================================ */
.product-card {
  text-decoration: none;
  color: inherit;
}

.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  display: block;
}

/* ============================================================
   Lade-Spinner fuer Produktbilder aus der Datenbank
   ============================================================ */
.bild-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  z-index: 2;
}

.bild-spinner::after {
  content: "";
  width: 28px;
  height: 28px;
  border: 3px solid #e0e0e0;
  border-top-color: #1a1a1a;
  border-radius: 50%;
  animation: bild-spin 0.8s linear infinite;
}

@keyframes bild-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   Hero mit Seitentitel (new-arrivals.php)
   ============================================================ */
.hero--page {
  position: relative;
}

.hero__title-box {
  position: absolute;
  left: 40px;
  bottom: 40px;
  color: #000;
}

.hero__title {
  font-size: clamp(32px, 6vw, 64px);
  font-weight: 700;
  color: #000;
}

.hero__subtitle {
  font-size: 14px;
  color: #000;
}

/* ============================================================
   Newsletter-Meldungen (index.php)
   ============================================================ */
.join__message {
  font-size: 13px;
  margin-bottom: 12px;
  color: #fff;
}

.join__message--ok {
  color: #6fcf97;
}

.join__message--error {
  color: #eb5757;
}

.join__js-error {
  font-size: 12px;
  color: #eb5757;
  margin-top: 8px;
}

/* ============================================================
   Produktdetailseite (product.php)
   ============================================================ */
.product {
  padding-top: 100px;
  padding-bottom: 60px;
}

.product__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-start;
}

/* Bild und Infoblock teilen sich den Platz, solange je mindestens 340px
   vorhanden sind. Darunter bricht flex-wrap um: Bild oben, Text unten. */
.product__gallery,
.product__info {
  flex: 1 1 340px;
  min-width: 0;
}

/* Zurueck-Button oben links ueber dem Produktfoto. */
.product__back {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: #555;
  text-decoration: none;
}

.product__back:hover {
  color: #000;
  text-decoration: underline;
}

.product__main-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 60vh;
  overflow: hidden;
  background: #fff;
}

.product__main-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.product__thumb {
  width: 70px;
  height: 90px;
  object-fit: contain;
  cursor: pointer;
}

.product__name {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.product__price {
  font-size: 18px;
  color: #555;
  margin-bottom: 24px;
}

.product__desc {
  font-size: 14px;
  color: #333;
  margin-bottom: 24px;
}

.product__release {
  font-size: 13px;
  color: #888;
  margin-bottom: 24px;
}

.product__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #999;
  margin: 20px 0 10px;
}

.product__features {
  list-style: none;
  padding: 0;
  font-size: 13px;
  color: #333;
}

.product__features li {
  padding: 4px 0;
  border-bottom: 1px solid #eee;
}

.product__sizes,
.product__colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product__size,
.product__color {
  border: 1px solid #ccc;
  padding: 8px 14px;
  font-size: 12px;
  /* Da es jetzt echte <button> sind: Standard-Aussehen zuruecksetzen */
  background: #fff;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
}

/* Der aktuell gewaehlte Groessen-/Farb-Button (nur einer pro Gruppe) */
.product__size.is-active,
.product__color.is-active {
  border-color: #000;
  background: #000;
  color: #fff;
}

.product__size {
  border-radius: 999px;
  text-transform: uppercase;
}

.product__farbkreis {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 0;
  cursor: pointer;
}

/* Der gewaehlte Farbkreis bekommt einen schwarzen Ring */
.product__farbkreis.is-active {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.product__buy {
  margin-top: 32px;
  display: inline-block;
}

.product__notfound {
  font-size: 18px;
  padding: 80px 24px 24px;
  text-align: center;
}

/* Aktions-Block: Add-to-cart, Size Guide, Trust Badges */
.product__actions {
  margin-top: 32px;
}

.product__add-to-cart {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  cursor: pointer;
  text-align: center;
}

.product__glacier-note {
  font-size: 11px;
  color: #888;
  text-align: center;
  margin-top: 8px;
}

.product__size-guide {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: #333;
  border-bottom: 1px solid #333;
}

.product__trust {
  list-style: none;
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product__trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #555;
}

.product__trust-item svg {
  flex-shrink: 0;
}

/* ============================================================
   Scroll-Animation: Elemente gleiten beim Scrollen herein
   ============================================================ */

/* Startzustand: unsichtbar und 50px nach unten verschoben. */
.einblenden {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  transition-delay: 0.15s;
}

/* Endzustand: voll sichtbar und an der richtigen Position.
   Die Klasse "sichtbar" wird per JavaScript hinzugefügt. */
.einblenden.sichtbar {
  opacity: 1;
  transform: translateY(0);
}

/* Gestaffelte Verzögerungen für den Hero-Bereich:
   Titel, Untertitel und Buttons erscheinen nacheinander. */
.einblenden--delay-1 { transition-delay: 0.3s; }
.einblenden--delay-2 { transition-delay: 0.5s; }
.einblenden--delay-3 { transition-delay: 0.7s; }

/* ============================================================
   Gletscher-Schutz-Banner (index.php, zwischen Grid und Game)
   ============================================================ */
.gletscher {
  background: #000;
  padding: 28px 24px;
  text-align: center;
}

.gletscher__text {
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.04em;
  opacity: 0.85;
}
