/* Loaded last. Fixes mobile/tablet/desktop layout without touching the homepage design system. */

html { -webkit-text-size-adjust: 100%; }
html, body.nm-home { overflow-x: clip; max-width: 100%; }
@supports not (overflow: clip) {
  html, body.nm-home { overflow-x: hidden; }
}
body.nm-home { margin: 0; }
*, *::before, *::after { box-sizing: border-box; }

img, svg, video, iframe { max-width: 100%; height: auto; }
img { height: auto; }

.announce { padding: 0 8px; }
.announce-pill {
  max-width: 100%;
  flex-wrap: wrap;
  text-wrap: balance;
}
.logo-lockup { max-width: 100%; min-width: 0; }
.logo-lockup img { max-width: min(240px, 62vw); height: auto; }
.site-foot .foot-brand img { max-width: min(220px, 70vw); height: auto; }

.nm-page, .cat-shop, .entry-content, .entry-content-no-builder, .woocommerce {
  overflow-wrap: anywhere;
}
.nm-page img, .entry-content img, .entry-content iframe, .entry-content table,
.woocommerce img, .woocommerce-product-gallery img {
  max-width: 100%;
  height: auto;
}
/* body.woocommerce img ties .logo-lockup img and stretches the header logo
   to its natural 720x182 on shop, category and product pages. Homepage has
   no .woocommerce class, so keep that exact logo (and footer mark) size. */
body.nm-home .site-head .logo-lockup img {
  max-width: min(240px, 62vw);
  width: auto;
  height: auto;
}
body.nm-home .site-foot .foot-brand img {
  max-width: min(220px, 70vw);
  width: auto;
  height: auto;
}
/* Shop and search close .nm before the footer, so the footer drops the
   homepage 16.5px / 1.55 type and comes out a few pixels shorter. */
body.nm-home .site-foot {
  font-size: 16.5px;
  line-height: 1.55;
}

/* Desktop nav: wrap instead of spilling off a 1280px laptop. */
@media (min-width: 1101px) and (max-width: 1360px) {
  body.nm-home .site-head .menu {
    flex-wrap: wrap !important;
    justify-content: center !important;
    row-gap: 2px;
    overflow: visible !important;
  }
}
@media (min-width: 1101px) {
  body.nm-home .menu-toggle { display: none !important; }
  body.nm-home .site-head .menu-bar {
    display: block !important;
    position: static !important;
    background: transparent !important;
    overflow: visible !important;
    inset: auto !important;
    padding: 0 !important;
  }
}

/* Phone + tablet: real menu, not a nowrap strip that widens the page. */
@media (max-width: 1100px) {
  body.nm-home .menu-toggle {
    display: inline-flex !important;
    position: relative;
    z-index: 95;
  }
  body.nm-home .site-head .menu-bar {
    display: none !important;
  }
  body.nm-home.nm-nav-open { overflow: hidden; }
  body.nm-home.nm-nav-open .site-head { z-index: 100; }
  body.nm-home.nm-nav-open .site-head .menu-bar {
    display: block !important;
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    z-index: 90;
    margin: 0;
    width: 100%;
    max-width: none;
    padding: 132px 18px 48px;
    background: #f4f5f2;
    overflow: auto;
    border: 0;
  }
  body.nm-home.nm-nav-open .announce,
  body.nm-home.nm-nav-open .head-shell,
  body.nm-home.nm-nav-open .head-top,
  body.nm-home.nm-nav-open .logo-lockup {
    position: relative;
    z-index: 96;
  }
  body.nm-home.nm-nav-open .site-head .menu {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
    gap: 0;
    min-height: 0;
    width: 100%;
    padding: 8px 0 20px;
  }
  body.nm-home.nm-nav-open .site-head .menu > a,
  body.nm-home.nm-nav-open .site-head .drop > a {
    color: #10261f !important;
    white-space: normal !important;
    font-size: 16px !important;
    letter-spacing: 0.04em !important;
    padding: 14px 2px !important;
    border-bottom: 1px solid rgba(16, 38, 31, 0.12) !important;
    width: 100%;
  }
  body.nm-home.nm-nav-open .site-head .drop { width: 100%; }
  body.nm-home .site-head .drop-panel,
  body.nm-home .site-head .drop:hover .drop-panel,
  body.nm-home .site-head .drop:focus-within .drop-panel,
  body.nm-home .site-head .drop.open .drop-panel {
    display: none !important;
    position: static !important;
  }
  body.nm-home.nm-nav-open .site-head .drop-panel,
  body.nm-home.nm-nav-open .site-head .drop:hover .drop-panel,
  body.nm-home.nm-nav-open .site-head .drop:focus-within .drop-panel,
  body.nm-home.nm-nav-open .site-head .drop.open .drop-panel {
    display: block !important;
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 0 8px 10px !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
  }
  body.nm-home.nm-nav-open .site-head .drop-panel a {
    display: block !important;
    background: transparent !important;
    color: #1d4a38 !important;
    border: 0 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    padding: 10px 4px !important;
    margin: 0 !important;
  }
  .head-shell { width: min(1180px, calc(100% - 20px)) !important; }
  .head-top { grid-template-columns: minmax(0, 1fr) !important; }
  .head-search { min-width: 0; max-width: 100%; }
  .head-actions { justify-content: flex-start; flex-wrap: wrap; }
}

@media (max-width: 720px) {
  .announce-pill {
    letter-spacing: 0.04em !important;
    font-size: 11px !important;
    line-height: 1.35;
    padding: 8px 10px !important;
    text-transform: none;
  }
  .logo-lockup img { height: 52px !important; }
  .trust-strip { padding: 10px 12px; }
  .faq-card, .sub-card { padding: 22px 14px !important; border-radius: 18px; }
  .sub-row { flex-direction: column !important; }
  .sub-row input, .sub-row button, .banner-actions .btn { width: 100%; }
  .banner-actions { flex-wrap: wrap !important; }
  .banner-still > img { height: 200px !important; }
  .stats-row { grid-template-columns: 1fr 1fr !important; }
  .foot-main { grid-template-columns: 1fr !important; gap: 22px !important; }
  .foot-pills span { text-align: center; }
  .wa-float { right: 10px; bottom: 10px; padding-left: 10px; }
}

@media (max-width: 380px) {
  body.nm-home .head-actions { gap: 6px; }
  body.nm-home .head-actions .head-btn {
    padding: 0 8px !important;
    font-size: 12px !important;
    min-height: 40px;
    gap: 4px;
  }
  .stats-row { grid-template-columns: 1fr !important; }
}

/* Category + homepage product grids. Counts match the homepage rail:
   desktop 5 across, category 4 (same card width next to the sidebar),
   3 across under 860px, 2 across under 640px. Images are sized by nm-boxfix. */
body.nm-cat .cat-grid.live-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
body.nm-home .live-products .live-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 1100px) {
  body.nm-cat .cat-grid.live-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 860px) {
  body.nm-cat .cat-grid.live-grid,
  body.nm-home .live-products .live-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 640px) {
  body.nm-cat .cat-grid.live-grid,
  body.nm-home .cat-grid,
  body.nm-home .live-products .live-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Shop archive: theme grid classes have no Bootstrap, so float columns collapse. */
body.nm-home ul.products {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 24px !important;
  padding: 0 !important;
  list-style: none;
  width: 100%;
}
body.nm-home ul.products::before,
body.nm-home ul.products::after { display: none !important; }
body.nm-home ul.products li.product {
  width: auto !important;
  max-width: none !important;
  float: none !important;
  clear: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.nm-home ul.products li.product img {
  width: 100% !important;
  height: auto !important;
  object-fit: contain;
  background: #fff;
}
@media (max-width: 860px) {
  body.nm-home ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 640px) {
  body.nm-home ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* Single product: gallery stays visible if flexslider never boots, and stacks on small screens. */
body.single-product .woocommerce-product-gallery,
body.single-product .woocommerce-product-gallery__wrapper,
body.single-product .woocommerce-product-gallery img {
  opacity: 1 !important;
}
body.single-product .row.product-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 32px;
  align-items: start;
  margin: 0;
}
body.single-product .row.product-details > [class*="col-"] {
  width: auto !important;
  max-width: none !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.single-product .product_title,
body.nm-home .entry-title,
.nm-page h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
body.single-product div.product form.cart,
body.single-product .product-details-info form.cart {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  max-width: 420px;
}
body.single-product div.product form.cart .quantity,
body.single-product div.product form.cart .quantity input {
  width: 100%;
  max-width: 140px;
  float: none;
}
@media (max-width: 800px) {
  body.single-product .row.product-details { grid-template-columns: 1fr; }
  body.single-product div.product form.cart,
  body.single-product .product-details-info form.cart { max-width: none; }
  .interested-products { margin-top: 12px; }
}

/* Cart, checkout, account */
.woocommerce table.shop_table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.woocommerce table.shop_table img { width: 72px; height: auto; }
.woocommerce form .form-row { float: none; width: 100%; }
.woocommerce form .form-row-first,
.woocommerce form .form-row-last { float: none; width: 100%; }
@media (min-width: 720px) {
  .woocommerce form .form-row-first { float: left; width: 48%; }
  .woocommerce form .form-row-last { float: right; width: 48%; }
}
.woocommerce form .input-text,
.woocommerce form select,
.woocommerce form textarea,
.woocommerce-page .input-text {
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  box-sizing: border-box;
}
.woocommerce-checkout #order_review,
.woocommerce .cart_totals { max-width: 100%; }
.wc-proceed-to-checkout .checkout-button,
.nm-checkout { max-width: 100%; }
#customer_login, .woocommerce-MyAccount-navigation, .woocommerce-MyAccount-content {
  max-width: 100%;
}
@media (max-width: 800px) {
  .woocommerce-account .woocommerce-MyAccount-navigation,
  .woocommerce-account .woocommerce-MyAccount-content {
    float: none !important;
    width: 100% !important;
  }
}

/* Elementor / blog pages inside the shared shell */
.nm-page .elementor, .nm-page .elementor-section, .nm-page .elementor-container, .nm-page .e-con {
  max-width: 100%;
}
.nm-page .elementor-section.elementor-section-stretched {
  width: 100% !important;
  left: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Below-the-fold sections can skip layout work until scrolled near. */
/* Rails stay painted. content-visibility hid rotated product photos. */
.faq-band, .sub-band, .guides, .qc-band, .lodge-steps {
  content-visibility: auto;
  contain-intrinsic-size: auto 520px;
}
.live-products { content-visibility: visible; }

@media (hover: none), (pointer: coarse) {
  .live-card, .live-card:hover { transform: none !important; }
}


/* WooCommerce uses class "product" on real catalog items.
   home.css turns every .product into a 2-column grid, which
   crushes shop cards and pins the single product to the left half. */
body.woocommerce ul.products > li.product,
body.woocommerce-page ul.products > li.product {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: none !important;
  gap: 0 !important;
  align-items: stretch !important;
  justify-items: stretch !important;
  background: #fff;
  border: 1px solid rgba(16, 38, 31, 0.08);
  border-radius: 16px;
  overflow: hidden;
  min-width: 0;
  height: auto !important;
}
body.woocommerce ul.products > li.product > .product-item,
body.woocommerce ul.products > li.product .product-item-inner-wrap,
body.woocommerce ul.products > li.product .product-item-info {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  float: none !important;
  grid-template-columns: none !important;
  height: auto !important;
}
body.woocommerce ul.products > li.product .woocommerce-loop-product__link {
  position: relative;
  display: block;
  width: 100%;
}
body.woocommerce ul.products > li.product img {
  display: block !important;
  width: 100% !important;
  height: 240px !important;
  max-height: 240px !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  background: #f7f4ee;
}
body.woocommerce ul.products > li.product .product-category {
  margin: 12px 14px 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
body.woocommerce ul.products > li.product .product-title,
body.woocommerce ul.products > li.product h4.product-title,
body.woocommerce ul.products > li.product .product-title a {
  display: block;
  height: auto !important;
  margin: 6px 14px 0 !important;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 20px !important;
  line-height: 1.25 !important;
  font-weight: 600;
  color: #10261f !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}
body.woocommerce ul.products > li.product .price {
  display: block;
  margin: 8px 14px 0 !important;
  color: #10261f !important;
}
body.woocommerce ul.products > li.product .nm-buybox {
  margin-top: auto;
}
body.woocommerce span.onsale {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  margin: 0;
  min-width: 0;
  border-radius: 999px;
  padding: 4px 10px;
  line-height: 1.2;
}

body.single-product div.product.type-product,
body.single-product div.product {
  display: block !important;
  grid-template-columns: none !important;
  gap: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
}
body.single-product .row.product-details {
  display: grid !important;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr) !important;
  width: 100% !important;
  max-width: 1100px;
  margin: 0 auto !important;
  gap: 28px 40px !important;
  float: none !important;
}
body.single-product .woocommerce-product-gallery,
body.single-product .summary,
body.single-product .product-details-info,
body.single-product .images {
  float: none !important;
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  opacity: 1 !important;
}
body.single-product div.product img,
body.single-product .woocommerce-product-gallery img {
  aspect-ratio: auto !important;
  object-fit: contain !important;
  width: 100% !important;
  height: auto !important;
  max-height: 640px;
  background: #f7f4ee;
}
body.single-product .product_title {
  margin-top: 0;
}
@media (max-width: 800px) {
  body.single-product .row.product-details {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
  }
  body.woocommerce ul.products > li.product img {
    height: 200px !important;
  }
}

/* A chat widget sets .container{display:flex} globally and stops columns shrinking. */
.nm-page > .container,
.nm-page .content-area,
.nm-page .site-main,
.nm-page .row,
.nm-page .woocommerce {
  display: block !important;
  min-width: 0 !important;
  max-width: 100%;
}
.nm-page .container {
  width: min(1200px, 100%) !important;
  margin-left: auto;
  margin-right: auto;
}
.nm-page .row {
  width: auto !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.nm-page [class*="col-"] {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  float: none !important;
  box-sizing: border-box;
}
.nm-page img,
.nm-page iframe,
.nm-page video,
.nm-page embed,
.nm-page table,
.nm-page pre {
  max-width: 100%;
}
.nm-page table {
  display: block;
  overflow-x: auto;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.woocommerce-result-count,
.woocommerce-ordering,
.woocommerce-pagination {
  float: none !important;
  max-width: 100%;
}
.woocommerce-ordering select,
.woocommerce form .input-text,
.woocommerce form select,
.woocommerce form textarea {
  max-width: 100%;
}
@media (max-width: 700px) {
  .woocommerce .woocommerce-ordering,
  .woocommerce .woocommerce-result-count {
    width: 100%;
    text-align: left;
    margin-bottom: 10px;
  }
}
