/* Winter & Christmas campaign theme layer */
.winter-campaign {
    --winter-flake-core: rgba(102, 152, 196, 0.6);
    --winter-flake-soft: rgba(148, 190, 224, 0.36);
    --winter-frost-sheen: rgba(206, 232, 250, 0.24);
}

html[data-theme="dark"] .winter-campaign {
    --winter-flake-core: rgba(255, 255, 255, 0.84);
    --winter-flake-soft: rgba(186, 222, 255, 0.48);
    --winter-frost-sheen: rgba(186, 225, 255, 0.14);
}

.winter-campaign .site-header .brand {
    position: relative;
}

.winter-campaign .brand-mark.is-winter .brand-mark-hat {
    transform-origin: 32px 20px;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.winter-campaign .brand:hover .brand-mark.is-winter .brand-mark-hat,
.winter-campaign .brand:focus-visible .brand-mark.is-winter .brand-mark-hat {
    transform: rotate(-4deg) translateY(-0.5px);
}

/* Animated multi-colour Christmas lights:
   1) .christmas-lights--bottom : under main header menu (bulbs point down)
   2) .christmas-lights--dock   : above desktop taskbar / over phone bottom menu (bulbs point up) */
.christmas-lights {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
}

.christmas-lights--bottom {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 2;
    height: 22px;
    overflow: visible;
}

.christmas-lights--dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 43;
    height: 22px;
    overflow: visible;
}

.christmas-lights__strand {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    max-width: none;
    height: 100%;
    margin-inline: auto;
    padding-inline: clamp(10px, 2vw, 24px);
    box-sizing: border-box;
}

.christmas-lights--dock .christmas-lights__strand {
    align-items: flex-end;
}

.christmas-lights__strand::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 9px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 10' preserveAspectRatio='none'%3E%3Cpath d='M0,1 Q30,9.5 60,1' fill='none' stroke='%23274435' stroke-width='1.5'/%3E%3C/svg%3E");
    background-size: 56px 9px;
    background-repeat: repeat-x;
    opacity: 0.94;
}

.christmas-lights--dock .christmas-lights__strand::before {
    top: auto;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 10' preserveAspectRatio='none'%3E%3Cpath d='M0,9 Q30,0.5 60,9' fill='none' stroke='%23274435' stroke-width='1.5'/%3E%3C/svg%3E");
}

.xmas-bulb {
    --bulb-color: #ff3355;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    padding-top: 3px;
}

.christmas-lights--dock .xmas-bulb {
    flex-direction: column-reverse;
    padding-top: 0;
    padding-bottom: 3px;
}

.xmas-bulb::before {
    content: "";
    display: block;
    width: 6px;
    height: 4px;
    border-radius: 2px 2px 1px 1px;
    background: #24382d;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.christmas-lights--dock .xmas-bulb::before {
    border-radius: 1px 1px 2px 2px;
    border-bottom: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.xmas-bulb > i {
    display: block;
    width: 8px;
    height: 12px;
    border-radius: 50% 50% 46% 46% / 38% 38% 62% 62%;
    background:
        radial-gradient(circle at 38% 34%, #ffffff 0 1.4px, var(--bulb-color) 46%, color-mix(in srgb, var(--bulb-color), #000 28%) 100%);
    box-shadow:
        0 2px 8px color-mix(in srgb, var(--bulb-color), transparent 15%),
        0 0 15px color-mix(in srgb, var(--bulb-color), transparent 36%);
    transform-origin: 50% 0%;
    animation: xmas-bulb-blink-slow 5.2s ease-in-out infinite;
    animation-delay: calc(var(--bulb-i, 0) * -0.85s);
}

.christmas-lights--dock .xmas-bulb > i {
    border-radius: 46% 46% 50% 50% / 62% 62% 38% 38%;
    background:
        radial-gradient(circle at 38% 66%, #ffffff 0 1.4px, var(--bulb-color) 46%, color-mix(in srgb, var(--bulb-color), #000 28%) 100%);
    box-shadow:
        0 -2px 8px color-mix(in srgb, var(--bulb-color), transparent 15%),
        0 0 15px color-mix(in srgb, var(--bulb-color), transparent 36%);
    transform-origin: 50% 100%;
}

.xmas-bulb--0 { --bulb-color: #ff355e; }
.xmas-bulb--1 { --bulb-color: #ffd43b; }
.xmas-bulb--2 { --bulb-color: #2ee87a; }
.xmas-bulb--3 { --bulb-color: #38c9ff; }
.xmas-bulb--4 { --bulb-color: #d95cff; }
.xmas-bulb--5 { --bulb-color: #ff8c38; }

.xmas-bulb:nth-child(odd) > i {
    animation-name: xmas-bulb-blink-slow-alt;
    animation-duration: 6.1s;
}

@keyframes xmas-bulb-blink-slow {
    0%, 100% {
        opacity: 0.16;
        transform: scale(0.88);
        filter: brightness(0.58);
    }
    24%, 46% {
        opacity: 1;
        transform: scale(1.1);
        filter: brightness(1.22);
    }
    70% {
        opacity: 0.24;
        transform: scale(0.9);
        filter: brightness(0.65);
    }
}

@keyframes xmas-bulb-blink-slow-alt {
    0%, 100% {
        opacity: 0.2;
        transform: scale(0.9);
        filter: brightness(0.62);
    }
    34%, 58% {
        opacity: 1;
        transform: scale(1.08);
        filter: brightness(1.2);
    }
    82% {
        opacity: 0.15;
        transform: scale(0.88);
        filter: brightness(0.55);
    }
}

@media (max-width: 1023px) {
    .xmas-bulb:nth-child(n + 19) {
        display: none;
    }
}

@media (max-width: 899px) {
    .christmas-lights--dock {
        bottom: var(--ps-tabbar-h, calc(59px + env(safe-area-inset-bottom)));
        height: 19px;
    }

    html body.winter-campaign.product-page .pdp-sticky {
        bottom: calc(var(--ps-tabbar-h, 59px) + env(safe-area-inset-bottom) + 19px);
        z-index: 65;
    }

    html body.winter-campaign {
        padding-bottom: calc(80px + env(safe-area-inset-bottom)) !important;
    }
}

@media (max-width: 640px) {
    .christmas-lights--bottom,
    .christmas-lights--dock {
        height: 18px;
    }

    .christmas-lights__strand {
        padding-inline: 10px;
    }

    .christmas-lights__strand::before {
        background-size: 42px 8px;
        height: 8px;
    }

    .xmas-bulb:nth-child(n + 13) {
        display: none;
    }

    .xmas-bulb::before {
        width: 5px;
        height: 3.5px;
    }

    .xmas-bulb > i {
        width: 7px;
        height: 10px;
        box-shadow:
            0 2px 6px color-mix(in srgb, var(--bulb-color), transparent 18%),
            0 0 11px color-mix(in srgb, var(--bulb-color), transparent 40%);
    }

    .christmas-lights--dock .xmas-bulb > i {
        box-shadow:
            0 -2px 6px color-mix(in srgb, var(--bulb-color), transparent 18%),
            0 0 11px color-mix(in srgb, var(--bulb-color), transparent 40%);
    }
}

@media (max-width: 380px) {
    .xmas-bulb:nth-child(n + 10) {
        display: none;
    }
}

/* Festive holiday offer pill — sits cleanly below the hanging header lights with zero overlap */
.winter-promotion {
    position: relative;
    z-index: 1;
    width: min(calc(100% - 32px), 720px);
    margin: 28px auto 0;
    border-radius: 999px;
    border: 1px solid rgba(110, 231, 183, 0.28);
    background: linear-gradient(135deg, #103a2a 0%, #18533c 55%, #124230 100%);
    box-shadow: 0 10px 26px rgba(6, 20, 14, 0.24);
    color: #fff9ef;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.winter-promotion:hover {
    transform: translateY(-1px);
    border-color: rgba(167, 243, 208, 0.45);
    box-shadow: 0 14px 32px rgba(6, 20, 14, 0.34);
}

html[data-theme="dark"] .winter-promotion {
    border-color: rgba(110, 231, 183, 0.26);
    background: linear-gradient(135deg, rgba(16, 56, 40, 0.94) 0%, rgba(23, 76, 55, 0.94) 55%, rgba(14, 48, 35, 0.94) 100%);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
}

.winter-promotion a {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem 0.7rem;
    margin-inline: auto;
    padding: 0.45rem 1.25rem;
    color: #fff9ef !important;
    font-size: 0.875rem;
    line-height: 1.25;
    text-decoration: none;
}

.winter-promotion a strong {
    color: #ffffff;
    font-weight: 700;
}

.winter-promotion a > span:last-child {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #ffd98d;
    font-size: 0.85rem;
    transition: transform 0.18s ease, background-color 0.18s ease;
}

.winter-promotion a:hover > span:last-child {
    transform: translateX(3px);
    background: rgba(255, 255, 255, 0.22);
}

.winter-promotion a:hover strong {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.winter-promotion a:focus-visible {
    outline: 2px solid #fff0c8;
    outline-offset: 2px;
    border-radius: inherit;
}

.winter-promotion-star {
    color: #ffd98d;
    font-size: 0.95rem;
}

.winter-promotion-date {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(167, 243, 208, 0.24);
    color: #e6f6ec;
    font-size: 0.76rem;
    font-weight: 600;
}

@media (max-width: 640px) {
    .winter-promotion {
        width: calc(100% - 24px);
        margin: 24px auto 0;
        border-radius: 999px;
    }

    .winter-promotion a {
        flex-wrap: nowrap;
        justify-content: space-between;
        font-size: 0.8125rem;
        gap: 0.45rem;
        padding: 0.45rem 0.75rem 0.45rem 0.95rem;
    }

    .winter-promotion a strong {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .winter-promotion-date {
        flex: 0 0 auto;
        font-size: 0.72rem;
        padding: 0.14rem 0.5rem;
        white-space: nowrap;
    }

    .winter-promotion a > span:last-child {
        flex: 0 0 24px;
    }
}

/* Subtle frosted corner shimmer on product media */
.winter-campaign :is(.product-card .product-media, .pdp-gallery-main) {
    position: relative;
}

.winter-campaign :is(.product-card .product-media, .pdp-gallery-main)::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    background:
        radial-gradient(circle at 8% 12%, rgba(255, 255, 255, 0.92) 0 1px, transparent 2.2px),
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.65) 0 1px, transparent 2px),
        radial-gradient(circle at 90% 16%, rgba(255, 255, 255, 0.9) 0 1.2px, transparent 2.4px),
        radial-gradient(circle at 81% 9%, rgba(255, 255, 255, 0.65) 0 1px, transparent 2px),
        linear-gradient(155deg, var(--winter-frost-sheen), transparent 28%);
    content: "";
    pointer-events: none;
}

/* Continuous gentle layered snowfall (desktop + mobile verified) */
.winter-flurry {
    display: none;
}

@media (prefers-reduced-motion: no-preference) {
    .winter-flurry {
        position: fixed;
        inset: 0;
        z-index: 35;
        display: block;
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
        opacity: 0.62;
        pointer-events: none;
        -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 72%, transparent 100%);
        mask-image: linear-gradient(to bottom, #000 0%, #000 72%, transparent 100%);
    }

    .winter-flurry::before,
    .winter-flurry::after {
        position: absolute;
        inset: -24rem -4rem 0;
        content: "";
        will-change: transform;
    }

    .winter-flurry::before {
        background-image:
            radial-gradient(circle at 11% 14%, var(--winter-flake-core) 0 1.4px, var(--winter-flake-soft) 2.2px, transparent 3.2px),
            radial-gradient(circle at 34% 42%, var(--winter-flake-core) 0 1.7px, var(--winter-flake-soft) 2.5px, transparent 3.5px),
            radial-gradient(circle at 58% 22%, var(--winter-flake-core) 0 1.3px, var(--winter-flake-soft) 2px, transparent 3px),
            radial-gradient(circle at 79% 64%, var(--winter-flake-core) 0 1.6px, var(--winter-flake-soft) 2.3px, transparent 3.3px),
            radial-gradient(circle at 92% 33%, var(--winter-flake-core) 0 1.4px, var(--winter-flake-soft) 2.1px, transparent 3.1px),
            radial-gradient(circle at 23% 76%, var(--winter-flake-core) 0 1.3px, var(--winter-flake-soft) 2px, transparent 3px);
        background-size: 20rem 20rem;
        animation: winter-flurry-fall-near 15s linear infinite;
    }

    .winter-flurry::after {
        background-image:
            radial-gradient(circle at 19% 28%, var(--winter-flake-soft) 0 1.1px, transparent 2.3px),
            radial-gradient(circle at 46% 74%, var(--winter-flake-soft) 0 1.3px, transparent 2.5px),
            radial-gradient(circle at 67% 12%, var(--winter-flake-soft) 0 1.1px, transparent 2.1px),
            radial-gradient(circle at 86% 52%, var(--winter-flake-soft) 0 1.2px, transparent 2.3px),
            radial-gradient(circle at 26% 88%, var(--winter-flake-soft) 0 1.1px, transparent 2.1px);
        background-size: 24rem 24rem;
        background-position: 8rem 4rem;
        animation: winter-flurry-fall-far 23s linear infinite;
    }

    @media (max-width: 760px) {
        .winter-flurry::before {
            background-size: 14rem 14rem;
            animation-name: winter-flurry-fall-near-mobile;
            animation-duration: 11s;
        }

        .winter-flurry::after {
            background-size: 18rem 18rem;
            animation-name: winter-flurry-fall-far-mobile;
            animation-duration: 17s;
        }
    }

    @keyframes winter-flurry-fall-near {
        0% { transform: translate3d(-0.75rem, 0, 0); }
        50% { transform: translate3d(0.75rem, 10rem, 0); }
        100% { transform: translate3d(-0.75rem, 20rem, 0); }
    }

    @keyframes winter-flurry-fall-far {
        0% { transform: translate3d(0.5rem, 0, 0); }
        50% { transform: translate3d(-0.8rem, 12rem, 0); }
        100% { transform: translate3d(0.5rem, 24rem, 0); }
    }

    @keyframes winter-flurry-fall-near-mobile {
        0% { transform: translate3d(-0.5rem, 0, 0); }
        50% { transform: translate3d(0.5rem, 7rem, 0); }
        100% { transform: translate3d(-0.5rem, 14rem, 0); }
    }

    @keyframes winter-flurry-fall-far-mobile {
        0% { transform: translate3d(0.4rem, 0, 0); }
        50% { transform: translate3d(-0.6rem, 9rem, 0); }
        100% { transform: translate3d(0.4rem, 18rem, 0); }
    }
}

@media (prefers-reduced-motion: reduce) {
    .winter-campaign .brand-mark.is-winter .brand-mark-hat,
    .winter-promotion,
    .winter-promotion a > span:last-child,
    .xmas-bulb > i {
        animation: none !important;
        transition: none;
    }

    .xmas-bulb > i {
        opacity: 0.92;
    }
}
