/* m-home.css — DKY-style mobile layout, Impulse brand. Loaded after impulse-design-system.css.
   Homepage only. Phone-first; the 769px+ block at the end keeps desktop sane.
   Product cards (.product-card*) are styled in m-card.css — only their wrappers are sized here. */

.home-main { padding: 0; }

/* ---------- Shared section chrome ---------- */
.mh-sec {
  padding: 0 16px;
  margin-top: 32px;
}
.mh-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.mh-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--brandInk);
}
.mh-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--brandLine);
  border-radius: 999px;
  background: #fff;
  color: var(--brandInk);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.mh-pill:hover,
.mh-pill:focus-visible { border-color: var(--brandNavy); color: var(--brandNavy); }

/* ---------- 1. Hero slideshow (edge to edge, scroll-snap) ---------- */
.mh-hero {
  position: relative;
  margin: 0;
  background: var(--brandNavy);
}
.mh-hero__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.mh-hero__track::-webkit-scrollbar { display: none; }
.mh-hero__track:focus-visible { outline: 2px solid var(--brandOrange); outline-offset: -2px; }
.mh-hero__slide {
  position: relative;
  flex: 0 0 100%;
  aspect-ratio: 4 / 5;
  max-height: 78svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: var(--productMat);
}
.mh-hero__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 3, 97, 0) 45%, rgba(4, 3, 97, 0.82) 100%);
  pointer-events: none;
}
.mh-hero__img,
.mh-hero__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}
.mh-hero__copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 0 20px 44px;
  color: #fff;
}
.mh-hero__eyebrow {
  display: inline-block;
  margin: 0 0 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brandOrange);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.mh-hero__sub,
.mh-hero__name {
  margin: 0 0 14px;
  max-width: 34ch;
  font-size: 15px;
  line-height: 1.4;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}
.mh-hero__sub {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mh-hero__name { font-size: 20px; font-weight: 800; line-height: 1.2; }
.mh-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--brandOrange);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(241, 90, 36, 0.35);
}
.mh-hero__cta:hover { color: #fff; filter: brightness(1.05); }
.mh-hero__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}
.mh-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.25s ease, background 0.25s ease;
  pointer-events: auto;
  cursor: pointer;
}
.mh-dot.is-active { width: 22px; background: #fff; }

/* ---------- 2. Category tiles ---------- */
.mh-tiles { margin-top: 20px; }
.mh-tiles__row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 16px 4px;
  scroll-padding: 0 16px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.mh-tiles__row::-webkit-scrollbar { display: none; }
.mh-tile {
  flex: 0 0 auto;
  width: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  scroll-snap-align: start;
  color: var(--brandInk);
  text-decoration: none;
}
.mh-tile__img {
  width: 88px;
  height: 88px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--productMat);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mh-tile__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}
.mh-tile__img--icon { color: var(--brandNavy); }
.mh-tile__fallback {
  font-size: 15px;
  font-weight: 800;
  color: var(--brandNavy);
}
.mh-tile__label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}
.mh-tile:hover .mh-tile__label,
.mh-tile:focus-visible .mh-tile__label { color: var(--brandNavy); }

/* ---------- 3. Trending rail ---------- */
.mh-trending { padding: 0; }
.mh-trending .mh-head { padding: 0 16px; }
.mh-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 16px 4px;
  scroll-padding: 0 16px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.mh-rail::-webkit-scrollbar { display: none; }
.mh-rail__item {
  flex: 0 0 74%;
  min-width: 0;
  scroll-snap-align: start;
}
.mh-rail-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}
.mh-rail-dots .mh-dot { background: var(--brandLine); }
.mh-rail-dots .mh-dot.is-active { background: var(--brandNavy); }

/* ---------- 4. Shop by size ---------- */
.home-sizes.mh-sec { padding: 0 16px; }
.mh-sizes__row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 0 16px 2px;
}
.mh-sizes__row::-webkit-scrollbar { display: none; }
.mh-size {
  flex: 0 0 auto;
  min-width: 56px;
  height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brandLine);
  border-radius: 999px;
  background: #fff;
  color: var(--brandInk);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.mh-size:hover,
.mh-size:focus-visible { border-color: var(--brandNavy); background: var(--brandNavy); color: #fff; }

/* ---------- Compact promo strip ---------- */
.mh-promo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin: 28px 16px 0;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--brandSurface);
  border: 1px dashed var(--brandOrange);
  color: var(--brandInk);
  text-decoration: none;
}
.mh-promo__code {
  flex: none;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--brandNavy);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.mh-promo__text {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.3;
  color: var(--brandInk);
}
.mh-promo__arrow { flex: none; color: var(--brandOrange); }

/* ---------- 5. New arrivals grid ---------- */
.mh-grid.product-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 10px;
}

/* ---------- 6. Shop by collection ---------- */
.mh-colls__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.mh-coll {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background: var(--brandNavy);
  text-decoration: none;
}
.mh-coll img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  transition: transform 0.4s ease;
}
.mh-coll::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 3, 97, 0) 50%, rgba(4, 3, 97, 0.85) 100%);
}
.mh-coll__name {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 14px;
  z-index: 1;
  text-align: center;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}
.mh-coll:hover img { transform: scale(1.03); }

/* ---------- 7. SEO / trust content, pushed below the shop ---------- */
.mh-colls + .home-trust,
.mh-colls + .index-section { margin-top: 36px; }

@media (max-width: 768px) {
  .home-main .index-section { padding-top: 32px; padding-bottom: 0; }
  .home-main .index-section h2,
  .home-main .home-section-head h2 { font-size: 22px; line-height: 1.2; font-weight: 800; }
  .home-main .home-section-head p,
  .home-main .sales-point p,
  .home-main .home-review p,
  .home-main .home-faq__item p { font-size: 14px; }
  .home-main .home-faq__item summary { min-height: 44px; }
  .home-main .home-capture { margin-top: 32px; }
}

/* ---------- Desktop ---------- */
@media (min-width: 769px) {
  .mh-sec,
  .mh-tiles,
  .mh-promo {
    max-width: var(--pageWidth);
    margin-left: auto;
    margin-right: auto;
  }
  .mh-sec { margin-top: 56px; padding: 0 24px; }
  .mh-head h2 { font-size: 28px; }

  .mh-hero--products .mh-hero__slide { flex-basis: 33.3333%; max-height: 640px; }
  .mh-hero:not(.mh-hero--products) .mh-hero__slide { aspect-ratio: 16 / 7; max-height: 640px; }
  .mh-hero--products .mh-hero__dots { display: none; }
  .mh-hero__copy { padding: 0 28px 48px; }

  .mh-tiles { margin-top: 32px; }
  .mh-tiles__row { justify-content: center; gap: 20px; padding: 0 24px 4px; }
  .mh-tile { width: 112px; }
  .mh-tile__img { width: 112px; height: 112px; }

  .mh-trending .mh-head { padding: 0; }
  .mh-trending { padding: 0 24px; }
  .mh-rail {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    overflow: visible;
    padding: 0;
  }
  .mh-rail-dots { display: none; }

  .mh-sizes__row { margin: 0; padding: 0; flex-wrap: wrap; }
  .mh-promo { margin-top: 40px; max-width: calc(var(--pageWidth) - 48px); }

  .mh-grid.product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .mh-colls__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .mh-coll__name { font-size: 18px; bottom: 20px; }
}
