/* Kategorieseiten 2026 (06.10.2026) – nur mit body.ms-kat26 (Vorschau ?ms_kat26=1, live MS_KAT26_LIVE=1).
   Desktop: linke Spalte (Kategoriebaum + Produktfilter) weg, Produkte volle Breite,
   Filter als Knopf -> Seitenleiste (CE-Dialog), Schalter «Nur sofort lieferbare».
   CE-Vorlage 19170101: Sektion #category-grid, Spalte links 7947df53 (Filter-Widget 12e61177),
   Spalte rechts 52a03a56 (Anzahl 673ec3f5, Filter-Knopf 1b967f50, Sortierung 6b438166, Raster 455755a6). */

/* Schalter (alle Breiten; per JS nur eingesetzt, wenn ein Verfügbarkeitsfilter existiert) */
body.ms-kat26 .ms-kat26-stock {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none;
  font-family: "Source Sans 3", Arial, sans-serif; font-size: 15px; font-weight: 600; color: #4A2E1C;
  padding: 8px 14px 8px 10px; border: 1px solid #E5D6C4; border-radius: 999px; background: #fff;
  margin: 0 12px 0 0; line-height: 1.2; white-space: nowrap;
}
body.ms-kat26 .ms-kat26-stock:hover { border-color: #C9A98A; }
body.ms-kat26 .ms-kat26-stock input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
body.ms-kat26 .ms-kat26-sw {
  position: relative; flex: 0 0 auto; width: 38px; height: 22px; border-radius: 999px;
  background: #D9CBBB; transition: background .2s;
}
body.ms-kat26 .ms-kat26-sw::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s;
}
body.ms-kat26 .ms-kat26-stock input:checked + .ms-kat26-sw { background: #2E8B57; }
body.ms-kat26 .ms-kat26-stock input:checked + .ms-kat26-sw::after { transform: translateX(16px); }
body.ms-kat26 .ms-kat26-stock input:focus-visible + .ms-kat26-sw { outline: 2px solid #754C2E; outline-offset: 2px; }
body.ms-kat26 .ms-kat26-stock.is-busy { opacity: .6; pointer-events: none; }

@media (max-width: 767px) {
  body.ms-kat26 .ms-kat26-stock { font-size: 14px; padding: 7px 12px 7px 8px; margin: 0 0 10px; }
}

/* Filter-Seitenleiste: Titel lesbarer (statt Cormorant) */
body.ms-kat26 dialog.ce-filters__container .ce-filters__title,
body.ms-kat26 dialog.ce-filters__container .elementor-field-label {
  font-family: "Source Sans 3", Arial, sans-serif; font-size: 16px; letter-spacing: 0;
}
body.ms-kat26 dialog.ce-filters__container .ce-filters > .elementor-heading-title {
  font-family: "Cormorant Garamond", Georgia, serif; font-size: 26px; font-weight: 600;
}

@media (min-width: 1025px) {
  /* linke Spalte zusammenklappen – NICHT display:none, sonst kann der Dialog nicht öffnen */
  body.ms-kat26 #category-grid > .elementor-container > .elementor-row > .elementor-element-7947df53 {
    flex: 0 0 0 !important; width: 0 !important; max-width: 0 !important; min-width: 0 !important;
    padding: 0 !important; margin: 0 !important; overflow: visible;
  }
  body.ms-kat26 .elementor-element-7947df53 > .elementor-column-wrap { padding: 0 !important; }
  body.ms-kat26 .elementor-element-7947df53 .elementor-widget:not(.elementor-element-12e61177) { display: none !important; }
  body.ms-kat26 .elementor-element-12e61177 { margin: 0 !important; }
  body.ms-kat26 dialog.ce-filters__container:not([open]) { display: none !important; }

  body.ms-kat26 #category-grid > .elementor-container > .elementor-row > .elementor-element-52a03a56 {
    flex: 1 1 100% !important; width: 100% !important; max-width: 100% !important;
  }

  /* Kopfzeile: Anzahl links, rechts Schalter · Filter · Sortierung */
  body.ms-kat26 .elementor-element-52a03a56 .elementor-element-673ec3f5 { flex: 1 1 auto; }
  body.ms-kat26 .elementor-element-1b967f50.elementor-hidden-desktop { display: block !important; margin-right: 12px; }
  body.ms-kat26 .elementor-element-1b967f50 .elementor-button {
    padding: 9px 18px; border-radius: 999px; font-size: 15px; font-weight: 600;
  }

  /* Raster: 5 Spalten ab 1241 px, darunter 4 */
  body.ms-kat26 .elementor-element-455755a6 .elementor-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
/* ---- Optik (b, 06.10.2026): Titel vor Kacheln, Kacheln in einer Reihe, ruhige Werkzeugleiste ---- */
@media (min-width: 1025px) {
  /* Reihenfolge im Kopf: Brotkrumen · Titel · Unterkategorien */
  body.ms-kat26 .elementor-element-27406051 .elementor-element-3d5ce6bb { order: 0; }
  body.ms-kat26 .elementor-element-27406051 .elementor-element-3495eaaf { order: 1; margin: 4px 0 20px !important; }
  body.ms-kat26 .elementor-element-27406051 .elementor-element-9756eab { order: 2; margin-bottom: 8px !important; }
  body.ms-kat26 .elementor-element-3495eaaf h1 { font-size: 46px; line-height: 1.05; font-weight: 600; color: #4A2E1C; }

  /* Unterkategorien: gleich grosse Kacheln, so viele wie in eine Reihe passen */
  body.ms-kat26 .elementor-element-9756eab .ce-image-gallery {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; gap: 20px 16px !important; overflow: visible !important;
  }
  body.ms-kat26 .elementor-element-9756eab .ce-gallery-icon { border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 1px 2px rgba(42,24,16,.06); }
  body.ms-kat26 .elementor-element-9756eab .ce-gallery-icon img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .25s ease; }
  body.ms-kat26 .elementor-element-9756eab .ce-gallery-item:hover .ce-gallery-icon img { transform: scale(1.04); }
  body.ms-kat26 .elementor-element-9756eab .ce-gallery-caption { margin-top: 10px; font-size: 15px; font-weight: 600; line-height: 1.25; text-align: center; }
  body.ms-kat26 .elementor-element-9756eab .ce-gallery-caption a { color: #4A2E1C; }
  body.ms-kat26 .elementor-element-9756eab .ce-gallery-item:hover .ce-gallery-caption a { color: #754C2E; text-decoration: underline; text-underline-offset: 3px; }

  /* Werkzeugleiste über den Produkten: alles 40 px hoch, gleicher Rahmen */
  body.ms-kat26 .elementor-element-52a03a56 > .elementor-column-wrap > .elementor-widget-wrap { align-items: center; }
  body.ms-kat26 .elementor-element-673ec3f5 .ce-listing-info { font-family: "Source Sans 3", Arial, sans-serif; font-size: 15px; font-weight: 600; color: #7A6455; }
  body.ms-kat26 .ms-kat26-stock { height: 40px; padding: 0 16px 0 10px; }
  body.ms-kat26 .elementor-element-1b967f50 .elementor-button {
    height: 40px; padding: 0 18px !important; display: inline-flex; align-items: center; gap: 8px;
    background: #fff !important; color: #4A2E1C !important; border: 1px solid #E5D6C4 !important; border-radius: 999px !important;
    font-family: "Source Sans 3", Arial, sans-serif; font-size: 15px !important; font-weight: 600 !important; text-transform: none !important; letter-spacing: 0 !important;
  }
  body.ms-kat26 .elementor-element-1b967f50 .elementor-button:hover { border-color: #C9A98A !important; }
  body.ms-kat26 .elementor-element-1b967f50 .elementor-button-icon { color: #754C2E; margin: 0 !important; }
  body.ms-kat26 .elementor-element-6b438166 select {
    height: 40px; border: 1px solid #E5D6C4 !important; border-radius: 999px !important; background-color: #fff !important;
    padding: 0 38px 0 16px !important; font-family: "Source Sans 3", Arial, sans-serif; font-size: 15px !important; font-weight: 600; color: #4A2E1C;
  }
  /* Trennlinie zwischen Werkzeugleiste und Produkten (aktive Filter stehen darunter) */
  body.ms-kat26 .elementor-element-55b5133c { border-top: 1px solid #EADCCB; margin-top: 14px !important; padding-top: 4px; }
  body.ms-kat26 .elementor-element-455755a6 { margin-top: 14px !important; }
  body.ms-kat26 #category-grid.elementor-element-3383f700 { margin-top: 12px !important; }
}

@media (min-width: 1241px) {
  body.ms-kat26 .elementor-element-455755a6 .elementor-grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}

/* ---- d (06.10.2026): «Neu» nicht mehr rot (Rot bleibt Sale/Rabatt), Handy kompakter Kopf ---- */
body.ms-kat26 .ce-product-badge-new { background: #A0632A !important; color: #fff !important; }

/* Titel vor den Kacheln auf allen Breiten */
body.ms-kat26 .elementor-element-27406051 .elementor-element-3d5ce6bb { order: 0; }
body.ms-kat26 .elementor-element-27406051 .elementor-element-3495eaaf { order: 1; }
body.ms-kat26 .elementor-element-27406051 .elementor-element-9756eab { order: 2; }

@media (max-width: 1024px) {
  body.ms-kat26 .elementor-element-27406051 .elementor-element-3495eaaf { margin: 2px 0 12px !important; }
  body.ms-kat26 .elementor-element-3495eaaf h1 { font-size: 30px; line-height: 1.1; }
  /* Unterkategorien als wischbare Reihe kleiner Kacheln */
  body.ms-kat26 .elementor-element-9756eab .ce-image-gallery {
    display: grid !important; grid-template-columns: none !important; grid-auto-flow: column !important;
    grid-auto-columns: 104px !important; gap: 12px !important; overflow-x: auto !important; overflow-y: hidden !important;
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    margin-right: -16px; padding: 0 16px 4px 0;
  }
  body.ms-kat26 .elementor-element-9756eab .ce-image-gallery::-webkit-scrollbar { display: none; }
  body.ms-kat26 .elementor-element-9756eab .ce-gallery-item { width: 104px !important; margin: 0 !important; scroll-snap-align: start; }
  body.ms-kat26 .elementor-element-9756eab .ce-gallery-icon { border-radius: 12px; overflow: hidden; background: #fff; }
  body.ms-kat26 .elementor-element-9756eab .ce-gallery-icon img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
  body.ms-kat26 .elementor-element-9756eab .ce-gallery-caption {
    margin-top: 6px; font-size: 13px; line-height: 1.2; font-weight: 600; text-align: center;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  body.ms-kat26 .elementor-element-9756eab .ce-gallery-caption a { color: #4A2E1C; }
  body.ms-kat26 #category-grid.elementor-element-3383f700 { margin-top: 0 !important; }
  body.ms-kat26 .elementor-element-27406051 .elementor-element-9756eab { margin-bottom: 0 !important; }
}

/* ---- e (06.10.2026): Handy-Werkzeugleiste: [Filter][Sortierung] / Schalter · Anzahl ---- */
@media (max-width: 767px) {
  body.ms-kat26 .elementor-element-1b967f50 { order: 1; flex: 1 1 40% !important; width: auto !important; max-width: none !important; margin: 0 8px 0 0 !important; }
  body.ms-kat26 .elementor-element-1b967f50 .elementor-button {
    width: 100%; height: 40px; padding: 0 14px !important; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: #fff !important; color: #4A2E1C !important; border: 1px solid #E5D6C4 !important; border-radius: 999px !important;
    font-family: "Source Sans 3", Arial, sans-serif; font-size: 15px !important; font-weight: 600 !important; text-transform: none !important; letter-spacing: 0 !important;
  }
  body.ms-kat26 .elementor-element-1b967f50 .elementor-button-icon { color: #754C2E; margin: 0 !important; }
  body.ms-kat26 .elementor-element-6b438166 { order: 2; flex: 1 1 40% !important; width: auto !important; max-width: none !important; margin: 0 !important; }
  body.ms-kat26 .elementor-element-6b438166 .elementor-select-wrapper,
  body.ms-kat26 .elementor-element-6b438166 select { width: 100% !important; }
  body.ms-kat26 .elementor-element-6b438166 select {
    height: 40px; border: 1px solid #E5D6C4 !important; border-radius: 999px !important; background-color: #fff !important;
    padding: 0 34px 0 14px !important; font-family: "Source Sans 3", Arial, sans-serif; font-size: 15px !important; font-weight: 600; color: #4A2E1C;
  }
  body.ms-kat26 .ms-kat26-stock { order: 3; height: 36px; margin: 10px 0 0 !important; font-size: 14px; }
  body.ms-kat26 .elementor-element-673ec3f5 { order: 4; width: auto !important; margin: 10px 0 0 auto !important; align-self: center; }
  body.ms-kat26 .elementor-element-673ec3f5 .ce-listing-info { font-size: 14px; font-weight: 600; color: #7A6455; }
  body.ms-kat26 .elementor-element-55b5133c { order: 5; }
  body.ms-kat26 .elementor-element-455755a6 { order: 6; margin-top: 12px !important; }
  body.ms-kat26 .elementor-element-23b83517 { order: 7; }
}

/* ---- g (06.10.2026): «Neu» am Handy rechts neben dem Preis statt eigener Zeile darüber, Karamell statt Rot.
   Gilt nur für Karten ohne Rabatt (kein Altpreis); Sale-Karten behalten Altpreis · −% / Preis. ---- */
body.ms-kat26 .elementor-widget-listing-products .ce-product-grid article .ce-product-badge.ce-product-badge-new,
body.ms-kat26 .elementor-widget-listing-products .ce-product-grid article .ms-price-badge.ce-product-badge-new {
  background-color: #A0632A !important; color: #fff !important;
}
@media (max-width: 575px) {
  body.ms-kat26 .elementor-widget-listing-products .ce-product-grid article
    .ce-product-prices:not(:has(.ce-product-price-regular)) > .ce-product-price {
    order: 1 !important; flex: 0 0 auto !important;
  }
  body.ms-kat26 .elementor-widget-listing-products .ce-product-grid article
    .ce-product-prices:not(:has(.ce-product-price-regular)) > .ms-price-badge {
    order: 2 !important; align-self: center !important; margin-left: 2px;
  }
}

/* ---- h (06.10.2026, Wunsch Rebecca): «Neu» klein links oben auf dem Bild, auf allen Breiten.
   Sale/−% bleibt beim Preis. Ersetzt die Platzierung neben dem Preis aus g. ---- */
body.ms-kat26 .elementor-widget-listing-products .ce-product-grid article .ce-product-badges .ce-product-badge-new {
  display: inline-block !important; font-size: 11px !important; line-height: 1.5 !important; font-weight: 700 !important;
  padding: 1px 8px !important; border-radius: 999px !important; letter-spacing: .02em; min-height: 0 !important;
  box-shadow: 0 1px 2px rgba(42,24,16,.18);
}
body.ms-kat26 .elementor-widget-listing-products .ce-product-grid article .elementor-element-d46bfdf { top: 8px !important; left: 8px !important; }
@media (max-width: 575px) {
  body.ms-kat26 .elementor-widget-listing-products .ce-product-grid article .ms-price-badge.ce-product-badge-new { display: none !important; }
  body.ms-kat26 .elementor-widget-listing-products .ce-product-grid article .elementor-element-d46bfdf { top: 0 !important; left: 0 !important; }
}
