// Black Friday landing page (Autogedal_BlackFriday).
// Loaded only on /black-friday (layout: css/landing.css, compiled by Magento from this file).
// Every rule is scoped to .bf-landing so the theme stays untouched.

// ---------------------------------------------------------------- variables
@bf-night: #050a1a;
@bf-glass: rgba(10, 22, 54, .72);
@bf-line: #1d3670;
@bf-neon: #2d7bff;
@bf-neon-2: #5ea3ff;
@bf-cyan: #22c4ff;
@bf-text: #f1f5ff;
@bf-text-soft: #cbd6f0;
@bf-muted: #9db0d6;
@bf-red: #ff3347;
@bf-ok: #3ddc97;
@bf-border-glow: rgba(94, 163, 255, .85);
@bf-glow: 0 0 0 1px rgba(45, 123, 255, .25), 0 0 18px rgba(45, 123, 255, .45), inset 0 0 14px rgba(45, 123, 255, .18);
@bf-display: 'Unbounded', 'Arial Black', 'Helvetica Neue', system-ui, sans-serif;
@bf-body: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
@bf-screen-s: ~'(max-width: 640px)';
@bf-screen-m: ~'(max-width: 860px)';
@bf-cart-icon: ~'url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Ccircle cx=%279%27 cy=%2720%27 r=%271.5%27/%3E%3Ccircle cx=%2718%27 cy=%2720%27 r=%271.5%27/%3E%3Cpath d=%27M2 3h3l2.6 12.4a2 2 0 0 0 2 1.6h8.8a2 2 0 0 0 2-1.6L22 7H6%27/%3E%3C/svg%3E")';

// ---------------------------------------------------------------- mixins
.bf-font(@weight; @size; @line-height; @family: @bf-body) {
    font-family: @family;
    font-size: @size;
    font-weight: @weight;
    line-height: @line-height;
}
.bf-label() {
    .bf-font(700; 10.5px; 1);
    letter-spacing: .16em;
    text-transform: uppercase;
    color: @bf-muted;
}
.bf-callout() {
    background: @bf-glass;
    border: 1.5px solid @bf-border-glow;
    border-radius: 12px;
    box-shadow: @bf-glow;
}
.bf-glow-border() {
    border-color: rgba(94, 163, 255, .9);
    box-shadow: @bf-glow;
}
.bf-input() {
    appearance: none;
    width: 100%;
    height: auto;
    background: rgba(6, 14, 36, .9);
    border: 1.5px solid @bf-line;
    border-radius: 10px;
    color: @bf-text;
    box-shadow: none;

    &:focus {
        outline: none;
        border-color: @bf-neon-2;
        box-shadow: @bf-glow;
    }
}

// ---------------------------------------------------------------- page
.autogedal-bf-page {
    background: @bf-night;

    // Magento's own message after add to cart duplicates the toast of the page (the component still clears them)
    .page.messages { display: none; }

    .page-wrapper { background: @bf-night; }
    .page-main {
        max-width: none;
        padding-left: 0;
        padding-right: 0;
    }
    .columns .column.main {
        padding-bottom: 0;
    }
}

// ---------------------------------------------------------------- add to cart effect (js/cart-fx.js)
.bf-fx {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 955;
    pointer-events: none;
}
.bf-fly {
    position: fixed;
    z-index: 960;
    border-radius: 14px;
    background: #fff center / contain no-repeat;
    box-shadow: 0 0 0 2px rgba(94, 163, 255, .95), 0 0 24px rgba(45, 123, 255, .85), 0 0 70px rgba(34, 196, 255, .5);
    pointer-events: none;
    will-change: transform, opacity;
}
.bf-plus {
    position: fixed;
    z-index: 965;
    .bf-font(900; 22px; 1; @bf-display);
    color: @bf-cyan;
    text-shadow: 0 0 10px rgba(34, 196, 255, .9), 0 0 26px rgba(45, 123, 255, .8);
    pointer-events: none;
}

@keyframes bf-cart-bump {
    0% { transform: scale(1); }
    30% { transform: scale(1.3) rotate(-5deg); }
    55% { transform: scale(.9) rotate(3deg); }
    75% { transform: scale(1.07); }
    100% { transform: scale(1); }
}
@keyframes bf-cart-wiggle {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-14deg); }
    50% { transform: rotate(10deg); }
    75% { transform: rotate(-5deg); }
}
@keyframes bf-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.7); }
    100% { transform: scale(1); }
}
@keyframes bf-ring {
    0% { transform: scale(.7); opacity: .95; }
    100% { transform: scale(2.3); opacity: 0; }
}
@keyframes bf-drop {
    from { transform: translateY(-16px); opacity: 0; }
    to { transform: none; opacity: 1; }
}
@keyframes bf-launch {
    0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, .9), 0 0 30px rgba(61, 220, 151, .6); border-color: @bf-ok; }
    100% { box-shadow: 0 0 0 16px rgba(61, 220, 151, 0), 0 0 0 rgba(61, 220, 151, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .bf-landing .bf-cart.is-hit .action.showcart,
    .bf-landing .bf-cart.is-hit .action.showcart::before { animation: none; }
}

@keyframes bf-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 51, 71, .7); }
    70% { box-shadow: 0 0 0 14px rgba(255, 51, 71, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 51, 71, 0); }
}
@keyframes bf-rise {
    from { opacity: 0; transform: translateY(6px); }
}
@keyframes bf-drop-in {
    from { opacity: 0; transform: translateY(-10px); }
}

.bf-landing {
    position: relative;
    width: 100vw;
    margin-left: ~'calc(50% - 50vw)';
    color: @bf-text;
    .bf-font(400; 15px; 1.55);
    -webkit-font-smoothing: antialiased;
    color-scheme: dark;
    background-color: @bf-night;
    background-image:
        radial-gradient(1px 1px at 12% 8%, rgba(255, 255, 255, .75), transparent 60%),
        radial-gradient(1px 1px at 27% 4%, rgba(255, 255, 255, .55), transparent 60%),
        radial-gradient(1.5px 1.5px at 44% 11%, rgba(255, 255, 255, .7), transparent 60%),
        radial-gradient(1px 1px at 63% 6%, rgba(255, 255, 255, .5), transparent 60%),
        radial-gradient(1.5px 1.5px at 78% 13%, rgba(255, 255, 255, .65), transparent 60%),
        radial-gradient(1px 1px at 91% 3%, rgba(255, 255, 255, .6), transparent 60%),
        radial-gradient(900px 520px at 50% 0%, rgba(45, 123, 255, .24), transparent 70%),
        linear-gradient(180deg, #071233 0%, @bf-night 40%, #03060f 100%);

    *, *::before, *::after { box-sizing: border-box; }
    [hidden] { display: none !important; }
    img, svg { max-width: 100%; }
    button, input {
        font: inherit;
        color: inherit;
        letter-spacing: normal;
        text-transform: none;
    }
    // Porto: button { height: 38px } / button:not(.primary) { height: 32px; line-height: 30px; ... }
    // "body .bf-landing button" outranks the theme and still loses to the component rules below
    body & button {
        height: auto;
        line-height: normal;
    }
    a {
        color: inherit;
        text-decoration: none;
    }
    h1, h2 {
        margin: 0;
        color: @bf-text;
        text-wrap: balance;
    }
    h2 {
        .bf-font(800; clamp(20px, 2.6vw, 28px); 1.15; @bf-display);
        text-transform: uppercase;
        letter-spacing: .02em;
    }
    :focus-visible {
        outline: 2px solid @bf-cyan;
        outline-offset: 2px;
    }

    // ------------------------------------------------------------ layout and buttons
    .bf-wrap {
        max-width: 1180px;
        margin: 0 auto;
        padding: 18px 20px 40px;
    }
    .bf-callout { .bf-callout(); }

    .bf-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 0;
        border-radius: 10px;
        padding: 14px 20px;
        color: #fff;
        background: linear-gradient(180deg, #3b86ff, #1f5fe0);
        box-shadow: 0 0 0 1px rgba(94, 163, 255, .6), 0 8px 26px rgba(45, 123, 255, .45);
        .bf-font(800; 12px; 1; @bf-display);
        letter-spacing: .04em;
        text-transform: uppercase;
        white-space: nowrap;
        text-decoration: none;
        cursor: pointer;
        transition: transform .15s, filter .15s;

        &:hover {
            transform: translateY(-1px);
            filter: brightness(1.08);
            color: #fff;
        }
        &:disabled {
            opacity: .5;
            cursor: wait;
            transform: none;
        }
        &.bf-ghost {
            background: rgba(10, 22, 54, .55);
            box-shadow: @bf-glow;
            border: 1.5px solid @bf-border-glow;
        }
    }

    // ------------------------------------------------------------ header of the page (no site header / footer here)
    .bf-header .bf-wrap {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding-top: 12px;
        padding-bottom: 12px;
    }
    .bf-logo {
        display: block;
        flex: none;

        // site logo recoloured for the night background (transparent PNG: white + neon blue)
        img {
            display: block;
            width: auto;
            height: 40px;
            filter: drop-shadow(0 0 10px rgba(45, 123, 255, .45));
            transition: filter .2s;
        }
        &:hover img { filter: drop-shadow(0 0 14px rgba(94, 163, 255, .75)); }
    }
    // logo + "Revino la site": sticky together once the header scrolled away (like the cart)
    .bf-brand {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        min-width: 0;
    }
    // "Revino la site": red, under the logo
    .bf-back {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        color: @bf-red;
        .bf-font(700; 13px; 1.2);
        text-decoration: none;
        white-space: nowrap;

        svg {
            width: 14px;
            height: 14px;
            flex: none;
            transition: transform .2s;
        }
        &:hover,
        &:focus,
        &:visited {
            color: @bf-red;
            text-decoration: none;
        }
        &:hover {
            text-decoration: underline;

            svg { transform: translateX(-3px); }
        }
    }
    .bf-neon-line {
        height: 1px;
        background: linear-gradient(90deg, transparent, @bf-neon 20%, @bf-cyan 50%, @bf-neon 80%, transparent);
        box-shadow: 0 0 12px rgba(45, 123, 255, .8);
    }

    // ------------------------------------------------------------ notice (result of the unsubscribe link)
    .bf-notice {
        display: flex;
        align-items: center;
        gap: 12px;
        max-width: 640px;
        margin: 18px auto 0;
        padding: 10px 10px 10px 16px;
        border-color: @bf-ok;
        box-shadow: 0 0 0 1px rgba(61, 220, 151, .25), 0 0 18px rgba(61, 220, 151, .3);
        .bf-font(600; 14px; 1.45);
        color: @bf-text;

        &::before {
            content: '';
            flex: none;
            width: 9px;
            height: 9px;
            border-radius: 50%;
            background: @bf-ok;
            box-shadow: 0 0 10px @bf-ok;
        }
        span {
            flex: 1;
        }
        &.is-error {
            border-color: @bf-red;
            box-shadow: 0 0 0 1px rgba(255, 51, 71, .25), 0 0 18px rgba(255, 51, 71, .3);

            &::before {
                background: @bf-red;
                box-shadow: 0 0 10px @bf-red;
            }
        }
    }
    .bf-notice-close {
        flex: none;
        width: 32px;
        height: 32px;
        padding: 0;
        border: 0;
        border-radius: 8px;
        background: transparent;
        box-shadow: none;
        .bf-font(400; 22px; 1);
        color: @bf-muted;
        cursor: pointer;

        &:hover,
        &:focus-visible {
            background: rgba(94, 163, 255, .12);
            color: @bf-text;
        }
    }
    .bf-header {
        position: relative;
        z-index: 30;   // the minicart dropdown above the page
    }
    .bf-header-actions {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    // site minicart (theme markup), restyled as a pill like the favourites one; only after the start
    .bf-cart {
        display: none;

        .minicart-wrapper {
            position: relative;
            float: none;
            display: block;
            margin: 0;
        }
        .action.showcart {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            height: auto;
            padding: 6px 12px;
            .bf-callout();
            border-radius: 999px;
            .bf-font(600; 13px; 1.2);
            color: @bf-text;
            text-decoration: none;
            cursor: pointer;

            &::before {
                content: '';
                display: block;
                width: 26px;
                height: 26px;
                margin: 0;
                font-size: 0;
                line-height: 0;
                background-color: @bf-cyan;
                -webkit-mask: @bf-cart-icon center / contain no-repeat;
                mask: @bf-cart-icon center / contain no-repeat;
            }
            &::after { display: none; }
            &:hover,
            &.active {
                .bf-glow-border();
                color: #fff;
            }
            .counter.qty {
                position: static;
                display: inline-grid;
                place-items: center;
                min-width: 22px;
                height: 22px;
                margin: 0;
                padding: 0 6px;
                border-radius: 11px;
                background: @bf-red;
                color: #fff;
                .bf-font(800; 12px; 1; @bf-display);
                box-shadow: 0 0 10px rgba(255, 51, 71, .6);

                &.empty { display: none; }
            }
            .counter-number {
                color: #fff;
            }
            .counter-label { display: none; }
        }
        // shockwave rings of the add to cart effect
        .minicart-wrapper::before,
        .minicart-wrapper::after {
            content: '';
            display: block;   // the theme may use these as a clearfix (display: table)
            position: absolute;
            inset: 0;
            border-radius: 999px;
            border: 2px solid @bf-cyan;
            opacity: 0;
            pointer-events: none;
        }
        .minicart-wrapper::after { border-color: @bf-red; }
        &.is-hit {
            .action.showcart { animation: bf-cart-bump .7s cubic-bezier(.3, 1.5, .5, 1); }
            .action.showcart::before { animation: bf-cart-wiggle .6s ease; }
            .counter.qty { animation: bf-pop .55s .12s cubic-bezier(.3, 1.8, .5, 1) both; }
            .minicart-wrapper::before { animation: bf-ring .75s ease-out; }
            .minicart-wrapper::after { animation: bf-ring .75s .14s ease-out; }
        }
    }
    // the cart stays on screen once the header scrolled away (the products fly into it)
    &.is-stuck .bf-brand {
        position: fixed;
        top: ~'calc(14px + env(safe-area-inset-top, 0px))';
        left: ~'max(16px, calc((100vw - 1180px) / 2 + 20px))';
        z-index: 900;
        padding: 8px 14px 9px;
        border: 1.5px solid @bf-line;
        border-radius: 14px;
        background: rgba(7, 16, 40, .92);
        backdrop-filter: blur(6px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
        animation: bf-drop .35s ease both;

        .bf-logo img { height: 26px; }
        .bf-back { font-size: 12px; }
    }
    &.is-live.is-stuck .bf-cart {
        position: fixed;
        top: ~'calc(14px + env(safe-area-inset-top, 0px))';
        right: ~'max(16px, calc((100vw - 1180px) / 2 + 20px))';
        z-index: 900;
        animation: bf-drop .35s ease both;

        .action.showcart {
            background: rgba(7, 16, 40, .92);
            backdrop-filter: blur(6px);
        }
    }
    .bf-fav-pill {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        padding: 8px 14px;
        border-radius: 999px;
        cursor: pointer;
        .bf-font(600; 13px; 1.2);
        color: @bf-text;

        svg {
            width: 16px;
            height: 16px;
            color: @bf-red;
        }
        b {
            .bf-font(800; 15px; 1; @bf-display);
            color: @bf-cyan;
            font-variant-numeric: tabular-nums;
        }
    }

    // ------------------------------------------------------------ hero: the countdown is the main element
    .bf-hero {
        position: relative;
        text-align: center;
        padding: 14px 0 30px;
        overflow: hidden;

        &::before {
            content: '';
            position: absolute;
            inset: 0;
            background-image: url('../images/bf-car.jpg');
            background-position: center 62%;
            background-size: ~'min(980px, 120%)';
            background-repeat: no-repeat;
            opacity: .16;
            filter: blur(2px);
            pointer-events: none;
            -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 60%, #000 30%, transparent 75%);
            mask-image: radial-gradient(ellipse 60% 70% at 50% 60%, #000 30%, transparent 75%);
        }
        > * { position: relative; }
    }
    .bf-title {
        .bf-font(900; clamp(26px, 4.4vw, 48px); 1; @bf-display);
        text-transform: uppercase;
        letter-spacing: -.01em;
    }
    .bf-friday {
        color: rgba(5, 15, 44, .85);
        -webkit-text-stroke: 1.8px @bf-neon-2;
        text-shadow: 0 0 22px rgba(45, 123, 255, .75);
    }
    .bf-cd-label {
        margin: 22px 0 12px;
        .bf-font(700; 13px; 1);
        letter-spacing: .2em;
        text-transform: uppercase;
        color: @bf-cyan;
    }
    .bf-cd {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: clamp(8px, 1.6vw, 18px);
        max-width: 720px;
        margin: 0 auto;
    }
    .bf-cd-box {
        padding: clamp(14px, 2.4vw, 26px) 6px clamp(10px, 1.8vw, 18px);

        b {
            display: block;
            .bf-font(900; clamp(38px, 8vw, 92px); 1; @bf-display);
            font-variant-numeric: tabular-nums;
            text-shadow: 0 0 24px rgba(45, 123, 255, .6);
            color: #fff;
        }
        span {
            display: block;
            margin-top: 8px;
            .bf-font(700; clamp(10px, 1.2vw, 13px); 1);
            letter-spacing: .18em;
            text-transform: uppercase;
            color: @bf-cyan;
        }
    }
    .bf-live {
        display: none;
        max-width: 720px;
        margin: 0 auto;
        padding: 24px;
        .bf-font(900; clamp(22px, 4vw, 44px); 1.1; @bf-display);
        text-transform: uppercase;
        align-items: center;
        justify-content: center;
        gap: 16px;

        i {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: @bf-red;
            flex: none;
            animation: bf-pulse 1.6s infinite;
        }
    }
    &.is-live {
        .bf-cd { display: none; }
        .bf-live { display: flex; }
        .bf-cart { display: block; }
        .bf-fav-note { display: none; }
    }
    .bf-facts {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 22px;
        margin-top: 20px;
        .bf-font(700; 17px; 1.4);

        b {
            color: @bf-cyan;
            font-family: @bf-display;
            font-size: 22px;
            text-shadow: 0 0 14px rgba(34, 196, 255, .6);
        }
        svg {
            width: 20px;
            height: 20px;
            color: @bf-cyan;
        }
    }
    .bf-date {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }
    .bf-sub {
        margin: 12px auto 0;
        max-width: 52ch;
        color: #d4def5;
    }
    .bf-cta {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        margin-top: 22px;
    }

    // ------------------------------------------------------------ panels
    .bf-panel {
        position: relative;
        background: linear-gradient(180deg, rgba(12, 26, 62, .8), rgba(7, 16, 40, .8));
        border: 1px solid @bf-line;
        border-radius: 16px;
        padding: 22px;
        margin-bottom: 18px;
        scroll-margin-top: 70px;

        &::before {
            content: '';
            position: absolute;
            left: 22px;
            right: 22px;
            top: -1px;
            height: 1px;
            background: linear-gradient(90deg, transparent, @bf-neon-2, transparent);
            box-shadow: 0 0 10px rgba(45, 123, 255, .9);
        }
    }
    .bf-panel-head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        margin-bottom: 6px;

        p {
            margin: 0;
            color: @bf-muted;
            font-size: 13.5px;
        }
    }
    .bf-fav-note {
        margin: 4px 0 12px;
        color: @bf-text-soft;
        font-size: 13.5px;
    }

    // ------------------------------------------------------------ category tabs
    .bf-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 4px 2px 8px;
    }
    .bf-tab {
        flex: none;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 9px 13px;
        border-radius: 10px;
        border: 1.5px solid @bf-line;
        background: rgba(6, 14, 36, .7);
        cursor: pointer;
        .bf-font(700; 13.5px; 1.2);
        white-space: nowrap;
        color: @bf-text;

        svg {
            width: 20px;
            height: 20px;
            color: @bf-cyan;
        }
        &[aria-selected='true'] {
            .bf-glow-border();
            background: rgba(45, 123, 255, .2);
        }
    }
    .bf-tab-fav svg {
        color: @bf-red;
        fill: rgba(255, 51, 71, .25);
    }

    // ------------------------------------------------------------ car filters: custom pickers instead of native selects
    .bf-filters {
        position: relative;
        z-index: 6;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
        margin: 12px 0 16px;

        &:empty { display: none; }
    }
    .bf-flabel {
        .bf-label();
        font-size: 11px;
        margin-right: 4px;
    }
    .bf-picker {
        position: relative;

        &.has-value .bf-pk-btn {
            border-color: rgba(94, 163, 255, .9);
            background: rgba(45, 123, 255, .16);

            b { color: @bf-cyan; }
        }
    }
    .bf-pk-btn {
        display: inline-flex;
        align-items: center;
        gap: 12px;
        min-width: 240px;
        min-height: 58px;
        padding: 12px 16px;
        border-radius: 10px;
        border: 1.5px solid @bf-line;
        background: rgba(6, 14, 36, .85);
        cursor: pointer;
        text-align: left;
        color: @bf-text;
        transition: border-color .15s, box-shadow .15s, background .15s;

        > span {
            display: grid;
            gap: 5px;
            flex: 1;
            min-width: 0;
        }
        small {
            .bf-label();
            font-size: 10px;
        }
        b {
            .bf-font(700; 14px; 1.2);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        > svg {
            width: 14px;
            height: 14px;
            color: @bf-neon-2;
            flex: none;
            transition: transform .2s;
        }
        &[aria-expanded='true'] > svg { transform: rotate(180deg); }
        &:hover:not(:disabled),
        &[aria-expanded='true'] { .bf-glow-border(); }
        &:disabled {
            opacity: .45;
            cursor: not-allowed;
        }
    }
    .bf-reset {
        background: none;
        border: 0;
        color: @bf-neon-2;
        .bf-font(600; 13px; 1.2);
        cursor: pointer;
        text-decoration: underline;
        padding: 6px 4px;
    }
    .bf-pop {
        position: absolute;
        z-index: 15;
        top: ~'calc(100% + 8px)';
        left: 0;
        width: 330px;
        padding: 12px;
        background: #071028;
        border: 1.5px solid @bf-border-glow;
        border-radius: 12px;
        box-shadow: @bf-glow, 0 20px 50px rgba(0, 0, 0, .6);
        animation: bf-rise .18s ease both;

        input {
            .bf-input();
            border-radius: 9px;
            padding: 10px 12px;
            font-size: 14px;
        }
    }
    .bf-pk-sub {
        .bf-label();
        font-size: 10px;
        margin: 12px 2px 8px;
    }
    .bf-pk-chips {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
    .bf-pk-chip {
        padding: 7px 11px;
        border-radius: 8px;
        border: 1.5px solid @bf-line;
        background: rgba(10, 22, 54, .8);
        cursor: pointer;
        .bf-font(700; 13px; 1.2);
        color: @bf-text;

        &:hover,
        &.is-sel {
            border-color: rgba(94, 163, 255, .9);
            background: rgba(45, 123, 255, .2);
        }
    }
    .bf-pk-list {
        max-height: 250px;
        overflow-y: auto;
        display: grid;
        gap: 2px;
        scrollbar-width: thin;
    }
    .bf-pk-opt {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        padding: 9px 10px;
        border-radius: 8px;
        border: 0;
        background: transparent;
        cursor: pointer;
        text-align: left;
        font-size: 14px;
        color: @bf-text;

        &:hover,
        &:focus-visible { background: rgba(45, 123, 255, .18); }
        &.is-sel {
            color: @bf-cyan;
            font-weight: 700;
        }
        svg {
            width: 15px;
            height: 15px;
            flex: none;
        }
    }
    .bf-pk-empty {
        padding: 10px;
        color: @bf-muted;
        font-size: 13px;
    }
    .bf-backdrop { display: none; }
    .bf-uni-note {
        margin: 2px 0 6px;
        font-size: 13px;
        color: @bf-ok;
    }

    // ------------------------------------------------------------ product cards
    .bf-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 14px;
        margin-top: 8px;
    }
    .bf-loading,
    .bf-empty {
        grid-column: ~'1 / -1';
        border: 1.5px dashed @bf-line;
        border-radius: 12px;
        padding: 28px 18px;
        text-align: center;
        color: @bf-muted;
    }
    .bf-empty .bf-btn { margin-top: 14px; }

    // no category chosen: one row of four per category (title = link to the category of the site), then "load more"
    .bf-grid.is-rows {
        display: block;
        margin-top: 4px;
    }
    .bf-row {
        // "& + &" would repeat .bf-landing in the selector and never match
        & + .bf-row { margin-top: 48px; }

        // four products + the "see all" card
        .bf-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    }
    .bf-row-mix .bf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    @media (max-width: 1099px) {
        .bf-row .bf-grid,
        .bf-row-mix .bf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    }
    // "Vezi toate produsele din <categorie>": a card as large as the products, the whole card is the link
    .bf-more-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 14px;
        padding: 22px 16px;
        border: 2px solid rgba(94, 163, 255, .75);
        border-radius: 12px;
        background:
            radial-gradient(220px 160px at 50% 20%, rgba(45, 123, 255, .35), transparent 70%),
            linear-gradient(180deg, rgba(14, 32, 78, .95), rgba(6, 14, 36, .95));
        box-shadow: 0 0 22px rgba(45, 123, 255, .35);
        text-align: center;
        text-decoration: none;
        color: @bf-text;
        transition: transform .2s, box-shadow .2s, border-color .2s;
        animation: bf-rise .3s ease both;

        &:hover,
        &:focus,
        &:visited {
            color: @bf-text;
            text-decoration: none;
        }
        &:hover {
            transform: translateY(-3px);
            border-color: @bf-cyan;
            box-shadow: 0 0 34px rgba(45, 123, 255, .6);

            .bf-more-btn svg { transform: translateX(4px); }
        }
    }
    .bf-more-icon {
        display: grid;
        place-items: center;
        width: 76px;
        height: 76px;
        flex: none;
        border-radius: 50%;
        background: rgba(45, 123, 255, .18);
        box-shadow: inset 0 0 0 1.5px rgba(94, 163, 255, .6);
        color: @bf-cyan;

        svg {
            width: 44px;
            height: 44px;
        }
    }
    .bf-more-text {
        display: flex;
        flex-direction: column;
        gap: 6px;

        b {
            .bf-font(800; 17px; 1.2; @bf-display);
            text-transform: uppercase;
            letter-spacing: .02em;
        }
        span {
            .bf-font(600; 14px; 1.35);
            color: @bf-text-soft;
        }
    }
    .bf-more-btn {
        width: 100%;

        svg {
            width: 15px;
            height: 15px;
            flex: none;
            transition: transform .2s;
        }
    }
    .bf-row-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px 14px;
        margin: 0 0 22px;
        padding-bottom: 12px;
        border-bottom: 1px solid @bf-line;

        h3 {
            margin: 0;
            .bf-font(800; clamp(15px, 1.8vw, 19px); 1.2; @bf-display);
            text-transform: uppercase;
            letter-spacing: .02em;
            color: @bf-text;
        }
    }

    .bf-card {
        position: relative;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background: rgba(6, 14, 36, .85);
        border: 1.5px solid @bf-line;
        border-radius: 12px;
        transition: border-color .2s, box-shadow .2s;
        animation: bf-rise .3s ease both;

        &:hover,
        &.is-fav { .bf-glow-border(); }
        &.is-launch { animation: bf-launch .6s ease-out; }
        &.is-out { opacity: .6; }
    }
    .bf-card-top { position: relative; }
    .bf-card-media {
        position: relative;
        display: block;
        aspect-ratio: ~'1 / 1';
        background: #fff;

        img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: contain;
        }
    }
    .bf-badge {
        position: absolute;
        left: 8px;
        top: 8px;
        .bf-font(700; 10.5px; 1);
        letter-spacing: .08em;
        text-transform: uppercase;
        color: #fff;
        background: rgba(45, 123, 255, .92);
        padding: 6px 8px;
        border-radius: 6px;
    }
    // discount label: the markup and the look of the site (theme: .product-label.sale-label); only the place is ours
    .bf-card .product-labels {
        position: absolute;
        top: 8px;
        right: 8px;
        left: auto;
        z-index: 2;
        margin: 0;
    }
    // red as on the rest of the site (another theme rule makes it green on this page)
    .bf-card .product-label.sale-label {
        background-color: #f83737;
        border-radius: 20px;
        color: #fff;
        font-size: 11px;
    }
    .bf-uni {
        position: absolute;
        left: 8px;
        bottom: 8px;
        .bf-font(700; 10px; 1);
        letter-spacing: .08em;
        text-transform: uppercase;
        color: #0a6b45;
        background: rgba(61, 220, 151, .9);
        padding: 5px 7px;
        border-radius: 6px;
    }
    .bf-fav {
        position: absolute;
        right: 8px;
        bottom: 8px;
        z-index: 2;
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 50%;
        border: 1.5px solid @bf-border-glow;
        background: rgba(5, 10, 26, .8);
        display: grid;
        place-items: center;
        cursor: pointer;

        svg {
            width: 19px;
            height: 19px;
            color: #fff;
        }
        &[aria-pressed='true'] {
            background: @bf-red;
            border-color: @bf-red;
            box-shadow: 0 0 14px rgba(255, 51, 71, .6);
        }
    }
    .bf-card-body {
        display: flex;
        flex-direction: column;
        flex: 1;
        gap: 6px;
        padding: 12px 14px 14px;
    }
    .bf-add {
        width: 100%;
        margin-top: 8px;
        padding: 12px 14px;

        svg {
            width: 16px;
            height: 16px;
            flex: none;
        }
        &.is-added {
            background: @bf-ok;
            color: #04251a;
            box-shadow: 0 0 18px rgba(61, 220, 151, .5);
        }
    }
    .bf-card-name {
        .bf-font(700; 14px; 1.3);
        color: @bf-text;

        &:hover { color: @bf-cyan; }
    }
    // old price (crossed out) on top, sale price below
    .bf-price {
        margin-top: auto;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;

        .bf-v {
            .bf-font(800; 20px; 1.15; @bf-display);
            color: @bf-cyan;
            text-shadow: 0 0 14px rgba(34, 196, 255, .45);
            font-variant-numeric: tabular-nums;

            &.is-secret {
                filter: blur(6px);
                user-select: none;
            }
        }
        .bf-old {
            color: @bf-muted;
            text-decoration: line-through;
            font-size: 12.5px;
        }
        .bf-note {
            flex-basis: 100%;
            font-size: 12px;
            color: @bf-muted;
        }
        .bf-out {
            font-weight: 700;
            color: #ff8090;
        }
    }
    .bf-more {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin-top: 18px;
    }

    // ------------------------------------------------------------ newsletter
    .bf-nl {
        display: grid;
        grid-template-columns: 1fr 1.2fr;
        gap: 22px;
        align-items: center;

        p {
            margin: 8px 0 0;
            color: @bf-muted;
            font-size: 14px;
        }
    }
    .bf-nl-form {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 10px;

        input[type='email'] {
            .bf-input();
            padding: 14px;
            font-size: 15px;
        }
    }
    .bf-check {
        grid-column: ~'1 / -1';
        display: flex;
        gap: 9px;
        align-items: flex-start;
        margin: 0;
        .bf-font(400; 12.5px; 1.45);
        color: @bf-text-soft;
        cursor: pointer;

        input {
            position: static;
            opacity: 1;
            flex: none;
            width: 16px;
            height: 16px;
            margin: 2px 0 0;
            accent-color: @bf-neon;
        }
    }
    .bf-recaptcha-check {
        grid-column: ~'1 / -1';
        min-height: 78px;   // the reCAPTCHA v2 checkbox
    }
    .bf-err {
        grid-column: ~'1 / -1';
        color: #ff8090;
        font-size: 13px;

        &:empty { display: none; }
    }
    .bf-done {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 14px 16px;

        b {
            display: block;
            .bf-font(800; 14px; 1.3; @bf-display);
            text-transform: uppercase;
        }
        span {
            font-size: 13px;
            color: @bf-muted;
        }
    }
    .bf-done .bf-link {
        display: inline-flex;
        align-items: center;
        margin-top: 10px;
        padding: 7px 14px;
        border: 1.5px solid @bf-neon;
        border-radius: 8px;
        background: rgba(45, 123, 255, .14);
        box-shadow: none;
        .bf-font(600; 13px; 1.2);
        color: @bf-text;
        cursor: pointer;
        transition: border-color .15s, box-shadow .15s, background .15s;

        &:hover,
        &:focus-visible {
            background: rgba(45, 123, 255, .26);
            color: #fff;
            .bf-glow-border();
        }
    }
    .bf-ok {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: @bf-ok;
        color: #04251a;
        display: grid;
        place-items: center;
        flex: none;
        box-shadow: 0 0 14px rgba(61, 220, 151, .6);

        svg {
            width: 18px;
            height: 18px;
        }
    }
    .bf-legal {
        margin: 6px 0 0;
        color: @bf-muted;
        font-size: 12px;
    }

    .bf-toast {
        position: fixed;
        left: 50%;
        bottom: ~'calc(24px + env(safe-area-inset-bottom, 0px))';
        z-index: 1000;
        max-width: ~'calc(100vw - 32px)';
        padding: 10px 16px;
        border-radius: 10px;
        background: @bf-neon;
        color: #fff;
        font-weight: 700;
        text-align: center;
        box-shadow: 0 0 22px rgba(45, 123, 255, .7);
        opacity: 0;
        pointer-events: none;
        transform: translateX(-50%) translateY(20px);
        transition: .25s;

        &.is-shown {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }
        &.has-link.is-shown { pointer-events: auto; }
        a {
            margin-left: 6px;
            color: #fff;
            text-decoration: underline;
            text-underline-offset: 3px;
        }
    }

    // ------------------------------------------------------------ test panel (admin: Mod test), as in the draft
    .bf-test {
        position: fixed;
        right: 16px;
        bottom: ~'calc(16px + env(safe-area-inset-bottom, 0px))';
        z-index: 850;
        width: 270px;
        padding: 12px 14px;
        background: rgba(6, 14, 36, .95);

        &.is-min .bf-test-body { display: none; }
    }
    .bf-test-head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        .bf-label();
        color: @bf-cyan;

        button {
            padding: 0 4px;
            border: 0;
            background: none;
            box-shadow: none;
            color: @bf-muted;
            font-size: 18px;
            line-height: 1;
            cursor: pointer;

            &:hover { color: @bf-text; }
        }
    }
    .bf-test-body {
        display: grid;
        gap: 10px;
        margin-top: 10px;
    }
    .bf-switch {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        font-size: 13px;
        color: @bf-text;
        cursor: pointer;

        input {
            appearance: none;
            -webkit-appearance: none;
            position: relative;
            top: 0;
            flex: none;
            width: 38px;
            height: 22px;
            margin: 0;
            border: 0;
            border-radius: 999px;
            background: @bf-line;
            cursor: pointer;
            transition: background .2s;

            &::after {
                content: '';
                position: absolute;
                top: 3px;
                left: 3px;
                width: 16px;
                height: 16px;
                border-radius: 50%;
                background: #fff;
                transition: transform .2s;
            }
            &:checked {
                background: @bf-neon;
                box-shadow: 0 0 10px rgba(45, 123, 255, .7);

                &::after { transform: translateX(16px); }
            }
        }
    }
    .bf-test-reset {
        padding: 7px;
        border: 1px solid @bf-line;
        border-radius: 8px;
        background: none;
        box-shadow: none;
        color: @bf-muted;
        font-size: 12.5px;
        cursor: pointer;

        &:hover {
            border-color: @bf-neon-2;
            color: @bf-text;
        }
    }
    .bf-test-note {
        margin: 0;
        font-size: 11px;
        line-height: 1.4;
        color: @bf-muted;
    }

    // ------------------------------------------------------------ responsive
    @media @bf-screen-m {
        .bf-row .bf-grid,
        .bf-row-mix .bf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .bf-more-card {
            grid-column: ~'1 / -1';
            flex-direction: row;
            flex-wrap: wrap;
            justify-content: center;
            text-align: left;
            padding: 16px;
        }
        .bf-more-icon {
            width: 56px;
            height: 56px;

            svg {
                width: 32px;
                height: 32px;
            }
        }
        .bf-more-text { flex: 1 1 160px; }
        .bf-more-btn { width: auto; flex: 1 1 100%; }
        .bf-nl { grid-template-columns: 1fr; }
    }

    @media @bf-screen-s {
        .bf-wrap { padding: 12px 16px 30px; }
        .bf-header .bf-wrap {
            padding-top: 10px;
            padding-bottom: 10px;
        }
        .bf-logo img { height: 32px; }
        .bf-back { font-size: 12px; }
        .bf-row + .bf-row { margin-top: 36px; }
        &.is-stuck .bf-brand {
            left: 16px;
            padding: 6px 12px 7px;

            .bf-logo img { height: 22px; }
            .bf-back { font-size: 11px; }
        }
        .bf-fav-pill span { display: none; }
        .bf-test {
            left: 16px;
            width: auto;
        }
        .bf-header-actions { gap: 8px; }
        .bf-panel { padding: 16px; }
        // all the categories visible on phones: two per row, no sideways scroll
        .bf-tabs {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px;
        }
        .bf-tab {
            min-width: 0;
            padding: 9px 10px;
            font-size: 13px;
            white-space: normal;
            text-align: left;

            svg {
                flex: none;
                width: 18px;
                height: 18px;
            }
        }
        .bf-filters { gap: 8px; }
        .bf-flabel { flex-basis: 100%; }
        // two pickers per row (brand / model, body / years)
        .bf-picker {
            flex: 1 1 ~'calc(50% - 4px)';
            min-width: 0;
        }
        .bf-pk-btn {
            min-width: 0;
            min-height: 54px;
            width: 100%;
            padding: 10px 12px;
        }
        // the filters bar must not be a stacking context on phones: its z-index would keep the bottom sheet below the
        // backdrop (z-index 1000) and no option could be tapped
        .bf-filters { z-index: auto; }
        // the picker opens as a sheet from the top on phones: the search field stays at the top, above the keyboard,
        // and a shorter list (search) does not slide the sheet down under the keyboard as a bottom sheet would
        .bf-pop {
            position: fixed;
            z-index: 1001;
            left: 10px;
            right: 10px;
            top: ~'calc(10px + env(safe-area-inset-top, 0px))';
            bottom: auto;
            width: auto;
            max-height: ~'calc(100vh - 20px)';
            max-height: ~'calc(100dvh - 20px - env(safe-area-inset-top, 0px))';
            overflow-y: auto;
            border-radius: 16px;
            padding: 16px;
            animation-name: bf-drop-in;
        }
        .bf-pk-list {
            max-height: 46vh;
            max-height: 46dvh;
        }
        .bf-pk-opt {
            padding: 13px 10px;
            font-size: 15px;
        }
        .bf-pk-chip {
            padding: 9px 12px;
            font-size: 14px;
        }
        .bf-backdrop {
            display: block;
            position: fixed;
            inset: 0;
            z-index: 1000;
            background: rgba(0, 0, 0, .6);
        }
        .bf-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }
        .bf-card-body { padding: 10px; }
        .bf-card-name { font-size: 13px; }
        .bf-price .bf-v { font-size: 16px; }
        .bf-nl-form { grid-template-columns: 1fr; }
    }
    @media (max-width: 360px) {
        // the reCAPTCHA checkbox has a fixed 304px width
        .bf-recaptcha-check {
            transform: scale(.88);
            transform-origin: 0 0;
        }
    }

    // narrow phones: the text of the button would be cut, the cart icon stays (the button keeps its aria-label)
    @media (max-width: 440px) {
        .bf-add[data-bf-add] {
            justify-content: center;
            padding-left: 10px;
            padding-right: 10px;

            span { display: none; }
            svg {
                width: 18px;
                height: 18px;
            }
        }
    }

    @media (prefers-reduced-motion: reduce) {
        *, *::before, *::after {
            animation: none !important;
            transition: none !important;
        }
    }
}
