/* Prevent horizontal overflow on page container */
#page-container {
  overflow-x: hidden;
}

.mauve-categories {
  margin: 0;
  font-family: Arial, sans-serif;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  position: relative; /* Establish containing block */
}

.mauve-categories h3 {
  color: #333;
  border-bottom: 2px solid #0073aa;
  padding: 0;
  margin: 0;
}

.mauve-category {
  margin: 0;
  padding: 0 15px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.mauve-category h4 {
  margin: 0 0 15px 0;
  color: #0073aa;
  font-size: 1.2em;
}

.mauve-products {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.mauve-products li {
  padding: 8px 0;
  border-bottom: 1px solid #e1e1e1;
  color: #666;
}

.mauve-products li:last-child {
  border-bottom: none;
}

.mauve-products li:hover {
  color: #0073aa;
  cursor: default;
}

.mauve-category em {
  color: #999;
  font-style: italic;
}

.product-sku {
  color: #999;
  font-size: 0.9em;
}

.product-description {
  color: #666;
  font-size: 0.9em;
  margin-top: 5px;
}

.product-price {
  color: #0073aa;
  font-weight: bold;
  margin-top: 5px;
}

/* Shortcode Generator Admin Styles */
#shortcode-generator {
  max-width: 800px;
}

#shortcode-generator label {
  margin-right: 15px;
}

#shortcode-generator input[type="radio"] {
  margin-right: 5px;
}

#shortcode-generator select {
  min-width: 200px;
}

#category-list label {
  font-weight: normal;
  margin-right: 0;
}

#generated-shortcode {
  font-family: "Courier New", monospace;
  font-size: 14px;
  padding: 10px;
  border: 2px solid #0073aa;
  border-radius: 4px;
}

/* Product Carousel Styles */
.mauve-carousel-container {
  position: relative;
  padding: 0 70px;
  margin: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible; /* Allow buttons to be visible */
}

.mauve-products-slider {
  overflow: hidden; /* This is the actual mask for the slides */
  padding: 0;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.mauve-carousel-track {
  display: flex;
  transition: transform 0.3s ease;
  gap: 20px;
  /* Remove width: max-content to prevent overflow */
}

/* Desktop: Show 3 items by default - fluid width */
.mauve-product-slide {
  flex: 0 0 calc((100% - 40px) / 3); /* 3 items with 2 gaps of 20px */
  min-width: 200px; /* Minimum width to prevent too small cards */
  max-width: 400px; /* Maximum width to prevent too large cards */
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Desktop: Show 4 items when data-slides-per-view="4" */
.mauve-carousel-container[data-slides-per-view="4"] .mauve-product-slide {
  flex: 0 0 calc((100% - 60px) / 4); /* 4 items with 3 gaps of 20px */
  min-width: 180px;
  max-width: 350px;
}

/* Navigation Buttons */
.carousel-nav-btn {
  all: unset;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  opacity: 1;
  visibility: visible;
  transition: none;
  background-color: #ffffff;
  color: #7B9929;
  width: 50px;
  height: 50px;
  border-radius: 6px;
  line-height: 1;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none !important;
  outline: none !important;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
}
.carousel-nav-btn.prev {
  left: 10px;
}

.carousel-nav-btn.next {
  right: 10px;
}
.carousel-nav-btn:hover,
.carousel-nav-btn:active,
.carousel-nav-btn:focus {
  border: none !important;
}
.carousel-nav-btn:hover:not(:disabled) {
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
}

.carousel-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.carousel-nav-btn::before {
  font-family: ETmodules !important;
  speak: none;
  font-size: 48px;
  font-style: normal;
  font-weight: 400;
  -webkit-font-feature-settings: normal;
  font-feature-settings: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-shadow: 0 0;
  direction: ltr;
}
.carousel-nav-btn.prev::before {
  content: "4";
}
.carousel-nav-btn.next::before {
  content: "5";
}

.mauve-product-slide:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.mauve-product-item {
  padding: 15px;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  margin-bottom: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

/* Product Attribute Styles */
.product-title {
  margin-bottom: 10px;
  font-size: 1.1em;
  font-weight: normal;
  line-height: 1.3;
  min-height: 2.6em; /* Fixed height for 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-image {
  margin-bottom: 10px;
  text-align: center;
  position: relative;
  min-height: 150px; /* Fixed minimum height */
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  border-radius: 4px;
  max-height: 150px;
  object-fit: contain;
  width: 100%;
}

.product-price {
  position: relative;
  margin: 10px 0;
  min-height: 60px; /* Fixed height to accommodate price + old price + unit price */
}

/* Product Link - Push to bottom of card */
.product-link {
  margin-top: auto;
  padding-top: 10px;
}

/* Discount Badge - Circular badge on top right of product image */
.rabattanzeige {
  position: absolute;
  top: -10px;
  right: 8px;
  background: #e74c3c;
  color: white;
  font-size: 0.85em;
  font-weight: bold;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  line-height: 1;
}

/* Regular Price (with strikethrough when discount available) */
.preis-alt {
  display: inline-block;
  color: #7f8c8d;
  font-weight: normal;
  font-size: 1em;
  text-decoration: line-through;
  margin-bottom: 2px;
  margin-left: 6px;
}

/* Main Price */
.preis {
  display: inline-block;
  color: #2c3e50;
  font-weight: bold;
  font-size: 1.2em;
  margin-bottom: 4px;
}

/* Standard Price (per unit) */
.stdpreis {
  color: #7f8c8d;
  font-size: 0.9em;
  margin-bottom: 8px;
}

.product-link {
  margin-top: 10px;
}

/* "zum Angebot" Button */
.zum-angebot-btn {
  display: inline-block;
  background: #e30614;
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  font-size: 0.9em;
  font-weight: bold;
  transition: background-color 0.2s ease;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.zum-angebot-btn:hover {
  background: #a2c517;
  color: white;
}

.product-sku {
  color: #666;
  font-size: 0.9em;
  margin: 5px 0;
  min-height: 1.5em;
}

.product-description {
  color: #666;
  font-size: 0.9em;
  margin: 8px 0;
  line-height: 1.4;
}

.product-availability {
  margin: 8px 0;
  font-size: 0.9em;
}

.availability-status {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.8em;
  font-weight: bold;
}

.availability-status.available {
  background: #d4edda;
  color: #155724;
}

.availability-status.out-of-stock {
  background: #f8d7da;
  color: #721c24;
}

.availability-status.unknown {
  background: #fff3cd;
  color: #856404;
}

.product-packaging {
  margin: 8px 0;
  font-size: 0.9em;
  color: #666;
}

.product-packaging span {
  margin-right: 10px;
}

.product-manufacturer,
.product-category,
.product-ean,
.product-weight,
.product-barcode,
.product-type,
.product-vat {
  margin: 5px 0;
  font-size: 0.9em;
  color: #666;
}

.product-sku-link {
  color: #0073aa;
  font-weight: bold;
}

/* Additional sk-apotheken inspired styling */
.mauve-product-slide .product-title,
.mauve-product-item .product-title {
  font-size: 0.95em;
  line-height: 1.4;
  min-height: 2.8em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mauve-product-slide .product-image,
.mauve-product-item .product-image {
  margin-bottom: 12px;
}

.mauve-product-slide .product-image img,
.mauve-product-item .product-image img {
  max-height: 120px;
  object-fit: contain;
}

/* Better spacing for product cards */
.mauve-product-slide > *:last-child,
.mauve-product-item > *:last-child {
  margin-bottom: 0;
}

/* Responsive Design */

/* Tablet: Show 2 items */
@media (max-width: 992px) {
  .mauve-product-slide {
    flex: 0 0 calc((100% - 20px) / 2); /* 2 items with 1 gap of 20px */
    min-width: 250px;
    max-width: 450px;
  }

  .mauve-carousel-container {
    padding: 0 60px;
  }
}

/* Mobile: Show 1 item */
@media (max-width: 640px) {
  .mauve-product-slide {
    flex: 0 0 100%; /* Full width for single item */
    min-width: 280px;
    max-width: 500px;
  }

  .mauve-carousel-track {
    gap: 15px;
  }

  .mauve-carousel-container {
    padding: 0 50px;
  }

  .carousel-nav-btn {
    width: 35px;
    height: 35px;
  }

  .carousel-nav-btn.prev {
    left: 5px;
  }

  .carousel-nav-btn.next {
    right: 5px;
  }
}

#main-header .et_menu_container {
  display: flex !important;
  flex-direction: row !important;
}
#main-header .logo_container {
  display: flex !important;
  position: relative !important;
  width: auto !important;
}
#main-header .logo_container .logo_helper {
  display: none !important;
}

#logo {
  width: 100% !important;
  max-width: 333px !important;
  height: auto !important;
  object-fit: contain !important;
  object-position: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

#et-secondary-menu {
  display: flex !important;
  flex-direction: row !important;
  gap: 10px !important;
  padding-left: 10px !important;
  margin-left: auto !important;
  flex: 1;
  min-width: 0;
}

#et-top-navigation {
  display: flex !important;
  flex-direction: row !important;
  gap: 10px !important;
  padding-left: 10px !important;
  margin-left: auto !important;
  min-width: 0;
}
#et-top-navigation:has(.speedfinder-header) {
  flex: 1;
}

.speedfinder-header {
  position: relative;
  display: none;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex: 1;
  min-width: 0;
}

/* When speedfinder-header is in #et-top-navigation, make it fill available space */
#et-top-navigation .speedfinder-header {
  flex: 1;
  min-width: 0;
  max-width: none;
}

@media screen and (max-width: 625px) {
  .speedfinder-header {
    display: none;
  }
}

.speedfinder-header .searchForm {
  width: 100%;
  display: flex;
  align-items: center;
}

.speedfinder-header .searchWrap {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
}

.speedfinder-header .searchInput {
  border: 1px solid #a2c517;
  flex: 1;
  min-width: 200px;
  padding-right: 6px;
  padding-bottom: 12px;
  padding-top: 12px;
  font-size: 16px;
  border-radius: 5px !important;
  box-sizing: border-box;
}

/* When in #et-top-navigation, make searchInput fill all available space */
#et-top-navigation .speedfinder-header .searchInput {
  flex: 1 1 auto;
  min-width: 200px;
  width: 100%;
}

.speedfinder-header .searchBtn {
  flex-shrink: 0;
  white-space: nowrap;
}

#filialen .dsm_card_carousel .dsm_card_carousel_child .et_pb_module_inner {
  position: relative;
  display: flex;
  flex-direction: column;
}
#filialen .dsm_card_carousel .dsm_card_wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
}

#filialen .dsm_card_carousel_child_description {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#filialen .dsm_card_carousel .dsm_card_wrapper .et_pb_button_wrapper {
  flex-shrink: 0;
  margin-top: auto;
}
