/* LMC shared mobile-first production fixes. Desktop layout is intentionally unchanged. */

@media (max-width: 1024px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  /* Elementor headers: use the hamburger layout throughout the tablet range. */
  header.elementor-element-33d8f6ba,
  header.elementor-element-62826f8c {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-height: 88px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  header.elementor-element-33d8f6ba > .elementor-container,
  header.elementor-element-62826f8c > .elementor-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 88px !important;
    padding: 0 16px !important;
  }

  header .elementor-nav-menu--main {
    display: none !important;
  }

  header .elementor-menu-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    margin: 0 auto !important;
    padding: 10px !important;
  }

  header.elementor-element-33d8f6ba .elementor-element-ee7b4d0,
  header.elementor-element-62826f8c .elementor-element-20b7de40 {
    align-self: center !important;
    width: 46px !important;
    max-width: 46px !important;
    margin: 0 auto !important;
  }

  header.elementor-element-33d8f6ba .elementor-element-ee7b4d0 .elementor-menu-toggle,
  header.elementor-element-62826f8c .elementor-element-20b7de40 .elementor-menu-toggle {
    margin: 0 !important;
  }

  header.elementor-element-33d8f6ba .elementor-element-ee7b4d0 > .elementor-widget-container,
  header.elementor-element-62826f8c .elementor-element-20b7de40 > .elementor-widget-container {
    width: 46px !important;
    margin: 0 !important;
  }

  header .elementor-menu-toggle[aria-expanded="false"] + .elementor-nav-menu__container {
    display: none !important;
  }

  header .elementor-menu-toggle[aria-expanded="true"] + .elementor-nav-menu__container {
    display: block !important;
  }

  header .elementor-nav-menu__container.elementor-nav-menu--dropdown {
    position: fixed !important;
    z-index: 99998 !important;
    top: 88px !important;
    right: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    max-height: calc(100vh - 88px) !important;
    overflow-y: auto !important;
    transform: none !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  }

  header .elementor-nav-menu--dropdown a.elementor-item,
  header .elementor-nav-menu--dropdown a.elementor-sub-item {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 48px !important;
    padding: 12px 18px !important;
    line-height: 1.35 !important;
  }

  /* Doors header columns. */
  header.elementor-element-33d8f6ba .elementor-element-3535199f {
    flex: 1 1 auto !important;
    width: auto !important;
  }

  header.elementor-element-33d8f6ba .elementor-element-1a766ab7,
  header.elementor-element-33d8f6ba .elementor-element-b18f677 {
    flex: 0 0 60px !important;
    width: 60px !important;
  }

  header.elementor-element-33d8f6ba .elementor-element-428605b8 img {
    width: auto !important;
    max-width: min(230px, 100%) !important;
    max-height: 54px !important;
  }

  header.elementor-element-33d8f6ba .elementor-search-form__toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 46px !important;
    height: 46px !important;
  }

  /* Cabinet header columns and compact, still usable search. */
  header.elementor-element-62826f8c .elementor-element-6f7cacea {
    flex: 1 1 auto !important;
    width: auto !important;
  }

  header.elementor-element-62826f8c .elementor-element-49b60c20 {
    flex: 0 0 58px !important;
    width: 58px !important;
  }

  header.elementor-element-62826f8c .elementor-element-769197f8 {
    flex: 0 0 150px !important;
    width: 150px !important;
  }

  header.elementor-element-62826f8c .elementor-element-753e404 img {
    width: auto !important;
    max-width: min(230px, 100%) !important;
    max-height: 50px !important;
  }

  header.elementor-element-62826f8c .elementor-element-35f96d12,
  header.elementor-element-62826f8c .elementor-search-form {
    width: 100% !important;
    max-width: 150px !important;
  }

  header.elementor-element-62826f8c .elementor-search-form__input,
  header.elementor-element-62826f8c .elementor-search-form__submit {
    min-height: 44px !important;
    font-size: 16px !important;
  }

  header.elementor-element-62826f8c .elementor-search-form__submit {
    min-width: 44px !important;
  }

  /* Tablet hero sections. */
  body.page-id-384 .elementor-element-f157715 {
    height: 720px !important;
    min-height: 720px !important;
  }

  body.page-id-384 .elementor-element-54df0ec .elementor-heading-title {
    font-size: clamp(34px, 5.2vw, 46px) !important;
    line-height: 1.25 !important;
  }

  body.page-id-136 .elementor-element-d9f951d {
    height: 700px !important;
    min-height: 700px !important;
  }

  body.page-id-136 .elementor-element-6c795b1 .elementor-heading-title {
    font-size: clamp(34px, 5vw, 44px) !important;
    line-height: 1.22 !important;
  }

  body.page-id-136 .elementor-element-e5dc577 .elementor-heading-title {
    font-size: clamp(25px, 3.8vw, 34px) !important;
    line-height: 1.3 !important;
  }

  /* One accessible minimum for navigation, CTAs and forms. */
  main a.elementor-button,
  main button.elementor-button,
  main .elementor-cta__button {
    min-height: 48px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .elementor-form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
  .elementor-form textarea,
  .elementor-form select {
    min-height: 48px !important;
    font-size: 16px !important;
    line-height: 1.35 !important;
  }

  .elementor-form textarea {
    min-height: 150px !important;
  }

  body.page-id-713 .elementor-element-c55285f {
    --container-widget-width: calc(100vw - 40px) !important;
    --container-widget-flex-grow: 0 !important;
    flex: 0 0 calc(100vw - 40px) !important;
    width: calc(100vw - 40px) !important;
    max-width: calc(100vw - 40px) !important;
    margin-right: 12px !important;
    margin-left: 12px !important;
  }

  body.page-id-713 .elementor-element-38572d8 > .elementor-element-populated {
    padding-right: 0 !important;
    padding-left: 0 !important;
  }

  body.page-id-141 .elementor-element-233ebe8 {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  body.page-id-713 .elementor-element-c55285f .elementor-field-type-submit,
  body.page-id-713 .elementor-element-c55285f button[type="submit"],
  body.page-id-141 .elementor-element-3a74494 .elementor-field-type-submit,
  body.page-id-141 .elementor-element-3a74494 button[type="submit"] {
    width: 100% !important;
    min-height: 52px !important;
  }

  /* Keep one contact action in the lower-right corner; Tawk is deactivated separately. */
  #ht-ctc-chat {
    position: fixed !important;
    z-index: 99990 !important;
    top: auto !important;
    right: 14px !important;
    bottom: calc(14px + env(safe-area-inset-bottom)) !important;
    left: auto !important;
    width: 58px !important;
    height: 58px !important;
    margin: 0 !important;
  }

  #gt_float_wrapper {
    position: fixed !important;
    z-index: 99989 !important;
    top: auto !important;
    right: auto !important;
    bottom: calc(14px + env(safe-area-inset-bottom)) !important;
    left: 10px !important;
    width: auto !important;
    transform: scale(0.82) !important;
    transform-origin: left bottom !important;
  }

  iframe[title="chat widget"],
  iframe[title="chat widget button"],
  .tawk-min-container,
  .widget-visible {
    display: none !important;
  }

  /* Cabinet homepage project titles must stay inside their cards. */
  body.page-id-136 .elementor-element-f08a1b1 .elementor-cta__title,
  body.page-id-136 .elementor-element-1b9bb71 .elementor-cta__title,
  body.page-id-136 .elementor-element-2930b6f .elementor-cta__title {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 12px 16px !important;
    font-size: clamp(20px, 4.2vw, 28px) !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere !important;
    transform: none !important;
  }

  body.page-id-136 .elementor-element-29303c2,
  body.page-id-136 .elementor-element-29303c2 * {
    transform: none !important;
  }

  /* Remove the duplicate product title and tighten the product summary on phones/tablets. */
  body.single-product .elementor-element-3588e7e {
    display: none !important;
  }

  body.single-product .elementor-element-9a2fe6e {
    min-height: 0 !important;
    padding-top: 32px !important;
    padding-bottom: 32px !important;
  }

  .lmc-mobile-collapsible {
    position: relative;
    overflow: hidden;
    transition: max-height 240ms ease;
  }

  .lmc-mobile-collapsible:not(.lmc-mobile-expanded)::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 100px;
    content: "";
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 85%);
  }

  .lmc-mobile-toggle {
    display: block;
    width: calc(100% - 40px);
    min-height: 48px;
    margin: 16px auto 42px;
    padding: 12px 18px;
    border: 0;
    border-radius: 4px;
    color: #fff;
    background: #c91f1f;
    font: 600 16px/1.35 inherit;
  }
}

@media (max-width: 767px) {
  header.elementor-element-33d8f6ba,
  header.elementor-element-62826f8c,
  header.elementor-element-33d8f6ba > .elementor-container,
  header.elementor-element-62826f8c > .elementor-container {
    min-height: 82px !important;
  }

  header .elementor-nav-menu__container.elementor-nav-menu--dropdown {
    top: 82px !important;
    max-height: calc(100vh - 82px) !important;
  }

  header.elementor-element-33d8f6ba > .elementor-container,
  header.elementor-element-62826f8c > .elementor-container {
    padding-right: 10px !important;
    padding-left: 10px !important;
  }

  header.elementor-element-33d8f6ba .elementor-element-1a766ab7,
  header.elementor-element-33d8f6ba .elementor-element-b18f677 {
    flex-basis: 54px !important;
    width: 54px !important;
  }

  header.elementor-element-62826f8c .elementor-element-49b60c20 {
    flex-basis: 52px !important;
    width: 52px !important;
  }

  header.elementor-element-62826f8c .elementor-element-769197f8 {
    flex-basis: 104px !important;
    width: 104px !important;
  }

  header.elementor-element-62826f8c .elementor-element-35f96d12,
  header.elementor-element-62826f8c .elementor-search-form {
    max-width: 104px !important;
  }

  header.elementor-element-33d8f6ba .elementor-element-428605b8 img,
  header.elementor-element-62826f8c .elementor-element-753e404 img {
    max-width: min(170px, 100%) !important;
    max-height: 44px !important;
  }

  body.page-id-384 .elementor-element-f157715 {
    height: 610px !important;
    min-height: 610px !important;
  }

  body.page-id-384 .elementor-element-54df0ec .elementor-heading-title {
    font-size: clamp(28px, 7.5vw, 34px) !important;
    line-height: 1.25 !important;
  }

  body.page-id-136 .elementor-element-d9f951d {
    height: 600px !important;
    min-height: 600px !important;
  }

  body.page-id-136 .elementor-element-6c795b1 .elementor-heading-title {
    font-size: clamp(30px, 8vw, 36px) !important;
    line-height: 1.2 !important;
  }

  body.page-id-136 .elementor-element-e5dc577 .elementor-heading-title {
    font-size: clamp(22px, 5.8vw, 28px) !important;
    line-height: 1.3 !important;
  }

  body.page-id-384 .elementor-widget-text-editor p,
  body.page-id-384 .elementor-widget-text-editor li,
  body.page-id-713 .elementor-widget-text-editor p,
  body.page-id-1530 .elementor-widget-text-editor p,
  body.page-id-1530 .elementor-widget-text-editor li {
    font-size: 16px !important;
    line-height: 1.6 !important;
  }

  body.page-id-140 .elementor-element-6ec9a6d {
    min-height: 440px !important;
  }

  body.page-id-140 .elementor-element-80bb791 .elementor-element-aa87a18 {
    display: none !important;
  }

  body.page-id-140 .elementor-element-ec420ff > .elementor-widget-wrap > .elementor-element {
    margin-bottom: 12px !important;
  }

  body.page-id-140 .elementor-element-ec420ff .elementor-widget-text-editor,
  body.page-id-140 .elementor-element-ec420ff .elementor-widget-text-editor li {
    font-size: 16px !important;
    line-height: 1.6 !important;
  }

  body.page-id-140 .elementor-element-80bb791.lmc-mobile-collapsible {
    max-height: 720px;
  }

  body.page-id-140 .elementor-element-80bb791.lmc-mobile-expanded {
    max-height: 5000px;
  }

  body.single-product .elementor-element-2535918.lmc-mobile-collapsible {
    max-height: 3000px;
  }

  body.single-product .elementor-element-2535918.lmc-mobile-expanded {
    max-height: 12000px;
  }

  body.single-product .elementor-element-570107c {
    min-height: 330px !important;
  }

  body.single-product .product_title {
    font-size: clamp(30px, 8vw, 38px) !important;
    line-height: 1.2 !important;
  }
}

/* Correct the corrupted Elementor mobile margin even before its generated CSS is refreshed. */
@media (max-width: 767px) {
  body.page-id-1530 .elementor-element-71e05fa > .elementor-element-populated {
    margin: 0 10px !important;
    --e-column-margin-right: 10px !important;
    --e-column-margin-left: 10px !important;
  }
}
