@charset "UTF-8";
/* =========================================================
   MARGREITER TECHNIK – ECWID / LIGHTSPEED CUSTOM CSS
   Version 2.0
   Ziele:
   - stabile Layouts / CLS-Optimierung
   - responsive Darstellung
   - Core-Web-Vitals-freundlich
   - geringe CSS-Konflikte mit Ecwid
   - saubere Produkt-, Marken- und Tabellenlayouts
   - SEO/GEO-freundliche Darstellung ohne versteckte Inhalte
========================================================= */
/* =========================================================
   01. DESIGN-VARIABLEN
========================================================= */
:root {
  --mt-text: #333333;
  --mt-text-light: #555555;
  --mt-border: #e5e7eb;
  --mt-border-light: #eaeaea;
  --mt-bg: #ffffff;
  --mt-bg-light: #f7f7f7;
  --mt-bg-table: #f9fafb;
  --mt-hover-bg: rgba(164, 188, 215, 0.50);
  --mt-hover-shadow: rgba(0, 0, 0, 0.08);
  --mt-radius: 6px;
  --mt-radius-large: 12px;
  --mt-transition-fast: 0.15s ease;
  --mt-transition: 0.25s ease;
}

/* =========================================================
   02. BASIS / LAYOUT-STABILITÄT
========================================================= */
/*
   box-sizing nur für eigene Inhaltsmodule.
   Dadurch werden Ecwid-Core-Elemente nicht unnötig verändert.
*/
.cat-hero *,
.brand-grid *,
.product-grid-2 *,
.product-grid-3 *,
.contact-grid *,
.model-grid *,
.accessory-grid *,
.clamp-spec-grid * {
  box-sizing: border-box;
}

/*
   Verhindert, dass Grid-Inhalte ihre Spaltenbreite sprengen.
*/
.cat-hero-inner > *,
.brand-grid > *,
.product-grid-2 > *,
.product-grid-3 > *,
.contact-grid > *,
.model-grid > *,
.accessory-grid > *,
.clamp-spec-grid > * {
  min-width: 0;
}

/* =========================================================
   03. TYPOGRAFIE / ÜBERSCHRIFTEN
========================================================= */
/*
   Einheitliche vertikale Abstände.
   Die alten doppelten h2/h3/h4-Regeln wurden entfernt.
*/
.ec-store h1,
.ec-store h2 {
  margin-top: 45px !important;
  margin-bottom: 25px !important;
}

.ec-store h3,
.ec-store h4 {
  margin-top: 25px !important;
  margin-bottom: 25px !important;
}

/*
   Überschriften innerhalb von Karten benötigen
   bewusst kleinere Abstände.
*/
.ec-store .product-card-compact h4 {
  margin-top: 8px !important;
  margin-bottom: 8px !important;
}

.ec-store .model-card h3 {
  margin-top: 0 !important;
  margin-bottom: 8px !important;
}

/* =========================================================
   04. ECWID KATEGORIE-SEITE
========================================================= */
.ec-store.ec-store__category-page {
  padding-top: 40px;
}

/* =========================================================
   05. HERO
========================================================= */
.cat-hero {
  margin-bottom: 40px;
}

.cat-hero-inner {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

/*
   1:1 reserviert die Bildfläche bereits vor dem Laden.
   Das reduziert Layout-Verschiebungen (CLS).
*/
.cat-hero-image {
  width: 100%;
}

.cat-hero-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: 0;
}

/* =========================================================
   06. BRAND / MARKEN GRID
========================================================= */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 25px;
  align-items: stretch;
}

.brand-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
}

.brand-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: 0 auto;
}

/* =========================================================
   07. 2-SPALTEN PRODUKT-GRID
========================================================= */
.product-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  margin-top: 25px;
}

/* =========================================================
   08. 3-SPALTEN PRODUKT-GRID
========================================================= */
/*
   Bewusst deterministisch:

   Desktop:    3 Spalten
   Tablet:     2 Spalten
   Smartphone: 1 Spalte

   Dadurch gibt es keine unerwarteten Änderungen durch auto-fit.
*/
.product-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  margin-top: 25px;
  align-items: stretch;
}

/* =========================================================
   09. PRODUKTKARTEN
========================================================= */
.product-card-compact {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  text-align: center;
  padding: 14px;
  border: 1px solid var(--mt-border-light);
  border-radius: var(--mt-radius);
  background: var(--mt-bg);
  transition: transform var(--mt-transition), box-shadow var(--mt-transition);
}

/*
   Feste Bildfläche reduziert CLS.
   Unterschiedliche Bildformate werden mit object-fit
   sauber in den Bereich eingepasst.
*/
.product-card-compact img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: 0 auto 10px;
}

.product-card-compact h4 {
  font-size: 16px;
  line-height: 1.35;
}

.product-card-compact ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.product-card-compact ul li {
  margin-bottom: 4px;
}

.product-card-compact ul li:last-child {
  margin-bottom: 0;
}

/* =========================================================
   10. TABELLEN
========================================================= */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--mt-bg);
}

.spec-table th,
.spec-table td {
  padding-top: 18px;
  padding-bottom: 18px;
  border: 1px solid #dddddd;
  vertical-align: middle;
}

/* Erste Spalte kompakter */
.spec-table th:first-child,
.spec-table td:first-child {
  padding-left: 18px;
  padding-right: 18px;
}

/* Weitere Spalten */
.spec-table th:not(:first-child),
.spec-table td:not(:first-child) {
  padding-left: 24px;
  padding-right: 24px;
}

/* =========================================================
   11. TABELLEN INNERHALB VON PRODUKTKARTEN
========================================================= */
.product-card-compact .centered-card-table {
  display: flex;
  justify-content: center;
  width: 100%;
  min-width: 0;
}

.product-card-compact .centered-card-table .spec-table {
  width: auto;
  min-width: 80%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   12. KONTAKT GRID
========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
  margin-top: 20px;
}

.contact-card {
  height: 100%;
  padding: 18px;
  background: var(--mt-bg-light);
  border-radius: var(--mt-radius);
}

/* =========================================================
   13. MODELL GRID
========================================================= */
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.model-card {
  height: 100%;
  padding: 18px;
  border: 1px solid #e0e0e0;
  border-radius: var(--mt-radius);
  background: var(--mt-bg);
  transition: transform var(--mt-transition-fast), box-shadow var(--mt-transition-fast);
}

.model-card h3 {
  font-size: 1.1em;
}

.model-info {
  font-size: 0.95em;
  color: var(--mt-text-light);
}

/* =========================================================
   14. ZUBEHÖR GRID
========================================================= */
.accessory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 50px;
  margin-top: 30px;
}

/* =========================================================
   15. KLAMMER / SPEZIFIKATIONS-GRID
========================================================= */
.clamp-spec-grid {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin: 24px 0;
}

.clamp-spec-image {
  width: 100%;
}

.clamp-spec-image img {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: var(--mt-radius-large);
  margin: 0;
}

.clamp-spec-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--mt-bg);
}

.clamp-spec-table th,
.clamp-spec-table td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--mt-border);
}

.clamp-spec-table th {
  width: 220px;
  font-weight: 600;
  background: var(--mt-bg-table);
}

/* =========================================================
   16. MARKENAUSWAHL / AVAILABLE CLIPS
========================================================= */
.available-clips.product-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

/*
   Einheitliche reservierte Bildfläche:
   kein max-width:50% mehr, da dies Bilder bei kleineren
   Karten unnötig verkleinern konnte.
*/
.available-clips.product-grid-3
.product-card-compact img {
  display: block;
  width: 200px;
  max-width: 100%;
  height: 200px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: 0 auto 12px;
}

/* =========================================================
   17. LIGHTBOX
========================================================= */
.custom-lightbox-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  overscroll-behavior: contain;
}

.custom-lightbox-image {
  display: block;
  max-width: 90%;
  max-height: 90%;
  width: auto;
  height: auto;
  border-radius: var(--mt-radius);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

/* =========================================================
   18. KATEGORIE-NAME / BUTTON
========================================================= */
.cat-name {
  display: inline-block;
  padding: 8px 16px;
  color: var(--mt-text);
  background-color: transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: transform var(--mt-transition), background-color var(--mt-transition), box-shadow var(--mt-transition);
}

/* =========================================================
   19. HOVER-EFFEKTE
========================================================= */
/*
   Hover nur auf Geräten, die tatsächlich Hover unterstützen.
   Dadurch keine "hängenden" Hover-Zustände auf Touch-Geräten.
*/
@media (hover: hover) and (pointer: fine) {
  .product-card-compact:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px var(--mt-hover-shadow);
  }
  .model-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px var(--mt-hover-shadow);
  }
  .cat-name:hover {
    transform: scale(1.08);
    background-color: var(--mt-hover-bg);
    box-shadow: 0 4px 10px rgba(164, 188, 215, 0.2);
  }
}

/* =========================================================
   20. BILD-HOVER
========================================================= */
/*
   Nicht mehr global auf alle Ecwid-Bilder.
   Dadurch werden Ecwid UI-Icons, Checkout-Elemente usw.
   nicht versehentlich verändert.
*/
.cat-hero-image img,
.brand-item img,
.product-card-compact img,
.clamp-spec-image img {
  transition: transform var(--mt-transition), filter var(--mt-transition), box-shadow var(--mt-transition);
}

@media (hover: hover) and (pointer: fine) {
  .cat-hero-image img:hover,
.brand-item img:hover,
.product-card-compact img:hover,
.clamp-spec-image img:hover {
    transform: scale(1.03);
    filter: brightness(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  }
}

/* =========================================================
   21. TASTATUR / ACCESSIBILITY
========================================================= */
.cat-name:focus-visible,
.brand-item:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* =========================================================
   22. TABLET
========================================================= */
@media (max-width: 1100px) {
  .product-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================
   23. TABLET / MOBILE
========================================================= */
@media (max-width: 900px) {
  .cat-hero-inner {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .cat-hero-image {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
  .product-grid-2 {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .accessory-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .available-clips.product-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================
   24. MOBILE
========================================================= */
@media (max-width: 700px) {
  /*
     Kleinere Tabellen-Paddings sparen horizontale Breite.
  */
  .spec-table th,
.spec-table td {
    padding: 12px 16px;
  }
  /*
     Tabellen innerhalb von Produktkarten nutzen
     auf Smartphones die volle Breite.
  */
  .product-card-compact
.centered-card-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .product-card-compact
.centered-card-table
.spec-table {
    width: 100%;
    min-width: 0;
  }
}

/* =========================================================
   25. KLEINE SMARTPHONES
========================================================= */
@media (max-width: 640px) {
  .available-clips.product-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .product-grid-3 {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* =========================================================
   26. KLAMMER GRID MOBILE
========================================================= */
@media (max-width: 767px) {
  .clamp-spec-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .clamp-spec-image {
    display: flex;
    justify-content: center;
  }
  .clamp-spec-image img {
    width: 200px;
    max-width: 100%;
  }
  .clamp-spec-table th,
.clamp-spec-table td {
    display: block;
    width: 100%;
  }
  .clamp-spec-table th {
    padding-bottom: 4px;
    border-bottom: 0;
    background: var(--mt-bg-table);
  }
  .clamp-spec-table td {
    padding-top: 4px;
  }
}

/* =========================================================
   27. VERY SMALL MOBILE
========================================================= */
@media (max-width: 480px) {
  .ec-store h1,
.ec-store h2 {
    margin-top: 35px !important;
    margin-bottom: 20px !important;
  }
  .ec-store h3,
.ec-store h4 {
    margin-top: 22px !important;
    margin-bottom: 18px !important;
  }
  .product-card-compact {
    padding: 12px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .model-grid {
    grid-template-columns: 1fr;
  }
  .brand-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

/* =========================================================
   28. REDUCED MOTION / ACCESSIBILITY / PERFORMANCE
========================================================= */
/*
   Nutzer mit deaktivierten Animationen erhalten keine
   unnötigen Bewegungen.

   Gleichzeitig werden Transform-Effekte nicht zur
   Voraussetzung für die Bedienung.
*/
@media (prefers-reduced-motion: reduce) {
  .product-card-compact,
.model-card,
.cat-name,
.cat-hero-image img,
.brand-item img,
.product-card-compact img,
.clamp-spec-image img {
    transition: none !important;
  }
  .product-card-compact:hover,
.model-card:hover,
.cat-name:hover,
.cat-hero-image img:hover,
.brand-item img:hover,
.product-card-compact img:hover,
.clamp-spec-image img:hover {
    transform: none !important;
  }
  /* =========================================================
   29. KATEGORIE LEAD / EINLEITUNG
========================================================= */
  /*
   Für den beschreibenden Untertitel direkt unter dem
   von Ecwid ausgegebenen H1.

   Beispiel:
   <p class="cat-lead">Befestigungsmittel aus Metall ...</p>
*/
  .cat-lead {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.25rem;
    line-height: 1.5;
    font-weight: 500;
    color: var(--mt-text);
  }
  /* Kurze Einleitung unter H2-Überschriften */
  .section-intro {
    max-width: 900px;
    margin-top: -8px;
    margin-bottom: 24px;
    line-height: 1.65;
  }
  /* =========================================================
   30. ÜBERSCHRIFTEN INNERHALB VON PRODUKTKARTEN
========================================================= */
  /*
   Verhindert die großen globalen H3-Abstände innerhalb
   von Karten wie "Warum Margreiter Technik?"
*/
  .ec-store .product-card-compact h3 {
    margin-top: 0 !important;
    margin-bottom: 10px !important;
    font-size: 1.1rem;
    line-height: 1.35;
  }
  /* =========================================================
   31. FACHLICHE AUSWAHLHILFE / CATEGORY GUIDE
========================================================= */
  /*
   Für Abschnitte wie:
   "Welche Heftklammer ist die richtige?"
*/
  .category-guide {
    margin-top: 25px;
    margin-bottom: 35px;
    padding: 24px;
    border: 1px solid var(--mt-border);
    border-radius: var(--mt-radius);
    background: var(--mt-bg);
  }
  .category-guide > :first-child {
    margin-top: 0;
  }
  .category-guide > :last-child {
    margin-bottom: 0;
  }
  /* Tabellen innerhalb der Auswahlhilfe */
  .category-guide .spec-table {
    margin-top: 20px;
  }
  /* =========================================================
   32. ANWENDUNGSBEREICHE / INTERNE KATEGORIE-LINKS
========================================================= */
  /*
   Für SEO/GEO-relevante interne Links auf Unterkategorien.

   Beispiel:
   <div class="category-link-grid">
     <a class="category-link-item" href="...">
       <strong>Verpackung & Kartons</strong>
       <span>Klammern für Kartonverschluss ...</span>
     </a>
   </div>
*/
  .category-link-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 25px;
    margin-bottom: 35px;
  }
  .category-link-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--mt-border);
    border-radius: var(--mt-radius);
    background: var(--mt-bg);
    color: var(--mt-text);
    text-decoration: none;
    transition: transform var(--mt-transition-fast), box-shadow var(--mt-transition-fast), border-color var(--mt-transition-fast);
  }
  .category-link-item strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1rem;
    line-height: 1.35;
  }
  .category-link-item span {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--mt-text-light);
  }
  /* Hover nur auf echten Hover-Geräten */
}

@media (prefers-reduced-motion: reduce) and (hover: hover) and (pointer: fine) {
  .category-link-item:hover {
    transform: translateY(-3px);
    border-color: #cfd4da;
    box-shadow: 0 5px 14px var(--mt-hover-shadow);
  }
}

@media (prefers-reduced-motion: reduce) {
  /* Tastatur-Navigation */
  .category-link-item:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
  }
  /* =========================================================
   33. FAQ
========================================================= */
  /*
   Sichtbare FAQ-Inhalte für Nutzer und Such-/KI-Systeme.

   Beispiel:
   <div class="faq-list">
     <div class="faq-item">
       <h3>Welche Heftklammer passt ...?</h3>
       <p>...</p>
     </div>
   </div>
*/
  .faq-list {
    display: grid;
    gap: 14px;
    margin-top: 25px;
    margin-bottom: 35px;
  }
  .faq-item {
    padding: 20px 22px;
    border: 1px solid var(--mt-border);
    border-radius: var(--mt-radius);
    background: var(--mt-bg);
  }
  .ec-store .faq-item h3 {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
    font-size: 1.05rem;
    line-height: 1.4;
  }
  .faq-item p {
    margin-top: 0;
    margin-bottom: 0;
    line-height: 1.65;
  }
  /* =========================================================
   34. ALLGEMEINE KATEGORIE-ABSCHNITTE
========================================================= */
  /*
   Gleichmäßiger Abstand zwischen größeren Inhaltsblöcken.
   Nur für explizit gekennzeichnete Content-Sektionen,
   damit Ecwid-eigene Bereiche nicht verändert werden.
*/
  .category-content-section {
    margin-top: 45px;
    margin-bottom: 45px;
  }
  .category-content-section > :first-child {
    margin-top: 0 !important;
  }
  .category-content-section > :last-child {
    margin-bottom: 0;
  }
  /* =========================================================
   35. KOMPAKTE VORTEILSKARTEN
========================================================= */
  /*
   Für "Warum Margreiter Technik?".
   Karten bleiben auch bei unterschiedlich langen Texten
   optisch gleichmäßig.
*/
  .product-grid-3 .product-card-compact {
    justify-content: flex-start;
  }
  .product-grid-3 .product-card-compact p:last-child {
    margin-bottom: 0;
  }
  /* =========================================================
   36. MOBILE – NEUE KATEGORIEMODULE
========================================================= */
}

@media (prefers-reduced-motion: reduce) and (max-width: 900px) {
  .category-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 640px) {
  .cat-lead {
    font-size: 1.1rem;
    line-height: 1.5;
  }
  .category-guide {
    padding: 18px;
  }
  .category-link-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .category-link-item {
    padding: 16px;
  }
  .faq-item {
    padding: 16px 18px;
  }
  .category-content-section {
    margin-top: 35px;
    margin-bottom: 35px;
  }
}

@media (prefers-reduced-motion: reduce) {
  /* =========================================================
   37. REDUCED MOTION – NEUE MODULE
========================================================= */
}

@media (prefers-reduced-motion: reduce) and (prefers-reduced-motion: reduce) {
  .category-link-item {
    transition: none !important;
  }
  .category-link-item:hover {
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  /* =========================================================
   38. ANWENDUNGS-TABELLE
========================================================= */
  .application-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background: var(--mt-bg);
  }
  .application-table th,
.application-table td {
    padding: 16px 20px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--mt-border);
  }
  .application-table th {
    font-weight: 600;
    background: var(--mt-bg-table);
  }
  .application-table th:first-child,
.application-table td:first-child {
    width: 34%;
  }
  .application-table th:last-child,
.application-table td:last-child {
    width: 66%;
  }
  .application-table td:first-child a {
    font-weight: 600;
    color: var(--mt-text);
    text-decoration: none;
  }
  .application-table td:first-child a:hover {
    text-decoration: underline;
  }
  /* Mobile */
}

@media (prefers-reduced-motion: reduce) and (max-width: 640px) {
  .application-table {
    table-layout: auto;
  }
  .application-table th,
.application-table td {
    padding: 12px 14px;
  }
  .application-table th:first-child,
.application-table td:first-child {
    width: 42%;
  }
  .application-table th:last-child,
.application-table td:last-child {
    width: 58%;
  }
}
