/* Miller Gadgets: buyer-first mobile + dark visual correction — 2026-11-12 */
html,body {overflow-x:clip}
body.page-home .hero-ad .ad-copy{width:100%!important;min-width:0!important;max-width:100%!important}
body.page-home .hero-ad .mg-home-search-cta{
  box-sizing:border-box!important;display:flex!important;align-items:center!important;
  justify-content:flex-start!important;gap:12px!important;width:100%!important;
  max-width:640px!important;min-width:0!important;min-height:52px!important;
  padding:13px 16px!important;border:1px solid var(--line,#d9d5df)!important;
  background:var(--surface,#fff)!important;color:var(--text,#1c1728)!important;
  font:inherit!important;font-size:clamp(.9rem,3.4vw,1rem)!important;
  line-height:1.3!important;text-align:left!important;white-space:normal!important;
  word-break:normal!important;overflow-wrap:normal!important;
  border-radius:14px!important;cursor:pointer;flex:none!important;margin:14px auto 0!important
}
body.page-home .hero-ad .mg-home-search-cta svg{flex:0 0 20px;width:20px;height:20px}
body.page-home .hero-ad .mg-home-search-cta span{display:block;flex:1 1 auto;min-width:0;white-space:normal;overflow-wrap:break-word}
body.page-home .hero-ad .actions{position:relative;z-index:1;clear:both;margin-top:18px!important}
body.page-home .hero-ad .actions .btn{box-sizing:border-box;max-width:100%!important}
@media(max-width:760px){
 html body.page-home .hero-ad,html[data-theme] body.page-home .hero-ad{
  display:flex!important;flex-direction:column!important;grid-template-columns:none!important;
  align-items:stretch!important;gap:18px!important;min-height:0!important;
  padding:28px clamp(16px,4vw,24px)!important;overflow:hidden!important;
 }
 html body.page-home .hero-ad .ad-copy,html[data-theme] body.page-home .hero-ad .ad-copy{display:block!important;flex:0 0 auto!important;max-width:100%!important;margin:0!important;text-align:center}
 html body.page-home .hero-ad h1,html[data-theme] body.page-home .hero-ad h1{font-size:clamp(2.1rem,9vw,3.55rem)!important;line-height:1.04!important;letter-spacing:-.04em!important;margin:10px auto 18px!important;max-width:12ch!important;text-wrap:balance}
 html body.page-home .hero-ad .mg-home-search-cta{margin:0 auto 14px!important;width:100%!important;max-width:100%!important}
 html body.page-home .hero-ad .actions{display:flex!important;flex-direction:column!important;gap:10px!important;width:100%!important}
 html body.page-home .hero-ad .actions .btn{width:100%!important;min-height:48px!important;padding:12px 18px!important}
 html body.page-home .hero-ad .hero-image{width:100%!important;max-width:460px!important;margin:4px auto 0!important;overflow:hidden!important}
 html body.page-home .hero-ad .hero-image img{width:100%!important;height:auto!important;max-height:250px!important;object-fit:contain!important}
}
/* No extra contrast panels behind products in dark mode. Subtle outlines remain for clarity. */
html[data-theme="dark"] body :is(.product-card,.product-card-v39,.product-media-card,.purchase-summary-card,.product-detail-card,.product-image-wrap,.product-main,.product-gallery,.product-image-panel,.card.product-card),
html[data-theme="dark"] body.page-product :is(.product-media-card,.purchase-summary-card){
 background:transparent!important;background-image:none!important;
 box-shadow:none!important;
 border-color:rgba(224,218,236,.13)!important;
}
html[data-theme="dark"] body :is(.product-card,.product-media-card,.purchase-summary-card)::before{background-image:none!important}
/* Override old highly-specific dark surface-lock rules. Flat product presentation. */
html[data-theme="dark"]:not(#mg-flat-1):not(#mg-flat-2):not(#mg-flat-3):not(#mg-flat-4):not(#mg-flat-5) body.page-product :is(.product-media-card,.purchase-summary-card,.product-main,.product-media,.warehouse-gallery-tile,.product-gallery,.product-image-panel,.product-image-link,.product-media-card img#productImage),
html[data-theme="dark"]:not(#mg-flat-1):not(#mg-flat-2):not(#mg-flat-3):not(#mg-flat-4):not(#mg-flat-5) body :is(.product-card,.product-card-v39,.accessory-card,.product-image-link,.store-feature-image){
  background-color:transparent!important;background-image:none!important;
  box-shadow:none!important;border-color:rgba(224,218,236,.13)!important;
}

/* Miller Gadgets 2026-11-13 — remove artificial dark-mode image and product
   card backing surfaces. Keep text, outlines and light mode unchanged. */
html[data-theme="dark"] body.page-product :is(
  .mg-merch-section, .mg-merch-card, .mg-merch-card img,
  #productFamilySpecsCard, .product-family-specs-card,
  .product-family-specs-head, .product-family-spec-item,
  .product-media-card, .product-media-stage, .product-media-note,
  .warehouse-gallery-strip, .warehouse-gallery-tile,
  .product-image-link, .product-image-panel, .product-image-wrap,
  .product-gallery, .product-config-card, .purchase-summary-card,
  .product-rich-description-v334
) {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body.page-product :is(
  .mg-merch-section, .mg-merch-card, #productFamilySpecsCard,
  .product-family-specs-card, .product-family-spec-item,
  .product-media-card, .product-config-card, .purchase-summary-card
) {border-color: rgba(231,226,245,.14) !important;}
html[data-theme="dark"] body.page-product :is(.mg-merch-section,.mg-merch-card,.product-family-specs-card,.product-media-card)::before,
html[data-theme="dark"] body.page-product :is(.mg-merch-section,.mg-merch-card,.product-family-specs-card,.product-media-card)::after {
  background: none !important;
  box-shadow: none !important;
}
