/* Siko: mobile UX + price request CTA */
:root {
  --siko-accent: #02aed6;
  --siko-accent-dark: #0289a8;
  --siko-hit: 44px;
}

/*
  Do NOT restyle .burger-menu-button / .inner — Astroid draws bars via
  ::before/::after on .inner. Breaking that makes a solid "scary" square.
  Keep menu z-index above .astroid-content::after overlay (1040).
*/
.header-mobilemenu-trigger > .button {
  min-width: var(--siko-hit);
  min-height: var(--siko-hit);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 10px !important;
}

/* Brand-colored bars only — do not change size/position of .inner */
.header-mobilemenu-trigger .inner,
.header-mobilemenu-trigger .inner::before,
.header-mobilemenu-trigger .inner::after {
  background-color: #123 !important;
}

.astroid-mobilemenu {
  z-index: 1200 !important; /* above .astroid-content::after (1040) */
  background: #fff !important;
}

.astroid-mobilemenu .astroid-mobilemenu-container,
.astroid-mobilemenu .astroid-mobile-menu {
  position: relative;
  z-index: 2;
  background: #fff;
}

.astroid-mobilemenu .nav-link,
.astroid-mobilemenu .item-link,
.astroid-mobilemenu .nav-item > a {
  min-height: var(--siko-hit);
  display: flex !important;
  align-items: center;
  padding-top: 12px !important;
  padding-bottom: 12px !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
}

/* Soften page dim; class lives on .astroid-container */
.astroid-mobilemenu-open .astroid-content::after {
  background-color: rgba(0, 0, 0, 0.45) !important;
}

/*
  Sticky CTA is appended to <body>, while .astroid-mobilemenu-open
  is on .astroid-container — use :has() / body flag.
*/
body:has(.astroid-mobilemenu-open) .siko-price-btn--sticky,
body.siko-nav-open .siko-price-btn--sticky {
  display: none !important;
}

/*
  Close control: absolute top-right chip — NOT a full-width white bar
  (flex stretch made width:auto still = 250px and looked like empty gap).
*/
.astroid-mobilemenu > .burger-menu-button {
  position: absolute !important;
  top: 4px;
  right: 4px;
  left: auto !important;
  z-index: 6;
  background: transparent !important;
  width: max-content !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 4px !important;
  min-height: 0 !important;
  min-width: 0 !important;
  display: flex !important;
  justify-content: center;
  align-items: center;
  align-self: flex-end !important;
  flex: 0 0 auto !important;
  box-sizing: border-box;
}

.astroid-mobilemenu > .burger-menu-button .button,
.astroid-mobilemenu > .burger-menu-button .close-offcanvas {
  min-width: 40px;
  min-height: 40px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

/* CTA sits at top of panel; leave room so it doesn't sit under X */
.astroid-mobilemenu > .siko-price-btn--menu,
#astroid-mobilemenu > .siko-price-btn--menu {
  margin-top: 8px !important;
  width: calc(100% - 56px - 12px) !important;
  max-width: calc(100% - 24px);
}

body.siko-modal-open {
  overflow: hidden !important;
  touch-action: none;
}

/* Keep form above leftover offcanvas if Astroid toggle lags */
body.siko-modal-open #astroid-mobilemenu {
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translate3d(-110%, 0, 0) !important;
}

body.siko-modal-open .astroid-content::after {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.siko-price-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--siko-accent);
  color: #fff !important;
  border: 0;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  padding: 10px 14px;
  min-height: var(--siko-hit);
  cursor: pointer;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background .2s ease;
  box-shadow: 0 2px 8px rgba(2, 174, 214, .28);
  font-family: inherit;
}

.siko-price-btn:hover,
.siko-price-btn:focus {
  background: var(--siko-accent-dark);
  color: #fff !important;
  text-decoration: none !important;
}

.siko-price-btn--header {
  margin-left: 8px;
  margin-right: 8px;
  align-self: center;
  flex-shrink: 0;
  font-size: 13px;
  padding: 8px 12px;
  min-height: 40px;
}

/* Desktop: keep main nav on one row next to CTA */
@media (min-width: 992px) {
  .astroid-header,
  .astroid-horizontal-header {
    flex-wrap: nowrap !important;
  }

  .header-right-section {
    flex-wrap: nowrap !important;
    align-items: center !important;
    min-width: 0;
  }

  .header-right-section .astroid-nav,
  .header-right-section .nav.astroid-nav {
    flex-wrap: nowrap !important;
    flex: 1 1 auto;
    min-width: 0;
  }

  .header-right-section .astroid-nav > .nav-item > .nav-link,
  .header-right-section .nav.astroid-nav > .nav-item > .nav-link {
    padding-left: 0.45rem !important;
    padding-right: 0.45rem !important;
    font-size: 14px !important;
    white-space: nowrap;
  }

  #siko-price-header.siko-price-btn--header {
    order: 3;
  }
}

.siko-price-btn--menu {
  width: calc(100% - 56px - 12px);
  margin: 8px 12px 12px;
  min-height: 48px;
  font-size: 15px;
  white-space: normal;
  text-align: center;
  display: flex !important;
}

.siko-price-btn--sticky {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 1030;
  min-height: 52px;
  font-size: 16px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  display: none;
}

@media (max-width: 991.98px) {
  .siko-price-btn--header {
    display: none !important;
  }

  .siko-price-btn--sticky {
    display: inline-flex;
  }

  body.siko-has-sticky-cta {
    padding-bottom: 76px;
  }

  .astroid-logo img,
  .astroid-logo-mobile img,
  .astroid-logo-default img {
    max-height: 40px !important;
    width: auto !important;
  }

  /* Category tiles */
  .category-view .category.floatleft,
  .category-view .category.width20,
  .category-view .category.width25,
  .category-view .category.width16,
  .category-view .category.width33,
  .category-view .width20,
  .category-view .floatleft.width20 {
    float: left !important;
    width: 50% !important;
    max-width: 50% !important;
    margin: 0 !important;
    padding: 8px !important;
    box-sizing: border-box !important;
    text-align: center;
    overflow: hidden;
    clear: none !important;
  }

  .category-view .category .spacer {
    padding: 6px !important;
  }

  .category-view .category h2,
  .category-view .category h2 a,
  .category-view .category .category-name,
  .category-view .category a {
    font-size: 13px !important;
    line-height: 1.25 !important;
    word-break: break-word;
    white-space: normal !important;
    display: block;
    max-width: 100%;
  }

  .category-view .category img {
    max-width: 72px !important;
    height: auto !important;
    margin: 0 auto 6px !important;
    display: block;
  }

  /* Product cards: 1 col phone, 2 col tablet */
  .browse-view .product.vm-col,
  .browse-view .vm-col-5,
  .browse-view .vm-col-4,
  .browse-view .vm-col-3,
  .browse-view .product.vm-col-5,
  .browse-view .product.vm-col-4,
  .browse-view .row .product {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    box-sizing: border-box;
  }

  .browse-view .spacer.product-container,
  .browse-view .product-container {
    display: flex;
    flex-direction: column;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 12px !important;
    background: #fff;
    min-height: 0 !important;
    height: auto !important;
  }

  .browse-view .vm-product-media-container {
    text-align: center;
    margin-bottom: 10px;
  }

  .browse-view .browseProductImage,
  .browse-view .vm-product-media-container img {
    max-width: 160px !important;
    width: auto !important;
    height: auto !important;
    margin: 0 auto;
  }

  .browse-view .vm-product-descr-container-0,
  .browse-view .vm-product-descr-container-1,
  .browse-view .vm-product-descr-container-2,
  .browse-view .vm-product-descr-container-3,
  .browse-view [class*="vm-product-descr-container"] {
    min-height: 0 !important;
    height: auto !important;
  }

  .browse-view .vm-product-descr-container-1 h2,
  .browse-view [class*="vm-product-descr-container"] h2,
  .browse-view [class*="vm-product-descr-container"] h2 a {
    font-size: 16px !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    display: block;
    word-break: break-word;
    max-height: none !important;
    height: auto !important;
  }

  .browse-view .product_s_desc {
    font-size: 14px !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
  }

  .browse-view .addtocart-bar,
  .browse-view .addtocart-button,
  .browse-view .vm-button-correct,
  .browse-view input.addtocart-button,
  .browse-view button.addtocart-button,
  .browse-view .vm-details-button a,
  .browse-view .product-details,
  .productdetails .addtocart-button,
  .productdetails .vm-button-correct,
  .productdetails input.addtocart-button {
    min-height: var(--siko-hit) !important;
    min-width: 120px;
    padding: 12px 16px !important;
    font-size: 15px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }

  .orderby-displaynumber select,
  .orderby-displaynumber .orderlistcontainer,
  .orderby-displaynumber .activeOrder,
  .orderby-displaynumber .display-number select,
  .vm-order-list .orderlistcontainer,
  .virtuemart_search .inputbox,
  .virtuemart_search .button {
    min-height: var(--siko-hit);
    font-size: 16px !important;
  }

  .orderby-displaynumber,
  .vm-order-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .orderby-displaynumber .floatleft,
  .orderby-displaynumber .floatright {
    float: none !important;
    width: 100% !important;
  }

  .orderlistcontainer .orderlist {
    position: static !important;
    display: block !important;
  }

  .home-uk-ua a[href^="tel:"],
  .home-ru-ru a[href^="tel:"] {
    display: inline-block;
    min-height: var(--siko-hit);
    padding: 6px 0;
    font-size: 16px !important;
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .browse-view .product.vm-col,
  .browse-view .vm-col-5,
  .browse-view .vm-col-4,
  .browse-view .product.vm-col-5,
  .browse-view .row .product {
    width: 50% !important;
    max-width: 50% !important;
    float: left !important;
    padding: 0 6px !important;
  }
}

@media (min-width: 992px) {
  .siko-price-btn--sticky {
    display: none !important;
  }
}

/* Modal */
.siko-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 32, .55);
  z-index: 1300; /* above mobile menu (1200) */
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.siko-modal-backdrop.is-open {
  display: flex;
}

.siko-modal {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 14px 14px 10px 10px;
  padding: 20px 18px 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .25);
  position: relative;
  max-height: calc(100vh - 32px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.siko-modal__title {
  margin: 0 36px 6px 0;
  font-size: 20px;
  line-height: 1.25;
  color: #123;
  font-weight: 700;
}

.siko-modal__sub {
  margin: 0 0 16px;
  color: #556;
  font-size: 14px;
  line-height: 1.4;
}

.siko-modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: var(--siko-hit);
  height: var(--siko-hit);
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #667;
}

.siko-field {
  margin-bottom: 12px;
}

.siko-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #234;
}

.siko-field input {
  width: 100%;
  min-height: var(--siko-hit);
  border: 1px solid #cfd7de;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 16px;
  box-sizing: border-box;
  background: #fff;
}

.siko-field input:focus {
  outline: 0;
  border-color: var(--siko-accent);
  box-shadow: 0 0 0 3px rgba(2, 174, 214, .18);
}

.siko-hp {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
}

.siko-modal__actions {
  margin-top: 8px;
}

.siko-modal__submit {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--siko-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.siko-modal__submit[disabled] {
  opacity: .65;
  cursor: wait;
}

.siko-modal__error {
  display: none;
  margin: 0 0 10px;
  color: #b42318;
  font-size: 14px;
}

.siko-modal__error.is-visible {
  display: block;
}

.siko-modal__success {
  display: none;
  text-align: center;
  padding: 18px 8px 10px;
}

.siko-modal__success.is-visible {
  display: block;
}

.siko-modal__success p {
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
  color: #145;
  font-weight: 600;
}

.siko-modal.is-success .siko-modal__form,
.siko-modal.is-success .siko-modal__sub {
  display: none;
}

@media (min-width: 768px) {
  .siko-modal-backdrop {
    align-items: center;
  }

  .siko-modal {
    border-radius: 12px;
    padding: 24px;
  }
}
