/* =============================================================================
   Walmart × MomentScience demo
   Single centered column (mirrors walmart.com order-confirmation layout).
   - Desktop: max-width container, horizontal product rails
   - Mobile (≤720px): same content, padding shrinks, rails scroll-snap
   - Embed: Hulu-style horizontal card — icon left, headline+desc+CTAs right
   Palette sampled from screenshots:
     Blue       #0071ce  (header, primary CTAs, links)
     Blue deep  #041e42  (hero text)
     Yellow     #ffc220  (logo + accent)
     Green      #1a8917  (success check)
     Bg         #f7f7f7  (page)
     Bg card    #ffffff
     Border     #e6e6e6
   ============================================================================= */

:root {
  --wm-blue: #0071ce;
  --wm-blue-hover: #005ea6;
  --wm-blue-deep: #041e42;
  --wm-yellow: #ffc220;
  --wm-green: #1a8917;
  --wm-page: #f7f7f7;
  --wm-card: #ffffff;
  --wm-line: #e6e6e6;
  --wm-text: #1a1a1a;
  --wm-muted: #6b6b6b;
  --wm-bg-tint: #f2f8fd;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-pill: 999px;

  --container: 1100px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  color: var(--wm-text);
  background: var(--wm-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font-family: inherit;
  cursor: pointer;
}

a {
  color: var(--wm-blue);
}

img {
  max-width: 100%;
  display: block;
}

/* =============================================================================
   HEADER — Walmart blue bar
   ============================================================================= */

.wm-header {
  background: var(--wm-blue);
  color: #fff;
}

.wm-header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.wm-spark {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wm-spark img {
  width: 36px;
  height: 36px;
}

.wm-search {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: var(--radius-pill);
  padding: 4px 4px 4px 18px;
  min-width: 0;
}
.wm-search-input {
  flex: 1 1 auto;
  border: 0;
  outline: 0;
  height: 36px;
  font-size: 14px;
  color: var(--wm-text);
  background: transparent;
  min-width: 0;
}
.wm-search-input::placeholder {
  color: #6b6b6b;
}
.wm-search-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--wm-yellow);
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wm-search-btn svg {
  width: 18px;
  height: 18px;
}

.wm-header-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wm-pill {
  background: transparent;
  border: 0;
  color: #fff;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 4px 10px;
  line-height: 1.1;
}
.wm-pill-label {
  font-size: 12px;
  font-weight: 700;
}
.wm-pill-sub {
  font-size: 11px;
  opacity: 0.85;
}

.wm-cart {
  position: relative;
  background: transparent;
  border: 0;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
}
.wm-cart svg {
  width: 22px;
  height: 22px;
}
.wm-cart-amount {
  font-size: 12px;
  font-weight: 700;
}
.wm-cart-badge {
  position: absolute;
  top: -4px;
  left: 14px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--wm-yellow);
  color: var(--wm-blue-deep);
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Subnav */
.wm-subnav {
  background: #f0f6fc;
  border-bottom: 1px solid var(--wm-line);
  font-size: 12px;
  color: var(--wm-blue-deep);
}
.wm-subnav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.wm-dept {
  font-weight: 600;
}
.wm-crumb {
  color: var(--wm-muted);
}
.wm-promo-strip {
  margin-left: auto;
}
.wm-promo-pill {
  background: var(--wm-yellow);
  color: var(--wm-blue-deep);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 11px;
}

/* =============================================================================
   MAIN
   ============================================================================= */

.wm-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Hero */
.wm-hero {
  text-align: center;
  padding: 8px 0 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.wm-hero-logo {
  width: 140px;
  height: auto;
}
.wm-hero-ack {
  margin: 0;
  font-size: 13px;
  color: var(--wm-muted);
}
.wm-hero-check {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wm-hero-check svg {
  width: 36px;
  height: 36px;
}
.wm-hero-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.18;
  font-weight: 800;
  color: var(--wm-blue-deep);
  max-width: 720px;
}
.wm-hero-amount {
  color: var(--wm-blue);
}
.wm-hero-w-plus {
  color: var(--wm-blue);
  font-weight: 800;
}

/* Cards */
.wm-card {
  background: var(--wm-card);
  border: 1px solid var(--wm-line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

/* Email card */
.wm-email-card {
  display: flex;
  align-items: center;
  gap: 14px;
}
.wm-email-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--wm-bg-tint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wm-email-icon svg {
  width: 22px;
  height: 22px;
}
.wm-email-body {
  flex: 1 1 auto;
  min-width: 0;
}
.wm-email-eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--wm-blue);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.wm-email-line {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--wm-text);
  line-height: 1.4;
}
.wm-link-btn {
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid var(--wm-blue);
  color: var(--wm-blue);
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 13px;
}
.wm-link-btn:hover {
  background: var(--wm-bg-tint);
}

/* =============================================================================
   Walmart+ Mother's Day banner
   - Blue card with rounded corners
   - Left: eyebrow + headline + white pill CTA + fineprint
   - Right: yellow circle behind a blue Walmart+ tote bag with emoji items
            + a small pink gift box + carousel-style arrows
   ============================================================================= */
.wm-wplus-banner {
  position: relative;
  /* Matches the blue in assets/wplus-banner-art.png so the image edge
     blends seamlessly into the card's left half. */
  background: #0153e3;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 200px;
  color: #fff;
}
.wm-wplus-banner-text {
  flex: 1 1 auto;
  min-width: 0;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  position: relative;
  z-index: 2;
}
.wm-wplus-eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.01em;
}
.wm-wplus-headline {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  max-width: 380px;
}
.wm-wplus-pill {
  margin-top: 12px;
  background: #fff;
  color: var(--wm-blue-deep);
  border: 0;
  border-radius: var(--radius-pill);
  padding: 12px 26px;
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.wm-wplus-pill:hover {
  background: rgba(255, 255, 255, 0.92);
}
.wm-wplus-pill-plus {
  color: var(--wm-yellow);
  font-weight: 900;
  margin-left: 1px;
}
.wm-wplus-fineprint {
  margin: 4px 0 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
}

.wm-wplus-banner-art {
  flex: 0 0 380px;
  position: relative;
  align-self: stretch;
  min-height: 200px;
}
.wm-wplus-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}

/* Embed eyebrow + footer (sit just above + below the embed itself) */
.wm-embed-eyebrow {
  margin: 6px 0 -6px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--wm-blue-deep);
}
.wm-embed-footer {
  margin: -8px 0 0;
  text-align: center;
  font-size: 10px;
  color: rgba(28, 29, 29, 0.4);
  letter-spacing: 0.04em;
}

/* =============================================================================
   PRODUCT STRIPS
   ============================================================================= */

.wm-strip {
  background: var(--wm-card);
  border: 1px solid var(--wm-line);
  border-radius: var(--radius-md);
  padding: 18px 18px 22px;
}

.wm-strip-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 800;
  color: var(--wm-text);
}

.wm-strip-rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
  margin-right: -4px;
  scrollbar-width: thin;
}
.wm-strip-rail::-webkit-scrollbar {
  height: 6px;
}
.wm-strip-rail::-webkit-scrollbar-thumb {
  background: var(--wm-line);
  border-radius: 4px;
}

.wm-prod {
  flex: 0 0 180px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.wm-prod-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  background: #f2f2f2;
  position: relative;
  overflow: hidden;
}
.wm-prod-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wm-prod-flag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #cc0000;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 2px;
  letter-spacing: 0.04em;
}
.wm-prod-price {
  margin: 8px 0 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--wm-text);
}
.wm-prod-name {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--wm-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wm-prod-stars {
  margin: 0;
  font-size: 11px;
  color: var(--wm-yellow);
}
.wm-prod-stars span {
  color: var(--wm-muted);
  margin-left: 4px;
}
.wm-prod-add {
  margin-top: 6px;
  background: transparent;
  border: 1px solid var(--wm-blue);
  color: var(--wm-blue);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-weight: 700;
  font-size: 13px;
  align-self: flex-start;
}
.wm-prod-add:hover {
  background: var(--wm-bg-tint);
}

/* Continue Shopping */
.wm-continue-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
}
.wm-continue {
  background: var(--wm-blue);
  color: #fff;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 14px 36px;
  font-weight: 700;
  font-size: 15px;
  min-width: 280px;
}
.wm-continue:hover {
  background: var(--wm-blue-hover);
}

/* Footer */
.wm-footer {
  text-align: center;
  padding: 24px 20px;
  font-size: 12px;
  color: var(--wm-muted);
  border-top: 1px solid var(--wm-line);
  background: #fff;
}

/* =============================================================================
   MOMENTSCIENCE EMBED — Hulu-style horizontal card.
   Layout: icon block (left, square light bg) + content column (right).
   Right column stacks: headline → description → CTAs row → dots + powered.
   Same layout on desktop and mobile (icon shrinks, text wraps).
   ============================================================================= */

.ms-embed {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 100%;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid var(--wm-line);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(28, 29, 29, 0.06);
  overflow: hidden;
  text-align: left;
  position: relative;
  font-family: inherit;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.4s ease,
    transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}
.ms-embed.active {
  opacity: 1;
  transform: translateY(0);
}

.ms-embed .ms-icon {
  flex: 0 0 160px;
  background: var(--wm-bg-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.ms-embed .ms-icon img {
  max-width: 100%;
  max-height: 110px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.ms-embed .ms-body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ms-embed h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--wm-blue-deep);
  margin: 0;
  line-height: 1.25;
}

.ms-embed .ms-desc {
  font-size: 14px;
  color: var(--wm-muted);
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ms-embed .ms-ctas {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.ms-embed .ms-cta-yes {
  background: var(--wm-blue);
  border: 0;
  color: #ffffff;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  letter-spacing: 0.01em;
  transition: background 0.15s ease;
}
.ms-embed .ms-cta-yes:hover {
  background: var(--wm-blue-hover);
}

.ms-embed .ms-cta-no {
  background: transparent;
  border: 0;
  color: var(--wm-muted);
  padding: 11px 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
}
.ms-embed .ms-cta-no:hover {
  color: var(--wm-text);
}

.ms-embed .ms-dots {
  display: flex;
  gap: 5px;
  margin-top: 8px;
}
.ms-embed .ms-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(28, 29, 29, 0.18);
}
.ms-embed .ms-dots span.active {
  background: var(--wm-blue);
}

/* =============================================================================
   MULTI-CARD MODE — desktop ≥720px renders all 3 offers as side-by-side cards
   filling the row width. Each card is a vertical stack: icon block on top,
   content (headline + desc + CTAs) below.
   ============================================================================= */

.ms-embed.ms-embed-multi {
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  gap: 14px;
  align-items: stretch;
}
.ms-embed.ms-embed-multi .ms-card {
  flex: 1 1 0;
  min-width: 0;
  background: #ffffff;
  border: 1px solid var(--wm-line);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(28, 29, 29, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ms-embed.ms-embed-multi .ms-icon {
  flex: 0 0 auto;
  width: 100%;
  height: 140px;
  padding: 16px;
}
.ms-embed.ms-embed-multi .ms-icon img {
  max-height: 100px;
}
.ms-embed.ms-embed-multi .ms-body {
  flex: 1 1 auto;
  padding: 18px 20px 20px;
}
.ms-embed.ms-embed-multi .ms-ctas {
  margin-top: auto;
  padding-top: 12px;
}
.ms-embed.ms-embed-multi .ms-cta-yes {
  padding: 10px 16px;
  font-size: 13px;
}

/* =============================================================================
   RESPONSIVE — mobile (≤720px)
   ============================================================================= */
@media (max-width: 720px) {
  .wm-header-inner {
    padding: 10px 12px;
    gap: 10px;
  }
  .wm-spark {
    width: 30px;
    height: 30px;
  }
  .wm-spark img {
    width: 28px;
    height: 28px;
  }
  .wm-search-input {
    font-size: 13px;
    height: 32px;
  }
  .wm-search-btn {
    width: 32px;
    height: 32px;
  }
  .wm-pill {
    display: none;
  }
  .wm-cart-amount {
    display: none;
  }

  .wm-subnav-inner {
    padding: 8px 14px;
    gap: 12px;
    overflow-x: auto;
    white-space: nowrap;
  }
  .wm-promo-strip {
    margin-left: 8px;
  }

  .wm-main {
    padding: 18px 14px 32px;
    gap: 16px;
  }

  .wm-hero-logo {
    width: 110px;
  }
  .wm-hero-title {
    font-size: 22px;
  }

  .wm-card,
  .wm-strip {
    padding: 14px 14px;
  }

  .wm-email-card {
    flex-wrap: wrap;
  }
  .wm-email-card .wm-link-btn {
    margin-left: auto;
  }

  /* W+ banner: shrink the art column, scale text down */
  .wm-wplus-banner {
    min-height: 170px;
  }
  .wm-wplus-banner-text {
    padding: 22px 20px;
  }
  .wm-wplus-headline {
    font-size: 22px;
    max-width: none;
  }
  .wm-wplus-banner-art {
    flex-basis: 200px;
  }

  .wm-prod {
    flex: 0 0 150px;
  }
  .wm-prod-name {
    font-size: 12px;
  }

  .wm-continue {
    width: 100%;
    min-width: 0;
  }

  /* Embed: keep horizontal layout but tighten icon column */
  .ms-embed .ms-icon {
    flex: 0 0 110px;
    padding: 12px;
  }
  .ms-embed .ms-icon img {
    max-height: 80px;
  }
  .ms-embed .ms-body {
    padding: 14px 16px;
  }
  .ms-embed h3 {
    font-size: 15px;
  }
  .ms-embed .ms-desc {
    font-size: 13px;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
  .ms-embed .ms-cta-yes {
    padding: 10px 16px;
    font-size: 13px;
  }
}

/* Very small phones — narrow the art column and shift the image so just the
   pink gift box (left portion of the source) stays visible. */
@media (max-width: 480px) {
  .wm-wplus-banner-art {
    flex-basis: 110px;
  }
  .wm-wplus-banner-img {
    object-position: 24% center;
  }
  .wm-wplus-banner-text {
    padding: 20px 16px 22px;
  }
  .wm-wplus-headline {
    font-size: 19px;
  }
  .wm-wplus-banner {
    min-height: 160px;
  }
}
