/* von Kannen OPC Warenkorb - Shop-Korrekturen (seitenweit): Toast ueber Overlays, einheitliches Mengenfeld, Handy-Anpassungen, Frage-Popup-Rahmen */

/* Meldungen (Toast) immer ueber Modal-/Popup-Overlays */
html:root #system-message-container { z-index: 2147483000 !important; }

/* Mengenfeld (+/-) einheitlich auf Merkzettel, Produktuebersicht, Produktdetail und Warenkorb */
html:root :is(#cart-view, body) .box-quantity { position: relative !important; display: inline-block !important; width: 100px !important; height: 32px !important; }
html:root :is(#cart-view, body) .box-quantity .quantity-box { display: block !important; position: relative !important; width: 100px !important; height: 32px !important; box-sizing: border-box !important; }
html:root :is(#cart-view, body) .box-quantity .quantity-box input.quantity-input.js-recalculate,
html:root #cart-view .box-bg.basket .box-bg-indent table.cart-summary.vk-cart-list tr td.qnt .box-quantity .quantity-box input.quantity-input.js-recalculate { display: block !important; box-sizing: border-box !important; width: 44px !important; min-width: 0 !important; max-width: none !important; height: 28px !important; margin: 0 auto !important; padding: 0 !important; line-height: 26px !important; text-align: center !important; }
html:root :is(#cart-view, body) .box-quantity button.quantity-controls {
  all: unset; position: absolute !important; top: 5px !important; width: 22px !important; height: 22px !important; margin: 0 !important; padding: 0 !important;
  box-sizing: border-box; display: flex !important; align-items: center; justify-content: center; cursor: pointer; font-size: 9px; line-height: 1; color: var(--cera-blue, #007dc5);
}
html:root :is(#cart-view, body) .box-quantity button.quantity-controls:is(.quantity-plus, .vk-q-plus) { left: 4px !important; right: auto !important; }
html:root :is(#cart-view, body) .box-quantity button.quantity-controls:is(.quantity-minus, .vk-q-minus) { right: 4px !important; left: auto !important; }
html:root :is(#cart-view, body) .box-quantity button.quantity-controls i { display: block; margin: 0 !important; padding: 0; font-size: 9px; line-height: 1; width: auto; height: auto; }

/* ===== Responsive (Handy) ===== */
@media (max-width: 575.98px) and (orientation: portrait) {
  html:root .responsive-tabs .responsive-tabs__panel { padding-left: 10px !important; padding-right: 10px !important; }
}
/* Produktdetail: Bildzoom (ElevateZoom) auf Touch-Geraeten aus, damit Scrollen moeglich bleibt */
@media (max-width: 991.98px), (hover: none) and (pointer: coarse) {
  html:root .zoomContainer, html:root .zoomWindowContainer, html:root .zoomLens { display: none !important; pointer-events: none !important; }
}
/* Kuerzlich angesehene Artikel: Bild links, kompletter Text daneben (zentriert) */
@media (max-width: 575.98px) {
  html:root ul.recentproducts li .box-style { display: grid; grid-template-columns: 96px 1fr; column-gap: 12px; align-items: center; align-content: center; text-align: center; padding: 10px; }
  html:root ul.recentproducts li .box-style > .browse { grid-column: 1; grid-row: 1 / span 3; margin: 0; float: none; width: 96px; }
  html:root ul.recentproducts li .box-style > .browse img { width: 96px; height: 96px; object-fit: contain; display: block; }
  html:root ul.recentproducts li .box-style > strong, html:root ul.recentproducts li .box-style > a { grid-column: 2; display: block; margin: 0; }
  html:root ul.recentproducts li .box-style > strong { font-size: 13px; }
  html:root ul.recentproducts li .box-style > i.fa { display: none; }
  html:root ul.recentproducts li .box-style > a:first-of-type::after { content: "\f0a9"; font-family: "Font Awesome 5 Free"; font-weight: 900; margin-left: 6px; font-size: 13px; }
}

/* Frage-zum-Produkt-Popup (fancybox iframe): Rahmen wie Warenkorb-Popup */
html:root .fancybox-wrap.fancybox-type-iframe { position: fixed !important; left: 50% !important; top: 50% !important; width: min(560px, calc(100vw - 20px)) !important; transform: translate(-50%, -50%) !important; }
html:root .fancybox-wrap.fancybox-type-iframe .fancybox-skin { padding: 0 !important; margin: 0 !important; background: var(--cera-white, #fff); border: 0; border-top: 3px solid var(--color-primary, var(--cera-blue, #007dc5)); border-radius: 6px; overflow: hidden; box-shadow: rgba(0,0,0,.2) 0 0 5px; }
html:root .fancybox-wrap.fancybox-type-iframe .fancybox-outer { padding: 0 !important; margin: 0 !important; }
html:root .fancybox-wrap.fancybox-type-iframe .fancybox-inner { width: 100% !important; height: min(640px, calc(100vh - 60px)) !important; overflow: hidden !important; }
html:root .fancybox-wrap.fancybox-type-iframe iframe.fancybox-iframe { display: block; width: 100%; height: 100%; }
html:root .fancybox-wrap.fancybox-type-iframe .fancybox-close { top: 15px !important; right: 14px !important; width: 16px; height: 16px; background: none !important; }
html:root .fancybox-wrap.fancybox-type-iframe .fancybox-close::before { content: "\f00d"; font-family: 'fontawesome'; font-size: 16px; line-height: 16px; color: var(--cera-text-dark, #292f38); }
html:root .fancybox-wrap.fancybox-type-iframe .fancybox-close::after { content: none !important; }

/* Konten-Seiten mit SP-Page-Builder-Inhalt in der linken Seitenleiste (z. B. Verwaltung): Hauptbereich auf die Container-Breite des SP Page Builder begrenzen
   (Einstellungen > Container maximale Breite; der Wert wird per Skript als --vk-sppb-container gelesen) */
html:root body.remove-container:has(#sp-sidebar-l .sppb-addon-wrapper) #sp-main-body { max-width: var(--vk-sppb-container, none); margin-left: auto; margin-right: auto; }

/* Produktdetail: Mengenfeld buendig mit den Buttons (Warenkorb/Preis auf Anfrage) */
html:root #productdetailsview .addtocart-bar2 > .wrapper { align-items: flex-start; }
html:root #productdetailsview .addtocart-bar2 > .wrapper > .controls { display: flex; height: 32px; }
@media (min-width: 576px) { html:root #productdetailsview .addtocart-bar2 > .wrapper > .controls { margin: 0 8px 0 0; } }
@media (max-width: 575.98px) { html:root #productdetailsview .addtocart-bar2 > .wrapper > .controls { margin-right: 0; padding-right: 8px; } }

/* Mein Konto: Kacheln 30px Abstand nach unten (Desktop) */
html:root #sp-component .sppb-addon-wrapper.addon-root-feature { margin-bottom: 30px; }

/* Mein Konto (Handy): Seitenabstand wie "Auftraege verwalten", Abstand der Kacheln untereinander = Abstand links/rechts (21px) */
@media (max-width: 575.98px) {
  html:root #sp-component .sppb-addon-wrapper.addon-root-feature { margin-bottom: 21px; }
  html:root body.remove-container:has(#sp-sidebar-l .sppb-addon-wrapper) #sp-main-body { padding-left: 15px; padding-right: 15px; box-sizing: border-box; }
  html:root #sp-component:has(.sppb-addon-feature) .sppb-section .sppb-row-container { padding-left: 0; padding-right: 0; }
}

/* Login-Formulare (Anmelden-Seite + Auftraege verwalten): linksbuendig, Karten-Optik, Titel wie "Meine Bestellung verfolgen" */
html:root .cera-login-page { text-align: left; }
html:root .cera-login-page .cera-login-box.cera-card { max-width: 520px; margin: 0 0 30px; padding: 20px; box-sizing: border-box; background: var(--cera-white, #fff); border: 0; border-radius: 6px; box-shadow: rgba(0,0,0,.1) 0 1px 3px; }
html:root .cera-login-page h3.module-title { color: var(--cera-sand, #7a6a5a); margin: 0 0 30px; padding-top: 20px; }
@media (max-width: 767.98px) {
  html:root .cera-login-page h3.module-title { font-size: clamp(20px, 5.6vw, 24px); line-height: 1.25; margin-bottom: 20px; padding-top: 12px; }
  html:root .cera-login-page .cera-login-box.cera-card { padding: 16px; }
}

/* Mein Konto: Kachel-Inhalt (Icon ca. 40px, Titel 18/23px, Text 14px, Links #007DC5 / Hover #7F7F7F, 15px Innenabstand) */
html:root #sp-component .addon-root-feature .sppb-media { display: flex; align-items: center; gap: 15px; padding: 15px; box-sizing: border-box; }
html:root #sp-component .addon-root-feature .sppb-media > .pull-left,
html:root #sp-component .addon-root-feature .sppb-media > .pull-right { float: none; flex: 0 0 auto; width: auto; margin: 0; display: flex; align-items: center; justify-content: center; min-width: 44px; }
html:root #sp-component .addon-root-feature .sppb-media > .pull-right { order: 2; }
html:root #sp-component .addon-root-feature .sppb-media .sppb-icon { padding: 0; margin: 0; width: auto; height: auto; line-height: 1; }
html:root #sp-component .addon-root-feature .sppb-media .sppb-icon-container { display: inline-flex; align-items: center; justify-content: center; width: auto; height: 40px; line-height: 1; }
html:root #sp-component .addon-root-feature .sppb-media .sppb-icon-container i { font-size: 40px; line-height: 40px; height: 40px; width: auto; color: #007DC5; transition: color .2s; }
html:root #sp-component .addon-root-feature .sppb-media .sppb-icon a:hover .sppb-icon-container i { color: #7F7F7F; }
html:root #sp-component .addon-root-feature .sppb-media-body { flex: 1 1 auto; width: auto; min-width: 0; }
html:root #sp-component .addon-root-feature .sppb-media-content { padding: 0; }
html:root #sp-component .addon-root-feature h3.sppb-media-heading,
html:root #sp-component .addon-root-feature .sppb-addon-title.sppb-feature-box-title { font-size: 18px; line-height: 23px; margin: 0 0 8px; }
html:root #sp-component .addon-root-feature h3.sppb-addon-title.sppb-media-heading,
html:root #sp-component .addon-root-feature h3.sppb-addon-title.sppb-feature-box-title,
html:root #sp-component .sppb-addon-wrapper.addon-root-feature .sppb-addon-feature h3.sppb-addon-title { font-size: 18px !important; line-height: 23px !important; margin: 0 0 8px; }
html:root #sp-component .addon-root-feature .sppb-media-content > a.sppb-btn,
html:root #sp-component .addon-root-feature .sppb-media-content > a:not(.sppb-icon) { display: inline-block; padding: 0; margin: 0; font-size: 14px; line-height: 20px; background: none; border: 0; box-shadow: none; text-transform: none; }
html:root #sp-component .addon-root-feature a,
html:root #sp-component .addon-root-feature a.sppb-btn,
html:root #sp-component .addon-root-feature h3 a { color: #007DC5; text-decoration: none; transition: color .2s; }
html:root #sp-component .addon-root-feature a:hover,
html:root #sp-component .addon-root-feature a:focus,
html:root #sp-component .addon-root-feature a.sppb-btn:hover,
html:root #sp-component .addon-root-feature h3 a:hover { color: #7F7F7F; }
@media (max-width: 575.98px) {
  html:root #sp-component .addon-root-feature .sppb-media { gap: 12px; padding: 15px; }
  html:root #sp-component .addon-root-feature .sppb-media > .pull-left { min-width: 36px; }
  html:root #sp-component .addon-root-feature .sppb-media .sppb-icon-container,
  html:root #sp-component .addon-root-feature .sppb-media .sppb-icon-container i { height: 34px; font-size: 34px; line-height: 34px; }
  html:root #sp-component .addon-root-feature h3.sppb-media-heading { overflow-wrap: anywhere; hyphens: auto; }
}

/* Einheitliche Inhaltsbreite: Beitragsseiten (Blog) und Mein Konto (SP Page Builder mit linker Seitenleiste) bekommen wie alle Unterseiten die Container-Breite (Breite wie bei den anderen Unterseiten = Einstellung "Container maximale Breite", zentriert, 15px Seitenabstand) - das Template entfernt sie hier ("remove-container") */
html:root body.remove-container.view-article .body-innerwrapper > #sp-main-body > .container { max-width: var(--vk-sppb-container, 100%); padding-left: 15px; padding-right: 15px; }
html:root body.remove-container.view-page .body-innerwrapper > #sp-main-body > .row:has(> #sp-sidebar-l) { max-width: var(--vk-sppb-container, 100%); width: 100%; margin-left: auto; margin-right: auto; }

/* Warenkorb (Responsive, Tablet/Querformat): Artikelnr., Bezeichnung und Kurzbeschreibung linksbuendig (Template zentriert hier die Tabellenzellen) */
html:root #cart-view table.cart-summary td.vk-cell-product,
html:root #cart-view table.cart-summary td.vk-cell-product .vk-product-text,
html:root #cart-view table.cart-summary td.vk-cell-product .vk-product-text > * { text-align: left; }

/* Shop-Suche (Ergebnisseite): Hinweistext oben (unter dem Suchbegriff), darunter Eingabefeld mit Button "Suche im Shop" direkt rechts daneben */
html:root #sp-component .virtuemart_search .vm-search-custom-search-input { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; }
html:root #sp-component .virtuemart_search .vm-search-descr { order: -1; flex: 0 0 100%; margin: 0 0 10px; }
html:root #sp-component .virtuemart_search .vm-search-custom-search-input input.inputbox { flex: 1 1 200px; width: auto; min-width: 0; max-width: 480px; float: none; margin: 0; }
html:root #sp-component .virtuemart_search .vm-search-custom-search-input input[type="submit"] { position: static; top: auto; right: auto; left: auto; flex: 0 0 auto; width: auto; height: 40px; margin: 0; padding: 0 22px; line-height: 40px; float: none; color: var(--cera-white, #fff); }
html:root #sp-component .virtuemart_search .vm-search-custom-search-input input[type="submit"]:hover,
html:root #sp-component .virtuemart_search .vm-search-custom-search-input input[type="submit"]:focus { color: var(--cera-white, #fff); }

/* Newsletter-Anmeldung (AcyMailing): cera-card, Switches im Stil der com_gdpr-Cookie-Einstellungen */
html:root .vk-newsletter-card { max-width: 520px; margin: 0 0 30px; padding: 20px; box-sizing: border-box; background: var(--cera-white, #fff); border: 0; border-radius: 6px; box-shadow: rgba(0,0,0,.1) 0 1px 3px; }
html:root #acym_wrapper h3.module-title.cera-login-heading { max-width: 520px; margin: 0 0 30px; color: var(--cera-sand, #766a5e); font-size: 30px; line-height: 36px; font-weight: 600; text-transform: none; }
@media (max-width: 575.98px) { html:root #acym_wrapper h3.module-title.cera-login-heading { font-size: 24px; line-height: 30px; margin-bottom: 20px; } }
html:root .vk-newsletter-card form fieldset { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
html:root .vk-newsletter-card form legend { padding: 0; margin: 0 0 8px; font-size: 18px; line-height: 23px; }
html:root #acym_wrapper .vk-newsletter-card form input[type="text"], html:root #acym_wrapper .vk-newsletter-card form input[type="email"] { width: 100%; max-width: 100%; height: 40px; box-sizing: border-box; padding: 10px; border: 1px solid #e2e6e7; border-radius: 3px; background-color: #fff; box-shadow: none; font-size: 14px; color: #007dc5; }
html:root #acym_wrapper .vk-newsletter-card form input[type="text"]:focus, html:root #acym_wrapper .vk-newsletter-card form input[type="email"]:focus { border-color: #007dc5; outline: 0; box-shadow: none; }
@media (max-width: 575.98px) { html:root .vk-newsletter-card { padding: 16px; } }
/* Liste: Schalter (AcyMailing nutzt input:checked ~ .switch-paddle, die Checkbox liegt aber in einem span: daher :has) */
html:root #acym_wrapper form[id^="formAcym"] .switch { position: relative; display: inline-block; margin: 0; }
html:root #acym_wrapper form[id^="formAcym"] .switch .checkbox { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
html:root #acym_wrapper form[id^="formAcym"] .switch .switch-paddle { display: block; position: relative; width: 42px; height: 18px; margin: 0; padding: 0; border: 0; border-radius: 15px; background: #ccc; cursor: pointer; transition: background-color .4s; }
html:root #acym_wrapper form[id^="formAcym"] .switch .switch-paddle::after { content: ""; position: absolute; top: 2px; left: 3px; width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; transform: none; transition: transform .4s; }
html:root #acym_wrapper form[id^="formAcym"] .switch .switch-paddle::before { content: none; display: none; }
html:root #acym_wrapper form[id^="formAcym"] .switch .switch-paddle .switch-active, html:root #acym_wrapper form[id^="formAcym"] .switch .switch-paddle .switch-inactive { display: none; }
html:root #acym_wrapper form[id^="formAcym"] .switch .checkbox:has(input:checked) ~ .switch-paddle { background: var(--vk-switch-on, #0277c0); }
html:root #acym_wrapper form[id^="formAcym"] .switch .checkbox:has(input:checked) ~ .switch-paddle::after { left: 3px; transform: translateX(22px); }
html:root #acym_wrapper form[id^="formAcym"] .switch .checkbox:has(input:focus-visible) ~ .switch-paddle { box-shadow: 0 0 1px 2px var(--vk-switch-on, #0277c0); }
/* Tracking-Zustimmung (Acym-Checkbox) */
html:root #acym_wrapper form[id^="formAcym"] span.checkbox:not(.switch .checkbox) { position: relative; display: inline-block; vertical-align: middle; margin: 0 8px 0 0; }
html:root #acym_wrapper form[id^="formAcym"] span.checkbox:not(.switch .checkbox) > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
html:root #acym_wrapper form[id^="formAcym"] span.checkbox:not(.switch .checkbox) > label.checkbox_inner { display: block; position: relative; width: 42px; height: 18px; margin: 0; padding: 0; border: 0; border-radius: 15px; background: #ccc; cursor: pointer; transition: background-color .4s; }
html:root #acym_wrapper form[id^="formAcym"] span.checkbox:not(.switch .checkbox) > label.checkbox_inner::before { content: ""; position: absolute; top: 2px; left: 3px; width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; transition: transform .4s; }
html:root #acym_wrapper form[id^="formAcym"] span.checkbox:not(.switch .checkbox) > label.checkbox_inner::after { content: none; display: none; }
html:root #acym_wrapper form[id^="formAcym"] span.checkbox:not(.switch .checkbox) > input:checked + label.checkbox_inner { background: var(--vk-switch-on, #0277c0); }
html:root #acym_wrapper form[id^="formAcym"] span.checkbox:not(.switch .checkbox) > input:checked + label.checkbox_inner::before { transform: translateX(22px); }
/* DSGVO-Checkbox (com_gdpr) im Formular: Standard-Optik wie im Frage-Popup */
html:root #acym_wrapper form[id^="formAcym"] .sppb-form-check { overflow: visible !important; display: flex; align-items: flex-start; flex-wrap: wrap; gap: 10px; margin: 6px 0 18px; padding: 2px 2px 2px 0; font-size: 13px; line-height: 19px; color: #696e6e; }
html:root #acym_wrapper form[id^="formAcym"] .sppb-form-check input[type="checkbox"] { order: 1; flex: 0 0 18px; width: 18px; height: 18px; min-width: 18px; margin: 2px 0 0 2px; }
html:root #acym_wrapper form[id^="formAcym"] .sppb-form-check > a { order: 2; flex: 1 1 0; min-width: 0; color: #696e6e; text-decoration: none; }
html:root #acym_wrapper form[id^="formAcym"] .sppb-form-check label { display: inline; margin: 0; font-size: 13px; font-weight: 400; color: #696e6e; }
html:root #acym_wrapper form[id^="formAcym"] p.acymodifybutton { margin: 0; }
html:root #acym_wrapper form[id^="formAcym"] #privacy_policy_required { display: none !important; }
html:root #acym_wrapper form[id^="formAcym"] .sppb-form-check:has(#privacy_policy_required) input[type="checkbox"]:not(:checked) { border-color: #e74c3c !important; box-shadow: 0 0 0 1px #e74c3c; }
/* Feld-Fehler von AcyMailing erscheinen als Toast; Felder bleiben rot markiert */
html:root #acym_wrapper form[id^="formAcym"] .acym__field__error__block, html:root #acym_wrapper form[id^="formAcym"] .acym__message__invalid__field { display: none !important; }
/* Kundenkonto (Zugangsdaten / Rechnungs- und Lieferadresse): Buttons gleiche Hoehe, gleiche Abstaende */
html:root .controls:has(> button[data-role$="_btn"]) { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
html:root .controls > button[data-role$="_btn"], html:root .control-buttons > button { margin: 0; height: 40px; padding: 0 22px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; vertical-align: middle; }
html:root .control-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
