/*
 * storefront-bb.css — full-bleed Best Buy-style homepage layer.
 * Scoped under .bb-page so it doesn't leak to other pages on the site
 * that still use the original indigo/gray palette from base.html.
 *
 * Loaded only on the homepage (linked via {% block extra_head %} in
 * storefront/public/home.html). Safe to remove the link to revert.
 */

.bb-page,
body.bb-active {
  /* Palette — saturated blue + signal yellow, white base.
     Declared on both .bb-page (page body wrapper) AND body.bb-active so
     the header/footer restyles outside .bb-page can also resolve these vars. */
  --bb-bg: #ffffff;
  --bb-bg-alt: #f4f6f8;          /* light gray section bands */
  --bb-bg-dark: #0b2447;         /* deep navy for hero/promo blocks */
  --bb-bg-accent: #fff8e1;       /* warm yellow tint */

  --bb-surface: #ffffff;
  --bb-border: #e5e9ec;
  --bb-border-strong: #c9d1d8;

  --bb-text: #0e1116;
  --bb-text-muted: #5b6975;
  --bb-text-inverse: #ffffff;

  --bb-primary: #003b9c;
  --bb-primary-hover: #002a73;
  --bb-accent: #ffd400;
  --bb-accent-hover: #e6bf00;
  --bb-danger: #d92d20;
  --bb-success: #079455;
  --bb-price: #cf2126;
  --bb-savings: #079455;

  --bb-radius-sm: 4px;
  --bb-radius-md: 6px;
  --bb-radius-lg: 10px;

  --bb-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --bb-shadow-md: 0 4px 10px rgba(15, 23, 42, 0.08);
  --bb-shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

  --bb-width: 1500px;

  color: var(--bb-text);
  background: var(--bb-bg);
}

/* ============ Layout primitives ============ */

/* Full-bleed section — backgrounds stretch viewport-wide */
.bb-page .bb-band {
  width: 100%;
  position: relative;
}
.bb-page .bb-band-alt { background: var(--bb-bg-alt); }
.bb-page .bb-band-dark { background: var(--bb-bg-dark); color: var(--bb-text-inverse); }
.bb-page .bb-band-accent { background: var(--bb-bg-accent); }

/* Inner content cap so text doesn't stretch absurdly on ultra-wide */
.bb-page .bb-inner {
  max-width: var(--bb-width);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Section header (title + view-all link) */
.bb-page .bb-sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 32px 0 16px;
}
.bb-page .bb-sec-head h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--bb-text);
}
.bb-page .bb-sec-head a {
  color: var(--bb-primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.875rem;
}
.bb-page .bb-sec-head a:hover { color: var(--bb-primary-hover); }

/* Center-aligned variant for categories/brands */
.bb-page .bb-sec-head-center {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}
.bb-page .bb-sec-head-center .bb-subtitle {
  color: var(--bb-text-muted);
  font-size: 0.9375rem;
  margin: 0;
}

/* ============ Dense product grid ============ */

.bb-page .bb-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  padding-bottom: 16px;
}
@media (max-width: 1280px) {
  .bb-page .bb-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 1100px) {
  .bb-page .bb-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .bb-page .bb-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .bb-page .bb-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* ============ Hero ============ */

.bb-page .bb-hero {
  background: linear-gradient(135deg, #032b66 0%, #0b3aa3 60%, #1450c8 100%);
  color: #fff;
  padding: 88px 0;
  min-height: 420px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.bb-page .bb-hero::after {
  content: "";
  position: absolute; right: -120px; top: -60px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(255,212,0,.35) 0%, transparent 65%);
  pointer-events: none;
}
.bb-page .bb-hero .bb-inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
}
@media (max-width: 1000px) {
  .bb-page .bb-hero .bb-inner { grid-template-columns: 1fr; }
}
.bb-page .bb-hero .eyebrow {
  display: inline-block;
  background: var(--bb-accent);
  color: #111;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.bb-page .bb-hero h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 16px 0 18px;
  line-height: 1.05;
  color: #fff;
}
.bb-page .bb-hero p {
  font-size: 1.125rem;
  opacity: 0.92;
  max-width: 580px;
  margin: 0;
  line-height: 1.5;
}
.bb-page .bb-hero .btn-yellow {
  background: var(--bb-accent);
  color: #111;
  border: 0;
  padding: 12px 22px;
  border-radius: 4px;
  font-weight: 700;
  margin-top: 18px;
  font-size: 0.9375rem;
  text-decoration: none;
  display: inline-block;
}
.bb-page .bb-hero .btn-yellow:hover { background: var(--bb-accent-hover); }

/* Hero deal cards (when no banner) */
.bb-page .bb-hero .deal-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.bb-page .bb-hero .deal-card {
  background: #fff;
  color: var(--bb-text);
  border-radius: 6px;
  padding: 12px;
  box-shadow: var(--bb-shadow-md);
}
.bb-page .bb-hero .deal-card .thumb {
  background: #f0f3f5;
  border-radius: 4px;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c9d1d8;
  font-size: 28px;
  margin-bottom: 8px;
}

/* ============ Best Buy-style hero — image slide + trending side cards ============ */

.bb-page .bb-hero-band {
  background: var(--bb-bg-alt);
  padding: 16px 0 32px;
}
.bb-page .bb-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 1100px) {
  .bb-page .bb-hero-grid { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 900px) {
  .bb-page .bb-hero-grid { grid-template-columns: 1fr; }
}

/* Left: image slide(s) */
.bb-page .bb-hero-slides { min-height: 580px; display: flex; }
.bb-page .bb-hero-slides .carousel,
.bb-page .bb-hero-slides .bb-slide { width: 100%; display: block; position: relative; }
.bb-page .bb-hero-slides .carousel-inner,
.bb-page .bb-hero-slides .carousel-item { height: 100%; }
.bb-page .bb-hero-slides .bb-slide {
  border-radius: var(--bb-radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  display: block;
  height: 100%;
}
.bb-page .bb-hero-slides .bb-slide img {
  width: 100%;
  height: 100%;
  min-height: 580px;
  object-fit: cover;
  display: block;
}
.bb-page .bb-hero-slides .bb-slide-text {
  position: absolute; left: 36px; bottom: 36px; right: 36px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.35);
}
.bb-page .bb-hero-slides .bb-slide-text h2 {
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 800;
  margin: 0 0 8px;
  color: #fff;
}
.bb-page .bb-hero-slides .bb-slide-text p {
  font-size: 1.0625rem;
  margin: 0;
  max-width: 540px;
}
/* Carousel controls — clear left/right arrow buttons (white circle on
   semi-opaque backdrop) so users see they can scrub between slides */
.bb-page .bb-hero-slides .carousel-control-prev,
.bb-page .bb-hero-slides .carousel-control-next {
  width: 56px;
  height: 56px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  opacity: 1;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  transition: background .15s, transform .15s;
}
.bb-page .bb-hero-slides .carousel-control-prev { left: 18px; }
.bb-page .bb-hero-slides .carousel-control-next { right: 18px; }
.bb-page .bb-hero-slides .carousel-control-prev:hover,
.bb-page .bb-hero-slides .carousel-control-next:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.05);
}
.bb-page .bb-hero-slides .carousel-control-prev-icon,
.bb-page .bb-hero-slides .carousel-control-next-icon {
  width: 22px;
  height: 22px;
  /* Re-tint the default Bootstrap chevrons to dark instead of white */
  filter: invert(1) brightness(0.1);
}
/* Indicator dots — pill-shaped, easier to spot than the default 8px lines */
.bb-page .bb-hero-slides .carousel-indicators {
  bottom: 14px;
  margin-bottom: 0;
}
.bb-page .bb-hero-slides .carousel-indicators button {
  width: 28px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.55);
  border: 0;
  margin: 0 4px;
  opacity: 1;
  transition: background .15s, width .15s;
}
.bb-page .bb-hero-slides .carousel-indicators button.active {
  background: var(--bb-accent);
  width: 44px;
}

/* Right: trending now stack */
.bb-page .bb-hero-side {
  background: #fff;
  border: 1px solid var(--bb-border);
  border-radius: var(--bb-radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
}
.bb-page .bb-side-title {
  font-size: 1.0625rem;
  font-weight: 800;
  margin: 0 0 2px;
  color: var(--bb-text);
}
.bb-page .bb-side-sub {
  font-size: 0.8125rem;
  color: var(--bb-text-muted);
  margin: 0 0 12px;
}
.bb-page .bb-side-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.bb-page .bb-mini-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--bb-text);
  border-radius: var(--bb-radius-md);
  padding: 8px;
  border: 1px solid transparent;
  transition: border-color .15s, background .15s;
}
.bb-page .bb-mini-card:hover {
  border-color: var(--bb-border);
  background: var(--bb-bg-alt);
}
.bb-page .bb-mini-thumb {
  width: 88px;
  height: 88px;
  background: #fff;
  border: 1px solid var(--bb-border);
  border-radius: var(--bb-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.bb-page .bb-mini-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.bb-page .bb-mini-thumb i { color: #c9d1d8; font-size: 24px; }
.bb-page .bb-mini-badge {
  display: inline-block;
  background: var(--bb-price);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  margin-bottom: 4px;
}
.bb-page .bb-mini-title {
  font-size: 0.8125rem;
  line-height: 1.3;
  font-weight: 500;
}
.bb-page .bb-mini-price {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--bb-text);
  margin-top: 4px;
}
.bb-page .bb-mini-placeholder { opacity: 0.55; pointer-events: none; }

/* ============ Image-driven promo strips ============
 * Each is a clickable full-bleed image (cropped from the bestbuy.png
 * reference, replaceable via static/images/storefront/ or via Banner records).
 */
.bb-page .bb-promo-strip-img {
  display: block;
  border-radius: var(--bb-radius-lg);
  overflow: hidden;
  margin: 16px 0;
  position: relative;
  transition: transform .15s;
}
.bb-page .bb-promo-strip-img:hover { transform: translateY(-1px); }
.bb-page .bb-promo-strip-img img {
  width: 100%;
  display: block;
}

/* ============ Legacy banner-mode hero (kept for old templates) ============ */
.bb-page .bb-hero-banner {
  padding: 0;
  background: var(--bb-bg-dark);
}
.bb-page .bb-hero-banner img {
  width: 100%;
  display: block;
  max-height: 480px;
  object-fit: cover;
}

/* ============ Category strip (round icons) ============ */

.bb-page .bb-cats {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
  padding: 28px 0;
}
@media (max-width: 1200px) { .bb-page .bb-cats { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 800px)  { .bb-page .bb-cats { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 480px)  { .bb-page .bb-cats { grid-template-columns: repeat(3, 1fr); } }

.bb-page .bb-cat {
  text-align: center;
  text-decoration: none;
  color: var(--bb-text);
  display: block;
}
.bb-page .bb-cat .ring {
  width: 76px; height: 76px;
  border-radius: 999px;
  margin: 0 auto 8px;
  background: #f1f3f5;
  display: flex; align-items: center; justify-content: center;
  color: #9aa3af;
  font-size: 28px;
  transition: background 0.2s, color 0.2s;
}
/* Icon (matches the megamenu icon_url): grey + faded by default, the category
   colour blooms in on hover. */
.bb-page .bb-cat .ring img {
  width: 38px; height: 38px; object-fit: contain;
  filter: grayscale(1); opacity: 0.5;
  transition: filter 0.2s, opacity 0.2s;
}
.bb-page .bb-cat:hover .ring {
  background: color-mix(in srgb, var(--cat-color, var(--bb-primary)) 18%, #fff);
  color: var(--cat-color, var(--bb-primary));
}
.bb-page .bb-cat:hover .ring img { filter: none; opacity: 1; }
.bb-page .bb-cat .label {
  font-size: 0.875rem;
  font-weight: 500;
}

/* ============ Split promo blocks ============ */

.bb-page .bb-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 32px 0;
}
@media (max-width: 720px) { .bb-page .bb-split { grid-template-columns: 1fr; } }

.bb-page .bb-split .block {
  border-radius: 10px;
  padding: 36px 30px;
  color: #fff;
  position: relative;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.bb-page .bb-split .block.tradein { background: linear-gradient(135deg, #0a5d3a, #0a8049); }
.bb-page .bb-split .block.openbox { background: linear-gradient(135deg, #6b2d8c, #9e3eb2); }
.bb-page .bb-split .block h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: #fff;
}
.bb-page .bb-split .block p {
  opacity: 0.9;
  margin: 0 0 14px;
  max-width: 90%;
}
.bb-page .bb-split .block .btn-pill {
  background: #fff;
  color: var(--bb-text);
  padding: 10px 18px;
  border-radius: 4px;
  font-weight: 700;
  align-self: flex-start;
  text-decoration: none;
  font-size: 0.875rem;
}

/* ============ Promo strip (trust badges) ============ */

.bb-page .bb-promo-strip {
  padding: 16px 0;
}
.bb-page .bb-promo-strip .bb-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
}
.bb-page .bb-promo-strip .item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
}
.bb-page .bb-promo-strip .item i {
  color: var(--bb-accent);
  font-size: 22px;
}

/* ============ Brand strip ============ */

.bb-page .bb-brands {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 18px;
  padding: 28px 0;
  align-items: center;
}
@media (max-width: 1200px) { .bb-page .bb-brands { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 800px)  { .bb-page .bb-brands { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 480px)  { .bb-page .bb-brands { grid-template-columns: repeat(3, 1fr); } }

.bb-page .bb-brand-pill {
  display: block;
  text-align: center;
  color: var(--bb-text-muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 12px 8px;
  border: 1px solid var(--bb-border);
  border-radius: 6px;
  background: #fff;
  transition: color 0.2s, border-color 0.2s;
}
.bb-page .bb-brand-pill:hover {
  color: var(--bb-primary);
  border-color: var(--bb-primary);
}
/* Brand logos: greyscale by default; on hover the logo regains full colour
   and the tile tints with the brand's palette colour (--brand-color =
   Brand.primary_color, falling back to the site primary). */
.bb-page .bb-brand-pill.has-logo {
  display: flex; align-items: center; justify-content: center;
  min-height: 56px;
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.bb-page .bb-brand-pill img {
  max-width: 100%; max-height: 40px; object-fit: contain;
  filter: grayscale(1); opacity: 0.55;
  transition: filter 0.25s, opacity 0.25s;
}
.bb-page .bb-brand-pill.has-logo:hover img { filter: none; opacity: 1; }
.bb-page .bb-brand-pill.has-logo:hover {
  border-color: color-mix(in srgb, var(--brand-color, var(--bb-primary)) 55%, #fff);
  background: color-mix(in srgb, var(--brand-color, var(--bb-primary)) 8%, #fff);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--brand-color, var(--bb-primary)) 22%, transparent);
}

/* ============ Product card density override ============
 * The existing .product-card from base.html stays — we adjust spacing,
 * sizing and column alignment so 6-per-row reads cleanly. All overrides
 * are scoped under .bb-page .bb-grid so other pages are untouched.
 */
.bb-page .bb-grid .product-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--bb-border);
  border-radius: var(--bb-radius-md);
  background: #fff;
  position: relative;
  overflow: hidden;
  transition: box-shadow .2s var(--ease, ease-out),
              border-color .2s var(--ease, ease-out),
              transform .2s var(--ease, ease-out);
  will-change: transform;
}
.bb-page .bb-grid .product-card:hover {
  border-color: var(--bb-primary);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12),
              0 4px 8px rgba(15, 23, 42, 0.08);
  transform: translateY(-4px);
}
/* Subtle yellow accent stripe slides across the top edge on hover —
   ties to the BB yellow brand colour without competing with the price */
.bb-page .bb-grid .product-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: var(--bb-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .25s var(--ease, ease-out);
  z-index: 2;
}
.bb-page .bb-grid .product-card:hover::before { transform: scaleX(1); }

/* Image area: square frame with white bg + padding so product
   photos sit inside it instead of stretching/clipping */
.bb-page .bb-grid .product-card .product-image {
  aspect-ratio: 1 / 1;
  background: #fff;
  border-radius: var(--bb-radius-md) var(--bb-radius-md) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 14px;
}
.bb-page .bb-grid .product-card .product-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform .35s var(--ease, ease-out);
}
/* Product image zooms gently on card hover */
.bb-page .bb-grid .product-card:hover .product-image img {
  transform: scale(1.06);
}

/* Wishlist button + add-to-cart in card body get extra emphasis on hover */
.bb-page .bb-grid .product-card .wishlist-btn {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .2s, transform .2s var(--ease, ease-out);
}
.bb-page .bb-grid .product-card:hover .wishlist-btn {
  opacity: 1;
  transform: translateY(0);
}
/* Body uses flex so title takes available space and price/CTA pin
   to the bottom — gives every card the same baseline regardless of
   title length */
.bb-page .bb-grid .product-card .product-body {
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 6px;
  flex: 1;
}
.bb-page .bb-grid .product-card .product-brand {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--bb-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bb-page .bb-grid .product-card .product-title {
  font-size: 0.9375rem;
  line-height: 1.35;
  min-height: 2.7em;
  flex: 1;
  margin: 0;
}
.bb-page .bb-grid .product-card .product-title a {
  color: var(--bb-text);
  text-decoration: none;
  transition: color .15s;
}
.bb-page .bb-grid .product-card:hover .product-title a {
  color: var(--bb-primary);
}
.bb-page .bb-grid .product-card .product-sku {
  font-size: 0.75rem;
  color: var(--bb-text-muted);
}
.bb-page .bb-grid .product-card .price-current {
  color: var(--bb-price);
  font-weight: 800;
  font-size: 1.125rem;
}
.bb-page .bb-grid .product-card .price-original {
  color: var(--bb-text-muted);
  font-size: 0.8125rem;
  margin-left: 6px;
  text-decoration: line-through;
}
.bb-page .bb-grid .product-card .price-call {
  color: var(--bb-primary);
  font-weight: 700;
  font-size: 0.9375rem;
}

/* ============ Section spacing ============
 * Adds breathing room between bands without adding a divider line.
 */
.bb-page .bb-band > .bb-inner {
  padding-bottom: 40px;
}
.bb-page .bb-hero > .bb-inner,
.bb-page .bb-promo-strip > .bb-inner {
  padding-bottom: 0;
}

/* ============ Mobile hero ============ */
@media (max-width: 600px) {
  .bb-page .bb-hero {
    padding: 56px 0;
    min-height: 320px;
  }
  .bb-page .bb-hero h1 {
    font-size: 1.875rem;
  }
  .bb-page .bb-hero p {
    font-size: 1rem;
  }
  .bb-page .bb-sec-head { padding: 24px 0 12px; }
  .bb-page .bb-sec-head h2 { font-size: 1.25rem; }
}

/* =====================================================================
 * BB HEADER + FOOTER RESTYLING — scoped under body.bb-active so only the
 * homepage gets the rebrand. Other pages keep their existing base.html chrome.
 * ===================================================================== */

/* ---------- Top utility bar (the dark band above the main header) ---------- */
body.bb-active .header-top {
  background: #0b1a3d;
  color: #ffffff;
  padding: 6px 0;
  font-size: 0.8125rem;
}
body.bb-active .header-top a {
  color: #ffffff;
  opacity: 0.85;
}
body.bb-active .header-top a:hover {
  color: var(--bb-accent);
  opacity: 1;
  text-decoration: none;
}
body.bb-active .header-top .container {
  max-width: var(--bb-width);
}

/* ---------- Main header band (logo + search + cart) ---------- */
body.bb-active .header-main {
  background: var(--bb-primary);
  padding: 14px 0;
  border-bottom: 0;
}
body.bb-active .header-main .container {
  max-width: var(--bb-width);
}
body.bb-active .store-logo,
body.bb-active .store-logo:hover {
  color: #fff;
  font-family: var(--font-sans, system-ui);
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
body.bb-active .store-logo::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 12px;
  background: var(--bb-accent);
  border-radius: 2px;
}
/* Keep the existing logo (image OR text) visible — invert image filter so a
   dark logo reads as white on the new navy header */
body.bb-active .store-logo img {
  max-height: 36px;
  filter: brightness(0) invert(1);
}
body.bb-active .store-logo .logo-text,
body.bb-active .store-logo .logo-char {
  color: #fff !important;
}

/* Search box — wide white pill with yellow submit */
body.bb-active .search-box {
  background: #fff;
  border-radius: 4px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 0;
  box-shadow: var(--bb-shadow-md);
}
body.bb-active .search-box input[type="search"],
body.bb-active .search-box input[type="text"],
body.bb-active .search-box .form-control {
  border: 0 !important;
  padding: 11px 14px;
  font-size: 0.9375rem;
  flex: 1;
  background: transparent;
  box-shadow: none !important;
}
body.bb-active .search-box input:focus { outline: none; }
body.bb-active .search-box button,
body.bb-active .search-box .btn {
  background: var(--bb-accent);
  color: #111;
  border: 0;
  padding: 0 18px;
  font-weight: 700;
  border-radius: 0;
}
body.bb-active .search-box button:hover { background: var(--bb-accent-hover); color: #111; }
/* The magnifier sits absolutely inside the flex pill; reserve left padding
   on the input so it never overlaps the placeholder / typed text. */
body.bb-active .search-box { position: relative; }
body.bb-active .search-box .search-icon {
  left: 14px;
  z-index: 2;
  pointer-events: none;
  color: #6b7280;
}
body.bb-active .search-box input[type="search"],
body.bb-active .search-box input[type="text"],
body.bb-active .search-box .form-control {
  padding-left: 40px;
}

/* Right-side header actions (cart, account) — light pills on navy */
body.bb-active .header-main .btn-outline-primary,
body.bb-active .header-main .btn-outline-secondary {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 8px 14px;
  border-radius: 4px;
}
body.bb-active .header-main .btn-outline-primary:hover,
body.bb-active .header-main .btn-outline-secondary:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.6);
  color: #fff;
}
body.bb-active .header-main .btn-outline-primary i,
body.bb-active .header-main .btn-outline-secondary i { color: #fff; }
body.bb-active .header-main .badge {
  background: var(--bb-accent) !important;
  color: #111 !important;
  font-weight: 700;
}

/* ---------- Department sub-nav (Home / Products / Brands ...) ---------- */
body.bb-active .nav-section {
  background: #fff;
  border-bottom: 1px solid var(--bb-border);
}
body.bb-active .nav-section .container { max-width: var(--bb-width); }
body.bb-active .nav-section .nav-link {
  color: var(--bb-text) !important;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 14px 12px !important;
  position: relative;
}
body.bb-active .nav-section .nav-link:hover {
  color: var(--bb-primary) !important;
}
body.bb-active .nav-section .nav-link.active {
  color: var(--bb-primary) !important;
  background: transparent;
}
body.bb-active .nav-section .nav-link.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  background: var(--bb-primary);
  border-radius: 2px;
}

/* ============ Footer — multi-column dark with payment/social ============ */
body.bb-active .store-footer {
  background: #0b1a3d;
  color: #c8d2e0;
  padding: 56px 0 24px;
  margin-top: 32px;
}
body.bb-active .store-footer .container { max-width: var(--bb-width); }
body.bb-active .store-footer h5 {
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}
body.bb-active .store-footer ul { padding: 0; list-style: none; }
body.bb-active .store-footer li { margin: 0; }
body.bb-active .store-footer a {
  color: #9aabbf;
  text-decoration: none;
  display: block;
  padding: 5px 0;
  font-size: 0.875rem;
  transition: color .15s;
}
body.bb-active .store-footer a:hover { color: var(--bb-accent); }

/* Footer bottom row (copyright + payment icons) */
body.bb-active .store-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 32px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8125rem;
  color: #7e8ea3;
}
/* Synthesise a payment-icon row using FontAwesome brand icons (no new images) */
body.bb-active .store-footer .footer-bottom::after {
  content: "\f1f0  \f1f1  \f1ed  \f415";
  font-family: "Font Awesome 6 Brands";
  font-size: 1.5rem;
  letter-spacing: 0.4em;
  color: #9aabbf;
}

/* Social row hover */
body.bb-active .store-footer .social-icons a,
body.bb-active .store-footer [class*="fa-"] {
  color: inherit;
}

/* =====================================================================
 * Header logo — force a Best Buy-style text mark on the navy header.
 * base.html conditionally renders <img> OR text; the img often loads
 * empty/broken on this storefront so the navy band ends up logo-less.
 * Override both branches via ::before so the brand is always present.
 * Site-name text is hardcoded here — the live brand is in
 * StorefrontSettings.site_name. If renaming again, also update this
 * literal (or move to an inline style in home.html that reads
 * `{{ storefront_settings.site_name }}` so the brand is data-driven).
 * ===================================================================== */
body.bb-active .store-logo > * { display: none !important; }
body.bb-active .store-logo {
  position: relative;
  padding-left: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
}
body.bb-active .store-logo::before {
  content: "Tech2have";
  display: inline-block;
  color: #ffffff !important;
  font-family: var(--font-sans, system-ui);
  font-weight: 800;
  font-size: 1.875rem;
  letter-spacing: -0.02em;
  line-height: 1;
}
/* ::after is already the yellow accent block from earlier — keep it */

/* =====================================================================
 * Footer extras — hide empty columns, add payment + app-store strip.
 * ===================================================================== */

/* Hide any footer column whose link list ended up empty (e.g. Categories
   when no categories are configured) — using :has() so we don't need to
   touch base.html markup */
body.bb-active .store-footer .col-lg-3:has(.footer-links:empty),
body.bb-active .store-footer .col-md-6:has(.footer-links:empty) {
  display: none !important;
}

/* Inject a payment + app-store strip into the .footer-bottom row */
body.bb-active .store-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 32px;
  padding-top: 20px;
  display: grid !important;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: #7e8ea3;
}
body.bb-active .store-footer .footer-bottom > * { margin: 0; }

/* Replace the old ::after-only payment row with a proper grid:
   left = copyright, center = payment icons, right = app badges */
/* Payment icons — only glyphs confirmed present in the loaded Font Awesome
   Brands set (visa / mastercard / paypal / apple-pay). The previous 5th
   glyph (\f7d9) and the app-store badges (\f3ce, \f370) aren't in this FA
   build, so they rendered as missing-glyph "tofu" boxes — removed. */
body.bb-active .store-footer .footer-bottom::after {
  content: "\f1f0  \f1f1  \f1ed  \f415";
  font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands";
  font-size: 1.625rem;
  letter-spacing: 0.35em;
  color: #b9c5d6;
  justify-self: center;
  grid-column: 2;
}
/* Fix copyright column placement */
body.bb-active .store-footer .footer-bottom > :first-child,
body.bb-active .store-footer .footer-bottom .copyright {
  grid-column: 1;
  justify-self: start;
}

@media (max-width: 900px) {
  body.bb-active .store-footer .footer-bottom {
    grid-template-columns: 1fr;
    text-align: center;
  }
  body.bb-active .store-footer .footer-bottom::after,
  body.bb-active .store-footer .footer-bottom::before {
    grid-column: 1;
    justify-self: center;
  }
}

/* ===================================================================
   Tech2Have: commerce paused — hide cart / Add-to-Cart / checkout /
   footer payment icons "for now". Delete this whole block to re-enable.
   =================================================================== */
.store-header a[href="/store/cart/"] { display: none !important; }      /* header cart button */
button[onclick^="addToCart"] { display: none !important; }              /* Add to Cart (cards + product page) */
a[href*="checkout"] { display: none !important; }                       /* Proceed/Login to Checkout */
body.bb-active .store-footer .footer-bottom::after { content: none !important; }  /* footer payment-card icons */


