/* Gando 9.7.17 — narrowly scoped homepage mobile + catalog continuation fixes. */

/* Homepage hero: JS handles horizontal swipe; keep normal vertical page scrolling. */
@media (max-width: 700px) {
  .home .hero-slider,
  body.home .hero-slider {
    touch-action: pan-y;
    overscroll-behavior-inline: contain;
  }

  /* Homepage category rail: keep cards compact and horizontal instead of portrait-stretched. */
  .home .category-showcase .category-mosaic,
  body.home .category-showcase .category-mosaic {
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    overflow-y: hidden !important;
    align-items: stretch;
  }

  .home .category-showcase .category-mosaic .category-tile,
  .home .category-showcase .category-mosaic .category-tile.cat-wide,
  .home .category-showcase .category-mosaic .category-tile:first-child,
  .home .category-showcase .category-mosaic .category-tile:last-child,
  body.home .category-showcase .category-mosaic .category-tile,
  body.home .category-showcase .category-mosaic .category-tile.cat-wide,
  body.home .category-showcase .category-mosaic .category-tile:first-child,
  body.home .category-showcase .category-mosaic .category-tile:last-child {
    flex: 0 0 calc((100vw - 48px) / 2) !important;
    width: calc((100vw - 48px) / 2) !important;
    min-width: calc((100vw - 48px) / 2) !important;
    min-height: 0 !important;
    height: auto !important;
    aspect-ratio: 1.18 / 1 !important;
  }

  .home .category-showcase .category-tile > img,
  .home .category-showcase .category-tile:first-child > img,
  .home .category-showcase .category-tile:last-child > img,
  body.home .category-showcase .category-tile > img,
  body.home .category-showcase .category-tile:first-child > img,
  body.home .category-showcase .category-tile:last-child > img {
    height: 62% !important;
    bottom: 0 !important;
  }
}

@media (max-width: 390px) {
  .home .category-showcase .category-mosaic .category-tile,
  .home .category-showcase .category-mosaic .category-tile.cat-wide,
  .home .category-showcase .category-mosaic .category-tile:first-child,
  .home .category-showcase .category-mosaic .category-tile:last-child,
  body.home .category-showcase .category-mosaic .category-tile,
  body.home .category-showcase .category-mosaic .category-tile.cat-wide,
  body.home .category-showcase .category-mosaic .category-tile:first-child,
  body.home .category-showcase .category-mosaic .category-tile:last-child {
    flex-basis: calc((100vw - 46px) / 2) !important;
    width: calc((100vw - 46px) / 2) !important;
    min-width: calc((100vw - 46px) / 2) !important;
    aspect-ratio: 1.14 / 1 !important;
    padding: 12px !important;
  }

  .home .category-showcase .category-tile__copy h3,
  body.home .category-showcase .category-tile__copy h3 {
    font-size: 11.8px !important;
  }
}

/* Native WooCommerce category description, intentionally only at the bottom of product categories. */
.tax-product_cat .category-term-description {
  padding: 52px 0 18px;
  border-top: 1px solid var(--line, #e3e7e3);
}
.tax-product_cat .category-term-description__inner {
  max-width: 920px;
  margin-inline: auto;
}
.tax-product_cat .category-term-description__content {
  color: var(--mut, #626b65);
  font-size: 14px;
  line-height: 2;
}
.tax-product_cat .category-term-description__content > :first-child { margin-top: 0; }
.tax-product_cat .category-term-description__content > :last-child { margin-bottom: 0; }

@media (max-width: 700px) {
  .tax-product_cat .category-term-description { padding: 38px 0 10px; }
  .tax-product_cat .category-term-description__content { font-size: 13px; line-height: 1.95; }
}
