/*
 * YUTNOFF / UniShop2 responsive navigation contract v1.1.2
 * PHONE <=767: bottom Fly Menu is allowed.
 * TABLET 768-991: no floating Fly Menu; header navigation remains authoritative.
 * DESKTOP >=992: desktop Fly Menu behavior.
 *
 * This file also keeps the exact-992 compatibility correction from v1.0.1.
 */

/* Tablet: neutralize UniShop2's server-side mobile-menu-bottom reservation
 * immediately (before fly-menu.js runs), so contacts/footer do not jump upward.
 */
@media (min-width:768px) and (max-width:991px) {
  /* Bootstrap 3 fixes .container at 750px throughout this range.
   * YUTNOFF uses the available tablet width instead, while converging
   * smoothly to Bootstrap's 970px desktop container at 992px.
   */
  .container {
    width:calc(100% - 20px) !important;
    max-width:970px !important;
  }

  .footer.mobile-menu-bottom,
  .footer.mobile-menu-bottom-2 {
    padding-bottom:0 !important;
  }

  .fly-block.mobile-menu-bottom,
  .fly-block.mobile-menu-bottom-2 {
    right:30px !important;
    bottom:100px !important;
    transition:none !important;
  }
}

/* Phone: when the bottom dock exists, remove the entire UniShop2 top-links row.
 * Hiding only its hamburger leaves the row height in normal flow and creates
 * an empty strip above the main header. Keep the row in DOM; CSS restores it
 * automatically from 768px upward.
 */
@media (max-width:767px) {
  body.yut-phone-bottom-flymenu header > #top.top-menu {
    display:none !important;
  }
}

/* UniShop2 3.6.2.0 contains both min-width:992px and max-width:992px branches.
 * At exactly 992px both apply. Restore the same desktop geometry as at 993px.
 */
@media (min-width:992px) and (max-width:992px) {
  .footer.mobile-menu-bottom,
  .footer.mobile-menu-bottom-2 {
    padding-bottom:0 !important;
  }

  .fly-block.mobile-menu-bottom,
  .fly-block.mobile-menu-bottom-2 {
    right:30px !important;
    bottom:100px !important;
    transition:none !important;
  }

  .fly-menu {
    top:-100% !important;
    bottom:auto !important;
    border-bottom:0 !important;
    box-shadow:0 4px 10px rgba(0 0 0 / .1) !important;
    opacity:0;
  }

  .fly-menu.show {
    top:0 !important;
    opacity:1;
  }

  .fly-menu .row {height:54px;}

  .fly-menu__block {
    flex:0 1 60px;
    width:60px;
    margin:0 5px;
  }

  .fly-menu__block:first-child,
  .fly-menu__block:last-child {
    margin-left:5px;
    margin-right:5px;
  }

  .fly-menu__cart {margin-right:10px;}
  .fly-menu__icon {font-size:1.5em;}

  .fly-menu__caption {
    margin:4px 0 0;
    white-space:normal;
  }

  .fly-menu__account .fly-menu__caption {
    overflow:visible;
    max-width:none;
    white-space:normal;
    text-overflow:clip;
  }

  .fly-menu__account.show .dropdown-menu {
    top:calc(100% + 4px);
    left:auto;
    right:0;
    transform:none;
    box-shadow:0 6px 12px rgba(0,0,0,.175);
    border-radius:var(--border-radius-0-0-1-1);
  }

  .fly-menu__product-price {
    flex:0 1 auto;
    flex-wrap:nowrap;
    padding:0 25px;
    font-size:1.4em;
  }

  .fly-menu__product-btn {
    height:32px;
    margin:0;
  }

  .fly-menu-backdrop {display:none !important;}
}
