:root {
    --sundose-blackweek-frame-padding: 12px;
    --sundose-blackweek-pdp-frame-padding: 20px;
}

/* Wspólna wysokość dla produktów z ramką i bez. */
body.sundose-blackweek-promo .products .pls-product-image {
    position: relative;
    height: 401px;
    box-sizing: border-box;
}

/* Kontener zdjęcia w Anvogue. */
body.sundose-blackweek-promo .products .pls-product-image > a.woocommerce-LoopProduct-link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

/* Zdjęcie wypełnia dostępną przestrzeń. */
body.sundose-blackweek-promo .products .pls-product-image > a.woocommerce-LoopProduct-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Ramka Black Week — padding wliczony w wysokość 401px. */
body.sundose-blackweek-promo .products .sundose-blackweek-product-card .pls-product-image {
    display: flex;
    flex-direction: column;
    padding: var(--sundose-blackweek-frame-padding) !important;
    box-sizing: border-box;
    border-radius: 12px !important;
    overflow: hidden;
    background: linear-gradient(
        325.04deg,
        #FF8941 44.49%,
        #FF6100 58.74%,
        #191919 87.45%
    );
}

/* Banner bez paddingu od góry i po bokach. */
body.sundose-blackweek-promo .products .sundose-blackweek-product-card .pls-product-image::before {
    content: "";
    position: static;
    display: block;
    flex: 0 0 auto;

    width: calc(100% + 2 * var(--sundose-blackweek-frame-padding));
    max-width: none;
    height: auto;
    aspect-ratio: 450 / 91;

    margin-top: calc(-1 * var(--sundose-blackweek-frame-padding));
    margin-right: calc(-1 * var(--sundose-blackweek-frame-padding));
    margin-bottom: 0;
    margin-left: calc(-1 * var(--sundose-blackweek-frame-padding));

    background: url("../img/banner-product-bw.png") center / contain no-repeat;
    pointer-events: none;
}

/* Zdjęcie zajmuje pozostałą wysokość pod bannerem. */
body.sundose-blackweek-promo .products .sundose-blackweek-product-card
.pls-product-image > a.woocommerce-LoopProduct-link {
    flex: 1 1 0;
    height: auto;
    border-radius: 7px;
}

/* Wyłączenie wcześniejszej ramki na pseudoelementcie. */
body.sundose-blackweek-promo .products .sundose-blackweek-product-card .pls-product-image::after {
    content: none;
}

/* Ukrycie etykiet wyłącznie dla produktów Black Week. */
body.sundose-blackweek-promo .products .sundose-blackweek-product-card .pls-product-labels {
    display: none;
}

/* Przyciski dopasowane do szerokości zdjęcia i podniesione o padding. */
body.sundose-blackweek-promo .products.grid-view:not(.product-style-5)
.sundose-blackweek-product-card
.pls-product-image .pls-product-actions {
    width: calc(100% - 2 * var(--sundose-blackweek-frame-padding));
    box-sizing: border-box;
    margin-bottom: var(--sundose-blackweek-frame-padding);
}

:root {
    --sundose-blackweek-pdp-frame-padding: 20px;
}

/* Ramka wyłącznie na pierwszym dużym slajdzie. */
.sundose-blackweek-product-gallery
.woocommerce-product-gallery__wrapper
.pls-single-product-gallery > .woocommerce-product-gallery__image:first-child {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    box-sizing: border-box;

    padding: var(--sundose-blackweek-pdp-frame-padding) !important;
    border-radius: 12px !important;
    overflow: hidden;

    background: linear-gradient(
        325.04deg,
        #FF8941 44.49%,
        #FF6100 58.74%,
        #191919 87.45%
    );
}

/* Banner bez paddingu od góry i po bokach. */
.sundose-blackweek-product-gallery
.woocommerce-product-gallery__wrapper
.pls-single-product-gallery > .woocommerce-product-gallery__image:first-child::before {
    content: "";
    position: relative;
    display: block;
    flex: 0 0 auto;
    z-index: 2;

    width: calc(100% + 2 * var(--sundose-blackweek-pdp-frame-padding));
    max-width: none;
    height: auto;
    aspect-ratio: 675 / 137;

    margin-top: calc(-1 * var(--sundose-blackweek-pdp-frame-padding));
    margin-right: calc(-1 * var(--sundose-blackweek-pdp-frame-padding));
    margin-bottom: 0;
    margin-left: calc(-1 * var(--sundose-blackweek-pdp-frame-padding));

    background:
        url("../img/banner-product-bw-big.png")
        center / contain no-repeat;

    pointer-events: none;
}

/* Zdjęcie produktu — bez ingerowania w rozmiary .zoomImg. */
.sundose-blackweek-product-gallery
.woocommerce-product-gallery__wrapper
.pls-single-product-gallery > .woocommerce-product-gallery__image:first-child > img.wp-post-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-width: 0;
    margin: 0;
    border-radius: 7px;
    object-fit: cover;
    object-position: center;
}

/* Ramka razem z bannerem zachowuje proporcje pozostałych slajdów. */
.sundose-blackweek-product-gallery
.woocommerce-product-gallery__wrapper
.pls-single-product-gallery > .woocommerce-product-gallery__image:first-child {
    aspect-ratio: 418 / 563;
    height: auto;
    box-sizing: border-box;
}

/* Zdjęcie wypełnia przestrzeń pozostałą pod bannerem. */
.sundose-blackweek-product-gallery
.woocommerce-product-gallery__wrapper
.pls-single-product-gallery > .woocommerce-product-gallery__image:first-child > img.wp-post-image {
    flex: 1 1 0;
    min-height: 0;
    height: 0;
    width: 100%;
    object-fit: cover;
    object-position: center;
}

:root {
    --sundose-blackweek-topbar-height: 40px;
    --sundose-blackweek-topbar-image-width: 200px;
}

/* Tło całego paska — wyłącznie podczas kampanii. */
.pls-header-topbar:has(.sundose-blackweek-topbar-message) {
    --pls-topbar-height: var(--sundose-blackweek-topbar-height);

    height: var(--sundose-blackweek-topbar-height);
    max-height: none;
    box-sizing: border-box;
    border: 0;

    background: #271E1C url("../img/topbar-bg.png?v=1.2.12")
        center / cover no-repeat;
}

/* Kontener zajmuje całą szerokość paska. */
.pls-header-topbar:has(.sundose-blackweek-topbar-message) > .container {
    width: 100%;
    max-width: none;
}

/* Ukrywamy pozostałe kolumny tylko w promocyjnym topbarze. */
.pls-header-topbar:has(.sundose-blackweek-topbar-message)
.pls-header-col:not(:has(.sundose-blackweek-topbar-message)) {
    display: none;
}

/* Kolumna z komunikatem — pełna szerokość i wyśrodkowanie. */
.pls-header-topbar
.pls-header-col:has(.sundose-blackweek-topbar-message) {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: var(--sundose-blackweek-topbar-height);
    padding: 0;
    justify-content: center;
    align-items: center;
}

/* Ukrywamy inne elementy w tej samej kolumnie. */
.pls-header-topbar
.pls-header-col:has(.sundose-blackweek-topbar-message)
> :not(:has(.sundose-blackweek-topbar-message)) {
    display: none;
}

/* Reset odstępów domyślnego wrappera tekstu. */
.pls-header-topbar
.pls-header-col > .pls-text-message:has(.sundose-blackweek-topbar-message) {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    line-height: 1;
}

/* Nasza grafika tekstowa. */
.pls-header-topbar .sundose-blackweek-topbar-message {
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--sundose-blackweek-topbar-height);
    padding: 6px 12px;
    box-sizing: border-box;
}

.pls-header-topbar .sundose-blackweek-topbar-message img {
    display: block;
    width: var(--sundose-blackweek-topbar-image-width);
    max-width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
}

body.sundose-bw26-landing div#page-title {
    display: none;
}

/* BLACK WEEK — wyróżniona pozycja menu */
.pls-main-navigation .menu-item.sundose-blackweek-menu-item > a {
    background-color: #000;
    color: #fff;
    padding: 10px 16px;
    border-radius: 6px;
    transition: color 0.2s ease;
}

.pls-main-navigation .menu-item.sundose-blackweek-menu-item:hover > a,
.pls-main-navigation .menu-item.sundose-blackweek-menu-item:focus-visible > a {
    background-color: #000 !important;
    color: #FF8941 !important;
}

/* Stopka tylko na LP i TYP — oba szablony mają tę klasę body. */
body.sundose-bw26-landing .pls-site-footer {
    position: relative;
}

@media (max-width: 1024px) {
    body.sundose-bw26-landing.pls-mobile-bottom-navbar {
        margin-bottom: 0;
    }
}

/* Bez odstępu przed stopką na landingu i Thank You Page. */
body.sundose-bw26-landing .pls-site-content {
    padding-bottom: 0;
}

/* Nowa galeria A/B: dziedziczy kwalifikację promocji ze starej galerii.
   product-image.php renderuje obie galerie jako bezpośrednie rodzeństwo. */
html.ab-main-variant .sd-gallery-test:has(+ .sundose-blackweek-product-gallery) .sd-gallery-test__track > .sd-gallery-test__slide[data-sd-slide="0"] {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-width: 0;
    padding: var(--sundose-blackweek-pdp-frame-padding);
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(325.04deg, #FF8941 44.49%, #FF6100 58.74%, #191919 87.45%);
}

html.ab-main-variant .sd-gallery-test:has(+ .sundose-blackweek-product-gallery) .sd-gallery-test__track > .sd-gallery-test__slide[data-sd-slide="0"]::before {
    content: "";
    display: block;
    flex: 0 0 auto;
    width: calc(100% + 2 * var(--sundose-blackweek-pdp-frame-padding));
    aspect-ratio: 675 / 137;
    margin: calc(-1 * var(--sundose-blackweek-pdp-frame-padding));
    margin-bottom: 0;
    background: url("../img/banner-product-bw-big.png") center / contain no-repeat;
    pointer-events: none;
}

html.ab-main-variant .sd-gallery-test:has(+ .sundose-blackweek-product-gallery) .sd-gallery-test__track > .sd-gallery-test__slide[data-sd-slide="0"] > img {
    position: static;
    inset: auto;
    display: block;
    flex: 1 1 0;
    width: 100%;
    max-width: 100%;
    height: 0;
    min-width: 0;
    min-height: 0;
    margin: 0;
    border-radius: 7px;
    object-fit: cover;
    object-position: center;
}


/* Hero ON/OFF: osobne grafiki, bez filtrów i masek hover. */
body.sundose-blackweek-home .pls-slider-wrapper:has(> .sundose-bw-hero-slider) {
 width:100vw; max-width:none; margin-inline:calc(50% - 50vw);
}
body.sundose-blackweek-home .sundose-bw-hero-slider,
body.sundose-blackweek-home .sundose-bw-hero-slider > .swiper-wrapper {height:auto; min-height:0;}
body.sundose-blackweek-home [data-elementor-type="wp-page"] .pls-home-slides.sundose-bw-hero-slider > .swiper-wrapper > .pls-slide.sundose-bw-hero-slide {
 position:relative; display:block; height:auto; min-height:0; max-height:none;
 padding:0; overflow:hidden; isolation:isolate; line-height:0;
 /* Kolory próbkowane z JPEG. Przejście ukryte pod grafiką o maksymalnej szerokości 1600px. */
 --bw-hero-edge-left:#111111;
 --bw-hero-edge-right:#6b6b6b;
 background:linear-gradient(to right,
   var(--bw-hero-edge-left) calc(50% - 800px),
   var(--bw-hero-edge-right) calc(50% + 800px));
}
body.sundose-blackweek-home [data-elementor-type="wp-page"] .pls-home-slides.sundose-bw-hero-slider > .swiper-wrapper > .pls-slide.sundose-bw-hero-slide > * {display:none;}
body.sundose-blackweek-home [data-elementor-type="wp-page"] .pls-home-slides.sundose-bw-hero-slider > .swiper-wrapper > .pls-slide.sundose-bw-hero-slide::before {
 content:""; display:block; position:relative; width:100%; min-width:0; max-width:1600px;
 height:auto; aspect-ratio:1700 / 892; left:50%; transform:translateX(-50%);
 background:url("../img/hero-desktop-off.jpg?v=1.2.13") center / 100% 100% no-repeat;
 pointer-events:none;
}
body.sundose-blackweek-home [data-elementor-type="wp-page"] .pls-home-slides.sundose-bw-hero-slider > .swiper-wrapper > .pls-slide.sundose-bw-hero-slide::after {content:none;}
body.sundose-blackweek-home [data-elementor-type="wp-page"] .pls-home-slides.sundose-bw-hero-slider > .swiper-wrapper > .pls-slide.sundose-bw-hero-slide.sundose-bw-hero-is-on {--bw-hero-edge-left:#320700; --bw-hero-edge-right:#b43d15;}
body.sundose-blackweek-home [data-elementor-type="wp-page"] .pls-home-slides.sundose-bw-hero-slider > .swiper-wrapper > .pls-slide.sundose-bw-hero-slide.sundose-bw-hero-is-on::before {background-image:url("../img/hero-desktop-on.jpg");}
body.sundose-blackweek-home [data-elementor-type="wp-page"] .pls-home-slides.sundose-bw-hero-slider > .swiper-wrapper > .pls-slide.sundose-bw-hero-slide > button.sundose-bw-hero-switch {
 /* Współrzędne w grafice źródłowej: x=190, y=420, szerokość=145 (1700 × 892). */
 display:grid; position:absolute; top:47.085202%;
 left:calc(50% - min(50%, 800px) + min(11.176471%, 178.823529px));
 width:min(8.529412%, 136.470588px); height:auto; min-height:0; max-width:none; margin:0; padding:0;
 border:0; border-radius:0; background:transparent; box-shadow:none; line-height:0;
 z-index:3; cursor:pointer; appearance:none; touch-action:manipulation;
}
body.sundose-blackweek-home [data-elementor-type="wp-page"] .pls-home-slides.sundose-bw-hero-slider > .swiper-wrapper > .pls-slide.sundose-bw-hero-slide > button.sundose-bw-hero-switch::before,
body.sundose-blackweek-home [data-elementor-type="wp-page"] .pls-home-slides.sundose-bw-hero-slider > .swiper-wrapper > .pls-slide.sundose-bw-hero-slide > button.sundose-bw-hero-switch::after {content:none;}
body.sundose-blackweek-home [data-elementor-type="wp-page"] .pls-home-slides.sundose-bw-hero-slider > .swiper-wrapper > .pls-slide.sundose-bw-hero-slide > button.sundose-bw-hero-switch > img {display:block; grid-area:1/1; width:100%; height:auto; margin:0;}
body.sundose-blackweek-home [data-elementor-type="wp-page"] .pls-home-slides.sundose-bw-hero-slider > .swiper-wrapper > .pls-slide.sundose-bw-hero-slide > button.sundose-bw-hero-switch > .sundose-bw-hero-switch__on {visibility:hidden;}
body.sundose-blackweek-home [data-elementor-type="wp-page"] .pls-home-slides.sundose-bw-hero-slider > .swiper-wrapper > .pls-slide.sundose-bw-hero-slide > button.sundose-bw-hero-switch[aria-pressed="true"] > .sundose-bw-hero-switch__off {visibility:hidden;}
body.sundose-blackweek-home [data-elementor-type="wp-page"] .pls-home-slides.sundose-bw-hero-slider > .swiper-wrapper > .pls-slide.sundose-bw-hero-slide > button.sundose-bw-hero-switch[aria-pressed="true"] > .sundose-bw-hero-switch__on {visibility:visible;}
body.sundose-blackweek-home [data-elementor-type="wp-page"] .pls-home-slides.sundose-bw-hero-slider > .swiper-wrapper > .pls-slide.sundose-bw-hero-slide > button.sundose-bw-hero-switch:focus-visible {outline:2px solid white; outline-offset:5px;}
@media (width < 767px) {
body.sundose-blackweek-home [data-elementor-type="wp-page"] .pls-home-slides.sundose-bw-hero-slider > .swiper-wrapper > .pls-slide.sundose-bw-hero-slide::before {min-width:0; width:100%; height:auto; aspect-ratio:767 / 1010; background-image:url("../img/hero-mobile-off.jpg"); background-size:100% 100%;}
body.sundose-blackweek-home [data-elementor-type="wp-page"] .pls-home-slides.sundose-bw-hero-slider > .swiper-wrapper > .pls-slide.sundose-bw-hero-slide.sundose-bw-hero-is-on::before {background-image:url("../img/hero-mobile-on.jpg");}
body.sundose-blackweek-home [data-elementor-type="wp-page"] .pls-home-slides.sundose-bw-hero-slider > .swiper-wrapper > .pls-slide.sundose-bw-hero-slide > button.sundose-bw-hero-switch {top:28.15%; left:8.333333%; width:22.222222%;}
}
/* Dwie identyczne grupy zapewniają ciągłą pętlę bez przeskoku. */
body.sundose-blackweek-home [data-elementor-type="wp-page"] .pls-home-slides.sundose-bw-hero-slider > .swiper-wrapper > .pls-slide.sundose-bw-hero-slide > .sundose-bw-hero-strip {
 display:flex; position:absolute; z-index:5; inset:0 0 auto; height:clamp(22px,2vw,30px);
 width:100%; overflow:hidden; background:#ff6b1f; color:#191919; pointer-events:none;
 font-family:"ABC",sans-serif; font-size:clamp(11px,1.05vw,16px); font-weight:400;
 letter-spacing:.12em; line-height:1; align-items:center;
}
body.sundose-blackweek-home [data-elementor-type="wp-page"] .pls-home-slides.sundose-bw-hero-slider > .swiper-wrapper > .pls-slide.sundose-bw-hero-slide > .sundose-bw-hero-strip[data-position="bottom"] {top:auto; bottom:0;}
.sundose-bw-hero-strip__track {display:flex; flex:none; width:max-content; animation:sundose-bw-strip-scroll 90s linear infinite;}
.sundose-bw-hero-strip__text {display:block; flex:none; white-space:pre;}
.sundose-bw-hero-strip[data-position="top"] .sundose-bw-hero-strip__track {animation-direction:reverse;}
@keyframes sundose-bw-strip-scroll {from {transform:translateX(0);} to {transform:translateX(-50%);}}
@media (prefers-reduced-motion:reduce) {.sundose-bw-hero-strip__track {animation:none;}}

/* Wspólny nagłówek LP/TYP: wyłącznie logo, bez sticky i menu. */
body.sundose-bw26-landing #header.pls-site-header {
    display: none !important;
}
body.sundose-bw26-landing .sundose-bw26-page-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 12px;
    left: 0;
    right: 0;
    z-index: 5;
    padding: 0 20px;
    background: transparent;
    text-align: center;
}
body.sundose-bw26-landing .sundose-bw26-page-header > a {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    height: var(--pls-header-height);
    max-height: 100%;
    line-height: 1;
}
body.sundose-bw26-landing .sundose-bw26-page-header img {
    display: block;
    width: var(--pls-logo-width, 170px);
    max-width: 100%;
    height: auto;
    object-fit: contain;
}
body.sundose-bw26-landing .sundose-bw26-page-header a:focus-visible {
    outline: 2px solid #FF8941;
    outline-offset: 6px;
}
body.sundose-bw26-landing .pls-site-content {
    padding-top: 0;
}
@media (max-width: 767px) {
    body.sundose-bw26-landing .sundose-bw26-page-header { padding: 0 20px; }
    body.sundose-bw26-landing .sundose-bw26-page-header img { width: var(--pls-mobile-logo-width, 148px); }
}
