@font-face { font-family: "Graphik BF"; src: url("assets/black-friday/Graphik-Regular-Web.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Graphik BF"; src: url("assets/black-friday/Graphik-Semibold-Web.woff2") format("woff2"); font-weight: 600; font-display: swap; }
.bf-label { display: inline-block; margin: 0 0 16px; padding: 7px 12px; border-radius: 8px; background: #BEE85C; color: #000; font: 600 13px/1.3 "Graphik BF", sans-serif; }
.bf-timer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 16px 0 10px; font: 400 12px/1.4 "Graphik BF", sans-serif; }
.bf-timer time { padding: 7px 10px; border: 1px solid currentColor; border-radius: 10px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
[data-bf-timer][hidden] { display: none !important; }
.bf-rules { color: inherit; font: 400 12px/1.5 "Graphik BF", sans-serif; text-decoration: underline; text-underline-offset: 3px; }
.bf-rules:focus-visible { outline: 2px solid #BEE85C; outline-offset: 3px; }


/* Фон и размеры одинаковы до и после открытия подарка. */
.gift-consult .gift-consult-card.is-open.bf-ai-gift { background: #000; color: #fff; font-family: "Graphik BF", sans-serif; }
.bf-ai-gift .consult-gift-box { width: 150px; left: 18px; top: 12px; bottom: auto; height: auto; }
.bf-ai-gift .consult-gift-discount { background: #BEE85C; color: #000; top: 22px; transform: rotate(7deg); }
.gift-consult .bf-ai-gift .gift-consult-card__discount { gap: 6px; }
.bf-ai-gift .gift-consult-card__discount small { font-size: 20px; }
.gift-consult .gift-consult-card.is-open.bf-ai-gift .gift-consult-card__note { color: #000; }
.bf-ai-meta { position: absolute; left: 20px; right: 20px; bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; }
.bf-ai-meta > p { width: 100%; margin: 0; color: #fff; font-size: 16px; line-height: 1.3; font-weight: 600; }
.bf-ai-meta .bf-timer { margin: 0; gap: 6px; }
.bf-ai-meta .bf-timer time { font-size: 13px; padding: 4px 6px; }
.bf-ai-meta .bf-rules { font-size: 11px; }
@media(max-width:960px) {
 .gift-consult .gift-consult-card.is-open.bf-ai-gift { display: grid; grid-template-columns: minmax(0, .44fr) minmax(0, .56fr); grid-template-rows: auto auto; align-items: center; height: auto; padding: 18px; gap: 10px 0; }
 .bf-ai-gift .consult-gift-box { position: static; width: 100%; max-width: 170px; margin: 0; justify-self: center; }
 .bf-ai-gift .consult-gift-discount { position: static; width: 100%; max-width: 248px; padding: 12px 8px; transform: rotate(4deg); }
 .gift-consult .bf-ai-gift .gift-consult-card__discount strong { font-size: clamp(42px, 13vw, 64px); }
 .bf-ai-gift .gift-consult-card__discount small { font-size: 16px; }
 .gift-consult .bf-ai-gift .gift-consult-card__note { font-size: 12px; }
 .bf-ai-meta { position: static; grid-column: 1 / -1; display: grid; justify-items: center; gap: 12px; margin-top: 4px; }
 .bf-ai-meta > p { text-align: center; }
 .bf-ai-meta .bf-timer { justify-content: center; }
 .bf-ai-meta .bf-rules { font-size: 12px; }
}

/* Салют начинается только после раскрытия и не перекрывает управление. */
.gift-consult-card.is-unveiling .gift-consult-confetti i { animation: none; }
.gift-consult-confetti.bf-celebration { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.bf-celebration i { top: -20px; width: 9px; height: 16px; background: #3D3BFF; animation: bfCelebration 800ms ease-out both; }
.bf-celebration i:nth-child(3n) { background: #BEE85C; }
.bf-celebration i:nth-child(3n + 1) { background: #FF74BC; width: 10px; height: 10px; }
@keyframes bfCelebration {
  0% { opacity: 0; transform: translateY(0) rotate(0); }
  8%, 75% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--burst-x), 110vh) rotate(var(--burst-turn)); }
}
@media(prefers-reduced-motion:reduce) { .bf-celebration { display: none; } }


/* Согласованный баннер 922/924, кнопка запускает ту же примерку. */
.bf-landing-gifts { width: 100%; max-width: 1120px; margin: 32px auto 24px; }
.bf-landing-gifts .bf-banner { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); align-items: center; gap: 24px; padding: 40px; border-radius: 32px; background: #000; color: #fff; font-family: "Graphik BF",sans-serif; box-shadow: none; }
.bf-landing-gifts .bf-banner h2 { margin: 22px 0 18px; color: #fff; font: 600 clamp(28px,3.2vw,42px)/1.08 "Graphik BF",sans-serif; letter-spacing: -.025em; }
.bf-landing-gifts .bf-banner p { margin: 0 0 26px; color: #fff; font-size: 17px; line-height: 1.5; }
.bf-landing-gifts .bf-banner__start { display: block; width: 100%; max-width: 320px; min-height: 56px; margin: 0 0 14px; padding: 14px 20px; border: 0; border-radius: 14px; background: #3D3BFF; color: #fff; font: 600 18px/1.3 "Graphik BF",sans-serif; cursor: pointer; box-shadow: none; }
.bf-landing-gifts .bf-banner__start:hover { background: #524FFF; }
.bf-landing-gifts .bf-banner__visual { position: relative; min-width: 0; }
.bf-landing-gifts .bf-banner__chest { display: block; width: 100%; height: auto; }
.bf-landing-gifts .bf-banner__tag { position: absolute; width: 42%; height: auto; left: -6%; bottom: 8%; transform: rotate(-7deg); }
.bf-landing-gifts .bf-timer { color: #fff; margin-top: 0; }
.bf-landing-gifts .bf-rules { color: #fff; }
@media(max-width:899px) {
 .bf-landing-gifts { margin-top: 24px; }
 .bf-landing-gifts .bf-banner { grid-template-columns: 1fr; padding: 28px 24px; gap: 20px; border-radius: 24px; }
 .bf-landing-gifts .bf-banner h2 { font-size: 29px; }
 .bf-landing-gifts .bf-banner p { font-size: 15px; }
 .bf-landing-gifts .bf-banner__visual { width: min(240px,85%); margin: 0 auto; }
 .bf-landing-gifts .bf-banner__start { max-width: none; }
}
@media(max-width:359px) { .bf-landing-gifts .bf-banner { padding: 24px 18px; } .bf-landing-gifts .bf-banner h2 { font-size: 26px; } }

/* Коробка и крышка — два слоя одного изображения, без смены картинки. */
.bf-gift-stage { position: absolute; z-index: 4; top: 14px; left: 50%; width: 190px; height: 190px; margin-left: -95px; pointer-events: none; }
.bf-gift-base, .bf-gift-lid { position: absolute; inset: 0; background: url("assets/black-friday/gift-parts.png") left center / 200% 100% no-repeat; }
.bf-gift-lid { background-position: right center; transform: translateY(-6%); transform-origin: 70% 80%; }
.bf-ai-gift:not(.bf-ai-revealed) .consult-gift-box,
.bf-ai-gift:not(.bf-ai-revealed) .consult-gift-discount,
.bf-ai-gift:not(.bf-ai-revealed) .bf-ai-meta { opacity: 0; }
.bf-ai-gift:not(.bf-ai-revealed):not(.is-unveiling) .bf-ai-meta { visibility: hidden; }
.bf-ai-revealed .bf-gift-stage { display: none; }
.gift-consult-card.is-unveiling .bf-gift-stage { animation: bfGiftUnwrap 800ms ease-in-out both; }
.gift-consult-card.is-unveiling .bf-gift-lid { animation: bfGiftLid 800ms ease-in-out both; }
.gift-consult-card.is-unveiling .consult-gift-discount { animation: bfOfferReveal 800ms cubic-bezier(.2,.7,.2,1) both; z-index: 5; }
.gift-consult-card.is-unveiling .consult-gift-box,
.gift-consult-card.is-unveiling .bf-ai-meta { animation: bfGiftDetails 800ms ease-out both; }
@keyframes bfGiftUnwrap {
  0%, 25%, 70% { opacity: 1; transform: rotate(0); }
  8% { transform: rotate(-4deg); }
  16% { transform: rotate(3deg); }
  100% { opacity: 0; transform: translateY(10px) scale(.9); }
}
@keyframes bfGiftLid {
  0%, 25% { transform: translateY(-6%); opacity: 1; }
  65%, 100% { transform: translate(8%, -42%) rotate(12deg); opacity: 0; }
}
@keyframes bfOfferReveal {
  0%, 35% { opacity: 0; transform: translate(-55px, 36px) rotate(-8deg) scale(.3); }
  65% { opacity: 1; }
  100% { opacity: 1; transform: rotate(7deg); }
}
@keyframes bfGiftDetails { 0%, 60% { opacity: 0; } 100% { opacity: 1; } }
@media(max-width:960px) {
 .bf-gift-stage { top: 0; width: 180px; height: 180px; margin-left: -90px; }
 .bf-ai-gift .consult-gift-discount { transform: rotate(7deg); }
}
@media(prefers-reduced-motion:reduce) {
 .bf-ai-gift .bf-gift-stage { display: none; }
 .bf-ai-gift .consult-gift-box, .bf-ai-gift .consult-gift-discount, .bf-ai-gift .bf-ai-meta { animation: none !important; opacity: 1; visibility: visible; }
}
