/*
 * Tech Store light theme cascade repair.
 * Loaded AFTER the legacy homepage and orange/lime layers. In particular,
 * techstore-home-layout.css had dark, unscoped !important backgrounds.
 * Visual campaign photography remains dark by design; UI chrome does not.
 */
body:not(.dark):not(.admin-page),
body:not(.dark)[data-bsg-page="home"]:not(.admin-page) {
  --bg: #f5f7fb !important;
  --bg-2: #edf1f7 !important;
  --bg-primary: #f5f7fb !important;
  --bg-secondary: #edf1f7 !important;
  --surface: #ffffff !important;
  --surface-2: #f1f4f9 !important;
  --surface-secondary: #f1f4f9 !important;
  --card-bg: #ffffff !important;
  --ts-bg: #f5f7fb !important;
  --ts-bg-site: #f5f7fb !important;
  --ts-bg-2: #edf1f7 !important;
  --ts-surface: #ffffff !important;
  --ts-surface-soft: #f1f4f9 !important;
  --ts-surface-2: #edf1f7 !important;
  --ts-text: #182236 !important;
  --ts-text-2: #34445a !important;
  --ts-muted: #58687b !important;
  --text: #182236 !important;
  --text-muted: #58687b !important;
  --border: #dce4ed !important;
  --border-strong: #bbc9d9 !important;
  --ts-line: rgba(34,49,73,.13) !important;
  --primary: #ff5b24 !important;
  --primary-hover: #ff783f !important;
  --accent: #b5ff3b !important;
  color-scheme: light !important;
  background: #f5f7fb !important;
  color: #182236 !important;
}

/* Every ordinary page surface stays light after navigating or switching mode.
   Do not blanket-override photographic hero/category cards. */
body:not(.dark):not(.admin-page) :is(
  .page-body,
  .home-page-shell,
  .home-page-body,
  .pc-home-categories,
  .pc-hardware-showcase,
  .pc-discovery-section,
  .pc-builder-callout,
  .brands-section,
  .home-blog-section,
  .product-rail-section,
  .special-products,
  .new-products-section,
  .best-sellers-section,
  .apple-categories,
  .apple-tech-worlds,
  .newsletter-section,
  .footer
) {
  background: #f5f7fb !important;
  color: #182236 !important;
}

/* Dark fallback canvas leaked through the image banner's rounded corners. */
body:not(.dark)[data-bsg-page="home"]:not(.admin-page) .pc-hero-image-only,
body:not(.dark)[data-bsg-page="home"]:not(.admin-page) .pc-hero-image-only .pc-home-hero__slider,
body:not(.dark)[data-bsg-page="home"]:not(.admin-page) .pc-hero-image-only .hero-banner-slide {
  background: #e9eef6 !important;
}
body:not(.dark)[data-bsg-page="home"]:not(.admin-page) .pc-hero-image-only {
  border-color: rgba(70,91,119,.17) !important;
  box-shadow: none !important;
}
/* Keep text readable in every ordinary heading, including the six-card rail. */
body:not(.dark)[data-bsg-page="home"]:not(.admin-page) :is(
  .pc-hardware-showcase .section-head-row h2,
  .pc-home-categories .section-head-row h2,
  .pc-discovery-section .section-head-row h2,
  .brands-section .section-head-row h2,
  .product-rail-section .section-head-row h2,
  .home-blog-section .section-head-row h2,
  .pc-builder-callout .section-head-row h2
) {
  color: #182236 !important;
  -webkit-text-fill-color: #182236 !important;
}
body:not(.dark)[data-bsg-page="home"]:not(.admin-page) :is(
  .section-link,
  .pc-hardware-showcase .section-link,
  .pc-home-categories .section-link
) { color: #c44717 !important; }

/* Restore light day cards where the old orange/lime layer forces navy. */
body:not(.dark):not(.admin-page) .pc-discovery-card,
body:not(.dark):not(.admin-page) .pc-discovery-card.tech-world-cpu,
body:not(.dark):not(.admin-page) .pc-discovery-card.tech-world-build {
  background:
    radial-gradient(circle at 90% 12%,rgba(255,91,36,.09),transparent 40%),
    linear-gradient(150deg,#fff,#f0f4f9) !important;
  color: #182236 !important;
  border-color: #dce4ed !important;
  box-shadow: 0 8px 26px rgba(34,49,73,.055) !important;
}
body:not(.dark):not(.admin-page) .pc-discovery-card .tech-world-copy,
body:not(.dark):not(.admin-page) .pc-discovery-card .tech-world-copy h3 {
  color: #182236 !important;
}
body:not(.dark):not(.admin-page) .pc-discovery-card :is(
  .tech-world-copy p, .pc-discovery-number
) { color: #58687b !important; }
body:not(.dark):not(.admin-page) .pc-discovery-card .tech-world-copy > span {
  color: #688c12 !important;
}
body:not(.dark):not(.admin-page) .pc-discovery-card .tech-world-copy strong {
  color: #cc4a1b !important;
}

/* Builder callout's text/image remains intact; only its dark outer strip and
   unreadable dark-on-dark boxes change in the day theme. */
body:not(.dark):not(.admin-page) .pc-builder-campaign {
  background: linear-gradient(115deg,#fff,#edf3fb) !important;
  border-color: #dce4ed !important;
  box-shadow: 0 12px 34px rgba(34,49,73,.075) !important;
}
body:not(.dark):not(.admin-page) .pc-builder-campaign__content :is(h2,p),
body:not(.dark):not(.admin-page) .pc-builder-campaign__benefits {
  color: #243149 !important;
}
body:not(.dark):not(.admin-page) .pc-builder-campaign__eyebrow {
  color: #cc4a1b !important;
}

/* Brand logos shouldn't be placed in black tiles in day mode. */
body:not(.dark):not(.admin-page) .brand-logo-card {
  background: #fff !important;
  color: #34445a !important;
  border-color: #dce4ed !important;
  box-shadow: 0 4px 18px rgba(34,49,73,.055) !important;
}
body:not(.dark):not(.admin-page) .brand-logo-card span {
  color: #58687b !important;
}
body:not(.dark):not(.admin-page) .brand-logo-card img {
  filter: none !important;
}

/* The benefits rail had a forced dark translucent gradient across light mode. */
body:not(.dark)[data-bsg-page="home"]:not(.admin-page) .pc-trust-section {
  background:
    linear-gradient(155deg,rgba(255,255,255,.93),rgba(245,249,253,.85) 58%,rgba(237,245,240,.95)),
    rgba(250,252,255,.94) !important;
  color: #182236 !important;
  border-top-color: rgba(255,255,255,.98) !important;
  border-bottom-color: rgba(79,102,132,.18) !important;
}
body:not(.dark)[data-bsg-page="home"]:not(.admin-page) .pc-trust-section .trust-item {
  background: rgba(255,255,255,.24) !important;
  border-inline-end-color: rgba(79,102,132,.14) !important;
}
body:not(.dark)[data-bsg-page="home"]:not(.admin-page) .pc-trust-section .trust-item h3 {
  color: #1d2b3f !important;
}
body:not(.dark)[data-bsg-page="home"]:not(.admin-page) .pc-trust-section .trust-item p {
  color: #53657b !important;
}

/* Light navigation is shared by home, product listing, blog and builder. */
body:not(.dark):not(.admin-page) .header {
  background:
    linear-gradient(150deg,rgba(255,255,255,.97),rgba(248,251,255,.9)),
    #f8fbff !important;
  border-color: rgba(121,142,168,.22) !important;
  box-shadow: 0 12px 32px rgba(37,54,75,.09),inset 0 1px rgba(255,255,255,.98) !important;
}
body:not(.dark):not(.admin-page) .header :is(
  .nav-dropdown,.nav-mega,.header-search-panel,.bell-panel
) {
  background: #fff !important;
  color: #182236 !important;
  border-color: #dce4ed !important;
}
body:not(.dark):not(.admin-page) .header :is(
  .logo-site-name,.nav-dropdown-toggle,.nav-theme-btn
) { color: #182236 !important; -webkit-text-fill-color: currentColor !important; }
body:not(.dark):not(.admin-page) .header-navbar nav > ul > li > a:not([aria-current="page"]),
body:not(.dark):not(.admin-page) .header nav > ul > li > a:not([aria-current="page"]) {
  color: #263449 !important;
  -webkit-text-fill-color: currentColor !important;
}
body:not(.dark):not(.admin-page) .header :is(
  .search-toggle,.theme-toggle,.cart-action,.nav-toggle,.wishlist-action,.account-btn
) { color: #263449 !important; }
body:not(.dark):not(.admin-page) .header :is(
  #headerSearchPanel #headerSearchInput,
  #headerSearchPanel #headerSearchInput::placeholder
) { color: #34445a !important; }

/* Keep an orange active tab rather than a dark/green day-mode tab. */
@media (max-width: 992px) {
  body:not(.dark):not(.admin-page) .mobile-bottom-bar {
    background: linear-gradient(155deg,#fff,#f1f5fa) !important;
    border-color: rgba(105,125,152,.23) !important;
    box-shadow: 0 10px 30px rgba(42,58,78,.15),inset 0 1px #fff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  body:not(.dark):not(.admin-page) .mobile-bottom-bar .mb-item:not([aria-current="page"]) {
    color: #34445a !important;
  }
  body:not(.dark):not(.admin-page) .mobile-bottom-bar .mb-item[aria-current="page"] {
    color: #c44717 !important;
  }
  body:not(.dark):not(.admin-page) .mobile-bottom-bar .mb-item[aria-current="page"] > i {
    color: #e9541d !important;
  }
}

/* Premium translucency only on desktop; mobile already avoids live blur. */
@media (min-width: 993px) {
  body:not(.admin-page) .header {
    backdrop-filter: blur(8px) saturate(120%) !important;
    -webkit-backdrop-filter: blur(8px) saturate(120%) !important;
  }
  body[data-bsg-page="home"]:not(.admin-page) .pc-trust-section {
    backdrop-filter: blur(8px) saturate(120%) !important;
    -webkit-backdrop-filter: blur(8px) saturate(120%) !important;
  }
}
