/* ================================
   Responsive Styles für Moodsupply
   ================================ */

/* Basis-Optimierungen */

/* Standard Desktop-Menü */
@media (min-width: 1025px) {
  .nav-links {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
    opacity: 1 !important;
    max-height: none !important;
    position: static !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
  }

  .nav-links li {
    margin: 0 15px !important;
  }

  .menu-icon {
    display: none !important; /* Burger nur auf Mobile */
  }
}

html, body {
  max-width: 100%;
  overflow-x: hidden; /* verhindert horizontales Scrollen */
}

body {
  font-size: 16px;
  line-height: 1.5;
}

/* =================================
   Burger-Menü Icon + Animation
   ================================= */
#menu-toggle {
  display: none; /* Checkbox unsichtbar */
}

.menu-icon {
  display: none;
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1001;
}

.menu-icon span {
  background: #111;
  position: absolute;
  height: 3px;
  width: 100%;
  left: 0;
  transition: all 0.4s ease;
  border-radius: 2px;
}

.menu-icon span:nth-child(1) { top: 0; }
.menu-icon span:nth-child(2) { top: 10px; }
.menu-icon span:nth-child(3) { top: 20px; }

/* ☰ -> ✕ Animation */
#menu-toggle:checked + .menu-icon span:nth-child(1) {
  transform: rotate(45deg);
  top: 10px;
}
#menu-toggle:checked + .menu-icon span:nth-child(2) {
  opacity: 0;
}
#menu-toggle:checked + .menu-icon span:nth-child(3) {
  transform: rotate(-45deg);
  top: 10px;
}

/* =================================
   Navigation Fade + Slide
   ================================= */
.nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  position: absolute;
  top: 60px;
  left: 0;
  width: 100%;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s ease;
  border-top: 1px solid #eee;
}

/* Fix: robuster Selektor */
#menu-toggle:checked ~ nav .nav-links {
  opacity: 1;
  max-height: 500px; /* genug Platz fürs Menü */
  padding: 20px 0;
}

.nav-links li {
  margin: 12px 0;
  text-align: center;
}

/* =================================
   Smartphones & Tablets (bis 1024px)
   ================================= */
@media (max-width: 1024px) {
  .menu-icon {
    display: block;
  }

  nav {
    width: 100%;
  }

  /* Hero-Bereich */
  .wp-block-cover {
    min-height: 280px;
    text-align: center;
  }

  .wp-block-cover img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
  }

  .wp-block-cover-text {
    font-size: 1.2rem;
    padding: 15px;
    text-align: center;
  }

  /* WooCommerce Produkte */
  .products {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    text-align: center;
  }

  .products .product {
    font-size: 0.95rem;
  }

  .product img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 0 auto;
    display: block;
  }

  /* Buttons */
  .button,
  button,
  input[type="submit"] {
    font-size: 1rem;
    padding: 12px 18px;
    border-radius: 8px;
    width: 100%;
    max-width: 280px;
    margin: 15px auto;
    display: block;
    text-align: center;
  }

  /* Footer */
  footer {
    text-align: center;
    padding: 20px;
  }

  /* ✅ Startseiten-Kacheln */
  .kacheln {
    grid-template-columns: 1fr 1fr; /* Tablets: 2 Spalten */
    padding: 20px;
  }

  .kachel {
    margin-bottom: 20px;
  }

  /* ✅ Produktseite Layout */
  .custom-product-page {
    flex-direction: column;   /* nebeneinander -> untereinander */
    gap: 30px;
    align-items: center;
    text-align: center;
  }

  .custom-product-image img {
    width: 100% !important;
    max-width: 400px;
    height: auto;
    margin: 0 auto;
  }

  .custom-product-summary {
    width: 100%;
    text-align: center;
  }

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

  .custom-product-summary .product-price {
    font-size: 1.3rem;
    margin-bottom: 10px;
  }

  .custom-product-summary form.cart {
    flex-direction: column;
    gap: 10px;
  }

  .custom-product-summary .single_add_to_cart_button {
    width: 100%;
    max-width: 250px;
  }
}

/* =================================
   Extra Small Devices (bis 600px)
   ================================= */
@media (max-width: 600px) {
  /* Produkte */
  .products {
    grid-template-columns: 1fr; /* nur 1 Spalte */
  }

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

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

  .wp-block-cover-text {
    font-size: 1rem;
  }

  /* ✅ Kacheln nur 1 Spalte */
  .kacheln {
    grid-template-columns: 1fr;
    padding: 15px;
  }
}

/* =================================
   WooCommerce Anpassungen Mobile
   ================================= */
@media (max-width: 768px) {
  /* Sortierleiste & Ergebniscounter ausblenden */
  .woocommerce-ordering,
  .woocommerce-result-count {
    display: none !important;
  }

  /* ✅ Tabs als Akkordeon */
  .woocommerce-tabs .tabs {
    display: none !important; /* Standard-Tabs ausblenden */
  }

  .accordion-tab {
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
  }

  .accordion-tab:hover {
    background: #eee;
  }

  .accordion-content {
    display: none;
    padding: 15px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 0 0 8px 8px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
  }

  .accordion-tab.active {
    background: #2f8f2f;
    color: #fff;
    border-radius: 8px 8px 0 0;
  }

  .accordion-tab.active + .accordion-content {
    display: block;
  }
}

/* ================================
   WooCommerce Warenkorb – Mobile (Optimiert)
   ================================ */
@media (max-width: 768px) {
  .woocommerce table.shop_table,
  .woocommerce-cart-form table.shop_table {
    border: 0;
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed;
  }

  .woocommerce table.shop_table thead {
    display: none; /* Tabellenkopf ausblenden */
  }

  .woocommerce table.shop_table tr,
  .woocommerce-cart-form table.shop_table tr {
    display: block;
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 15px;
    background: #fff;
    box-sizing: border-box;
    overflow-x: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  }

  .woocommerce table.shop_table td {
    display: block;
    text-align: center;
    border: none;
    padding: 10px 5px;
    max-width: 100% !important;
    box-sizing: border-box;
    word-wrap: break-word;
  }

  .woocommerce table.shop_table td.product-thumbnail img {
    max-width: 100px;
    height: auto;
    margin: 0 auto 10px auto;
    border-radius: 8px;
  }

  .woocommerce table.shop_table td.product-name {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 5px;
  }

  .woocommerce table.shop_table td.product-price,
  .woocommerce table.shop_table td.product-quantity,
  .woocommerce table.shop_table td.product-subtotal {
    font-size: 0.9rem;
    margin-bottom: 5px;
  }

  .woocommerce table.shop_table td.actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .woocommerce table.shop_table td.actions .coupon {
    display: flex;
    flex-wrap: wrap;           /* erlaubt Umbruch */
    align-items: center;
    justify-content: center;   /* mittig in der Kachel */
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
  }

  .woocommerce table.shop_table td.actions .coupon input.input-text {
    flex: 1 1 auto;
    min-width: 160px;
    max-width: 240px;
    width: 100%;
  }

  .woocommerce table.shop_table td.actions .button {
    flex: 1 1 auto;
    min-width: 160px;          /* Platz für "Gutschein anwenden" */
    max-width: 240px;          /* verhindert Überlaufen */
    white-space: nowrap;
    text-align: center;
  }
}

/* Weiter zur Kasse Button mobile mittig */
@media (max-width: 768px) {
  .woocommerce .cart-collaterals,
  .woocommerce .cart_totals {
    width: 100% !important;
    margin-top: 20px;
    text-align: center;
  }

  .woocommerce .cart-collaterals .checkout-button,
  .woocommerce .cart_totals .checkout-button {
    display: inline-block;
    width: 90% !important;
    max-width: 320px;
    margin: 15px auto 0 auto !important;
    padding: 14px !important;
    font-size: 1rem !important;
    border-radius: 10px !important;
    text-align: center;
  }
}

/* Checkout Steps Basis */
.checkout-step {
  display: none;
}
.checkout-step.active {
  display: block;
}
.checkout-step .button.next-step {
  margin-top: 20px;
  background: #2f8f2f;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.checkout-step .button.next-step:hover {
  background: #246d24;
}
.step-buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
}
.step-buttons .button {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-size: 1rem;
}

/* Produkte auf Mobile zentriert */
@media (max-width: 768px) {
  .woocommerce ul.products {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  .woocommerce ul.products li.product {
    flex: none !important;
    width: 90% !important;
    max-width: 350px !important;
    margin: 0 0 20px 0 !important;
  }
}

/* Update-Button im Warenkorb ausblenden */
.woocommerce-cart .button.update-cart {
  display: none !important;
}

/* Gutschein-Bereich schön */
.woocommerce-cart .coupon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}
.woocommerce-cart .coupon label {
  margin: 0;
  font-weight: 600;
  white-space: nowrap;
}
.woocommerce-cart .coupon input.input-text {
  flex: 1 1 auto;
  min-width: 160px;
  max-width: 240px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #ddd;
}
.woocommerce-cart .coupon .button {
  flex: 1 1 auto;
  min-width: 160px;
  max-width: 240px;
  background: #2f8f2f !important;
  border-radius: 8px !important;
  padding: 10px 18px !important;
  font-weight: 600;
  color: #fff !important;
  white-space: nowrap;
  text-align: center;
}







nav {
  position: relative;
  z-index: 2000;
}

.nav-links {
  z-index: 2001;
}

.menu-icon {
  z-index: 2002;
}

.widget_shopping_cart,
.woocommerce-mini-cart,
.site-header-cart {
  position: relative;
  z-index: 3000;
}
