/* Existing ElektroDom tokens; homepage-only tuning, no new design system. */
/* Reserve the current native mobile media before decode; retain natural ratios after load. */
body.ed-tuning:not(.ed-inner):has(.top_design) #banners img {
  aspect-ratio: auto 710 / 380;
  height: auto;
}
body.ed-tuning:not(.ed-inner):has(.top_design) .headline-item img {
  aspect-ratio: auto 1 / 1;
  height: auto;
}
/* First native frame before initialization. Native wrapper removes this selector afterward. */
.ed-tuning .homebanner > #banners_allinone_rotator {
  display: block !important;
  aspect-ratio: 1920 / 725;
  overflow: hidden;
}
.ed-tuning .homebanner > #banners_allinone_rotator > ul > li:not(:first-child) {
  display: none;
}
.ed-tuning .homebanner > #banners_allinone_rotator img {
  width: 100%;
  height: auto;
}
body.ed-tuning {
  --tuning-radius: 8px;
  --tuning-shadow: 0 3px 12px rgb(8 53 102 / 9%);
  --tuning-shadow-hover: 0 7px 18px rgb(8 53 102 / 15%);
  --tuning-motion: 180ms ease-out;
}

/* Reserve the current 1920×725 desktop banner slot before native initialization. */
.ed-tuning .homebanner:has(#banners_allinone_rotator) {
  min-height: calc(100vw * 725 / 1920);
}

/* Product and editorial cards preserve their native grid, sizes and order. */
.ed-tuning .product-list {
  border-radius: var(--tuning-radius);
  box-shadow: var(--tuning-shadow);
  transition: transform var(--tuning-motion), opacity var(--tuning-motion);
}

.ed-tuning .product-list:focus-within {
  box-shadow: var(--tuning-shadow-hover);
}

.ed-tuning .headline-item img {
  border-radius: 6px;
}

.ed-tuning .grow {
  transition: transform var(--tuning-motion), opacity var(--tuning-motion);
}

/* Keyboard focus stays visible without changing navigation or form actions. */
.ed-tuning :is(.qa-site-header, .menu-bgr, .headline, .productsfocus, .productsnew, .bgr3, .footer_design) :is(a, button, input):focus-visible {
  outline: 3px solid var(--ed-action);
  outline-offset: 3px;
}

.ed-tuning :is(.bgr3, .footer_design) a:focus-visible {
  outline-color: #fff;
}

/* Header controls keep the same position, identity, labels and destinations. */
.ed-tuning .qa-site-header .form1 {
  min-height: 44px;
}

/* Keep the existing search surface; use the site's dark blue text tone. */
.ed-tuning #searchProduct { color: #18334f; }
.ed-tuning #searchProduct::placeholder { color: #18334f; opacity: 1; }

/* Closed native submenus must not enlarge the document off screen.
   Native inline display:block remains available for measurement and animation. */
.ed-tuning #mbmcpebul_table { margin-right: 0; max-width: 100%; }
.ed-tuning #mbmcpebul_table li { --ed-submenu-left: initial; --ed-submenu-top: initial; }
.ed-tuning #mbmcpebul_table ul {
  display: none;
  box-sizing: border-box;
  width: max-content;
  max-width: calc(100vw - 48px);
}
.ed-tuning #mbmcpebul_table.css_menu li:hover > ul {
  display: block;
  position: fixed !important;
  width: max-content !important;
  top: var(--ed-submenu-top, calc(var(--ed-header-height) + 48px)) !important;
  left: var(--ed-submenu-left, 0px) !important;
  right: auto !important;
}
.ed-tuning #mbmcpebul_table ul li a { white-space: normal; overflow-wrap: anywhere; }
.ed-tuning #mbmcpebul_table ul > li { break-inside: avoid; }
.ed-tuning #mbmcpebul_table ul li > div.buttonbg { height: auto; }

.ed-tuning .qa-site-header input[type="image"] {
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  padding: 12px;
  object-fit: contain;
}

.ed-tuning .qa-site-header a:is([href*="/login/"], [href*="/customer/profile/"], [href*="/cart/"]) {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.ed-tuning .wishlist,
.ed-tuning .awishlist {
  width: 44px;
  height: 44px;
}

.ed-tuning .awishlist {
  background-size: 32px;
  background-position: center;
  background-repeat: no-repeat;
}

/* Use the card image corner; the legacy fixed top value can cover product prices. */
.ed-tuning .product-list .wishlist {
  top: 8px;
  right: 8px;
  bottom: auto;
  left: auto;
  border-radius: 50%;
  background: #fff;
}

/* Mobile header uses the existing table and menu contract, with larger hit areas. */
.ed-tuning .top_design .header {
  height: 50px;
  padding-left: 48px;
}

.ed-tuning .top_design .header a.menu {
  top: 3px;
  left: 4px;
  width: 44px;
  height: 44px;
  background-size: 23px;
}

.ed-tuning .top_design .header .ed-home-link {
  position: static;
  display: inline-flex;
  width: auto;
  height: 50px;
  align-items: center;
  justify-content: center;
  background: none;
  vertical-align: top;
}

.ed-tuning .top_design .ed-home-link img {
  max-width: calc(100vw - 168px);
  height: 38px;
  margin-block: 0;
  object-fit: contain;
}

.ed-tuning .top_design td:last-child {
  width: 100px;
}

.ed-tuning .top_design td:last-child > div {
  display: flex;
  height: 50px;
  padding-top: 0 !important;
  padding-right: 4px;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* The native menu backdrop must cover the viewport after opening at scroll. */
body.ed-tuning > .mm-wrapper__blocker {
  position: fixed;
}

/* Keep native AOS, with a short and consistent tuning motion duration. */
body.ed-tuning [data-aos] {
  transition-duration: 180ms;
}

/* Preferences presentation only; native categories, tabs and Save behavior stay intact. */
body.ed-tuning .termsfeed-com---pc-dialog {
  width: min(720px, calc(100vw - 32px)) !important;
}

body.ed-tuning .termsfeed-com---pc-dialog .cc-pc-container {
  max-height: 82dvh;
}

/* Desktop pointer polish does not create hover-only content or new layout. */
@media (hover: hover) and (pointer: fine) {
  .ed-tuning .product-list:hover {
    box-shadow: var(--tuning-shadow-hover);
    transform: translateY(-2px);
  }

  .ed-tuning .grow:hover {
    transform: scale(1.02);
  }
}

/* Compact mobile notice: same native owners, text, callbacks and persistence. */
@media (max-width: 767px) {
  body.ed-tuning .termsfeed-com---nb-simple {
    inset: auto 12px max(12px, env(safe-area-inset-bottom)) !important;
    width: calc(100vw - 24px) !important;
  }

  body.ed-tuning .termsfeed-com---nb .cc-nb-main-container {
    padding: 14px !important;
  }

  body.ed-tuning .termsfeed-com---nb .cc-nb-title {
    margin-bottom: 6px !important;
    font-size: 18px !important;
    line-height: 1.3 !important;
  }

  body.ed-tuning .termsfeed-com---nb .cc-nb-text {
    margin-bottom: 10px !important;
    font-size: 16px !important;
    line-height: 1.35 !important;
  }

  body.ed-tuning .termsfeed-com---nb .cc-nb-buttons-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.ed-tuning .termsfeed-com---nb button {
    min-height: 44px;
    padding: 8px 6px !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
  }

  body.ed-tuning .termsfeed-com---nb .cc-nb-changep {
    grid-column: 1 / -1;
  }
}

/* Keyboard access survives the native CSS-to-JS handoff and closes on focus-out. */
.ed-tuning #mbmcpebul_table li:focus-within { position: relative; }
.ed-tuning #mbmcpebul_table li:focus-within > ul {
  display: block !important;
  width: max-content !important;
  position: fixed !important;
  top: var(--ed-submenu-top, calc(var(--ed-header-height) + 48px)) !important;
  left: var(--ed-submenu-left, 0px) !important;
  right: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.ed-tuning #mbmcpebul_table ul li:focus-within > ul {
  top: var(--ed-submenu-top, calc(var(--ed-header-height) + 48px)) !important;
  left: var(--ed-submenu-left, 0px) !important;
}
.ed-tuning #mbmcpebul_table li:focus-within > div.buttonbg a { color: #0d55a3; background-color: #fff; }

/* Reduced motion preserves visibility without changing native menu/slider state. */
@media (prefers-reduced-motion: reduce) {
  .ed-tuning .product-list,
  .ed-tuning .grow {
    transition-duration: 0.01ms;
    transform: none;
  }

  body.ed-tuning [data-aos] {
    opacity: 1;
    transform: none;
    transition-duration: 0.01ms;
  }
}
