/* ==========================================================
   Modernes Design (Modul hsmoderndesign 1.2.1) – nur Optik per CSS.
   Keine Layout-Eingriffe, keine Vorlagen, keine Skripte.
   Die Werte in :root sind Standardwerte; die Modul-Einstellungen
   (Akzentfarbe, Rundung, Schatten) überschreiben sie im <head>.
   ========================================================== */
:root {
  --hsm-accent: #0f766e;
  --hsm-accent-dark: #0b5a54;
  --hsm-accent-soft: rgba(15,118,110,.12);
  --hsm-accent-shadow: rgba(15,118,110,.30);
  --hsm-on-accent: #ffffff;
  --hsm-bar-chip: rgba(255,255,255,.16);
  --hsm-menu-size: 1.15rem;
  --hsm-text: #1f2937;
  --hsm-muted: #6b7280;
  --hsm-border: #e5e7eb;
  --hsm-bg: #f3f4f6;
  --hsm-radius: 10px;
  --hsm-radius-sm: 6px;
  --hsm-radius-lg: 14px;
  --hsm-shadow: 0 1px 3px rgba(16,24,40,.08);
  --hsm-shadow-hover: 0 12px 28px rgba(16,24,40,.14);
}

/* ---------- Grundlagen ---------- */
body { color: var(--hsm-text); line-height: 1.6; }
#wrapper { background: var(--hsm-bg); padding-top: 2rem; }
a { color: var(--hsm-accent); transition: color .15s ease; }
a:hover, a:focus { color: var(--hsm-accent-dark); }

/* ---------- Überschriften (deutlich größer, fett, keine Großbuchstaben) ---------- */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  text-transform: none;
  font-weight: 800;
  letter-spacing: -.015em;
  color: var(--hsm-text);
}
h1, .h1 { font-size: 2rem; line-height: 1.2; }
h2, .h2 { font-size: 1.6rem; line-height: 1.25; }
h3, .h3 { font-size: 1.25rem; }

/* Kategorie-Überschrift: bewusst groß */
#js-product-list-header h1,
.block-category h1,
.block-category .h1,
.page-category h1,
.page-category .h1 {
  font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.75rem) !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  letter-spacing: -.02em;
  text-transform: none !important;
  margin: 0 0 .5rem;
}
.block-category {
  background: #fff;
  border: 0;
  border-left: 6px solid var(--hsm-accent);
  border-radius: var(--hsm-radius-lg);
  box-shadow: var(--hsm-shadow);
}

/* Abschnittstitel auf der Startseite: links, mit Akzentbalken */
.products-section-title,
.featured-products .h2,
.page-header h1 {
  text-align: left;
  text-transform: none;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}
.products-section-title::after,
.featured-products .h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin-top: .6rem;
  border-radius: 2px;
  background: var(--hsm-accent);
}

/* Hufeisen-Symbol vor den Abschnittstiteln (per Maske in Akzentfarbe) */
.products-section-title::before,
.featured-products .h2::before {
  content: "";
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  margin-right: .45em;
  vertical-align: -.1em;
  background: var(--hsm-accent);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'><path d='M28 102C10 60 24 16 60 16s50 44 32 86' fill='none' stroke='black' stroke-width='16' stroke-linecap='round'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'><path d='M28 102C10 60 24 16 60 16s50 44 32 86' fill='none' stroke='black' stroke-width='16' stroke-linecap='round'/></svg>") center / contain no-repeat;
}

/* ---------- Header ---------- */
#header { background: #fff; box-shadow: 0 2px 16px rgba(16,24,40,.07); }
#header .header-top { background: #fff; }
@media (min-width: 768px) {
  #header .header-top { padding: .9rem 0; }
}
/* Kategorienamen im Hauptmenü: Größe in der Modul-Konfiguration einstellbar */
#_desktop_top_menu .top-menu a[data-depth="0"] {
  text-transform: none;
  font-weight: 700;
  font-size: var(--hsm-menu-size, 1.15rem) !important;
  letter-spacing: .005em;
  color: var(--hsm-text);
}
#_desktop_top_menu .top-menu a[data-depth="0"]:hover {
  color: var(--hsm-accent);
  box-shadow: inset 0 -3px 0 var(--hsm-accent);
}
#_desktop_top_menu .sub-menu {
  border-radius: 0 0 var(--hsm-radius-lg) var(--hsm-radius-lg);
  box-shadow: var(--hsm-shadow-hover);
}
#search_widget form input[type=text] {
  border-radius: 999px;
  border: 1px solid var(--hsm-border);
  background: var(--hsm-bg);
}
#search_widget form input[type=text]:focus {
  border-color: var(--hsm-accent);
  background: #fff;
  outline: 0;
  box-shadow: 0 0 0 3px var(--hsm-accent-soft);
}

/* ---------- Buttons ---------- */
.btn:not(.btn-touchspin) {
  border-radius: 999px;
  text-transform: none;
  font-weight: 700;
  letter-spacing: 0;
  transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.btn-primary, .btn-secondary { padding: .6rem 1.4rem; }
.btn-primary {
  background: var(--hsm-accent);
  border-color: var(--hsm-accent);
  color: var(--hsm-on-accent);
  box-shadow: 0 4px 14px var(--hsm-accent-shadow);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.btn-primary:not(:disabled):not(.disabled):active {
  background: var(--hsm-accent-dark);
  border-color: var(--hsm-accent-dark);
  color: var(--hsm-on-accent);
}
.btn-primary.disabled, .btn-primary:disabled {
  background: var(--hsm-accent);
  border-color: var(--hsm-accent);
  box-shadow: none;
  opacity: .5;
}
.add-to-cart { padding: .8rem 1.6rem; }

/* ---------- Produktkacheln ---------- */
.product-miniature .thumbnail-container {
  background: #fff;
  border: 1px solid var(--hsm-border);
  border-radius: var(--hsm-radius-lg);
  overflow: hidden;
  box-shadow: var(--hsm-shadow);
  transition: box-shadow .25s ease, transform .25s ease;
}
.product-miniature .product-thumbnail img { transition: transform .4s ease; }
/* Akzentlinie am unteren Rand der Kachel, läuft beim Überfahren ein */
.product-miniature .thumbnail-container::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--hsm-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
@media (hover: hover) {
  .product-miniature .thumbnail-container:hover::after { transform: scaleX(1); }
}

@media (hover: hover) {
  .product-miniature .thumbnail-container:hover {
    box-shadow: var(--hsm-shadow-hover);
    transform: translateY(-4px);
  }
  .product-miniature .thumbnail-container:hover .product-thumbnail img { transform: scale(1.05); }
}
.product-miniature .product-title,
.product-miniature .product-title a {
  text-transform: none;
  font-weight: 700;
  color: var(--hsm-text);
}
.product-miniature .product-title a:hover { color: var(--hsm-accent); }
.product-price-and-shipping .price,
.product-miniature .price {
  color: var(--hsm-accent);
  font-weight: 800;
  font-size: 1.05rem;
}
.regular-price { color: var(--hsm-muted); font-weight: 400; }
.product-flags li.product-flag {
  border-radius: 999px;
  padding: .2rem .75rem;
  text-transform: none;
  font-weight: 700;
  letter-spacing: 0;
}

/* ---------- Produktseite ---------- */
.product-cover img,
.images-container .thumb-container img.thumb { border-radius: var(--hsm-radius-lg); }
.product-prices .current-price span:first-child,
.current-price-value { color: var(--hsm-accent); font-weight: 800; }
.product-prices .current-price { font-size: 1.6rem; }
.nav-tabs .nav-link.active {
  color: var(--hsm-accent);
  border-bottom: 3px solid var(--hsm-accent);
}
.tabs { border-radius: var(--hsm-radius-lg); box-shadow: var(--hsm-shadow); }

/* Menge: Zahl mittig */
#quantity_wanted,
.product-quantity .qty .form-control,
.bootstrap-touchspin input.form-control {
  text-align: center !important;
  padding-left: .25rem;
  padding-right: .25rem;
}

/* Menge: Pfeile deutlich sichtbar (als Linien gezeichnet, unabhängig von der Icon-Schrift) */
.bootstrap-touchspin .btn-touchspin {
  position: relative;
  background: #fff !important;
  color: var(--hsm-accent) !important;
  border: 1px solid var(--hsm-border) !important;
  opacity: 1;
}
.bootstrap-touchspin .btn-touchspin:hover { background: var(--hsm-accent-soft) !important; }
.bootstrap-touchspin .btn-touchspin .material-icons { display: none !important; }
.bootstrap-touchspin .btn-touchspin::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 2.5px 2.5px 0;
}
.bootstrap-touchspin .bootstrap-touchspin-up::before   { transform: translate(-50%, -30%) rotate(-135deg); }
.bootstrap-touchspin .bootstrap-touchspin-down::before { transform: translate(-50%, -70%) rotate(45deg); }

/* "In den Warenkorb": Symbol und Text auf einer Linie */
.add-to-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  line-height: 1.2;
}
.add-to-cart .material-icons {
  position: static !important;
  top: auto !important;
  margin: 0 !important;
  font-size: 1.4rem;
  line-height: 1;
  vertical-align: middle;
}

/* Verfügbarkeit/Lieferzeit: Haken auf Höhe des Textes */
#product-availability {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  line-height: 1.3;
}
#product-availability .material-icons,
.material-icons.product-available,
.material-icons.product-last-items,
.material-icons.product-unavailable {
  position: static !important;
  margin: 0 !important;
  line-height: 1;
  vertical-align: middle;
}

/* PayPal-Button: abgerundet zuschneiden, damit keine weißen Ecken zu sehen sind */
.paypal-buttons,
.paypal-buttons iframe,
iframe[name*="paypal_buttons"] {
  border-radius: 999px;
  overflow: hidden;
  background: transparent !important;
  color-scheme: normal;
}

/* ---------- Karten, Warenkorb, Checkout (nur Optik) ---------- */
.card, .cart-summary, .checkout-step {
  border-radius: var(--hsm-radius-lg);
}
.card { border: 1px solid var(--hsm-border); box-shadow: var(--hsm-shadow); }
.checkout-step { box-shadow: var(--hsm-shadow); }
.checkout-step.-current h1 { color: var(--hsm-accent); }
.checkout-step.-current .step-number { background: var(--hsm-accent); }

/* ---------- Formulare ---------- */
.form-control, .custom-select {
  border-radius: var(--hsm-radius-sm);
  border-color: #d1d5db;
  box-shadow: none;
}
.form-control:focus, .custom-select:focus {
  border-color: var(--hsm-accent);
  box-shadow: 0 0 0 3px var(--hsm-accent-soft);
  outline: 0;
}
.custom-radio input[type=radio]:checked + span { background-color: var(--hsm-accent); }

/* ---------- Sonstiges ---------- */
.breadcrumb { background: transparent; font-size: .85rem; }
.breadcrumb li a:hover { color: var(--hsm-accent); }
.carousel, #carousel { border-radius: var(--hsm-radius-lg); overflow: hidden; }
.modal-content { border-radius: var(--hsm-radius-lg); border: 0; box-shadow: var(--hsm-shadow-hover); }
.alert { border-radius: var(--hsm-radius-sm); }
.page-item.active .page-link,
.pagination .current a { background: var(--hsm-accent); border-color: var(--hsm-accent); color: var(--hsm-on-accent); }
.products-sort-order .select-title { border-radius: 999px; }
.facet-label.active a, .facet-label:hover a { color: var(--hsm-accent); }

/* ---------- Shop-spezifisch ---------- */
/* Doppelter Text-Link "Abmelden" hinter dem Warenkorb (Abmelden erfolgt über den Power-Button) */
.header-nav .right-nav #_desktop_cart ~ .user-info a.logout { display: none !important; }

/* ---------- Mobil ---------- */
@media (max-width: 767px) {
  h1, .h1 { font-size: 1.6rem; }
  .products-section-title, .featured-products .h2 { font-size: 1.4rem; }

  /* Kopfleiste in schmaler Ansicht: Menü, Suche, Logo und Warenkorb in einer Reihe,
     mittig ausgerichtet – der Warenkorb darf nicht unter der Leiste herausragen.
     (!important, damit auch Regeln aus Theme und custom.css nicht dazwischenfunken) */
  #header .header-nav {
    max-height: none !important;
    height: auto !important;
  }
  #header .header-nav .mobile {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center !important;
  }
  #header .header-nav .mobile > div {
    float: none !important;
    align-self: center;
  }
  #header .header-nav #_mobile_cart {
    position: static !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
  #header .header-nav #_mobile_cart .blockcart {
    height: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: .5rem .75rem !important;
  }
  #header .header-nav #_mobile_cart .blockcart .header {
    margin: 0 !important;
  }
}
