/*
 * Home page on phones and small tablets (<= 900px).
 * The painted desktop hero can't shrink to phone size (its text and search bar would be
 * unreadable), so below 900px it is replaced by a real mobile header + hero.
 * Nothing in this file applies above 900px: the desktop design is unchanged.
 */
.m-header,
.m-hero,
.m-features { display: none; }

@media (max-width: 900px) {
  /* The desktop body is a centred grid (place-items: start center); in block layout that
     centring would still shrink-wrap the sections, so reset it on small screens. */
  body { display: block; place-items: normal; overflow-x: hidden; }
  .catalog, .site-footer { width: auto; }
  .site-shell { display: none !important; }
  .mobile-note { display: none !important; }

  /* ---------- Header ---------- */
  .m-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: block;
    padding: 10px 16px 10px;
    background: rgba(3, 16, 51, .96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 6px 20px rgba(3, 16, 51, .25);
  }
  .m-header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .m-brand { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: #fff; font-size: 18px; font-weight: 800; letter-spacing: -.01em; text-decoration: none; }
  .m-brand small { font-size: .82em; font-weight: 700; opacity: .85; }
  .m-brand .brand-mark { flex: 0 0 auto; }
  /* Cart / messages / account controls: see mobile.css (shared with the site header). */

  /* Search */
  .m-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 0 6px 0 14px;
    border-radius: 999px;
    background: #fff;
  }
  .m-search > .icon { flex: 0 0 auto; width: 18px; height: 18px; color: #6b7590; }
  .m-search input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: transparent; color: #06194c; font: 500 15px Inter, system-ui, sans-serif; }
  .m-search button { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: linear-gradient(135deg, #0a5dff, #0091ff); color: #fff; }
  .m-search button .icon { width: 16px; height: 16px; }

  .m-categories { display: flex; gap: 8px; margin: 10px -16px 0; padding: 0 16px 2px; overflow-x: auto; scrollbar-width: none; }
  .m-categories::-webkit-scrollbar { display: none; }
  .m-categories a { flex: 0 0 auto; padding: 7px 12px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; color: #dbe6ff; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }

  /* ---------- Hero ---------- */
  .m-hero {
    position: relative;
    display: block;
    overflow: hidden;
    padding: 34px 20px 30px;
    color: #fff;
    /* The people side of the desktop artwork; the painted header bar and text stay out of frame. */
    background:
      linear-gradient(180deg, rgba(3, 16, 51, .45) 0%, rgba(3, 16, 51, .78) 55%, rgba(3, 16, 51, .95) 100%),
      url("../img/canada-now-master.png") 88% 42% / auto 165% no-repeat,
      #06194c;
  }
  .m-hero-body { position: relative; max-width: 560px; }
  .m-hero-eyebrow { margin: 0 0 10px; color: #dbe6ff; font-size: 12px; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; }
  .m-hero h1 { margin: 0; font-size: clamp(30px, 8.6vw, 46px); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
  .m-hero h1 span { display: block; margin-top: 4px; background: linear-gradient(90deg, #2f8bff, #22d0ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .m-hero-lead { margin: 16px 0 0; color: #e3ebff; font-size: 15px; line-height: 1.6; }
  .m-hero-secure { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0; color: #7cc4ff; font-size: 14px; font-weight: 600; }
  .m-hero-secure .icon { width: 18px; height: 18px; }
  .m-hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
  .m-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    font: 600 15px/1 Inter, system-ui, sans-serif;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
  }
  .m-btn .icon { width: 18px; height: 18px; }
  .m-btn-primary { background: linear-gradient(90deg, #0a5dff, #0091ff); color: #fff; box-shadow: 0 8px 22px rgba(0, 90, 255, .45); }
  .m-btn-glass { border: 1px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .14); color: #fff; backdrop-filter: blur(8px); }
  .m-btn-company { width: 100%; margin-top: 10px; background: #fff; color: #0a3fd6; font-weight: 600; }

  /* ---------- Feature cards ---------- */
  .m-features { display: flex; gap: 10px; padding: 14px 16px 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: #f4f8ff; }
  .m-features::-webkit-scrollbar { display: none; }
  .m-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    padding: 12px 14px;
    border: 1px solid #e1e8f5;
    border-radius: 14px;
    background: #fff;
    color: #06194c;
    text-align: left;
    scroll-snap-align: start;
    box-shadow: 0 4px 14px rgba(6, 25, 76, .06);
  }
  .m-feature-icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, #0a5dff, #00a3ff); color: #fff; }
  .m-feature-icon .icon { width: 20px; height: 20px; }
  .m-feature strong { display: block; font-size: 14px; font-weight: 700; white-space: nowrap; }
  .m-feature small { display: block; color: #6b7590; font-size: 12px; white-space: nowrap; }
}

@media (max-width: 430px) {
  .m-hero-actions { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .m-brand { font-size: 16px; }
  .m-brand small { display: none; }
}
