/* ============================================
   MGH24 REDESIGN - Global Stylesheet
   Modern B2B Industrial E-Commerce Design
   ============================================ */

:root {
  --primary: #c1272d;
  --primary-dark: #a91f24;
  --primary-light: #e63946;
  --bg-light: #fafafa;
  --bg-white: #ffffff;
  --text-dark: #1a1a1a;
  --text-gray: #4a4a4a;
  --border-light: #e8e8e8;
  --success: #2ecc71;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
}

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

html {
  lang: de;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Open Sans', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-white);
  line-height: 1.6;
  font-size: 16px;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header-top {
  background: var(--primary-dark);
  color: white;
  padding: var(--space-sm);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.header-top a {
  color: white;
  text-decoration: none;
}

.header-top a:hover {
  text-decoration: underline;
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -1px;
  text-decoration: none;
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo span {
  font-size: 0.75rem;
  color: var(--text-gray);
  letter-spacing: 2px;
  font-weight: 600;
}

.nav {
  display: none;
  list-style: none;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

@media (min-width: 768px) {
  .nav {
    display: flex;
    gap: var(--space-lg);
  }

  .nav-toggle {
    display: none;
  }

  .nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
  }

  .nav a:hover,
  .nav a:focus {
    color: var(--primary);
    outline: none;
  }
}

.header-main nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-white);
  flex-direction: column;
  padding: var(--space-lg);
  gap: var(--space-md);
  border-bottom: 1px solid var(--border-light);
  width: 100%;
}

.header-main nav.active {
  display: flex;
}

.header-main nav a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  padding: var(--space-sm);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.header-main nav a:hover,
.header-main nav a:focus {
  background: var(--bg-light);
  color: var(--primary);
  outline: none;
}

/* ============================================
   HERO SLIDER
   ============================================ */

.hero-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--bg-light);
}

.hero-slide {
  display: none;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.hero-slide.active {
  display: block;
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-sm);
  z-index: 10;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-dot.active {
  background: white;
  width: 32px;
  border-radius: 6px;
}

.hero-dot:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.hero-arrows {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 var(--space-md);
  pointer-events: none;
  z-index: 9;
}

.hero-arrow {
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s ease;
  pointer-events: auto;
}

.hero-arrow:hover,
.hero-arrow:focus {
  background: rgba(0, 0, 0, 0.6);
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ============================================
   SECTIONS & CONTAINERS
   ============================================ */

main {
  min-height: 60vh;
}

section {
  padding: var(--space-xl) var(--space-lg);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: var(--space-lg);
  color: var(--text-dark);
}

/* ============================================
   CARDS & GRID
   ============================================ */

.grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

.card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(193, 39, 45, 0.12);
  transform: translateY(-4px);
}

.card:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.card-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-light);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: var(--space-md);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-title {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: var(--space-sm);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--primary-dark);
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

.btn-secondary {
  background: var(--bg-light);
  color: var(--text-dark);
  border: 2px solid var(--text-dark);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: var(--text-dark);
  color: white;
  outline: none;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* ============================================
   BREADCRUMB
   ============================================ */

.breadcrumb {
  display: flex;
  gap: var(--space-sm);
  font-size: 0.875rem;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb a:hover,
.breadcrumb a:focus {
  text-decoration: underline;
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.breadcrumb span {
  color: var(--text-gray);
}

/* ============================================
   PRODUCT GALLERY
   ============================================ */

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

.gallery-main {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-light);
  border-radius: 8px;
  overflow: hidden;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-md);
}

.gallery-thumbs {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
}

.gallery-thumb {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border: 2px solid var(--border-light);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-light);
  transition: all 0.2s ease;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.gallery-thumb.active {
  border-color: var(--primary);
  background: white;
}

.gallery-thumb:hover,
.gallery-thumb:focus {
  border-color: var(--primary);
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

/* ============================================
   PRODUCT INFO
   ============================================ */

.product-info {
  background: var(--bg-light);
  padding: var(--space-lg);
  border-radius: 8px;
  margin-bottom: var(--space-lg);
}

.product-header {
  margin-bottom: var(--space-lg);
}

.product-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

.product-meta {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.product-meta-item {
  font-size: 0.875rem;
  color: var(--text-gray);
}

.product-meta-label {
  font-weight: 600;
  color: var(--text-dark);
}

.product-price {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: var(--space-md);
}

.stock-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--success);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
}

.stock-badge::before {
  content: '●';
  font-size: 1.5rem;
}

/* ============================================
   TABLES
   ============================================ */

.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
}

.specs-table th,
.specs-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.specs-table th {
  background: var(--bg-light);
  font-weight: 600;
  color: var(--text-dark);
}

.specs-table tr:hover {
  background: var(--bg-light);
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background: var(--text-dark);
  color: white;
  padding: var(--space-xl) var(--space-lg);
  margin-top: var(--space-xl);
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  letter-spacing: 0.5px;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: var(--space-sm);
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-section a:hover,
.footer-section a:focus {
  color: var(--primary-light);
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-lg);
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   FOCUS STYLES & ACCESSIBILITY
   ============================================ */

a:focus,
button:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 600px) {
  section {
    padding: var(--space-lg) var(--space-md);
  }

  .section-title {
    font-size: 1.5rem;
  }

  .product-title {
    font-size: 1.5rem;
  }

  .product-price {
    font-size: 1.75rem;
  }

  .header-main {
    padding: var(--space-md);
    gap: var(--space-md);
  }

  .logo {
    font-size: 1.2rem;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .product-meta {
    flex-direction: column;
    gap: var(--space-sm);
  }
}
