/* Homepage promo carousel and the Christmas box banner on /vianoce/ (inc/bafbox-home.php, static/js/bafbox-slides.js).
   Full-bleed track: the active slide lines up with the header content, the neighbours peek in at both sides. */
.bbc-hero, .bbc-slide {
  --bbc-cream: #FFFAF0; --bbc-sand: #F9F1E0; --bbc-sand-2: #F3E6CC; --bbc-paper: #fff;
  --bbc-ink: #4C341A; --bbc-brown: #785837; --bbc-muted: #8E6B48; --bbc-line: #EADBC0;
  --bbc-blue: #4B59A7; --bbc-blue-deep: #27356F; --bbc-yellow: #FFC92C; --bbc-yellow-hi: #FFD65E;
  --bbc-red: #AF342D; --bbc-green: #477B39; --bbc-green-deep: #3A6530; --bbc-on-dark: #FFFAF0;
}
.bbc-hero { padding: 16px 0 8px; overflow: hidden; }
.bbc-car { position: relative; --sw: 1216px; --gap: 16px; }
.bbc-viewport { overflow: hidden; touch-action: pan-y; }
.bbc-track { display: flex; gap: var(--gap); align-items: stretch; }
.bbc-track.is-anim { transition: transform .6s cubic-bezier(.22, .7, .2, 1); }
.bbc-car:not(.is-ready) .bbc-track { justify-content: center; }
.bbc-car:not(.is-ready) .bbc-slide:not(:first-child) { display: none; }

.bbc-slide {
  flex: 0 0 var(--sw, 100%); width: var(--sw, 100%); border-radius: 28px; overflow: hidden; position: relative;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 24px;
  min-height: clamp(380px, calc(100svh - 270px), 450px); padding: 32px 56px; isolation: isolate;
  font-family: "Jost", sans-serif; line-height: 1.5; color: var(--bbc-on-dark);
  transition: opacity .5s ease, filter .5s ease;
}
.bbc-car.is-ready .bbc-slide:not(.is-on) { opacity: .55; filter: saturate(.75); cursor: pointer; }
.bbc-copy { position: relative; z-index: 2; display: grid; gap: 14px; justify-items: start; max-width: 560px; }
.bbc-slide h2, .bbc-slide h1, .bbc-slide .bbc-title {
  margin: 0; font-size: clamp(2rem, 3.3vw, 3rem); font-weight: 700; line-height: 1.12; letter-spacing: -.01em;
  color: inherit; text-wrap: balance;
}
.bbc-lead { margin: 0; font-size: 1.15rem; line-height: 1.45; max-width: 44ch; opacity: .92; }
.bbc-art { position: relative; z-index: 1; align-self: stretch; min-height: 300px; }
.bbc-nowrap { white-space: nowrap; }
.bbc-icon { width: 1.25em; height: 1.25em; flex: none; }
.bbc-eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

/* brand shapes from the Figma brand file (bafbox_final) */
.bbc-sh { position: absolute; z-index: 0; pointer-events: none; height: auto; overflow: visible; }
.bbc-sh-heart { aspect-ratio: 723/591; } .bbc-sh-bean { aspect-ratio: 892/744; } .bbc-sh-cloud { aspect-ratio: 1127/654; }
.bbc-sh-egg { aspect-ratio: 331/280; } .bbc-sh-loop { aspect-ratio: 1321/1106; } .bbc-sh-wave { aspect-ratio: 1075/980; }
.bbc-sh-s { aspect-ratio: 876/740; } .bbc-sh-heart2 { aspect-ratio: 397/286; }
.bbc-baffy { position: absolute; z-index: 2; width: auto; max-width: none; filter: drop-shadow(0 18px 26px rgba(0, 0, 0, .22)); }

.bbc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; border: 0; border-radius: 999px;
  font-weight: 600; text-decoration: none; padding: .85em 1.5em; font-size: 1rem; line-height: 1.1; white-space: nowrap;
  transition: background .15s ease;
}
.bbc-btn--yellow { background: var(--bbc-yellow); color: var(--bbc-ink); }
.bbc-btn--yellow:hover { background: var(--bbc-yellow-hi); color: var(--bbc-ink); }
.bbc-btn--blue { background: var(--bbc-blue); color: var(--bbc-on-dark); }
.bbc-btn--blue:hover { background: var(--bbc-blue-deep); color: var(--bbc-on-dark); }
.bbc-ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.bbc-slide a:focus-visible, .bbc-slide button:focus-visible, .bbc-arrow:focus-visible, .bbc-dot:focus-visible {
  outline: 3px solid var(--bbc-yellow); outline-offset: 3px;
}

/* Christmas box */
.bbc-xmas {
  /* dark green shade on the left, so the copy stays readable over the pattern (candy cane) and the snow */
  background:
    linear-gradient(90deg, rgba(22, 52, 20, .82) 0%, rgba(22, 52, 20, .7) 34%, rgba(22, 52, 20, .3) 52%, rgba(22, 52, 20, 0) 64%),
    url("../images/xmas/pattern-first.svg") left bottom / cover no-repeat,
    var(--bbc-green);
  grid-template-columns: .95fr 1.05fr;
}
.bbc-xmas .bbc-copy { text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.bbc-xmas .bbc-pill, .bbc-xmas .bbc-btn, .bbc-xmas .bbc-chip[aria-pressed="true"], .bbc-xmas .bbc-days { text-shadow: none; }
.bbc-snow { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.bbc-snow i {
  position: absolute; top: -12px; border-radius: 50%; background: #fff;
  animation-name: bbc-fall, bbc-sway; animation-timing-function: linear, ease-in-out;
  animation-iteration-count: infinite, infinite; animation-direction: normal, alternate;
}
@keyframes bbc-fall { from { translate: 0 0; } to { translate: 0 var(--fall, 560px); } }
@keyframes bbc-sway { from { transform: translateX(-12px); } to { transform: translateX(12px); } }
.bbc-pill { display: inline-block; background: var(--bbc-yellow); color: var(--bbc-ink); font-weight: 600; font-size: .9rem; padding: .45em 1em; border-radius: 999px; }
.bbc-sizes { display: flex; gap: 8px; flex-wrap: wrap; }
.bbc-chip {
  border: 0; border-radius: 14px; padding: .55em .95em; background: rgba(36, 72, 30, .72); backdrop-filter: blur(3px);
  color: inherit; text-align: left; line-height: 1.15; box-shadow: inset 0 0 0 1.5px rgba(255, 250, 240, .5); cursor: pointer;
  font: inherit;
}
.bbc-chip b { display: block; font-size: 1.05rem; }
.bbc-chip span { display: block; font-size: .78rem; opacity: .85; }
.bbc-chip[aria-pressed="true"] { background: var(--bbc-cream); color: var(--bbc-green-deep); box-shadow: none; }
.bbc-deadline { display: flex; align-items: center; gap: 10px; font-size: .95rem; background: rgba(0, 0, 0, .18); padding: .5em .9em .5em .6em; border-radius: 999px; }
.bbc-days { background: var(--bbc-yellow); color: var(--bbc-ink); font-weight: 700; border-radius: 999px; padding: .15em .6em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bbc-art-xmas { display: grid; place-items: center; }
.bbc-art-xmas .bbc-box {
  position: relative; z-index: 2; width: min(100%, 520px); height: auto; aspect-ratio: 1; object-fit: contain;
  filter: drop-shadow(0 26px 34px rgba(0, 0, 0, .28)); margin-block: -56px; max-width: 100%;
}
.bbc-price {
  position: absolute; z-index: 3; display: grid; place-items: center; text-align: center; width: 124px; height: 124px;
  border-radius: 50%; background: var(--bbc-yellow); color: var(--bbc-ink); transform: rotate(-10deg); line-height: 1;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18); left: 0; top: 4%;
}
.bbc-price small { font-size: .8rem; font-weight: 500; display: block; }
.bbc-price b { font-size: 1.55rem; font-weight: 700; display: block; margin-top: 3px; white-space: nowrap; }
.bbc-deadline--m { display: none; }

/* gift */
.bbc-gift { background: var(--bbc-blue); }
.bbc-gift .bbc-eyebrow { color: var(--bbc-yellow); }
.bbc-progress { width: 100%; max-width: 420px; display: grid; gap: 6px; }
.bbc-bar { height: 12px; border-radius: 999px; background: rgba(255, 250, 240, .25); overflow: hidden; }
.bbc-bar i { display: block; height: 100%; background: var(--bbc-yellow); border-radius: inherit; }
.bbc-progress span { font-size: .9rem; opacity: .9; }
.bbc-art-gift .bbc-baffy { right: 4%; bottom: -150px; height: calc(100% + 190px); }
.bbc-gift-img { position: absolute; z-index: 3; left: 2%; bottom: 2%; width: min(42%, 250px); height: auto; border-radius: 20px; rotate: -5deg; box-shadow: 0 22px 40px rgba(0, 0, 0, .28); }

/* voucher */
.bbc-voucher { background: #D3AB84; color: var(--bbc-ink); }
.bbc-voucher h2, .bbc-voucher .bbc-eyebrow { color: var(--bbc-blue-deep); }
.bbc-voucher .bbc-lead { opacity: 1; }
.bbc-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; margin: 0; padding: 0; font-size: .95rem; }
.bbc-facts li { display: flex; gap: .4em; align-items: center; }
.bbc-vcard { position: absolute; z-index: 3; right: 6%; top: 50%; translate: 0 -50%; width: min(88%, 470px); height: auto; border-radius: 16px; rotate: -5deg; box-shadow: 0 22px 40px rgba(76, 52, 26, .32); }

/* products */
.bbc-toys { background: var(--bbc-ink); }
.bbc-toys .bbc-eyebrow { color: var(--bbc-yellow); }
.bbc-art-toys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-content: center; }
.bbc-mini {
  position: relative; z-index: 1; background: var(--bbc-paper); color: var(--bbc-ink); border-radius: 18px; padding: 8px 8px 10px;
  display: grid; grid-template-rows: auto 1fr auto; gap: 4px; text-decoration: none; box-shadow: 0 6px 16px rgba(0, 0, 0, .14);
  transition: translate .2s ease, box-shadow .2s ease;
}
.bbc-mini:hover, .bbc-mini:focus-visible { translate: 0 -6px; box-shadow: 0 16px 28px rgba(0, 0, 0, .28); color: var(--bbc-ink); }
.bbc-mini img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 8px; background: #fff; }
.bbc-mini b { font-size: .8rem; font-weight: 500; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bbc-pr { font-weight: 700; color: var(--bbc-red); font-size: .92rem; white-space: nowrap; }
.bbc-pr s { font-weight: 400; color: var(--bbc-muted); font-size: .78em; margin-left: 4px; }

/* custom */
.bbc-c-blue { background: var(--bbc-blue); }
.bbc-c-green { background: var(--bbc-green); }
.bbc-c-kraft { background: #D3AB84; color: var(--bbc-ink); }
.bbc-c-kraft h2 { color: var(--bbc-blue-deep); }
.bbc-c-brown { background: var(--bbc-ink); }
.bbc-c-red { background: var(--bbc-red); }
.bbc-custom .bbc-eyebrow { color: var(--bbc-yellow); }
.bbc-c-kraft .bbc-eyebrow { color: var(--bbc-blue-deep); }
.bbc-art-custom { display: grid; place-items: center; }
.bbc-custom-img { position: relative; z-index: 2; max-height: 380px; width: auto; max-width: 100%; height: auto; object-fit: contain; filter: drop-shadow(0 22px 30px rgba(0, 0, 0, .22)); }

/* arrows + dots */
.bbc-arrow {
  position: absolute; top: calc(50% - 22px); translate: 0 -50%; z-index: 6; width: 48px; height: 48px; border-radius: 999px; border: 0;
  background: var(--bbc-paper); color: var(--bbc-ink); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .16); cursor: pointer;
}
.bbc-arrow:hover { background: var(--bbc-yellow); }
.bbc-prev { left: calc(50% - var(--sw) / 2 - 24px); }
.bbc-next { right: calc(50% - var(--sw) / 2 - 24px); }
.bbc-car:not(.is-ready) .bbc-arrow { display: none; }
.bbc-dots { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 14px; min-height: 10px; }
.bbc-dot { position: relative; width: 10px; height: 10px; border-radius: 999px; border: 0; padding: 0; background: var(--bbc-line); overflow: hidden; cursor: pointer; transition: width .3s ease, background .3s ease; }
.bbc-dot:hover { background: var(--bbc-muted); }
.bbc-dot[aria-current="true"] { width: 44px; background: var(--bbc-sand-2); }
.bbc-dot .bbc-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--bbc-blue); border-radius: inherit; }
.bbc-dot[aria-current="true"] .bbc-fill { animation: bbc-dotfill var(--bbc-dur, 7s) linear forwards; }
.bbc-car.is-paused .bbc-dot[aria-current="true"] .bbc-fill { animation-play-state: paused; }
.bbc-car.is-still .bbc-dot[aria-current="true"] .bbc-fill { animation: none; width: 100%; }
@keyframes bbc-dotfill { to { width: 100%; } }

/* /vianoce/: the box banner on its own, full container width, lower than on the homepage so the products show sooner */
.bbc-solo { margin-bottom: 1.75rem; }
.bbc-solo .bbc-slide { width: 100%; min-height: 0; padding: 24px 48px; gap: 16px; }
.bbc-solo .bbc-xmas { background-image: linear-gradient(90deg, rgba(22, 52, 20, .82) 0%, rgba(22, 52, 20, .7) 34%, rgba(22, 52, 20, .3) 52%, rgba(22, 52, 20, 0) 64%); } /* low banner: no pattern, its candy cane would run behind the title */
.bbc-solo .bbc-copy { gap: 10px; }
.bbc-solo .bbc-slide .bbc-title { font-size: clamp(1.6rem, 2.4vw, 2.25rem); }
.bbc-solo .bbc-lead { font-size: 1.05rem; }
.bbc-solo .bbc-art { min-height: 250px; }
.bbc-solo .bbc-art-xmas .bbc-box { width: min(100%, 330px); margin-block: -40px; }
.bbc-solo .bbc-price { width: 100px; height: 100px; left: 4%; top: 6%; }
.bbc-solo .bbc-price b { font-size: 1.3rem; }
.bbc-solo .bbc-price small { font-size: .72rem; }

@media (max-width: 900px) {
  .bbc-hero { padding: 12px 0 4px; }
  .bbc-slide { grid-template-columns: 1fr !important; grid-template-rows: auto auto; min-height: 0; padding: 0 0 18px; gap: 0; align-content: start; }
  .bbc-art { order: -1; min-height: 180px; height: 180px; }
  .bbc-copy { padding: 14px 18px 0; gap: 10px; }
  .bbc-slide h2, .bbc-slide h1, .bbc-slide .bbc-title { font-size: 1.45rem; }
  .bbc-lead { font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .bbc-xmas, .bbc-solo .bbc-xmas { background-image: none; }
  .bbc-xmas .bbc-pill, .bbc-xmas .bbc-ctas .bbc-deadline, .bbc-facts { display: none; }
  .bbc-deadline--m { display: flex; position: absolute; z-index: 3; left: 12px; top: 12px; font-size: .82rem; background: rgba(0, 0, 0, .28); }
  .bbc-art-xmas { height: 200px !important; }
  .bbc-art-xmas .bbc-box { width: 236px; margin-block: -10px -26px; }
  .bbc-price { width: 76px; height: 76px; left: auto; right: 5%; top: 10%; }
  .bbc-price b { font-size: 1rem; } .bbc-price small { font-size: .66rem; }
  .bbc-art .bbc-baffy { top: -8px; bottom: auto; -webkit-mask-image: linear-gradient(#000 136px, transparent 186px); mask-image: linear-gradient(#000 136px, transparent 186px); }
  .bbc-art-gift .bbc-baffy { right: 6%; height: 340px; }
  .bbc-gift-img { left: 8%; bottom: 8%; width: 132px; border-radius: 14px; }
  .bbc-vcard { right: 50%; translate: 50% -50%; width: min(58%, 215px); }
  .bbc-hide-m { display: none; }
  .bbc-art-toys { padding: 14px 14px 0; height: auto !important; min-height: 0 !important; gap: 8px; }
  .bbc-mini { padding: 5px 5px 7px; gap: 3px; border-radius: 12px; }
  .bbc-mini b { font-size: .7rem; } .bbc-pr { font-size: .8rem; } .bbc-pr s { display: none; }
  a.bbc-mini:nth-of-type(n+5) { display: none; }
  .bbc-custom-img { max-height: 170px; }
  .bbc-progress span { font-size: .82rem; }
  .bbc-arrow { display: none; }
  .bbc-chip { padding: .4em .75em; } .bbc-chip b { font-size: .95rem; } .bbc-chip span { font-size: .72rem; }
  .bbc-ctas .bbc-btn { padding: .8em 1.3em; }
  .bbc-dots { margin-top: 10px; }
  .bbc-solo .bbc-slide { border-radius: 20px; padding: 0 0 16px; gap: 0; }
  .bbc-solo .bbc-art { min-height: 160px; }
  .bbc-solo .bbc-art-xmas { height: 160px !important; }
  .bbc-solo .bbc-art-xmas .bbc-box { width: 190px; margin-block: -8px -20px; }
  .bbc-solo .bbc-price { width: 70px; height: 70px; left: auto; right: 5%; top: 10%; }
  .bbc-solo .bbc-price b { font-size: .95rem; }
  .bbc-solo .bbc-slide .bbc-title { font-size: 1.3rem; }
  .bbc-solo .bbc-lead { display: none; } /* the intro above says the same */
}
@media (prefers-reduced-motion: reduce) {
  .bbc-track.is-anim, .bbc-slide, .bbc-mini, .bbc-dot { transition: none; }
  .bbc-snow { display: none; }
}

/* /vianoce/ heading (inc/bafbox-vianoce.php) */
.bb-vianoce-head { padding: 22px 0 16px; display: grid; gap: 10px; justify-items: start; color: #4C341A; font-family: "Jost", sans-serif; }
.bb-vianoce-back { display: inline-flex; gap: 10px; align-items: center; color: #785837; text-decoration: none; font-size: .95rem; }
.bb-vianoce-back:hover { color: #4B59A7; }
.bb-vianoce-head h1 { margin: 0; font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 600; line-height: 1.1; color: #785837; }
.bb-vianoce-intro { max-width: 62ch; font-size: 1.1rem; line-height: 1.5; color: #4C341A; }
.bb-vianoce-intro p { margin: 0; }
.bb-vianoce-sub { margin: 0 0 18px; font-size: clamp(1.5rem, 2.4vw, 2.1rem); font-weight: 600; line-height: 1.15; color: #785837; font-family: "Jost", sans-serif; }
@media (max-width: 900px) {
  .bb-vianoce-head { padding: 18px 0 14px; }
  .bb-vianoce-intro { font-size: 1rem; }
}
