/* Mobile UX fixes — cache-busted standalone; keep after header-menu-v2.css */

:root {
  --lw-chat-safe: calc(72px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 991.98px) {
  :root {
    --lw-header-offset: 56px;
  }

  /* ----- Fixed header clearance ----- */
  .page-white .body-content,
  body.page-white > .wrapper .body-content {
    padding-top: var(--lw-header-offset) !important;
  }

  body {
    padding-bottom: var(--lw-chat-safe);
  }

  /* ----- Hamburger → X when open ----- */
  .navbar-toggler {
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
  }

  .navbar-toggler .icon-bar {
    width: 22px;
    height: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .navbar-toggler:not(.collapsed) .top-bar {
    transform: rotate(45deg);
    transform-origin: 10% 10%;
  }

  .navbar-toggler:not(.collapsed) .middle-bar {
    opacity: 0;
  }

  .navbar-toggler:not(.collapsed) .bottom-bar {
    transform: rotate(-45deg);
    transform-origin: 10% 90%;
  }

  /* Don't rely on hover for X on touch */
  .navbar-toggler:hover .top-bar,
  .navbar-toggler:hover .middle-bar,
  .navbar-toggler:hover .bottom-bar {
    transform: none;
    opacity: 1;
  }

  .navbar-toggler:not(.collapsed):hover .top-bar {
    transform: rotate(45deg);
    transform-origin: 10% 10%;
  }

  .navbar-toggler:not(.collapsed):hover .middle-bar {
    opacity: 0;
  }

  .navbar-toggler:not(.collapsed):hover .bottom-bar {
    transform: rotate(-45deg);
    transform-origin: 10% 90%;
  }

  /* ----- Mobile nav touch targets + accordion ----- */
  #main-navbar .navbar-collapse {
    max-height: calc(100vh - var(--lw-header-offset));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #main-navbar .main-menu > .nav-item:not(.nav-item-icons) > a {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    min-height: 44px !important;
    height: auto !important;
    max-height: none !important;
    padding: 12px 8px !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
  }

  #main-navbar .main-menu > .nav-item.dropdown > a.lw-mobile-parent::after {
    content: "";
    width: 10px;
    height: 10px;
    margin-left: 12px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    flex-shrink: 0;
    opacity: 0.7;
    transition: transform 0.2s ease;
  }

  #main-navbar .main-menu > .nav-item.dropdown.open > a.lw-mobile-parent::after,
  #main-navbar .main-menu > .nav-item.dropdown.show > a.lw-mobile-parent::after {
    transform: rotate(-135deg);
    margin-top: 6px;
  }

  #main-navbar .main-menu > .nav-item > .dropdown-menu,
  #main-navbar .main-menu > .nav-item > .lw-projects-mega-wrap {
    display: none;
    position: static !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 0 8px 12px !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
  }

  #main-navbar .main-menu > .nav-item.open > .dropdown-menu,
  #main-navbar .main-menu > .nav-item.show > .dropdown-menu,
  #main-navbar .main-menu > .nav-item.open > .lw-projects-mega-wrap,
  #main-navbar .main-menu > .nav-item.show > .lw-projects-mega-wrap {
    display: block !important;
  }

  #main-navbar .lw-projects-mega-wrap .lw-projects-mega,
  #main-navbar .lw-projects-mega-wrap .projects-megamenu {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 0 !important;
  }

  #main-navbar .main-menu .dropdown-menu > li > a,
  #main-navbar .main-menu .dropdown-menu .dropdown-toggle {
    display: flex !important;
    align-items: center;
    min-height: 40px;
    padding: 8px 10px !important;
    font-size: 14px !important;
    white-space: normal !important;
    line-height: 1.3 !important;
  }

  #main-navbar .main-menu .dropdown-menu .dropdown-menu {
    position: static !important;
    display: none;
    padding-left: 12px !important;
    box-shadow: none !important;
    border: 0 !important;
    background: transparent !important;
  }

  #main-navbar .main-menu .dropdown-menu > li.open > .dropdown-menu,
  #main-navbar .main-menu .dropdown-menu > li.show > .dropdown-menu {
    display: block !important;
  }

  /* ----- Shop catalog cards ----- */
  .store-items .item,
  #equipment .store-items .item {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    display: flex;
    flex-direction: column;
    background: #fff !important;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  }

  .store-items .product-thumbs,
  #equipment .product-thumbs {
    height: auto !important;
    min-height: 200px;
    max-height: none !important;
    width: 100%;
    padding: 12px 12px 0;
    background: #f7f7f7;
    border-radius: 8px 8px 0 0;
  }

  .store-items .product-thumbs img,
  .store-items .product-thumbs picture,
  .store-items .product-thumbs picture img,
  #equipment .product-thumbs img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 220px;
    object-fit: contain;
    margin: 0 auto;
    opacity: 1 !important;
  }

  .store-items .product-thumbs img:not(:first-child),
  .store-items .product-thumbs picture:not(:first-child) {
    display: none !important;
  }

  .store-items .item-cover,
  .store-items-white .item-cover,
  #equipment .store-items-white .item-cover {
    position: relative !important;
    bottom: auto !important;
    width: 100% !important;
    background: #fff !important;
    padding: 14px 16px 16px !important;
    display: flex !important;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
  }

  .store-items-white h2,
  .store-items-white .item-cover h2,
  #equipment .store-items-white h2 {
    color: #1a1a1a !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    opacity: 1 !important;
  }

  .store-items-white .item-category,
  #equipment .store-items-white .item-category {
    color: #c4121c !important;
    font-size: 12px !important;
  }

  .store-items-white .item-price,
  #equipment .store-items-white .item-price {
    color: #d10000 !important;
    font-size: 22px !important;
    font-weight: 700 !important;
  }

  .item-label-container {
    z-index: 2;
  }

  /* Category strip tap targets */
  ul.tiles > li a,
  .tiles > li a {
    min-height: 44px;
  }

  /* ----- Homepage hero simplify ----- */
  .page-home article.b-best-laser-tag-equipment {
    min-height: 0 !important;
    padding-bottom: 24px;
  }

  .page-home article.b-best-laser-tag-equipment img.b-best-laser-tag-equipment-flag,
  .page-home article.b-best-laser-tag-equipment img.b-best-laser-tag-equipment-people,
  .page-home article.b-best-laser-tag-equipment img.b-best-laser-tag-equipment-universe {
    display: none !important;
  }

  .page-home article.b-best-laser-tag-equipment .b-laurels {
    display: none !important;
  }

  .page-home article.b-best-laser-tag-equipment h1 {
    font-size: 1.65rem !important;
    line-height: 1.15 !important;
  }

  .page-home article.b-best-laser-tag-equipment p {
    font-size: 0.95rem !important;
    line-height: 1.45 !important;
    max-height: none !important;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .page-home article.b-best-laser-tag-equipment .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* ----- start-laser-tag-business ----- */
  .promopage .section-intro h1,
  .promopage.section-intro h1,
  article.promopage .section-intro h1 {
    margin-top: 1.25rem !important;
    font-size: 1.55rem !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
  }

  .promopage .section-intro h1 small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.95rem !important;
    font-weight: 600;
    line-height: 1.35 !important;
    color: #333 !important;
  }

  .promopage .aeo-answer p {
    font-size: 15px !important;
    line-height: 1.5 !important;
  }

  .promopage table.aeo-facts,
  .promopage table.aeo-facts tbody,
  .promopage table.aeo-facts tr,
  .promopage table.aeo-facts th,
  .promopage table.aeo-facts td {
    display: block !important;
    width: 100% !important;
  }

  .promopage table.aeo-facts {
    border: 0 !important;
  }

  .promopage table.aeo-facts tr {
    background: #f6f6f6;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
  }

  .promopage table.aeo-facts th {
    font-size: 12px !important;
    color: #666 !important;
    font-weight: 600;
    padding: 0 0 4px !important;
    border: 0 !important;
  }

  .promopage table.aeo-facts td {
    font-size: 15px !important;
    color: #111 !important;
    font-weight: 600;
    padding: 0 !important;
    border: 0 !important;
    line-height: 1.35 !important;
  }

  .promopage .franchise_text .item1 {
    font-size: 1.6rem !important;
    line-height: 1.2 !important;
  }

  .promopage .franchise_text .item2,
  .promopage .franchise_text .item3,
  .promopage .franchise_text .item3 ul {
    font-size: 1rem !important;
    line-height: 1.45 !important;
  }

  /* ----- Reviews ----- */
  .cr-hero__cta {
    flex-direction: column;
    width: 100%;
  }

  .cr-hero__cta .cr-btn {
    width: 100%;
    min-height: 44px;
  }

  .cr-hero__note {
    font-size: 0.92rem !important;
    color: #555 !important;
    line-height: 1.5 !important;
  }

  /* ----- Footer legal ----- */
  .footer-bottom .footer-legal-links .privacy-link,
  .footer-bottom .footer-legal-sep,
  .page-white .footer-bottom .footer-legal-links .privacy-link,
  .page-white .footer-bottom .footer-legal-sep {
    font-size: 13px !important;
    line-height: 1.4 !important;
  }

  /* ----- Jivo: collapse wide label to FAB footprint ----- */
  jdiv[class*="button_"] > jdiv[class*="label"],
  jdiv[class*="button__"] jdiv[class*="label"],
  jdiv[class*="hoverLabel"],
  jdiv[class*="__label"],
  jdiv[class*="leafButton__text"],
  jdiv[class*="mobile__label"] {
    display: none !important;
  }

  jdiv#jivo_custom_widget,
  jdiv[class*="globalClass_"],
  jdiv[class*="buttonWrap"],
  jdiv[class*="jivo-btn"] {
    max-width: 64px !important;
  }

  html.lw-jivo-mobile jdiv[class*="label"],
  html.lw-jivo-mobile jdiv[class*="Label"],
  html.lw-jivo-mobile jdiv[class*="leaf_"] {
    max-width: 60px !important;
    overflow: hidden !important;
  }

  html.lw-jivo-mobile jdiv[class*="label"] span,
  html.lw-jivo-mobile jdiv[class*="Label"] span {
    display: none !important;
  }
}

@media (max-width: 560px) {
  .cr-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }
}
