/*
 * MessageCard Boutique v3.6.1 — mobile alignment and header fit
 * CSS-only patch. No changes to Zen Cart's forms, PHP or checkout.
 * Insert after existing v3.6 stylesheets.
 */
@media (max-width: 630px) {
  /* Header: fit the brand, cart and menu within small devices (320px+). */
  body.tpl_messagecard .mc-v2-header .mc-header-inner {
    width: 100%;
    min-width: 0;
    padding-inline: clamp(10px, 3.8vw, 18px);
    gap: 8px;
  }
  body.tpl_messagecard .mc-v2-header .mc-brand {
    min-width: 0;
    flex: 0 1 auto;
    gap: 5px;
  }
  body.tpl_messagecard .mc-v2-header .mc-brand-name {
    font-size: clamp(12px, 3.95vw, 16px);
    letter-spacing: 0;
  }
  body.tpl_messagecard .mc-v2-header .mc-brand-sprig {
    font-size: clamp(23px, 7.5vw, 30px);
    flex: 0 0 auto;
  }
  body.tpl_messagecard .mc-v2-header .mc-header-actions {
    margin-left: auto;
    flex: 0 0 auto;
  }
  body.tpl_messagecard .mc-v2-header .mc-mobile-menu {
    flex: 0 0 38px;
    max-width: 38px;
  }

  /* Home hero: align against the viewport, not intrinsic flex-item width. */
  body.tpl_messagecard:has(.mc-home.mc-v2) .mc-v2-hero-inner {
    width: 100%;
    max-width: 100%;
    padding-inline: 0;
  }
  body.tpl_messagecard:has(.mc-home.mc-v2) .mc-v2-hero-copy {
    align-self: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 48px clamp(18px, 5vw, 26px) 37px;
    text-align: center;
  }
  body.tpl_messagecard:has(.mc-home.mc-v2) .mc-v2-hero-copy h1 {
    text-align: center;
    font-size: clamp(21px, 6.6vw, 31px);
    letter-spacing: .02em;
    line-height: 1.65;
    overflow-wrap: anywhere;
  }
  body.tpl_messagecard:has(.mc-home.mc-v2) .mc-v2-hero-copy .mc-v2-lead {
    width: fit-content;
    max-width: 100%;
    text-align: left;
    margin: 0 auto 27px !important;
  }
  body.tpl_messagecard:has(.mc-home.mc-v2) .mc-v2-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 360px;
    gap: 10px;
    margin: 0 auto 24px;
  }
  body.tpl_messagecard:has(.mc-home.mc-v2) .mc-v2-buttons .mc-v2-btn {
    min-width: 0;
    padding: 11px 8px;
    gap: 7px;
    font-size: clamp(10px, 3vw, 12px);
    white-space: nowrap;
  }
  body.tpl_messagecard:has(.mc-home.mc-v2) .mc-v2-benefits {
    justify-content: center;
    text-align: center;
    column-gap: 10px;
    row-gap: 6px;
  }
}
