/* =========================================================
   PRODUCT DETAIL – SCHARRSHOP
   Modern, Amazon-Style, stabil, responsive, WCAG 2.2 AA
   ========================================================= */

/* ---------------------------------------------------------
   BARRIEREFREIHEIT: SR-ONLY & FOKUS (Pflicht EAA 2025)
--------------------------------------------------------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Stark sichtbarer Fokus – gelb auf grün = perfekt erkennbar (Kontrast > 4.5:1) */
:focus-visible {
    outline: 3px solid #ffbf00 !important;
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------------------------------------------------------
   GLOBAL WRAPPER
--------------------------------------------------------- */
.product-wrapper {
    width: 100%;
    margin: 10px 10px 20px 10px;
    padding-bottom: 80px;
    font-size: 16px;
}

/* =========================================================
   BREADCRUMB
========================================================= */
.breadcrumb {
    margin-top: 5px !important;     /* ← das ist alles, was du brauchst */
    padding: 5px;     /* oben/unten/seitlich schön viel Luft */
    border-bottom: 1px solid #eee;
    margin-bottom: 5px;
    font-size: 15px;
    line-height: 1.4;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-link {
    color: #2E4F20;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 2px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb-link:hover {
    color: #1a3a12;
    background: rgba(46, 79, 32, 0.08);
}

.breadcrumb-link .material-icons {
    font-size: 20px;
    color: #2E4F20;
}

/* Trennzeichen › */
.breadcrumb-separator {
    color: #999;
    font-size: 18px;
    font-weight: 300;
    user-select: none;
}

/* Aktueller Punkt (nicht klickbar) */
.breadcrumb-current {
    color: #222;
    font-weight: 600;
    padding: 6px 2px;
}

/* Mobile Optimierung */
@media (max-width: 768px) {
    .breadcrumb {
		margin-top: 8px !important;
        padding: 16px 16px 12px 16px;
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .breadcrumb-link {
        padding: 8px 4px;
    }
    
    .breadcrumb-separator {
        font-size: 16px;
    }
    
    .breadcrumb-link .material-icons {
        font-size: 19px;
    }
}

/* Dark Mode (falls du mal willst) */
@media (prefers-color-scheme: dark) {
    .breadcrumb {
        background: #1a1a1a;
        border-bottom-color: #333;
        color: #ddd;
    }
    .breadcrumb-link { color: #8fb98a; }
    .breadcrumb-separator { color: #666; }
    .breadcrumb-current { color: #fff; }
}

/* ---------------------------------------------------------
   GRID LAYOUT
--------------------------------------------------------- */
.product-grid {
    display: grid;
    grid-template-columns: 40% 40% 20%;
    gap: 40px;
}

@media (max-width: 1100px) {
    .product-grid {
        grid-template-columns: 50% 50%;
    }
}

@media (max-width: 850px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------------------------------
   STICKY COLUMNS (Amazon Style)
--------------------------------------------------------- */
@media (min-width: 1100px) {
    .col-left,
    .col-middle,
    .col-right {
        position: sticky;
        top: 120px;
        height: fit-content;
        z-index: 5;
    }
}

/* ---------------------------------------------------------
   LEFT COLUMN – IMAGES
--------------------------------------------------------- */
.main-image-box {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
}

#mainImage {
    width: 100%;
    height: auto;
    cursor: zoom-in;
    border-radius: 12px;
}

/* Thumbnails */
.thumb-row {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid transparent;
    background: #fff;
    cursor: pointer;
    transition: 0.2s;
}

/* Fokus + Hover + aktive Auswahl */
.thumb:hover,
.thumb:focus-visible,
.thumb.active {
    border-color: #2E4F20;
    transform: scale(1.04);
}

/* ---------------------------------------------------------
   MIDDLE COLUMN
--------------------------------------------------------- */
.brand {
    font-size: 18px;
    font-weight: 600;
    color: #2E4F20;
    margin-bottom: 5px;
}

.product-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.rating-box {
    font-size: 15px;
    color: #555;
    margin-bottom: 18px;
}

.short-description {
    margin-bottom: 25px;
    font-size: 15px;
    line-height: 1.5;
}

/* ---------------------------------------------------------
   VARIANTEN
--------------------------------------------------------- */
.variant-section {
    margin: 28px 0 10px 0;
}

/* Komplett alle fieldset-Border, Hintergründe und Abstände entfernen */
.variant-group,
.variant-group fieldset {
    all: unset;                     /* entfernt wirklich ALLES vom fieldset */
    display: block;
    margin: 0 0 28px 0;
    padding: 0;
    border: none !important;
    background: none !important;
    min-width: 0;
}

.variant-group legend {
    all: unset;
    display: block;
    font-weight: 700;
    font-size: 15px;
    color: #222;
    margin-bottom: 11px;
    padding: 0;
}

/* Container für die Buttons */
.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Grundzustand – komplett clean, nur leichter Schatten */
.variant-btn {
    padding: 11px 20px;
    background: #ffffff;
    color: #1a1a1a;
    border: 2px solid #e2e2e2;        /* sehr dezent, fast unsichtbar */
    border-radius: 14px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.23s ease;
    min-width: 56px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.07);
}

/* Hover & Fokus – sanftes Highlight */
.variant-btn:hover {
    border-color: #2E4F20;
    background: #f9fff7;
    box-shadow: 0 4px 12px rgba(46, 79, 32, 0.15);
    transform: translateY(-2px);
}

.variant-btn:focus-visible {
    outline: none;
    border-color: #2E4F20;
    box-shadow: 0 0 0 4px rgba(46, 79, 32, 0.18), 0 4px 12px rgba(46, 79, 32, 0.15);
    transform: translateY(-2px);
}

/* Ausgewählt – dein Markengrün, stark und elegant */
.variant-btn.active,
.variant-btn[aria-checked="true"] {
    background: #2E4F20 !important;
    color: #ffffff !important;
    border-color: #2E4F20 !important;
    box-shadow: 0 5px 15px rgba(46, 79, 32, 0.3);
    transform: translateY(-3px);
    font-weight: 600;
}

/* Optional: Farb-Swatches (falls du später echte Farben willst) */
.variant-btn[data-swatch] {
    padding: 4px;
    min-width: 64px;
    height: 44px;
    position: relative;
    overflow: hidden;
}
.variant-btn[data-swatch]::before {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 10px;
    background: var(--swatch-color, #ccc);
    border: 2px solid #fff;
}
.variant-btn[data-swatch] span {
    position: relative;
    z-index: 1;
    font-size: 13px;
}

/* ---------------------------------------------------------
   RIGHT COLUMN – Pricing
--------------------------------------------------------- */
.col-right {
    background: #fafafa;
    padding: 20px;
    border-radius: 12px;
}

/* Aktion */
.discount-badge {
    background: #e60000;
    color: #fff;
    padding: 6px 12px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 6px;
    margin-bottom: 15px;
}

/* Preis */
.price-top {
    display: flex;
    gap: 12px;
    align-items: baseline;
}

.price-percent {
    color: #e60000;
    font-weight: 700;
    font-size: 22px;
}

.price-current {
    font-size: 26px;
    font-weight: 700;
    color: #2E4F20;
}

/* MwSt */
.mwst-line {
    font-size: 11px;
    margin-bottom: 20px;
}

.mwst-line a {
    color: #2E4F20;
    font-weight: 600;
}

.mwst-line a:focus-visible {
    text-decoration: underline;
}

/* Lieferzeit */
.delivery {
    font-size: 15px;
    margin-bottom: 15px;
}

/* Menge */
.qty-select {
    padding: 7px;
    font-size: 15px;
    margin-bottom: 20px;
}

/* Kaufen Button */
.btn-buy {
    width: 100%;
    padding: 14px;
    background: #2E4F20;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 15px;
    transition: background .2s;
}

.btn-buy:hover,
.btn-buy:focus-visible {
    background: #1c3616;
}

/* Merken + Teilen */
.action-row {
    display: flex;
    gap: 10px;
}

.btn-wishlist,
.btn-share {
    flex: 1;
    padding: 10px;
    background: #fff;
    border: 1px solid #aaa;
    color: #2E4F20;
    border-radius: 10px;
    cursor: pointer;
    transition: .2s;
}

.btn-wishlist:hover,
.btn-share:hover,
.btn-wishlist:focus-visible,
.btn-share:focus-visible {
    background: #eaeaea;
}

/* SKU */
.sku-line {
    font-size: 12px !important;
    color: #777;
    margin-top: 15px;
    line-height: 1.4;
}

/* ---------------------------------------------------------
   DESCRIPTION SECTION
--------------------------------------------------------- */
.description-block {
    margin-top: 60px;
}

.description {
    margin-top: 20px !important;   /* genau die 20px, die du wolltest */
}

@media (max-width: 850px) {
    .description-block {
        margin-top: 40px;
    }
}

.related-products h2 {
    margin-bottom: 20px;
}

/* ---------------------------------------------------------
   RELATED PRODUCTS
--------------------------------------------------------- */
.related-products {
    margin-top: 80px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

@media (max-width: 850px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.related-item {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    text-decoration: none;
    color: #222;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: .2s;
}

.related-item:hover,
.related-item:focus-visible {
    transform: translateY(-3px);
}

.related-thumb img {
    width: 100%;
    height: 180px;
    object-fit: contain;
}

.related-name {
    font-size: 16px;
    font-weight: 600;
}

.related-uvp {
    font-size: 14px;
}

.related-percent {
    color: #e60000;
    font-weight: 700;
}

.related-uvp-strike s {
    color: #777;
}

.related-price {
    font-size: 18px;
    font-weight: 700;
    color: #2E4F20;
    margin: 10px 0;
}

/* UVP Styles */
.uvp-line {
    font-size: 15px;
    color: #777;
    margin: 5px 0px 10px 0px;
}

.uvp-label {
    font-weight: 600;
    margin-right: 6px;
}

.uvp-value s {
    color: #999;
}

/* =========================================================
   LIGHTBOX 
========================================================= */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: #eaeaea;                    /* schönes helles Grau */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 0;
    overflow: hidden;
}

.lightbox-window {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Bild */
.lightbox-main {
    width: 100%;
    height: 100%;
    cursor: zoom-in;
    text-align: center;
    user-select: none;
}

.lightbox-main img {
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
    transition: transform 0.4s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.lightbox-main.zoomed {
    cursor: zoom-out;
}

/* Bildzähler */
.lightbox-counter {
    position: absolute;
    top: 28px;
    left: 28px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    z-index: 100;
    backdrop-filter: blur(12px);
}

/* X-Button – oben rechts */
.lightbox-close-only {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.95);
    color: #222;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    z-index: 100;
    transition: all 0.25s ease;
}

.lightbox-close-only:hover {
    background: #fff;
    transform: scale(1.12);
}

/* Lupe-Button – 50px nach unten + 50px vom rechten Rand */
.lightbox-zoom-btn {
    position: absolute;
    top: 74px;
    right: 100px; 
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,0.95);
    color: #222;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 10px 35px rgba(0,0,0,0.2);
    z-index: 100;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-zoom-btn:hover {
    background: #fff;
    transform: scale(1.15);
}

/* Pfeile ‹ › */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 64px;
    height: 64px;
    background: rgba(255,255,255,0.94);
    color: #222;
    border: none;
    border-radius: 50%;
    font-size: 34px;
    font-weight: 300;
    cursor: pointer;
    box-shadow: 0 12px 40px rgba(0,0,0,0.22);
    z-index: 100;
    transition: all 0.3s ease;
}

.lightbox-prev { left: 30px; }
.lightbox-next { right: 30px; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 18px 50px rgba(0,0,0,0.3);
}

/* =========================================================
   MOBILE – Bild exakt mittig (vertikal + horizontal)
   → funktioniert auf allen Handys & Tablets bis 768px
========================================================= */
@media (max-width: 768px) {

    /* Lightbox komplett zentriert */
    .lightbox-overlay {
        align-items: center;      /* vertikale Zentrierung */
        justify-content: center;  /* horizontale Zentrierung */
        padding: 0;
    }

    .lightbox-window {
        width: 100vw;
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Bild selbst – perfekt mittig + nie oben kleben */
    .lightbox-main {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;            /* kleiner Rand, damit nichts am Rand klebt */
        box-sizing: border-box;
    }

    .lightbox-main img {
        max-width: calc(100% - 40px);   /* Platz für die seitlichen Pfeile */
        max-height: calc(100% - 40px);  /* Platz für obere/untere Buttons */
        width: auto;
        height: auto;
        object-fit: contain;
    }

    /* Bildzähler etwas kleiner und nicht im Weg */
    .lightbox-counter {
        top: 50px !important;
        left: 30px !important;
        font-size: 13px !important;
        padding: 6px 12px !important;
    }

    /* X-Button oben rechts */
    .lightbox-close-only {
        top: 50px !important;
        right: 30px !important;
        width: 44px !important;
        height: 44px !important;
        font-size: 22px !important;
    }

    /* Lupe-Button – 50px nach unten + 50px vom Rand (wie gewünscht) */
    .lightbox-zoom-btn {
        top: 100px !important;     /* 12px oben + 50px nach unten */
        right: 50px !important;   /* 50px vom Rand wird auf Handy auf 12px reduziert, sonst zu weit */
        width: 80px !important;
        height: 80px !important;
        font-size: 20px !important;
    }

    /* Pfeile links & rechts – schön mittig und nicht zu groß */
    .lightbox-prev,
    .lightbox-next {
        width: 56px !important;
        height: 56px !important;
        font-size: 30px !important;
    }
    .lightbox-prev  { left: 12px !important; }
    .lightbox-next { right: 12px !important; }

    /* Falls du Querformat hast – trotzdem mittig */
    @media (max-height: 500px) and (orientation: landscape) {
        .lightbox-main { padding: 10px; }
        .lightbox-main img {
            max-height: calc(100% - 20px);
            max-width: calc(100% - 20px);
        }
    }
}

@media (max-width: 768px) {
    .product-wrapper {
        width: auto;
        box-sizing: border-box; /* optional perfekt */
    }
}
