/* Faradey Bike optional dark theme */
#fb-theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:6px 10px;border:1px solid #707b80;border-radius:8px;background:transparent;color:#fff;cursor:pointer;font:inherit;font-size:13px;line-height:1.2;white-space:nowrap}
#fb-theme-toggle:hover,#fb-theme-toggle:focus-visible{background:#485158;outline:2px solid #f5a000;outline-offset:2px}#fb-theme-toggle .fb-theme-icon{font-size:18px;line-height:1}#fb-theme-toggle .fb-theme-label{color:inherit}
@media(max-width:767px){#fb-theme-toggle{min-width:40px;padding:6px}#fb-theme-toggle .fb-theme-label{display:none}#top-links>ul:last-child{display:flex;align-items:center;gap:8px}#top-links>ul:last-child li{padding:0}}
html[data-fb-theme="dark"]{color-scheme:dark;background:#11191f}
html[data-fb-theme="dark"] body{background:#11191f!important;color:#e5edf0!important}
html[data-fb-theme="dark"] :is(header,footer,.copyright,.product-thumb,.advantage,.category__item--link,.faq--item--link,.menu_popup,.menu__child,.modal-content,.dropdown-menu,.dropdown-menu li,.dropdown-menu a,.panel,.well,.table,.list-group-item,.breadcrumb,.pagination>li>a,.pagination>li>span){background-color:#202b33!important;border-color:#42515b!important;color:#e5edf0!important}
html[data-fb-theme="dark"] :is(.bg_blue,.calc-panel,.calc-results>div,.measurement-guide,.erd-guide-v2,.calc-controls,.filter,.filters,.filter__item,.simplecheckout-block-content){background-color:#18252c!important;border-color:#42515b!important;color:#e5edf0!important}
html[data-fb-theme="dark"] :is(.drawings,.erd-step,.erd-sum,.preset-product-card){background-color:#fff!important;color:#243b47!important}
html[data-fb-theme="dark"] :is(.drawings,.erd-step,.erd-sum) :is(h4,p,strong,span,figcaption):where(:not([class^="color--"], [class*=" color--"], [style^="color:" i], [style*=";color:" i], [style*="; color:" i])){color:#243b47!important}
html[data-fb-theme="dark"] :is(input:not([type=checkbox]):not([type=radio]),textarea,select,.form-control){background-color:#26363f!important;color:#f0f5f7!important;border-color:#647782!important}
html[data-fb-theme="dark"] input::placeholder,html[data-fb-theme="dark"] textarea::placeholder{color:#afbdc5!important}
html[data-fb-theme="dark"] :is(h1,h2,h3,h4,h5,h6,p,label,li,td,th,.price,.name,.product__name,.product__price,.menu__list--item--link,.menu__child--item--link,.breadcrumb a,.breadcrumb li,.copyright):where(:not([class^="color--"], [class*=" color--"], [style^="color:" i], [style*=";color:" i], [style*="; color:" i])){color:#e5edf0!important}
html[data-fb-theme="dark"] :is(a:not(.btn):not(.button):not(.spoke-product-link a),.no--style):where(:not([class^="color--"], [class*=" color--"], [style^="color:" i], [style*=";color:" i], [style*="; color:" i])){color:#dce8ed}
html[data-fb-theme="dark"] :is(.btn--catalog,.btn-primary,.button,#button-cart,.spoke-product-link a){color:#fff!important}
html[data-fb-theme="dark"] :is(.category__item--link,.product-thumb) :is(h1,h2,h3,h4,p,b,strong,span,a):where(:not([class^="color--"], [class*=" color--"], [style^="color:" i], [style*=";color:" i], [style*="; color:" i])){color:#e5edf0!important}
html[data-fb-theme="dark"] :is(.table,.table-bordered,table) :is(td,th){background-color:#202b33!important;border-color:#42515b!important;color:#e5edf0!important}
html[data-fb-theme="dark"] :is(.menu_popup,.modal-content,.dropdown-menu){box-shadow:0 8px 24px rgba(0,0,0,.45)}
html[data-fb-theme="dark"] #logo img{content:url(/dist/logo-dark.svg)}
html[data-fb-theme="dark"] .calc-results strong{color:#63d49b!important}
html[data-fb-theme="dark"] .erd-tip{background:#433720!important;color:#f9e4bc!important}

html[data-fb-theme="dark"] header :is(b,strong):where(:not([class^="color--"], [class*=" color--"], [style^="color:" i], [style*=";color:" i], [style*="; color:" i])),html[data-fb-theme="dark"] #cart>button,html[data-fb-theme="dark"] #wishlist-total{color:#e5edf0!important}
html[data-fb-theme="dark"] :is(.modal-dialog,.modal-header,.modal-body,.modal-footer){background-color:#202b33!important;color:#e5edf0!important;border-color:#42515b!important}
html[data-fb-theme="dark"] .modal-dialog .close{color:#fff!important;opacity:.9}
html[data-fb-theme="dark"] :is(.qty,.quantity,.quantity button,.qty button,.qty span,.quantity span){color:#e5edf0!important;border-color:#536570!important}
html[data-fb-theme="dark"] .preset-product-card span{color:#243b47!important}

@media(min-width:768px){#fb-theme-toggle{width:140px}}
@media(prefers-reduced-motion:no-preference){html.fb-theme-changing body,html.fb-theme-changing header,html.fb-theme-changing footer{transition:background-color 120ms ease,color 120ms ease}}

/* Dark theme: footer branding and wheel visibility */
html[data-fb-theme="dark"] footer img[src*="logo_v.svg"]{content:url(/dist/logo_v-dark.svg)}
html[data-fb-theme="dark"] footer img[src*="avito_footer.svg"]{content:url(/dist/avito_footer-dark.svg)}
html[data-fb-theme="dark"] .adv-wheel-img {
  background-color: #b8c9d3;
  border-radius: 16px;
}

/* Consistent product cards on dark carousel backgrounds */
html[data-fb-theme="dark"] .swiper-slide:has(> .product-thumb){height:auto}
html[data-fb-theme="dark"] .swiper-slide > .product-thumb{height:100%;box-sizing:border-box;display:flex;flex-direction:column;position:relative}
html[data-fb-theme="dark"] .swiper-slide > .product-thumb .caption{display:flex;flex:1;flex-direction:column}
html[data-fb-theme="dark"] .swiper-slide > .product-thumb .infa{min-height:2.4em;align-items:flex-start;gap:4px;flex-wrap:wrap}
html[data-fb-theme="dark"] .swiper-slide > .product-thumb .wishlist-row{margin-top:auto;gap:10px;flex-wrap:wrap}
html[data-fb-theme="dark"] .product-thumb .image img{border-radius:8px}
html[data-fb-theme="dark"] .product-thumb .wishlist-btn--moved{background:#2b3b45;border-color:#50616b}
html[data-fb-theme="dark"] .product-thumb .wishlist-btn--moved i{color:#e5edf1}


/* Catalog submenu chips */
html[data-fb-theme="dark"] .menu_popup .menu__child--item--link {
  background-color: #30414d;
  color: #f1f6f8 !important;
}
html[data-fb-theme="dark"] .menu_popup .menu__child--item--link:hover,
html[data-fb-theme="dark"] .menu_popup .menu__child--item--link:focus-visible {
  background-color: #ffad21;
  color: #19232a !important;
}

/* Leave breathing room between the final homepage carousel and the footer. */
.popular--product:has(.swiper .product-thumb) {
  padding-bottom: clamp(24px, 4vw, 48px);
}

/* Keep dark text on panels that retain their light backgrounds. */
html[data-fb-theme="dark"] :is(.news__item .caption, .erd-step, #fbchat-msgs .fb-msg.in),
html[data-fb-theme="dark"] :is(.news__item .caption, .erd-step) :is(h1,h2,h3,h4,h5,h6,p,label,li,td,th,.name,.price,.d-block):where(:not([class^="color--"], [class*=" color--"], [style^="color:" i], [style*=";color:" i], [style*="; color:" i])) {
  color: #25343b !important;
}
html[data-fb-theme="dark"] .news__item .caption a:where(:not([class^="color--"], [class*=" color--"], [style^="color:" i], [style*=";color:" i], [style*="; color:" i])) {
  color: #185674 !important;
}
html[data-fb-theme="dark"] #cartPopup .btn--popup {
  color: #202a30 !important;
}
html[data-fb-theme="dark"] .links :is(a[href="oplata"],a[href="dostavka"]) svg path[fill="#323436"] {
  fill: currentColor;
}
html[data-fb-theme="dark"] #cartPopup .btn--remove {
  color: #8a202b !important;
}

/* Match checkout surfaces to the dark storefront. */
html[data-fb-theme="dark"] .simple-content :is(.simplecheckout-left-column,.simplecheckout-right-column .bg_grey) {
  background-color: #1f2931;
  color: #e5edf0;
}
html[data-fb-theme="dark"] .simple-content :is(#simplecheckout_shipping,#simplecheckout_payment) .radio label > input:checked + div {
  background-color: #30434e;
  color: #f1f6f8;
}
html[data-fb-theme="dark"] .simple-content :is(#simplecheckout_shipping,#simplecheckout_payment) .radio label > div {
  border-color: #42515b;
}
html[data-fb-theme="dark"] .simple-content a.apiship_points {
  background-color: #14743f;
  color: #fff !important;
}
html[data-fb-theme="dark"] .simple-content #simplecheckout_button_confirm {
  color: #202a30 !important;
}
html[data-fb-theme="dark"] .simple-content .remove {
  color: #ff9996 !important;
}

html[data-fb-theme="dark"] .product-thumb button.click1 {
  border-top-color: transparent;
}

/* Keep cart and checkout sections separated by space instead of lines. */
html[data-fb-theme="dark"] .simple-content :is(.product-item,.simplecheckout-cart-total,#simplecheckout_shipping,#simplecheckout_customer,.radio) {
  border-bottom-color: transparent;
}
html[data-fb-theme="dark"] #cartPopup .modal-content {
  background: transparent !important;
  border: 0;
  box-shadow: none;
}
html[data-fb-theme="dark"] #cartPopup .product--item {
  border-bottom-color: transparent;
}
html[data-fb-theme="dark"] #cartPopup .total--miniCart {
  border-top: 0;
}
