/* ==================================================================
   Newegg Black Friday 2026 eFlyer: cover page
   Source: 2025_cover_pg.psd (1920 x 4000)

   How the scale works
   --u is one PSD pixel at the current width (100cqw / 1920), so every
   size below is written in raw PSD px: calc(70 * var(--u)) = the
   70px price in Photoshop. Slot geometry at the bottom of this file is
   PSD layer bounds copied straight from the Info panel.

   Below 900px wide the canvas switches to a flowing grid and --u
   becomes a fixed px scale, so the same type rules still apply.
   All selectors are .ngg-bfc-* scoped: no bare-element rules.
   ================================================================== */

.ngg-bfc {
  --ngg-bfc-ink: #000;
  --ngg-bfc-red: #c50000;           /* PSD: R197 G0 B0 */
  --ngg-bfc-bubble: #fffc00;        /* PSD: Color Overlay 255/252/0 */
  --ngg-bfc-paper: #fff;
  --ngg-bfc-gold: #f6d58a;          /* bg fallback while the JPG loads */
  --ngg-bfc-font: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  container: bfc / inline-size;
  max-width: 1920px;
  margin: 0 auto;
}

.ngg-bfc-canvas {
  --u: calc(100cqw / 1920);
  position: relative;
  height: calc(var(--canvas-h, 4000) * var(--u));   /* set from bf-config.js cover.canvasHeight */
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
  background: var(--ngg-bfc-gold) url(../imgs/bf-cover-bg.jpg) center top / 100% 100% no-repeat;
  font-family: var(--ngg-bfc-font);
  font-weight: 700;
  color: var(--ngg-bfc-ink);
  letter-spacing: -.02em;           /* PSD tracking -20 */
  text-align: left;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@supports not (width: 1cqw) {
  .ngg-bfc-canvas { --u: calc(min(100vw, 1920px) / 1920); }
}

/* template.css resets font-family to sans-serif on div/span/a/li/strong/s
   with element selectors, which beats inheritance: hand it back */
.ngg-bfc-canvas * { font-family: inherit; }

/* ---------- slot + card ---------- */

.ngg-bfc-slot {
  position: absolute;
  left: calc(var(--cx) * var(--u));
  top: calc(var(--cy) * var(--u));
  width: calc(var(--cw) * var(--u));
  height: calc(var(--ch) * var(--u));
  margin: 0;
  padding: 0;
  pointer-events: none;             /* only the visible parts take clicks */
}
.ngg-bfc-card {
  position: absolute;
  inset: 0;
  display: block;
  color: inherit;
  text-decoration: none;
  outline: none;
}
.ngg-bfc-card > * { pointer-events: auto; }
.ngg-bfc-card:focus-visible .ngg-bfc-media {
  outline: calc(4 * var(--u)) solid var(--ngg-bfc-ink);
  outline-offset: calc(6 * var(--u));
  border-radius: calc(6 * var(--u));
}
.ngg-bfc-card:hover .ngg-bfc-title,
.ngg-bfc-card:focus-visible .ngg-bfc-title {
  text-decoration: underline;
  text-decoration-thickness: calc(2 * var(--u));
  text-underline-offset: .15em;
}

/* ---------- product image ---------- */

.ngg-bfc-media {
  position: absolute;
  left: calc((var(--mx) - var(--cx)) * var(--u));
  top: calc((var(--my) - var(--cy)) * var(--u));
  width: calc(var(--mw) * var(--u));
  height: calc(var(--mh) * var(--u));
  display: block;
  z-index: 1;
}
.ngg-bfc-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: var(--fit, 50% 100%);
  /* White Outer Glow, Photoshop-style: opacity 75%, spread 10%, size 70px, range 50%.
     CSS has no glow "spread", so it's two white layers: a tight 7px one (the 10% spread, solid near
     the edge) and a wide one that fades out by about 70px (the size; range 50% = even falloff).
     Then the PSD's faint dark outer glow. All in PSD px (x --u), set here because --u lives on the canvas. */
  filter: drop-shadow(0 0 calc(7 * var(--u)) rgb(255 255 255 / .75))
          drop-shadow(0 0 calc(46 * var(--u)) rgb(255 255 255 / .75))
          drop-shadow(0 0 calc(17 * var(--u)) rgb(0 0 0 / .13));
}

/* placeholder until the SKU cutout exists */
.ngg-bfc-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(8 * var(--u));
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border: calc(3 * var(--u)) dashed rgb(0 0 0 / .28);
  border-radius: calc(16 * var(--u));
  background: rgb(255 255 255 / .45);
  color: rgb(0 0 0 / .55);
  text-align: center;
  letter-spacing: 0;
}
.ngg-bfc-ph__label { font-size: calc(26 * var(--u)); font-weight: 700; }
.ngg-bfc-ph__meta { font-size: calc(20 * var(--u)); font-weight: 500; }

/* ---------- SAVE bubble ---------- */

.ngg-bfc-save {
  position: absolute;
  left: calc((var(--sx) - var(--cx)) * var(--u));
  top: calc((var(--sy) - var(--cy)) * var(--u));
  width: calc(192 * var(--u));
  height: calc(120 * var(--u));
  box-sizing: border-box;
  border: calc(3 * var(--u)) solid var(--ngg-bfc-paper);
  border-radius: 50%;
  background: var(--ngg-bfc-bubble);
  text-align: center;
  line-height: 1;
  z-index: 2;
}
.ngg-bfc-save__label {
  display: block;
  margin-left: calc(-3 * var(--u));
  padding-top: calc(13.5 * var(--u));
  font-size: calc(26.9 * var(--u));   /* 30pt x 89.7% */
  font-weight: 800;
}
.ngg-bfc-save__pct {
  display: block;
  margin: calc(-4 * var(--u)) 0 0 calc(5 * var(--u));
  font-size: calc(58 * var(--u));     /* 24pt x 241.5% */
  font-weight: 700;
}

/* ---------- text block ---------- */

.ngg-bfc-body {
  position: absolute;
  left: calc((var(--bx) - var(--cx)) * var(--u));
  top: calc((var(--by) - var(--cy)) * var(--u));
  width: calc(var(--bw) * var(--u));
  display: block;
  z-index: 3;
}

.ngg-bfc-price {
  display: block;
  margin: calc(var(--m-price, 0) * var(--u)) 0 0 calc(var(--dx-price, 0) * var(--u));
  font-size: calc(70 * var(--u));
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.ngg-bfc-price__cur,
.ngg-bfc-price__dec { font-size: .62em; line-height: 0; }
.ngg-bfc-price__cur { vertical-align: -.1em; margin: 0 -.026em 0 .046em; }
.ngg-bfc-price__dec { vertical-align: .52em; margin-left: -.1em; }

.ngg-bfc-was {
  margin-left: -.135em;
  font-size: .4em;                     /* 28px */
  font-weight: 500;
  line-height: 0;
  opacity: .8;                         /* PSD layer opacity 80% */
  text-decoration: line-through;
  text-decoration-thickness: .07em;
}

.ngg-bfc-valid {
  color: var(--ngg-bfc-red);
  font-weight: 700;
  white-space: nowrap;
}
.ngg-bfc-valid--inline {
  margin-left: .283em;
  font-size: calc(30 / 70 * 1em);
  line-height: 0;
  vertical-align: .4em;
}
.ngg-bfc-valid--above {
  display: none;
  margin-bottom: calc(var(--m-valid, 14) * var(--u));
  font-size: calc(30 * var(--u));
  line-height: 1.2;
}
/* slots that stack "Valid" above the price are listed at the bottom */

.ngg-bfc-title {
  display: block;
  margin-top: calc(var(--m-title, 3.8) * var(--u));
  font-size: calc(var(--fs-title, 28) * var(--u));
  font-weight: 700;
  line-height: 1.2;
}

/* dashed boxes: CSS border is the no-JS fallback, JS swaps in the exact
   PSD stroke (4px, dash 16 / gap 8, square caps, centred on the edge) */
.ngg-bfc-box {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  border: calc(4 * var(--u)) dashed var(--ngg-bfc-ink);
  background: var(--ngg-bfc-paper);
  font-weight: 700;
  line-height: 1.2;
}
.ngg-bfc-nb { white-space: nowrap; }
.ngg-bfc-box--gift,
.ngg-bfc-box--promo { white-space: nowrap; }   /* line breaks are explicit, as in the PSD */
.ngg-bfc-box.is-dashed {
  border-color: transparent;
  background: none;
}
.ngg-bfc-dash {
  position: absolute;
  top: calc(-4 * var(--u));
  left: calc(-4 * var(--u));
  width: calc(100% + 8 * var(--u));
  height: calc(100% + 8 * var(--u));
  overflow: visible;
  pointer-events: none;
  z-index: -1;
}
.ngg-bfc-dash path {
  fill: var(--ngg-bfc-paper);
  stroke: var(--ngg-bfc-ink);
  stroke-linecap: square;
}

.ngg-bfc-box--gift {
  margin-left: calc(var(--dx-gift, 0) * var(--u));
  margin-bottom: calc(var(--m-gift, 10) * var(--u));
  padding: calc(15.5 * var(--u)) calc(36 * var(--u)) calc(18.5 * var(--u)) calc(20 * var(--u));
  border-bottom-right-radius: calc(61 * var(--u));   /* PSD path radius 59 + half stroke */
  font-size: calc(28 * var(--u));
}
.ngg-bfc-box--promo {
  margin: calc(var(--m-promo, 12) * var(--u)) 0 0 calc(var(--dx-promo, 0) * var(--u));
  padding: calc(13 * var(--u)) calc(25 * var(--u)) calc(16 * var(--u)) calc(20 * var(--u));
  font-size: calc(31 * var(--u));
}
.ngg-bfc-box--label { padding: calc(12 * var(--u)) calc(28 * var(--u)) calc(25 * var(--u)) calc(25 * var(--u)); }

.ngg-bfc-red,
.ngg-bfc-code,
.ngg-bfc-amt { color: var(--ngg-bfc-red); }
.ngg-bfc-red,
.ngg-bfc-code { font-weight: 800; }
.ngg-bfc-amt { font-size: calc(32 / 31 * 1em); font-weight: 700; }
.ngg-bfc-amt strong { font-weight: 800; }

.ngg-bfc-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ==================================================================
   Tablet / mobile: flowing grid, same type rules at a fixed scale
   ================================================================== */
@container bfc (max-width: 899px) {
  .ngg-bfc-canvas {
    --u: .5px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 24px;
    height: auto;
    padding: 32px 24px 48px;
    background-size: cover;
  }
  .ngg-bfc-slot { position: relative; inset: auto; width: auto; height: auto; pointer-events: auto; }
  .ngg-bfc-card { position: relative; inset: auto; display: flex; flex-direction: column; height: 100%; }
  .ngg-bfc-media { position: relative; left: auto; top: auto; width: 100%; height: 200px; }
  .ngg-bfc-media img { object-position: 50% 100%; }
  .ngg-bfc-save { left: -6px; top: -10px; }
  .ngg-bfc-body { position: relative; left: auto; top: auto; width: auto; margin-top: 12px; }
  .ngg-bfc-price,
  .ngg-bfc-box--gift,
  .ngg-bfc-box--promo { margin-left: 0; }
  .ngg-bfc-price { margin-top: 0; white-space: normal; }
  .ngg-bfc-title { margin-top: 4px; font-size: calc(28 * var(--u)); }
  .ngg-bfc-box--gift { margin-bottom: 8px; }
  .ngg-bfc-box--gift,
  .ngg-bfc-box--promo { white-space: normal; }
  .ngg-bfc-box--promo { margin-top: 10px; }
  .ngg-bfc-valid--above { margin-bottom: 4px; }
}

@container bfc (max-width: 559px) {
  .ngg-bfc-canvas {
    --u: .48px;
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding: 24px 16px 40px;
  }
  .ngg-bfc-card { display: grid; grid-template-columns: 38% minmax(0, 1fr); column-gap: 14px; align-items: center; }
  .ngg-bfc-media { height: 150px; }
  .ngg-bfc-media img { object-position: 50% 50%; }
  .ngg-bfc-body { margin-top: 0; }
  .ngg-bfc-br { display: none; }   /* gift copy reflows freely at phone width */
}

@media (prefers-reduced-motion: no-preference) {
  .ngg-bfc-media img { transition: transform .2s ease-out; }
  .ngg-bfc-card:hover .ngg-bfc-media img { transform: translateY(calc(-6 * var(--u))); }
}

/* ==================================================================
   Item positions are NOT here any more: each item's --mx/--my/... come
   from its row in data/cover.csv (ImageX, ImageY, TextX, SaveX, ...),
   written onto the item by images/js/bf-cover.js.
   ================================================================== */

/* "Valid" stacked above the price (ValidAbove = Y in cover.csv) */
.ngg-bfc-slot.is-valid-above .ngg-bfc-valid--above { display: block; }
.ngg-bfc-slot.is-valid-above .ngg-bfc-valid--inline { display: none; }

/* Price hidden behind a note until a date ("Pricing & availability viewable on 11/19") */
.ngg-bfc-pricenote {
  display: block;
  max-width: 100%;
  font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  font-size: calc(30 * var(--u));
  font-weight: 800;
  line-height: 1.2;
  color: #d0021b;
}

/* Gift box under the title (GiftBelow = Y in cover.csv): same spacing as the promo box */
.ngg-bfc-slot.is-gift-below .ngg-bfc-box--gift {
  margin-top: calc(var(--m-gift, 12) * var(--u));
  margin-bottom: 0;
}

/* Image taken from products.csv (white-background photo, not a cutout):
   multiply drops the white onto the gold; no drop shadow around the box */
.ngg-bfc-media img.is-sheet-img { mix-blend-mode: multiply; filter: none; }   /* only until the in-browser cutout finishes */

/* FEATURED ITEMS title uses the same markup/classes as the CATEGORIES title
   (.ngg-title > .cat-bar in product.css); this keeps its black band, makes it
   twice the size (scaled down on phones so it fits) and fills the letters with
   an orange-yellow-orange gradient. The side lines keep their gold. */
.ngg-bf-feature { background: #000; }
.ngg-bf-feature .cat-bar { font-size: min(4em, 9vw); }
.ngg-bf-feature .cat-bar > span {
  background: linear-gradient(90deg, #ff7a00 0%, #ffd800 50%, #ff7a00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ==================================================================
   Layout helper: add ?bfqa=1 to the page URL (never shown to shoppers)
   ================================================================== */
.ngg-bfc-canvas.is-layout .ngg-bfc-media { outline: 2px dashed #00a2ff; }
.ngg-bfc-canvas.is-layout .ngg-bfc-body { outline: 2px dashed #ff2d95; }
.ngg-bfc-canvas.is-layout .ngg-bfc-save { outline: 2px dashed #00b050; }
.ngg-bfc-canvas.is-layout .ngg-bfc-slot::before {
  content: attr(data-bfc-label);
  position: absolute;
  left: calc((var(--mx) - var(--cx)) * var(--u));
  top: calc((var(--my) - var(--cy)) * var(--u));
  z-index: 9;
  padding: 2px 6px;
  background: #00a2ff;
  color: #fff;
  font: 700 12px/1.3 Arial, sans-serif;
  letter-spacing: 0;
}
.ngg-bfc-qa {
  position: fixed; left: 12px; bottom: 12px; z-index: 2147483647;
  max-width: 520px; max-height: 40vh; overflow: auto;
  padding: 10px 14px; border: 2px solid #00a2ff; border-radius: 8px;
  background: #fff; color: #111; font: 12px/1.45 monospace;
  box-shadow: 0 6px 24px rgba(0,0,0,.35);
}
