/* OT365 responsive patch. Loaded after theme, Elementor and OT365 plugins. */
html.ot365-responsive-active,
html.ot365-responsive-active body {
  max-width: 100%;
  overflow-x: clip;
}

body img,
body video,
body iframe {
  max-width: 100%;
}

body .ot365-navbar,
body .ot365-footer,
body .ot365-hero-v2,
body .ot365-home-catalog,
body .ot365-full-catalog,
body .ot365-document-shell,
body .ot365-auth-shell,
body .ot365-account-shell {
  isolation: isolate;
}

/* Header / navbar */
body .ot365-navbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 2147483000 !important;
}

body.admin-bar .ot365-navbar {
  top: 32px !important;
}

body .ot365-burger {
  cursor: pointer;
  border-radius: 12px;
}

body .ot365-burger:hover {
  background: #eef5ff;
}

body .ot365-mobile-panel-actions {
  display: none;
}

@media (max-width: 1240px) {
  body .ot365-navbar__top {
    max-width: 100%;
    padding-inline: 16px;
    gap: 12px;
    grid-template-columns: auto auto minmax(210px, 1fr) auto auto auto;
  }

  body .ot365-logo__text strong {
    font-size: 16px;
  }

  body .ot365-logo__text em {
    font-size: 12px;
  }

  body .ot365-catalog-btn {
    padding-inline: 16px;
  }

  body .ot365-phone-link,
  body .ot365-header-link--favorite {
    display: none !important;
  }
}

@media (max-width: 980px) {
  body .ot365-navbar__top {
    min-height: 72px;
    padding: 10px 14px;
    grid-template-columns: auto minmax(220px, 1fr) auto auto auto;
    gap: 10px;
  }

  body .ot365-logo {
    min-width: 0;
  }

  body .ot365-catalog-btn {
    display: none !important;
  }

  body .ot365-top-search {
    display: grid !important;
    min-height: 46px;
    grid-template-columns: 1fr 42px;
  }

  body .ot365-top-search input {
    min-width: 0;
    font-size: 14px;
    padding-inline: 12px;
  }

  body .ot365-header-link--cart {
    display: inline-flex !important;
    align-items: center;
    min-height: 42px;
    padding-inline: 8px;
    border-radius: 12px;
  }

  body .ot365-account-btn {
    display: inline-flex !important;
    min-height: 42px;
    padding-inline: 14px;
  }

  body .ot365-burger {
    display: block !important;
    width: 42px;
    height: 42px;
  }

  body .ot365-navbar__menu {
    max-width: 100%;
    padding-inline: 14px;
    gap: 16px;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  body.admin-bar .ot365-navbar {
    top: 46px !important;
  }

  body .ot365-navbar__top {
    min-height: auto;
    padding: 9px 12px 10px;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 44px;
    grid-template-areas:
      "logo burger"
      "search search";
    row-gap: 9px;
  }

  body .ot365-logo {
    grid-area: logo;
    max-width: 100%;
    gap: 9px;
  }

  body .ot365-logo__mark {
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px !important;
    border-radius: 12px !important;
  }

  body .ot365-logo__mark::before {
    left: 12px !important;
    top: 7px !important;
    width: 10px !important;
    height: 18px !important;
    border-width: 3px !important;
  }

  body .ot365-logo__text {
    min-width: 0;
  }

  body .ot365-logo__text strong {
    font-size: 14px !important;
    line-height: 1.05;
    white-space: normal;
  }

  body .ot365-logo__text em {
    font-size: 11px !important;
    line-height: 1.1;
  }

  body .ot365-burger {
    grid-area: burger;
    align-self: center;
    justify-self: end;
    display: block !important;
  }

  body .ot365-top-search {
    grid-area: search;
    display: grid !important;
    min-height: 44px;
    border-radius: 12px;
  }

  body .ot365-top-search input {
    font-size: 14px;
    height: 44px;
  }

  body .ot365-catalog-btn,
  body .ot365-header-link,
  body .ot365-phone-link,
  body .ot365-account-btn {
    display: none !important;
  }

  body .ot365-navbar__menu {
    display: none !important;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    max-height: min(78vh, 620px);
    overflow-y: auto;
    padding: 12px;
    background: #ffffff;
    border-top: 1px solid #dfe7f3;
    box-shadow: 0 24px 44px rgba(7, 27, 58, .16);
    grid-template-columns: 1fr;
    gap: 6px;
  }

  body .ot365-navbar.is-mobile-open .ot365-navbar__menu {
    display: grid !important;
  }

  body .ot365-navbar__menu a,
  body .ot365-mobile-panel-link {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    background: #f7fbff;
    color: #071b3a !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    font-weight: 900 !important;
    text-decoration: none !important;
  }

  body .ot365-navbar__menu a:hover,
  body .ot365-mobile-panel-link:hover {
    background: #eef5ff;
    color: #005bd6 !important;
  }

  body .ot365-mobile-panel-actions {
    display: grid !important;
    gap: 6px;
    padding-top: 8px;
    margin-top: 6px;
    border-top: 1px solid #dfe7f3;
  }

  body .ot365-mobile-panel-link--primary {
    background: #005bd6 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
  }
}

/* Footer */
@media (max-width: 1024px) {
  body .ot365-footer {
    padding: 34px 16px 32px;
  }

  body .ot365-footer__cta {
    min-height: unset;
    padding: 28px;
    margin-bottom: 34px;
    gap: 20px;
  }

  body .ot365-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 28px 34px !important;
  }

  body .ot365-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  body .ot365-footer {
    padding: 28px 14px 28px;
  }

  body .ot365-footer__cta {
    display: grid !important;
    padding: 22px 18px;
    border-radius: 16px;
    margin-bottom: 28px;
  }

  body .ot365-footer__cta::after {
    right: -60px;
    bottom: -72px;
    opacity: .55;
  }

  body .ot365-footer__cta h2 {
    font-size: 26px !important;
    line-height: 1.05;
  }

  body .ot365-footer__cta p {
    font-size: 15px !important;
    line-height: 1.4;
  }

  body .ot365-footer__cta a {
    width: 100%;
    min-height: 50px;
  }

  body .ot365-footer__grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  body .ot365-footer__brand p {
    max-width: none;
    margin: 16px 0;
  }
}

/* Hero */
@media (max-width: 1180px) {
  body .ot365-hero-v2 {
    padding-top: 54px !important;
    padding-bottom: 56px !important;
  }

  body .ot365-hero-v2__shell {
    gap: 34px !important;
  }
}

@media (max-width: 760px) {
  body .ot365-hero-v2 {
    padding: 30px 14px 36px !important;
  }

  body .ot365-hero-v2__shell {
    display: block !important;
  }

  body .ot365-hero-v2__title {
    font-size: clamp(34px, 11vw, 44px) !important;
    line-height: 1.02 !important;
    letter-spacing: -.05em !important;
    margin: 14px 0 10px !important;
  }

  body .ot365-hero-v2__lead {
    font-size: 18px !important;
    line-height: 1.35 !important;
  }

  body .ot365-hero-v2__text {
    font-size: 14px !important;
    line-height: 1.55 !important;
  }

  body .ot365-hero-v2__search {
    grid-template-columns: 1fr !important;
    padding: 7px !important;
    border-radius: 16px !important;
  }

  body .ot365-hero-v2__input,
  body .ot365-hero-v2__submit {
    min-height: 48px !important;
  }

  body .ot365-hero-v2__submit,
  body .ot365-hero-v2__button {
    width: 100% !important;
  }

  body .ot365-hero-v2__actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  body .ot365-hero-v2__facts {
    display: grid !important;
    gap: 10px !important;
  }

  body .ot365-hero-v2__visual {
    display: none !important;
  }
}

/* Catalog blocks */
@media (max-width: 1180px) {
  body .ot365-home-catalog__shell,
  body .ot365-full-catalog__shell {
    max-width: 100%;
  }

  body .ot365-docs-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body .ot365-full-catalog__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  body .ot365-home-catalog {
    padding-top: 42px !important;
  }

  body .ot365-cats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }

  body .ot365-docs-row,
  body .ot365-full-catalog__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }

  body .ot365-full-catalog__top {
    grid-template-columns: 1fr !important;
    align-items: start !important;
  }
}

@media (max-width: 600px) {
  body .ot365-home-catalog,
  body .ot365-full-catalog {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  body .ot365-section-head {
    align-items: flex-start !important;
    gap: 10px !important;
  }

  body .ot365-section-head h2 {
    font-size: 24px !important;
  }

  body .ot365-cats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin-bottom: 32px !important;
  }

  body .ot365-cat-card {
    min-height: 138px !important;
    padding: 16px 8px !important;
    border-radius: 14px !important;
  }

  body .ot365-cat-card__icon {
    width: 46px !important;
    height: 46px !important;
    border-radius: 14px !important;
    font-size: 24px !important;
  }

  body .ot365-cat-card__title {
    min-height: auto !important;
    font-size: 13px !important;
  }

  body .ot365-cat-card__count {
    font-size: 12px !important;
  }

  body .ot365-docs-row,
  body .ot365-full-catalog__grid {
    grid-template-columns: 1fr !important;
  }

  body .ot365-product-card {
    min-height: unset !important;
    padding: 18px !important;
    border-radius: 16px !important;
  }

  body .ot365-product-card__title {
    font-size: 16px !important;
  }

  body .ot365-product-card__bottom {
    gap: 10px !important;
  }

  body .ot365-product-card__button {
    min-height: 42px !important;
    padding: 0 16px !important;
  }

  body .ot365-full-catalog__title {
    font-size: 30px !important;
  }

  body .ot365-full-catalog__search {
    grid-template-columns: 1fr !important;
  }

  body .ot365-full-catalog__search button {
    width: 100% !important;
  }

  body .ot365-full-catalog__filters {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding-bottom: 6px !important;
    scrollbar-width: none;
  }

  body .ot365-full-catalog__filters::-webkit-scrollbar {
    display: none;
  }

  body .ot365-full-catalog__filter {
    flex: 0 0 auto;
  }
}

/* Document, account and auth pages */
@media (max-width: 760px) {
  body .ot365-document-container,
  body .ot365-document-header__inner,
  body .ot365-document-footer__inner,
  body .ot365-auth-header__inner,
  body .ot365-auth-main,
  body .ot365-auth-footer__inner,
  body .ot365-account-header__inner,
  body .ot365-account-main,
  body .ot365-account-footer__inner {
    width: calc(100% - 28px) !important;
  }

  body .ot365-document-hero,
  body .ot365-auth-hero,
  body .ot365-account-hero {
    padding: 20px !important;
    border-radius: 22px !important;
  }

  body .ot365-document-title,
  body .ot365-auth-title,
  body .ot365-account-title {
    font-size: clamp(31px, 10vw, 38px) !important;
    line-height: 1.04 !important;
  }

  body .ot365-document-lead,
  body .ot365-auth-lead,
  body .ot365-account-lead {
    font-size: 15px !important;
    line-height: 1.5 !important;
  }

  body .ot365-document-sidecard,
  body .ot365-auth-panel,
  body .ot365-account-card,
  body .ot365-account-limit,
  body .ot365-document-info-card {
    width: 100% !important;
    max-width: none !important;
  }

  body .ot365-document-reader {
    padding: 22px 16px !important;
    font-size: 15px !important;
    line-height: 1.68 !important;
  }

  body .ot365-document-reader:before {
    font-size: 36px !important;
    padding: 14px !important;
  }

  body .ot365-auth-benefits {
    grid-template-columns: 1fr !important;
  }
}

/* WooCommerce checkout/order pages */
@media (max-width: 768px) {
  body.woocommerce-page .woocommerce,
  body .woocommerce {
    max-width: 100% !important;
  }

  body .woocommerce form .form-row-first,
  body .woocommerce form .form-row-last,
  body .woocommerce-page form .form-row-first,
  body .woocommerce-page form .form-row-last {
    width: 100% !important;
    float: none !important;
  }

  body .woocommerce table.shop_table,
  body .woocommerce-page table.shop_table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body .woocommerce .woocommerce-order-overview {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding-left: 0 !important;
  }

  body .woocommerce .woocommerce-order-overview li {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 12px 0 !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(7,27,58,.1);
  }
}
