/*
Theme Name: Tauchshop Landsberg
Theme URI:  https://www.tauchshop-landsberg.com
Author:      Dein Name
Description: WooCommerce-Theme mit responsive Header, Hamburger-Menü, Kategorie-Leiste, einheitlichen Produktbildern, JTL-Kompatibilität und modernem Layout.
Version:     3.1
*/

/* Grundlayout */
body {
  margin: 0;
  font-family: "Open Sans", Arial, sans-serif;
  background: #fff;
  color: #222;
}

a {
  color: #0077c8;
  text-decoration: none;
}

a:hover {
  color: #0ea5a4;
}

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid #eaeaea;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.75rem 1rem;
}

.brand img {
  max-height: 50px;
  width: auto;
}

/* Navigation */
.main-navigation {
  flex: 1;
  text-align: center;
}

.main-menu {
  list-style: none;
  display: inline-flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.main-menu > li > a {
  color: #0077c8;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
}

/* Dropdown-Menü */
.main-menu li ul {
  display: none;
  position: absolute;
  background: #0077c8;
  border-radius: 8px;
  min-width: 180px;
  list-style: none;
  padding: 0.5rem 0;
  margin-top: 0.25rem;
  z-index: 1100; /* über Kategorie-Leiste */
}

.main-menu li:hover > ul {
  display: block;
}

.main-menu li ul li a {
  color: #fff;
  padding: 0.5rem 1rem;
  display: block;
}

.main-menu li ul li a:hover {
  background: #0ea5a4;
}

/* Hamburger-Menü */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #0077c8;
  cursor: pointer;
}

/* Warenkorb */
.header-right {
  display: flex;
  align-items: center;
}

.cart-btn {
  color: #0077c8;
  position: relative;
}

.cart-count {
  background: #0077c8;
  color: #fff;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.75rem;
  margin-left: 4px;
}

/* Kategorie-Leiste */
.category-bar {
  background: #e7f6ff;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  padding: 0.5rem 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  will-change: transform, opacity;
  position: relative;
  z-index: 1000;
}

.category-bar.hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.category-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-menu a {
  color: #0077c8;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
}

.category-menu a:hover {
  color: #fff;
  background: #0ea5a4;
  border-radius: 6px;
}

/* Produktdarstellung */
.woocommerce ul.products {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-left: 1rem;  /* Abstand links */
  padding-right: 1rem; /* Abstand rechts */
}

.woocommerce ul.products li.product {
  width: calc(25% - 1.5rem);
  display: flex;
  flex-direction: column;
}

.woocommerce ul.products li.product img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 6px;
}

/* Footer */
.site-footer {
  background: #f4f8fb;
  border-top: 1px solid #eaeaea;
  text-align: center;
  padding: 2rem 1rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  color: #0077c8;
}

.page-content {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.page-content h2 {
  color: #0077c8;
}

/* Responsives Design */
@media (max-width: 900px) {
  .brand img {
    max-height: 40px;
  }

  .menu-toggle {
    display: block;
  }

  .main-navigation {
    display: none;
    width: 100%;
  }

  .main-navigation.active {
    display: block;
  }

  .main-menu {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0;
  }

  .main-menu li a {
    width: 100%;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eaeaea;
  }

  .header-inner {
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: space-between;
  }

  /* Kategorie-Leiste absolut, über Content */
  .category-bar {
    position: absolute;
    width: 100%;
    top: 100%;
    left: 0;
  }

  .category-menu {
    gap: 0.5rem 0.75rem;
    font-size: 14px;
  }

  .woocommerce ul.products li.product {
    width: calc(50% - 1rem);
  }
}

@media (max-width: 600px) {
  .woocommerce ul.products li.product {
    width: 100%;
  }
}
