/**
 * Copyright © Caravel. All rights reserved.
 *
 * "Oferta-âncora" widget (Block\Widget\AnchorOffer, templates/widget/anchor-offer.phtml): the spotlight hero of the
 * Black Cassol home, after the "holofote" mockup. Loaded by the cassol_blackfriday_active layout handle next to
 * black-friday.css, whose tokens (--bf-*) it reuses. Plain CSS with its own class names (bf-anchor__*), so the theme
 * Tailwind build is not involved; the fonts are the theme's.
 */

.bf-anchor {
    position: relative;
    overflow: hidden;
    color: var(--bf-text);
    background: radial-gradient(120% 90% at 70% 0%, #15110a 0, var(--bf-bg) 60%);
    --bf-anchor-glow: rgba(255, 231, 184, .34);
    --bf-anchor-glow-soft: rgba(255, 231, 184, .10);
    --bf-anchor-ease: cubic-bezier(.2, .7, .2, 1);
}

.bf-anchor__wrap {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 48px);
}

.bf-anchor__grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(16px, 3vw, 56px);
    align-items: center;
    min-height: max(70vh, 560px);
    padding-top: clamp(20px, 3vw, 40px);
}

/* ---------- information column (the only hover area that pauses the rotation) ---------- */
.bf-anchor__info {
    position: relative;
    z-index: 2;
    padding-bottom: 20px;
}

.bf-anchor__slot--in > * {
    animation: bf-anchor-rise .55s var(--bf-anchor-ease) both;
}

.bf-anchor__slot--in > *:nth-child(2) { animation-delay: .05s; }
.bf-anchor__slot--in > *:nth-child(3) { animation-delay: .1s; }
.bf-anchor__slot--in > *:nth-child(4) { animation-delay: .15s; }
.bf-anchor__slot--in > *:nth-child(5) { animation-delay: .2s; }
.bf-anchor__slot--in > *:nth-child(6) { animation-delay: .25s; }
.bf-anchor__slot--in > *:nth-child(7) { animation-delay: .3s; }
.bf-anchor__slot--in > *:nth-child(8) { animation-delay: .35s; }

@keyframes bf-anchor-rise {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
}

.bf-anchor__top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-bottom: 18px;
}

.bf-anchor__seal {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    border: 1px solid var(--bf-line-2);
    border-radius: 999px;
    padding: 7px 14px;
    background: rgba(255, 255, 255, .03);
}

.bf-anchor__seal i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bf-red);
    box-shadow: 0 0 0 0 rgba(189, 40, 33, .7);
    animation: bf-anchor-ping 1.8s infinite;
}

@keyframes bf-anchor-ping {
    70% { box-shadow: 0 0 0 10px rgba(189, 40, 33, 0); }
    100% { box-shadow: 0 0 0 0 rgba(189, 40, 33, 0); }
}

.bf-anchor__timer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--bf-muted);
    font-size: 14px;
}

.bf-anchor__timer b {
    font-size: 18px;
    font-weight: 800;
    color: var(--bf-text);
    font-variant-numeric: tabular-nums;
}

.bf-anchor__icon {
    flex-shrink: 0;
    width: 1.25em;
    height: 1.25em;
}

.bf-anchor__name {
    color: inherit; /* the theme paints headings dark */
    margin: 0 0 14px;
    max-width: 30ch;
    font-size: clamp(22px, 2.4vw, 32px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.01em;
}

.bf-anchor__name a {
    color: inherit;
    text-decoration: none;
}

.bf-anchor__name a:hover {
    text-decoration: underline;
}

.bf-anchor__pricebox {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.bf-anchor__from {
    color: var(--bf-muted);
    text-decoration: line-through;
    font-size: 15px;
}

.bf-anchor__off {
    background: var(--bf-red);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    padding: 6px 9px 5px;
    border-radius: 6px;
    letter-spacing: .02em;
}

/* The mockup sets the price in a condensed display face; with the theme's Inter the same size would spread the
   digits across the column, so it is smaller and tighter here. */
.bf-anchor__price {
    display: flex;
    align-items: baseline;
    gap: 2px;
    margin: 8px 0 4px;
    font-size: clamp(60px, 7vw, 104px);
    font-weight: 900;
    line-height: .9;
    letter-spacing: -.04em;
}

.bf-anchor__price .bf-anchor__cur {
    font-size: .3em;
    letter-spacing: 0;
    margin-right: 8px;
    align-self: flex-start;
    margin-top: .45em;
}

.bf-anchor__price .bf-anchor__int {
    text-shadow: 0 0 60px var(--bf-anchor-glow-soft);
}

.bf-anchor__price small {
    font-size: .3em;
    font-weight: 800;
    letter-spacing: 0;
}

.bf-anchor__pay {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    font-size: 15px;
    margin: 10px 0 18px;
}

.bf-anchor__pay b {
    color: var(--bf-text);
}

.bf-anchor__pay span {
    color: var(--bf-muted);
}

.bf-anchor__stock {
    max-width: 420px;
    margin-bottom: 14px;
}

.bf-anchor__stock-top {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 7px;
}

.bf-anchor__stock-top b {
    font-weight: 700;
}

.bf-anchor__stock-top span {
    color: var(--bf-red);
    font-weight: 700;
}

.bf-anchor__track {
    height: 6px;
    border-radius: 3px;
    background: var(--bf-line);
    overflow: hidden;
}

.bf-anchor__track i {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: var(--bf-red);
}

/* ---------- buttons: the chrome's primary (red) and secondary (light outline) ---------- */
/* no stock in the region: a single disabled button in place of the buy buttons */
.bf-anchor__btn--soldout,
.bf-anchor__btn--soldout:disabled {
    background: var(--bf-surface-3);
    color: var(--bf-muted);
    border-color: var(--bf-surface-3);
    box-shadow: none;
    opacity: 1;
    cursor: not-allowed;
}

.bf-anchor__pk-soldout {
    margin-left: 6px;
    font-size: .85em;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--bf-muted);
}

.bf-anchor__ctas {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 14px;
}

.bf-anchor__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 26px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 16px;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s;
}

.bf-anchor__btn:disabled {
    cursor: not-allowed;
    opacity: .75;
}

.bf-anchor__btn--red {
    background: var(--bf-red);
    color: #fff;
    border: 1.5px solid var(--bf-red);
    box-shadow: 0 8px 28px -8px rgba(189, 40, 33, .7);
}

.bf-anchor__btn--line {
    background: transparent;
    color: var(--bf-text);
    border: 1.5px solid var(--bf-outline);
}

.bf-anchor__btn--line:hover:not(:disabled) {
    background: var(--bf-text);
    color: #050505;
}

/* ---------- pickup: the mockup's card (icon, bold line, muted line) as a button that opens the drawer ---------- */
.bf-anchor__pickup {
    max-width: 440px;
    margin-bottom: 20px;
}

.bf-anchor__pickup-btn {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
    color: var(--bf-text);
    background: rgba(255, 255, 255, .025);
    border: 1px solid var(--bf-line);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .2s, background-color .2s;
}

.bf-anchor__pickup-btn:hover {
    border-color: var(--bf-line-2);
    background: rgba(255, 255, 255, .05);
}

.bf-anchor__pickup-btn .bf-anchor__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    color: var(--bf-ok);
}

.bf-anchor__pickup-text {
    display: flex;
    flex-direction: column;
}

.bf-anchor__pickup-text b {
    font-weight: 700;
}

.bf-anchor__pickup-text span {
    color: var(--bf-muted);
}

/* ---------- stage (the spotlight) ---------- */
.bf-anchor__stage {
    position: relative;
    aspect-ratio: 1 / 1.08;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    justify-self: center;
    -webkit-mask-image: linear-gradient(#000 86%, transparent);
    mask-image: linear-gradient(#000 86%, transparent);
}

.bf-anchor__lamp {
    position: absolute;
    top: 0;
    left: 50%;
    width: 120px;
    height: 14px;
    transform: translateX(-50%);
    background: linear-gradient(#2b2b2b, #0c0c0c);
    border-radius: 0 0 40px 40px;
    box-shadow: 0 0 40px 10px var(--bf-anchor-glow);
    z-index: 3;
}

.bf-anchor__cone {
    position: absolute;
    top: 0;
    left: 50%;
    width: 100%;
    height: 76%;
    transform: translateX(-50%);
    clip-path: polygon(41% 0, 59% 0, 98% 100%, 2% 100%);
    background: linear-gradient(to bottom, rgba(255, 231, 184, .55), rgba(255, 231, 184, .16) 55%, rgba(255, 231, 184, .05));
    filter: blur(14px);
    opacity: 0;
    animation: bf-anchor-lightup 1.3s .1s var(--bf-anchor-ease) forwards;
}

.bf-anchor__cone2 {
    position: absolute;
    top: 0;
    left: 50%;
    width: 70%;
    height: 72%;
    transform: translateX(-50%);
    clip-path: polygon(44% 0, 56% 0, 92% 100%, 8% 100%);
    background: linear-gradient(to bottom, rgba(255, 244, 222, .5), rgba(255, 231, 184, .03));
    filter: blur(6px);
    opacity: 0;
    animation: bf-anchor-lightup 1.3s .25s var(--bf-anchor-ease) forwards;
}

.bf-anchor__pool {
    position: absolute;
    left: 50%;
    top: 70%;
    width: 92%;
    height: 20%;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(255, 231, 184, .5) 0, rgba(255, 231, 184, .16) 45%, transparent 70%);
    opacity: 0;
    animation: bf-anchor-lightup 1.3s .35s var(--bf-anchor-ease) forwards;
}

.bf-anchor__shadow {
    position: absolute;
    left: 50%;
    top: 77%;
    width: 56%;
    height: 7%;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, .95) 0, rgba(0, 0, 0, .6) 45%, transparent 72%);
    opacity: 0;
    z-index: 1;
    animation: bf-anchor-lightup 1.3s .5s var(--bf-anchor-ease) forwards;
}

@keyframes bf-anchor-lightup {
    0% { opacity: 0; }
    18% { opacity: .9; }
    26% { opacity: .25; }
    40% { opacity: .8; }
    52% { opacity: .45; }
    100% { opacity: 1; }
}

/* The theme's WebP converter wraps local images in <picture> and copies the img class to it: let the box vanish so
   the img keeps its position relative to the shot. */
.bf-anchor picture {
    display: contents;
}

.bf-anchor picture source {
    display: none; /* the theme gives <source> a box; as a grid item it would push the img to another row */
}

.bf-anchor__shot {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .7s var(--bf-anchor-ease);
    z-index: 2;
}

.bf-anchor__shot.is-on {
    opacity: 1;
}

.bf-anchor__product {
    position: absolute;
    left: 50%;
    bottom: 20%;
    height: 60%;
    width: 74%;
    transform: translateX(-50%);
    object-fit: contain;
    filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .6));
}

.bf-anchor__reflection {
    position: absolute;
    left: 50%;
    top: 80%;
    height: 60%;
    width: 74%;
    transform: translateX(-50%) scaleY(-1);
    object-fit: contain;
    opacity: .26;
    -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, .9), transparent 48%);
    mask-image: linear-gradient(to top, rgba(0, 0, 0, .9), transparent 48%);
    filter: blur(1.5px);
}

.bf-anchor__shot.is-on .bf-anchor__product {
    animation: bf-anchor-lit 1.4s var(--bf-anchor-ease) both, bf-anchor-float 7s 1.4s ease-in-out infinite;
}

@keyframes bf-anchor-lit {
    from {
        opacity: 0;
        filter: brightness(.2) drop-shadow(0 30px 40px rgba(0, 0, 0, .6));
        transform: translateX(-50%) translateY(18px);
    }
}

@keyframes bf-anchor-float {
    50% { transform: translateX(-50%) translateY(-6px); }
}

/* ---------- picker (one card per product, progress bar on the current one) ---------- */
.bf-anchor__picker {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 20px 0 clamp(28px, 4vw, 48px);
    position: relative;
    z-index: 3;
}

.bf-anchor__pk {
    position: relative;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-items: center;
    text-align: left;
    padding: 12px 14px 16px;
    border: 1px solid var(--bf-line);
    border-radius: 12px;
    background: rgba(16, 16, 16, .7);
    color: var(--bf-text);
    cursor: pointer;
    transition: border-color .25s, background-color .25s;
    min-height: 84px;
    overflow: hidden;
}

.bf-anchor__pk:hover {
    border-color: var(--bf-line-2);
}

.bf-anchor__pk[aria-selected="true"] {
    border-color: rgba(244, 241, 234, .5);
    background: var(--bf-surface-2);
}

.bf-anchor__pk img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.bf-anchor__pk-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.bf-anchor__pk-name {
    font-size: 13px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--bf-muted);
}

.bf-anchor__pk[aria-selected="true"] .bf-anchor__pk-name {
    color: var(--bf-text);
}

.bf-anchor__pk-price {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.01em;
    margin-top: 2px;
}

.bf-anchor__pk-price em {
    font-size: 12px;
    font-weight: 700;
    font-style: normal;
    color: var(--bf-red);
    margin-left: 6px;
}

.bf-anchor__pk-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: transparent;
}

.bf-anchor__pk-bar i {
    display: block;
    height: 100%;
    width: 0;
    background: var(--bf-red);
}

/* ---------- mobile: stage first, then the information, picker in two columns ---------- */
@media (max-width: 1023px) {
    .bf-anchor__grid {
        grid-template-columns: 1fr;
        min-height: 0;
        gap: 0;
        padding-top: 0;
    }

    .bf-anchor__stage {
        order: -1;
        max-width: none;
        aspect-ratio: auto;
        height: 270px;
    }

    .bf-anchor__info {
        margin-top: -18px;
    }

    .bf-anchor__slot {
        display: flex;
        flex-direction: column;
    }

    .bf-anchor__slot .bf-anchor__ctas { order: 6; margin-bottom: 6px; }
    .bf-anchor__slot .bf-anchor__stock { order: 7; margin-top: 12px; }
    .bf-anchor__slot .bf-anchor__pickup { order: 8; }

    .bf-anchor__top {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 8px;
    }

    .bf-anchor__seal {
        font-size: 9.5px;
        letter-spacing: .04em;
        padding: 5px 9px;
        gap: 6px;
        white-space: nowrap;
    }

    .bf-anchor__timer {
        font-size: 11px;
        gap: 5px;
        white-space: nowrap;
    }

    .bf-anchor__timer .bf-anchor__icon {
        display: none;
    }

    .bf-anchor__timer b {
        font-size: 16px;
    }

    .bf-anchor__name {
        font-size: 17px;
        margin: 10px 0 6px;
    }

    .bf-anchor__price {
        font-size: 56px;
        margin: 2px 0;
    }

    .bf-anchor__pay {
        margin: 4px 0 12px;
        gap: 2px 14px;
        font-size: 13px;
    }

    .bf-anchor__picker {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 639px) {
    .bf-anchor__ctas .bf-anchor__btn {
        flex: 1;
    }

    .bf-anchor__pk {
        grid-template-columns: 48px 1fr;
        padding: 10px 10px 14px;
    }

    .bf-anchor__pk img {
        width: 48px;
        height: 48px;
    }

    .bf-anchor__pk-price {
        font-size: 16px;
    }

    .bf-anchor__pk-price em {
        display: block;
        margin: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bf-anchor *,
    .bf-anchor *::before,
    .bf-anchor *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        animation-delay: 0s !important;
        transition-duration: .001ms !important;
    }

    .bf-anchor__cone,
    .bf-anchor__cone2,
    .bf-anchor__pool,
    .bf-anchor__shadow {
        opacity: 1;
    }
}
