/* =================================================================
   SD24 GLOBAL – PDP/PLP-relevante Styles
   Ladereihenfolge: nach variables.css + components.css (PageType=all)
   Quelle: sd24/themes/my-snackys/css/inlinecss/global.css
   (PDP-relevante Sektionen extrahiert)
   ================================================================= */

/* ─────────────────────────────────────────────
   Basis-Typographie
   ───────────────────────────────────────────── */

html,
body {
  font-family: var(--sd-font-body);
  font-size: var(--sd-text-base);
  font-weight: 400;
  line-height: var(--sd-leading-loose);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
}

p        { line-height: var(--sd-leading-loose); margin-bottom: 1em; }
small    { font-size: var(--sd-text-sm); }
strong   { font-weight: 600; }

/* Utility-Klassen Textgröße */
.text-xs   { font-size: var(--sd-text-xs); }
.text-sm   { font-size: var(--sd-text-sm); }
.text-base { font-size: var(--sd-text-base); }
.text-md   { font-size: var(--sd-text-md); }
.text-lg   { font-size: var(--sd-text-lg); }

/* ─────────────────────────────────────────────
   Layout
   ───────────────────────────────────────────── */

:root {
  --wdt-pag: 1500px;
}

   @media (max-width: 767px) {
        .mw-container {
            padding-left: 10px;
            padding-right: 10px;
        }
    }

    body {
        overflow-x: clip;
    }

    .modal[tabindex] {
        z-index: 9999 !important;
    }


    
/* ─── Warenkorb-Buttons ───────────────────────────────────────── */

#toWarenkorb{
    border-radius: var(--sd-radius-pill);
}

/* ─── SD24 Einheitliche Pfeil-Icons (.ar.ar-l / .ar.ar-r mit SVG) ──────
   Wenn ein <span class="ar ar-l/r"> ein <svg> enthält, soll dieses SVG
   sichtbar sein – nicht der gerbte CSS-Border-Chevron. Ohne diese Regel
   würde die Snackys-Parent-CSS einen Border-Chevron drüber zeichnen. */
.ar.ar-l:has(> svg),
.ar.ar-r:has(> svg){
    border: 0 !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    transform: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: currentColor;
}
.ar.ar-l > svg,
.ar.ar-r > svg{
    display: block;
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
}

/* ═══════════════════════════════════════════════════════════════════
   SD24 UNIFIED CHEVRON – klassisch-modern, identisch site-weit
   Eine einzige SVG-Form, gleicher viewBox/stroke/polyline. Größe per
   ─── *width/height inline ODER Container-Größe. */
.sd24-chev{
    display: inline-block;
    width: 1em;
    height: 1em;
    flex: 0 0 auto;
    stroke: currentColor;
    fill: none;
    vertical-align: middle;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: inherit;
}
.sd24-chev--sm{ width: .85em; height: .85em; }
.sd24-chev--md{ width: 1em;   height: 1em; }
.sd24-chev--lg{ width: 1.4em; height: 1.4em; }
.sd24-chev--xl{ width: 1.8em; height: 1.8em; }

/* Bootstrap .caret (Footer-Boxen, alte Dropdowns) auf SD24-Chevron umrüsten.
   Statt CSS-Border-Triangle: SVG-Chevron als CSS-mask (gleiches Icon). */
.caret{
    display: inline-block !important;
    width: .9em !important;
    height: .9em !important;
    border: 0 !important;
    background-color: currentColor !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat center / contain;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat center / contain;
    vertical-align: middle;
    transition: transform .2s ease;
    margin-left: 4px;
}
.dropup .caret,
[aria-expanded="true"] > .caret,
.open > a > .caret{
    transform: rotate(180deg);
}
/* ─────────────────────────────────────────────
   Swatch-Defaults (PDP + PLP)
   ───────────────────────────────────────────── */
.var-it .swatches .btn-img.btn-default {
    width: 20%;
    box-shadow: none;
    background: none !important;
    margin-right: 5px;
}

#toSize {
    display: none;
}

.artikelzursetzen {
    display: none;
}

.dpflex-wrap.swatches.disFlex.imgswatches.imgswatches-größe.imgswatches-groesse {
    display: none;
}

.variation.block.btn.btn-default.active.btn-xs.btn-img {
    border: 2px solid var(--sd-text) !important;
}

/* ─────────────────────────────────────────────
   Size-Tabs (PDP + PLP)
   ───────────────────────────────────────────── */
.selectTab {
    display: flex;
    text-transform: uppercase;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.sizeBtn {
    padding: .5rem;
}

p.sizeBtn.active {
    border-bottom: 2px solid var(--sd-text);
    font-weight: 600;
}

/* ─────────────────────────────────────────────
   PDP Preis- & Link-Korrekturen
   ───────────────────────────────────────────── */
.wr-info .rabattWrapper {
    position: unset !important;
}

.info-essential a, .hotdeal-pricedetail a, a.sd-club-btn, h2 a, #print-form-btn, .grWrapper {
    text-decoration: none !important;
}

/* ─────────────────────────────────────────────
   STYLINGS FÜR PDP UND PLP
   ───────────────────────────────────────────── */
.variation-tile.out-of-stock {
    pointer-events: none;
}

.wrkKopieSize {
    font-size: 1rem;
}

@media (max-width: 768px) {
    .wrkKopieSize {
        font-size: 14px !important;
    }
}

.size-button-arrow svg {
    transition: transform .2s ease;
}

.btn.btn-default.btn-block.form-control {
    background: none !important;
    border: 1px solid #ddd !important;
}

b#size-button-value {
    margin-left: 5px;
}

#toSize .var-head {
    display: none;
}

/* ─────────────────────────────────────────────
   1. SWATCHES-BLAZE-SLIDER CSS
   ───────────────────────────────────────────── */
.variation.block.btn.btn-default.btn-xs.btn-img:hover {
    border: 2px solid var(--sd-text) !important;
}

[data-page="2"] .var-it .swatches .btn-img:hover .img-ct,
.var-it .swatches .btn-img.active .img-ct {
    box-shadow: none !important;
}

.blaze-track { gap: 10px; }
.variation.block.btn.btn-default.btn-xs.btn-img { background: none !important; }
.variation.block.btn.btn-default.active.btn-xs.btn-img { border: 2px solid var(--sd-text) !important; }
.variation.block.btn.btn-default.active.btn-xs.btn-img:hover { border: 2px solid var(--sd-text) !important; }

[data-page="2"] #result-wrapper #p-l .p-w .basket-variations .var-it .variation.btn.active {
    background: none !important;
}

/* Pfeile ausblenden, wenn weniger oder gleich 4 Slides */
.swatches-blaze-slider .blaze-container:has(.blaze-track > :is(.blaze-slide):nth-child(-n+4):last-child) .blaze-prev,
.swatches-blaze-slider .blaze-container:has(.blaze-track > :is(.blaze-slide):nth-child(-n+4):last-child) .blaze-next {
    display: none;
}

.blaze-slider { margin-bottom: 0px; }

/* Globale Variablen für Gap & Spaltenanzahl */
.swatches-blaze-slider {
    --slides: 4;
    --gap: 8px;
}

#content-wrapper.no-scroll-content {
    overflow: hidden !important;
    overscroll-behavior: none;
    touch-action: none;
}

/* Abstand zwischen Slides */
.swatches-blaze-slider .blaze-track { gap: var(--gap); }

/* Exakt gleiche Breite für alle Slides */
.swatches-blaze-slider .blaze-slide {
    flex: 0 0 calc((100% - (calc(var(--slides) - 1) * var(--gap))) / var(--slides));
    box-sizing: border-box;
    min-width: 0;
}

/* Inhalt darf die Slidebreite nicht sprengen */
.swatches-blaze-slider .blaze-slide .variation {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #fff;
}

/* Pfeile überlagern */
.swatches-blaze-slider .blaze-track-container {
    padding: 0 !important;
    position: relative;
    overflow: hidden;
}

/* Innenabstand Container */
.swatches-blaze-slider .blaze-track-container { padding: 0 18px; }
.variation.block.btn.btn-default.btn-xs.btn-img { padding: 0; }

.swatches-blaze-slider .blaze-track { align-items: center; }

/* Pfeil-Styles */
.swatches-blaze-slider .blaze-prev,
.swatches-blaze-slider .blaze-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
}

.blaze-prev {
    background: none !important; padding: 0; margin: 0;
    border: none !important; box-shadow: none !important;
}
.blaze-next {
    background: none !important; padding: 0; margin: 0;
    border: none !important; box-shadow: none !important;
}
.blaze-prev::before, .blaze-next::before { content: unset !important; }

/* Links/rechts neben den Slides */
.swatches-blaze-slider .blaze-prev { left: -29px; }
.swatches-blaze-slider .blaze-next { right: -29px; }

.swatches-blaze-slider .blaze-prev svg,
.swatches-blaze-slider .blaze-next svg {
    width: 18px; height: 18px;
}

/* ─────────────────────────────────────────────
   2. SIDEBAR OVERLAY CSS
   ───────────────────────────────────────────── */
#size-sidebar-overlay {
    position: fixed; top: 0; right: -450px; width: 400px; max-width: 90%;
    height: 100vh; background: #fff; box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    z-index: 2147483647;
    transition: right 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex; flex-direction: column;
    will-change: right;
    visibility: hidden;
}
#size-sidebar-overlay.open {
    right: 0;
    visibility: visible;
}

#size-sidebar-backdrop {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh; background: rgba(0,0,0,0.5);
    z-index: 2147483646; display: none; backdrop-filter: blur(2px);
}
#size-sidebar-backdrop.open { display: block; }
html.sidebar-open, body.sidebar-open { overflow: hidden !important; }

/* Loading State */
.sidebar-loader {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.8); z-index: 10;
    display: none; justify-content: center; align-items: center;
}
#size-sidebar-overlay.is-loading .sidebar-loader { display: flex; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Sidebar Content */
.size-sidebar-header {
    padding: 15px 20px; border-bottom: 1px solid #eee; display: flex;
    justify-content: space-between; align-items: center; font-size: 1.1rem; font-weight: bold; background: #f8f9fa;
}
.size-sidebar-close { cursor: pointer; font-size: 28px; line-height: 1; }
.size-tabs { display: flex; border-bottom: 1px solid #eee; background: #fff; }
.size-tab { flex: 1; text-align: center; padding: 15px 0; cursor: pointer; font-weight: 600; color: #999; border-bottom: 3px solid transparent; text-transform: uppercase; }
.size-tab.active { color: var(--sd-text); border-bottom: 3px solid var(--sd-text); }
.size-sidebar-content { padding: 20px; overflow-y: auto; height: auto; }

/* Sidebar Grid */
.sidebar-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 480px) { .sidebar-swatches { grid-template-columns: repeat(3, 1fr); gap: 8px; } }

.sidebar-swatches .variation-tile {
    display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
    width: 100%; min-height: 50px; margin: 0; padding: 5px;
    border: 1px solid #ddd; border-radius: var(--sd-radius-base); background: #fff; cursor: pointer; position: relative;
}
.sidebar-swatches .variation-tile:hover { border-color: #888; }
.sidebar-swatches .variation-tile.active { border-color: var(--sd-text); background: var(--sd-text); color: var(--sd-text-inverse); }

.grid-stock-badge { display: none; }
.sidebar-swatches .variation-tile.out-of-stock { opacity: 0.5; background: #f9f9f9; }
.variation-tile.out-of-stock.active {
    background: var(--sd-text);
    opacity: 1;
}

.show-eu .uk, .show-eu .us { display: none !important; }
.show-uk .normal { display: none !important; }

/* ─────────────────────────────────────────────
   Blaze Swatch Slider – PDP/PLP Konfiguration
   ───────────────────────────────────────────── */

/* Standard: PLP / überall → 4 Slides */
.swatches-blaze-slider {
    --slides: 4;
}

/* PDP (PAGE_ARTIKEL = 1) → mobil 3.5 Slides */
body[data-page="1"] .swatches-blaze-slider {
    --slides: 3.5;
}

@media (max-width: 768px) {
    body[data-page="1"] .swatches-blaze-slider {
        --slides: 3.5;
    }
}

@media (max-width: 520px) {
    body[data-page="1"] .swatches-blaze-slider {
        --slides: 3.5;
    }
}

.swatches.disBlockimgswatchesimgswatches-farbe {
    display: flex;
}

/* ─────────────────────────────────────────────
   Fullscreen Layout – #bxt-w Boxed-Layout auflösen
   Snackys setzt max-width: var(--wdt-pag) auf #bxt-w,
   das begrenzt Header + Footer. Wir machen #bxt-w
   vollbreit und stellen mw-container für Content wieder her.
   ───────────────────────────────────────────── */

#bxt-w {
  max-width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
}

/* mw-container innerhalb #bxt-w: normale Breite wiederherstellen
   (Snackys boxlayout.css hatte max-width: none gesetzt) */
#bxt-w .mw-container {
  max-width: calc(var(--wdt-pag) + 200px);
  margin-left: auto;
  margin-right: auto;
}


/* Gap auf dem Track entfernen, Abstand über Margin der Slides */
.swatches-blaze-slider .blaze-track {
    gap: 0 !important;
}

.swatches-blaze-slider .blaze-slide {
    margin-right: 20px;
}

.swatches-blaze-slider .blaze-slide:last-child {
    margin-right: 0;
}

.muted {
    color: var(--sd-muted-alt);
}

.muted a {
    color: var(--sd-muted-alt) !important;
}
/* =========================================================
   Mobile: Focus & Hover States – NUR TOUCH/MOBILE
   ========================================================= */

/* Focus-Ringe, Box-Shadows und rote Rahmen auf Touch-Geraeten entfernen */
@media (max-width: 767px) {
  :focus,
  :focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border-color: inherit !important;
  }
  * {
    -webkit-tap-highlight-color: transparent;
  }
}

/* Hover-Effekte nur auf Geraeten mit echter Hover-Faehigkeit aktiv lassen */
@media (hover: none) {
  a:hover,
  button:hover,
  .btn:hover,
  li:hover > a,
  .mm-mainlink:hover,
  .p-w:hover,
  .card:hover,
  *:hover > .overlay,
  *:hover > .hover-overlay {
    color: inherit !important;
    background-color: inherit !important;
    border-color: inherit !important;
    opacity: inherit !important;
    text-decoration: inherit !important;
    box-shadow: inherit !important;
  }

  /* Keine roten Rahmen/Boxshadow auf Variations beim Swipe (PDP) */
  a.variation:focus,
  a.variation:active,
  a.variation:focus-visible,
  label.variation:focus,
  label.variation:active,
  label.variation:focus-visible,
  .swatches .variation:focus-within,
  .imgswatches-farbe .variation:focus,
  .imgswatches-farbe .variation:active,
  .var-it .swatches .btn-img:hover .img-ct,
  .var-it .swatches .btn-img:active .img-ct {
    outline: none !important;
    box-shadow: none !important;
    border-color: inherit !important;
    background-color: inherit !important;
  }
}

/* pointer:coarse = Touchscreen – gleiches gilt unabhaengig von hover-Faehigkeit */
@media (pointer: coarse) {
  .var-it .swatches .btn-img:hover .img-ct,
  .var-it .swatches .btn-img:active .img-ct,
  .var-it .swatches .btn-img:focus .img-ct {
    box-shadow: none !important;
  }

  /* .active bleibt – nur Pseudo-Klassen unterdrücken */
  .var-it .swatches .btn-img:not(.active):hover,
  .var-it .swatches .btn-img:not(.active):active {
    border-color: inherit !important;
  }
}
