/* === Design System: Antike Türbeschläge === */

:root {
  /* Brand colors */
  --color-primary: #a1b300;
  --color-primary-dark: #7a8800;
  --color-primary-light: #ecf0cc;

  /* Neutrals */
  --color-text: #2d2d2d;
  --color-text-light: #555;
  --color-text-muted: #777;
  --color-border: #ddd;
  --color-bg: #fff;
  --color-bg-alt: #f8f8f6;
  --color-bg-dark: #2d2d2d;

  /* Typography */
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Layout */
  --max-width: 72rem;
  --content-padding: var(--space-lg);

  /* Misc */
  --radius: 4px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.12);
  --transition: 0.2s ease;
}

/* === Reset === */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* === Base === */

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--color-primary-dark);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-primary);
}

/* === Typography === */

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--color-text);
  line-height: 1.3;
}

h1 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-md);
}

/* === Layout === */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--content-padding);
}

main {
  flex: 1;
}

/* === Header / Navigation === */

.site-header {
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: var(--space-sm);
}

.site-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-text);
  white-space: nowrap;
}

.site-title:hover {
  color: var(--color-primary-dark);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-xs) var(--space-sm);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.site-nav {
  display: flex;
  gap: var(--space-xs);
  list-style: none;
  flex-wrap: wrap;
}

.site-nav a {
  display: block;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius);
  color: var(--color-text-light);
  font-size: 0.9rem;
  transition: background var(--transition), color var(--transition);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--color-primary);
  color: #fff;
}

@media (max-width: 48rem) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-bottom: var(--space-sm);
  }

  .site-nav.open {
    display: flex;
  }

  .site-header .container {
    flex-wrap: wrap;
  }
}

/* === Footer === */

.site-footer {
  background: var(--color-bg-dark);
  color: #ccc;
  padding: var(--space-xl) 0;
  margin-top: var(--space-3xl);
  font-size: 0.85rem;
  text-align: center;
}

.site-footer a {
  color: var(--color-primary);
}

.site-footer a:hover {
  color: var(--color-primary-light);
}

.footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-top: var(--space-sm);
}

/* === Page Header / Hero === */

.page-header {
  background: var(--color-bg-alt);
  padding: var(--space-2xl) 0;
  margin-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
  margin-bottom: var(--space-sm);
}

.page-header p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 0;
}

/* === Product Grid (Overview Pages) === */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.product-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  background: var(--color-bg);
}

.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.product-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  filter: sepia(0.08) saturate(1.1);
  transition: var(--transition);
}

.product-card img:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
  filter: sepia(0) saturate(1.15);
}

.product-card-body {
  padding: var(--space-md);
}

.product-card-body h3 {
  font-size: 0.95rem;
  margin-bottom: var(--space-xs);
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.product-card-body h3 a {
  color: var(--color-text);
}

.product-card-body h3 a:hover {
  color: var(--color-primary-dark);
}

.product-card-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.product-card-price {
  font-weight: bold;
  color: var(--color-primary-dark);
  font-size: 1rem;
  margin-top: var(--space-xs);
}

/* === Product Detail Page === */

.product-detail {
  padding: var(--space-2xl) 0;
}

.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

@media (max-width: 48rem) {
  .product-layout {
    grid-template-columns: 1fr;
  }
}

.product-images {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.product-images picture img,
.product-images img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  filter: sepia(0.08) saturate(1.1);
}

.product-info h1 {
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: var(--space-sm);
}

.product-description {
  margin: var(--space-lg) 0;
  line-height: 1.7;
}

/* Detail table */
.detail-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
}

.detail-table tr {
  border-bottom: 1px solid var(--color-border);
}

.detail-table th {
  text-align: left;
  padding: var(--space-sm) var(--space-md) var(--space-sm) 0;
  color: var(--color-text-light);
  font-weight: 600;
  white-space: nowrap;
  width: 40%;
}

.detail-table td {
  padding: var(--space-sm) 0;
}

.price-tag {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--color-primary-dark);
  margin: var(--space-lg) 0;
}

/* CTA Button */
.btn {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  transition: background var(--transition);
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

/* Breadcrumb */
.breadcrumb {
  list-style: none;
  display: flex;
  gap: var(--space-xs);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.breadcrumb li + li::before {
  content: "›";
  margin-right: var(--space-xs);
}

/* === Startpage === */

.hero {
  position: relative;
  padding: 0;
  text-align: center;
  border-bottom: 2px solid var(--color-primary);
  overflow: hidden;
  height: clamp(200px, 25vw, 400px);
}

.hero-bg {
  position: absolute;
  inset: 0;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0.45));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  max-width: 40rem;
  margin-inline: auto;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--space-xl);
  margin: var(--space-2xl) 0;
}

.section-card {
  text-align: center;
  padding: var(--space-xl);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: box-shadow var(--transition), border-color var(--transition);
  overflow: hidden;
}

.section-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--color-primary);
}

.section-card h2 {
  font-size: 1.2rem;
  margin-bottom: var(--space-sm);
}

.section-card p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.cross-link {
  margin-top: var(--space-2xl);
  padding: var(--space-lg);
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  border-left: 4px solid var(--color-primary);
}

/* === Content Sections (Landingpages) === */

.content-section {
  margin: var(--space-3xl) 0;
}

.content-section h2 {
  margin-bottom: var(--space-lg);
}

.content-section h3 {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}

.content-section .product-card-body h3 {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.content-image img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  filter: sepia(0.08) saturate(1.1);
  transition: var(--transition);
}

.content-image img:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
  filter: sepia(0) saturate(1.15);
}

.content-text ul {
  margin: var(--space-md) 0;
  padding-left: var(--space-lg);
}

.content-text li {
  margin-bottom: var(--space-sm);
}

.cta-center {
  text-align: center;
  margin-top: var(--space-xl);
}

@media (min-width: 768px) {
  .content-layout {
    grid-template-columns: 1fr 2fr;
  }
  .content-layout--reverse {
    grid-template-columns: 2fr 1fr;
  }
  .content-layout--reverse .content-image {
    order: 2;
  }
  .content-layout--reverse .content-text {
    order: 1;
  }
}

/* === Utility === */

.text-center {
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* === Ratgeber Technik === */

.toc-list {
  list-style: none;
  margin: var(--space-lg) 0 var(--space-2xl);
  padding: var(--space-lg);
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  border-left: 4px solid var(--color-primary);
}

.toc-list li {
  margin-bottom: var(--space-sm);
}

.toc-list li:last-child {
  margin-bottom: 0;
}

.tech-section {
  margin-bottom: var(--space-3xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.tech-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-xl);
  margin-top: var(--space-lg);
  align-items: start;
}

@media (max-width: 48rem) {
  .tech-layout {
    grid-template-columns: 1fr;
  }
}

.tech-image img {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  padding: var(--space-sm);
}

.tech-text h3 {
  margin-top: var(--space-lg);
}

.tech-text h3:first-child {
  margin-top: 0;
}

.tech-text h4 {
  font-size: 1rem;
  margin: var(--space-md) 0 var(--space-sm);
  color: var(--color-primary-dark);
}

/* === Content Pages (Impressum, Datenschutz) === */

.content-page {
  padding: var(--space-2xl) var(--content-padding);
  max-width: 52rem;
}

.content-page h2 {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.content-page h2:first-of-type {
  margin-top: var(--space-xl);
  padding-top: 0;
  border-top: none;
}

.content-page ul {
  margin: var(--space-md) 0;
  padding-left: var(--space-xl);
}

.content-page li {
  margin-bottom: var(--space-xs);
}
