/**
 * LFA Product Labels - Pionowe Etykiety + Nakładka Outofstock
 * BUILD 005.28
 * Data: 2025-11-05
 */

.product-label {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    right: auto !important;
    z-index: 99 !important;
    pointer-events: none !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: row !important;  /* ETYKIETY OBOK SIEBIE POZIOMO */
    gap: 3px !important;            /* PRZERWA MIĘDZY PIONOWYMI ETYKIETAMI */
    align-items: flex-start !important;
    justify-content: flex-start !important;
}

.product-label span.out-of-stock,
.product-label span.on-sale,
.product-label span.onsale,
.product-label span.new,
.product-label span.featured,
.product-label span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    overflow: hidden !important;
    
    /* WYMIARY ZGODNE Z DEVELOPER TOOLS - 22x140px PIONOWE BOXY */
    width: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    height: 140px !important;
    min-height: 140px !important;
    max-height: 140px !important;
    
    /* Padding */
    padding: 10px 2px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    
    /* FORMATOWANIE TEKSTU - dokładnie wyśrodkowane */
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    word-wrap: break-word !important;
    
    /* PIONOWY TEKST Z PERFEKCYJNYM WYŚRODKOWANIEM */
    writing-mode: vertical-rl !important;
    text-orientation: mixed !important;
    transform: rotate(180deg) !important;
    transform-origin: center center !important;
    
    /* Stylizacja wizualna */
    background: #e74c3c !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 11px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
    pointer-events: auto !important;
    
    /* WYŁĄCZONE ANIMACJE */
    transition: none !important;
    animation: none !important;
}

.product-label span.out-of-stock span,
.product-label span.on-sale span,
.product-label span.onsale span,
.product-label span.new span,
.product-label span.featured span,
.product-label span span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    text-align: center !important;
    color: inherit !important;
    background: transparent !important;
    border: none !important;
    text-transform: inherit !important;
    letter-spacing: inherit !important;
    writing-mode: inherit !important;
    text-orientation: inherit !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
    box-sizing: border-box !important;
}

/* KOLORY DLA RÓŻNYCH TYPÓW ETYKIET */

/* Wyprzedane - szary */
.product-label span.out-of-stock {
    background: linear-gradient(180deg, #7f8c8d 0%, #95a5a6 100%) !important;
    box-shadow: 0 2px 6px rgba(127, 140, 141, 0.4) !important;
}

/* Wyprzedaż/promocja - czerwony */
.product-label span.on-sale,
.product-label span.onsale {
    background: linear-gradient(180deg, #e74c3c 0%, #c0392b 100%) !important;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.4) !important;
}

/* Nowość - zielony */
.product-label span.new {
    background: linear-gradient(180deg, #27ae60 0%, #229954 100%) !important;
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.4) !important;
}

/* Bestseller - zielony */
.product-label span.featured {
    background: linear-gradient(180deg, #27ae60 0%, #229954 100%) !important;
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.4) !important;
}

/* Procentowe zniżki - pomarańczowy */
.product-label span.percent {
    background: linear-gradient(180deg, #e67e22 0%, #d35400 100%) !important;
    box-shadow: 0 2px 6px rgba(230, 126, 34, 0.4) !important;
}

/* CAŁKOWICIE WYŁĄCZONE HOVER EFEKTY */
.product-label:hover,
.product-label:hover span,
.product-label span:hover,
.product-label *:hover {
    transform: rotate(180deg) !important;
    width: 22px !important;
    height: 140px !important;
    box-shadow: inherit !important;
    background: inherit !important;
    transition: none !important;
    animation: none !important;
    scale: 1 !important;
}

/* Dodatkowe zabezpieczenia przed hover */
.product-label *,
.product-label *:before,
.product-label *:after {
    transition: none !important;
    animation: none !important;
}

.thumbnail-wrapper {
    position: relative !important;
}

.thumbnail-wrapper .product-label {
    z-index: 100 !important;
}

/* RESPONSYWNOŚĆ */
@media (max-width: 768px) {
    .product-label {
        gap: 2px !important;  /* Mniejsza przerwa na tabletach */
    }
    
    .product-label span.out-of-stock,
    .product-label span.on-sale,
    .product-label span.onsale,
    .product-label span.new,
    .product-label span.featured,
    .product-label span {
        width: 20px !important;
        min-width: 20px !important;
        max-width: 20px !important;
        height: 120px !important;
        min-height: 120px !important;
        max-height: 120px !important;
        font-size: 10px !important;
        padding: 8px 2px !important;
        border-radius: 10px !important;
    }
    
    .product-label:hover span {
        width: 20px !important;
        height: 120px !important;
    }
}

@media (max-width: 480px) {
    .product-label {
        gap: 1px !important;  /* Bardzo mała przerwa na telefonach */
    }
    
    .product-label span.out-of-stock,
    .product-label span.on-sale,
    .product-label span.onsale,
    .product-label span.new,
    .product-label span.featured,
    .product-label span {
        width: 18px !important;
        min-width: 18px !important;
        max-width: 18px !important;
        height: 100px !important;
        min-height: 100px !important;
        max-height: 100px !important;
        font-size: 9px !important;
        padding: 6px 1px !important;
        border-radius: 9px !important;
    }
    
    .product-label:hover span {
        width: 18px !important;
        height: 100px !important;
    }
}

/* NAKŁADKA DLA WYPRZEDANYCH PRODUKTÓW */

/* Kontener produktu wyprzedanego */
.product.outofstock .thumbnail-wrapper,
.product[class*="outofstock"] .thumbnail-wrapper,
section.outofstock .thumbnail-wrapper,
section[class*="outofstock"] .thumbnail-wrapper {
    position: relative !important;
}

/* Nakładka na całym obrazku produktu wyprzedanego */
.product.outofstock .thumbnail-wrapper::after,
.product[class*="outofstock"] .thumbnail-wrapper::after,
section.outofstock .thumbnail-wrapper::after,
section[class*="outofstock"] .thumbnail-wrapper::after {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(255, 255, 255, 0.8) !important; /* Biała nakładka z 80% przezroczystością */
    z-index: 2 !important;
    pointer-events: none !important;
    border-radius: inherit !important;
}

/* Alternatywna wersja z szarą nakładką (odkomentuj jeśli wolisz szarą) */
/*
.product.outofstock .thumbnail-wrapper::after,
.product[class*="outofstock"] .thumbnail-wrapper::after,
section.outofstock .thumbnail-wrapper::after,
section[class*="outofstock"] .thumbnail-wrapper::after {
    background-color: rgba(128, 128, 128, 0.7) !important;
}
*/

/* Alternatywna wersja z czarną nakładką (odkomentuj jeśli wolisz czarną) */
/*
.product.outofstock .thumbnail-wrapper::after,
.product[class*="outofstock"] .thumbnail-wrapper::after,
section.outofstock .thumbnail-wrapper::after,
section[class*="outofstock"] .thumbnail-wrapper::after {
    background-color: rgba(0, 0, 0, 0.6) !important;
}
*/

/* Zapewnienie że etykiety są ponad nakładką */
.product.outofstock .product-label,
.product[class*="outofstock"] .product-label,
section.outofstock .product-label,
section[class*="outofstock"] .product-label {
    z-index: 101 !important;
}

.product.outofstock .product-label span,
.product[class*="outofstock"] .product-label span,
section.outofstock .product-label span,
section[class*="outofstock"] .product-label span {
    z-index: 102 !important;
}

/* Zapewnienie że przyciski są ponad nakładką */
.product.outofstock .product-group-button,
.product[class*="outofstock"] .product-group-button,
section.outofstock .product-group-button,
section[class*="outofstock"] .product-group-button {
    position: relative !important;
    z-index: 103 !important;
}

/* Opcjonalnie - efekt hover dla nakładki */
.product.outofstock .thumbnail-wrapper:hover::after,
.product[class*="outofstock"] .thumbnail-wrapper:hover::after,
section.outofstock .thumbnail-wrapper:hover::after,
section[class*="outofstock"] .thumbnail-wrapper:hover::after {
    background-color: rgba(255, 255, 255, 0.9) !important; /* Zwiększona przezroczystość przy hover */
}

/* Responsywność */
@media (max-width: 768px) {
    .product.outofstock .thumbnail-wrapper::after,
    .product[class*="outofstock"] .thumbnail-wrapper::after,
    section.outofstock .thumbnail-wrapper::after,
    section[class*="outofstock"] .thumbnail-wrapper::after {
        background-color: rgba(255, 255, 255, 0.75) !important; /* Nieco mniej przezroczystości na mobile */
    }
}

@media (max-width: 480px) {
    .product.outofstock .thumbnail-wrapper::after,
    .product[class*="outofstock"] .thumbnail-wrapper::after,
    section.outofstock .thumbnail-wrapper::after,
    section[class*="outofstock"] .thumbnail-wrapper::after {
        background-color: rgba(255, 255, 255, 0.7) !important; /* Jeszcze mniej przezroczystości na małych ekranach */
    }
}
