/* Static replacements for what UIkit and Swiper did at runtime on bomba.md,
   plus the compact demo labels. Merchant styling itself lives in bomba.css. */

/* ---- rails */
[data-rail] { position: relative; }
.swiper-container { overflow: hidden; --spv: 1; --rail-gap: 16px; }
[data-rail-track] {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  transform: none !important;
  -webkit-overflow-scrolling: touch;
}
[data-rail-track]::-webkit-scrollbar { display: none; }
[data-rail-track] > * { scroll-snap-align: start; }
.swiper-wrapper {
  display: flex;
  gap: var(--rail-gap);
  list-style: none;
  margin: 0;
  padding: 0;
}
.swiper-wrapper > * {
  flex: 0 0 calc((100% - (var(--spv) - 1) * var(--rail-gap)) / var(--spv));
  min-width: 0;
  box-sizing: border-box;
  margin-right: 0 !important;
  width: auto !important;
  height: auto;
  position: relative;
}
.swiper-wrapper { align-items: stretch; }
.swiper-wrapper > * > div { width: 100%; height: 100%; }
.swiper-wrapper .card-product-item { height: 100%; box-sizing: border-box; }
@media (min-width: 960px) { .main-slider [data-rail-track] { margin-right: -14px; } }

.swiper-container-category { --spv: 2.3; }
.swiper-container-5 { --spv: 1.8; }
.swiper-container-4 { --spv: 1.8; }
.swiper-container-5-new, .swiper-container-5-shops, .swiper-container-5-view { --spv: 1.8; }
.partners-banners { --spv: 1; --rail-gap: 15px; }
.swiper-container-1 { --spv: 1; --rail-gap: 0px; }
.swiper-container-2 { --spv: 1; }
@media (min-width: 450px) { .swiper-container-2 { --spv: 1.4; } }
@media (min-width: 640px) { .swiper-container-2 { --spv: 2; } }
@media (min-width: 960px) { .swiper-container-2 { --spv: 3; } }
@media (min-width: 1240px) { .swiper-container-2 { --spv: 4; } }
@media (min-width: 600px) {
  .swiper-container-category { --spv: 3.3; }
  .swiper-container-4, .swiper-container-5-new, .swiper-container-5-shops, .swiper-container-5-view { --spv: 2.6; }
}
@media (min-width: 768px) {
  .swiper-container-category { --spv: 4.3; }
  .swiper-container-5 { --spv: 2.3; }
}
@media (min-width: 860px) {
  .swiper-container-4, .swiper-container-5-new, .swiper-container-5-shops, .swiper-container-5-view { --spv: 3.6; }
}
@media (min-width: 960px) {
  .swiper-container-4 { --spv: 3.2; }
  .swiper-container-5-new, .swiper-container-5-shops, .swiper-container-5-view { --spv: 4.25; }
}
@media (min-width: 1024px) {
  .swiper-container-category { --spv: 6.3; }
  .swiper-container-5 { --spv: 3.3; }
}
@media (min-width: 1324px) {
  .swiper-container-category { --spv: 8; }
  .swiper-container-5 { --spv: 4.3; }
}
@media (min-width: 1440px) {
  .swiper-container-4 { --spv: 4; }
  .swiper-container-5, .swiper-container-5-new, .swiper-container-5-shops, .swiper-container-5-view { --spv: 5; }
}

/* the merchant header overflows the viewport by 1px */
.header-2 { overflow-x: clip; }
.partners-banners [data-rail-track] a { display: block; }
.partners-banners [data-rail-track] img { display: block; width: 100%; height: auto; }

/* ---- popups */
.demo-drop-trigger { cursor: pointer; }
.header-1 .uk-drop.uk-open { display: block; position: absolute; top: 100%; right: 0; left: auto; z-index: 1030; }
.numbers-phone, .weekly-schedule { position: relative; }
.form-search-popup, .search_form .popup-search.uk-open { display: block; position: absolute; top: calc(100% + 12px); left: 0; right: 0; z-index: 1030; }
.search_form { position: relative; }
.popup-search li a { break-inside: avoid; display: block; }

.close__search { display: none; padding: 0; border: 0; background: none; cursor: pointer; }
.search_form input:not(:placeholder-shown) ~ .close__search { display: flex; }

#demo-catalog { display: none; }
#demo-catalog.uk-open {
  display: block;
  position: absolute;
  top: calc(100% + 13px);
  left: 15px;
  right: 15px;
  z-index: 1030;
  max-height: calc(100vh - 170px);
  overflow: auto;
  overscroll-behavior: contain;
}
html.demo-catalog-open body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0, 0, 0, .45);
}
html.demo-catalog-open header { position: relative; z-index: 1000; }
.demo-mega-list { list-style: none; margin: 8px 0 0; padding: 0; columns: 2; column-gap: 24px; }
@media (min-width: 1200px) { .demo-mega-list { columns: 3; } }
.demo-mega-list a { display: inline-block; padding: 2px 0; }

/* ---- mobile menu */
#mobile-menu.demo-menu-open { display: block; }
html.demo-menu-lock { overflow: hidden; }
#mobile-menu [role="button"] { cursor: pointer; }
#mobile-menu .mobile_menu_content_menu ul:not(.loaded) { visibility: hidden; }
#mobile-menu:has(.mobile_menu_content_menu:not(.activity)) .uk-offcanvas-close { color: #333; }
#mobile-menu .uk-offcanvas-close { background: none; border: 0; color: #fff; cursor: pointer; }

/* ---- demo labels */
.demo-visually-hidden {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}
.demo-strip {
  background: #171717;
  color: #e7e7e7;
  font-size: 11px;
  line-height: 20px;
  overflow: hidden;
  padding: 0 12px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.demo-pill-item { display: flex; align-items: center; margin-right: 12px; }
.demo-pill {
  background: rgba(0, 0, 0, .28);
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  padding: 0 8px;
  white-space: nowrap;
}
.demo-snapshot-date { color: #ed0000; font-size: 13px; font-weight: 600; white-space: nowrap; }
.demo-price-note { color: #767676; font-size: 12px; line-height: 1.35; margin: -8px 0 12px; }
.demo-footnote {
  background: #111;
  color: #a8a8a8;
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
  padding: 10px 16px 76px;
  text-align: center;
}
@media (min-width: 960px) { .demo-footnote { padding-bottom: 12px; } }

/* ---- keyboard and motion */
a:focus-visible, button:focus-visible, summary:focus-visible, [role="button"]:focus-visible, input:focus-visible {
  outline: 2px solid #1a73e8 !important;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* ---- stories are links here, the merchant used block-level role="button" divs */
.bs-stories__item { display: block; color: inherit; }
