/* NYJC mobile-fix — 2026-11-04
   Repairs bad Less leftovers + phone layout polish.
*/

/* --- Mobile drawer (broken Less leftovers in app.css) --- */
.header-mobile .sidebar-mobile {
  background-color: rgba(255, 255, 255, 0.98) !important;
  filter: none !important;
  opacity: 0;
  z-index: 10050 !important;
  -webkit-transform: translateX(-270px);
  transform: translateX(-270px);
}
.header-mobile .sidebar-mobile.show {
  filter: none !important;
  opacity: 1 !important;
  -webkit-transform: translate(0, 0);
  transform: translate(0, 0);
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.45), 0 0 10px 0 rgba(0, 0, 0, 0.5) !important;
}
.header-mobile .open-sidebar.hide {
  filter: none !important;
  opacity: 0 !important;
}
.header-mobile .open-sidebar,
.header-mobile .open-sidebar button {
  z-index: 10051;
  position: relative;
}
.header-mobile .close-sidebar button {
  z-index: 10052 !important;
}
.header-mobile .mobile-menu .nav-menu > li > a {
  color: #222 !important;
  font-size: 15px;
  line-height: 44px;
}
.header-mobile .mobile-menu .nav-menu > li > a {
  border-top-color: #e6e6e6 !important;
}

@media screen and (max-width: 767px) {
  html, body {
    max-width: 100%;
    overflow-x: hidden;
  }
  .wrapper, .main-container {
    max-width: 100%;
  }

  /* Homepage category cards: force single column */
  .home-categories .row {
    display: block;
  }
  .home-categories .home-category-item,
  .home-categories .home-category-item.col-sm-6,
  .home-categories .home-category-item.col-sm-4 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    float: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin-bottom: 12px !important;
    border-left-width: 0 !important;
    border-right-width: 0 !important;
  }
  .home-categories .category-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px;
    min-height: 0;
  }
  .home-categories .category-container .image {
    flex: 0 0 42%;
    max-width: 42%;
  }
  .home-categories .category-container .image img,
  .home-categories .max-h-240 {
    width: 100% !important;
    height: auto !important;
    max-height: 140px !important;
    object-fit: cover;
  }
  .home-categories .category-container .text {
    flex: 1;
    text-align: left !important;
    padding: 0 4px;
  }
  .home-categories .category-container h5,
  .home-categories .category-container .max-w-172 {
    font-size: 1.15rem !important;
    line-height: 1.25 !important;
    max-width: none !important;
    margin: 0 0 6px !important;
  }
  .home-categories .category-container p,
  .home-categories .category-container a {
    font-size: 14px !important;
  }

  /* Hero / type scale */
  .page-hero h1 {
    font-size: 1.75rem !important;
    line-height: 1.2 !important;
  }
  .page-hero__caption p {
    font-size: 0.95rem !important;
  }
  .page-hero img {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: cover;
  }
  h1 { font-size: 1.75rem !important; }
  h2 { font-size: 1.4rem !important; }
  h3 { font-size: 1.2rem !important; }
  .heading-title h2,
  .heading-title {
    font-size: 1.35rem !important;
  }

  /* Back to top — smaller, less intrusive */
  #back-top,
  #back-top.show {
    width: 36px !important;
    height: 36px !important;
    right: 10px !important;
    bottom: 14px !important;
    background-size: 16px !important;
    z-index: 5000 !important;
  }

  /* Shop filters / sort */
  .shop-top-bar .product-short {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
  }
  .shop-top-bar .product-short p {
    margin: 0;
  }
  .shop-top-bar .nice-select,
  .shop-product-filters .nice-select,
  .product-short .nice-select {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 40px;
    line-height: 1.3 !important;
    border-radius: 8px !important;
    padding-right: 30px !important;
    white-space: normal !important;
  }
  .shop-product-filters .col-lg-4,
  .shop-product-filters .col-lg-6 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding-left: 0;
    padding-right: 0;
  }
  .shop-product-filters {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  /* Product page */
  .product-details-des,
  .product-details-des p,
  .product-details-des li {
    font-size: 0.95rem !important;
    line-height: 1.45 !important;
  }
  .product-details .product-name,
  .product-details h1,
  .product-details h2 {
    font-size: 1.35rem !important;
  }

  /* Footer type */
  .footer,
  .footer p,
  .bottom-footer {
    font-size: 0.9rem !important;
  }
  .footer .social-icons a {
    width: 36px !important;
    height: 36px !important;
  }
}
