/* Grocery sponsor ads (public/sponsor-ads.js). Locked colors: tag #5F5A54 on
   #EFE9DD, tile sage #D7E6D4 with a produce #1F7A4D sparkle. Ads never use
   tomato. Outfit scale. */

.aisle-ad-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.aisle-ad-tile {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #D7E6D4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* A sponsor's logo (design's image spec, section 1): on white with a 1px
   hairline, 12% padding all round, letterboxed, never cropped or stretched. */
.aisle-ad-tile.has-logo {
  position: relative;
  overflow: hidden;
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px #E6DED0;
}
.aisle-ad-tile-logo {
  position: absolute;
  top: 12%;
  left: 12%;
  width: 76%;
  height: 76%;
  object-fit: contain;
  pointer-events: none;
}

/* The tag: 11/600, uppercase, +0.5 tracking, 18pt tall, 6pt sides, 4pt corners. */
.aisle-ad-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  background: #EFE9DD;
  color: #5F5A54;
  font-family: Outfit, "Pretendard", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

/* The tag opens the hide sheet: a 44pt tap area around an 18pt tag. */
button.aisle-ad-tag-hit {
  position: relative;
  border: 0;
  margin: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button.aisle-ad-tag-hit::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(44px, 100%);
  height: 44px;
  transform: translate(-50%, -50%);
}

/* Matches row: styled like a match row (aisle-match-row), no Chat button. */
.match-card.aisle-match-row.aisle-ad-row {
  overflow: hidden;
  max-height: 160px;
  transition: max-height 240ms ease-out, opacity 240ms ease-out, margin 240ms ease-out, padding 240ms ease-out;
}
.match-card.aisle-match-row.aisle-ad-row.is-collapsing {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.aisle-ad-row-tile {
  margin-left: 18px;
}
.aisle-ad-row-main {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}
.aisle-ad-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.aisle-ad-row-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1C1917;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}
.aisle-ad-row-line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1C1917;
  font-size: 15px;
  line-height: 1.35;
}
.aisle-ad-row-sponsored {
  color: #5F5A54;
  font-size: 13px;
  line-height: 1.35;
}
.aisle-ad-more {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #5F5A54;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 12px;
}
.aisle-ad-more:focus-visible,
.aisle-ad-sheet-row:focus-visible,
.aisle-ad-sheet-cancel:focus-visible,
.aisle-ad-outline-btn:focus-visible,
.aisle-ad-why-back:focus-visible,
.aisle-ad-toast-undo:focus-visible {
  outline: 2px solid #1F7A4D;
  outline-offset: 2px;
}

/* Hide sheet: bottom sheet, cream panel, grabber, 16pt edges. */
.aisle-ad-sheet-layer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.aisle-ad-sheet-scrim {
  position: absolute;
  inset: 0;
  background: rgba(28, 25, 23, 0.35);
}
.aisle-ad-sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: #F7F1E6;
  border-radius: 16px 16px 0 0;
  font-family: Outfit, "Pretendard", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  color: #1C1917;
  animation: aisle-ad-sheet-up 240ms ease-out;
}
@keyframes aisle-ad-sheet-up {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.aisle-ad-sheet-grabber {
  display: block;
  width: 36px;
  height: 5px;
  margin: 0 auto 12px;
  border-radius: 3px;
  background: #D6CDBE;
}
.aisle-ad-sheet-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0 12px;
}
.aisle-ad-sheet-store {
  font-size: 17px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aisle-ad-sheet-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 8px 0;
  border: 0;
  border-top: 1px solid #E6DED0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.aisle-ad-sheet-row-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.aisle-ad-sheet-row-label {
  font-size: 17px;
  font-weight: 600;
}
.aisle-ad-sheet-row-sub {
  font-size: 13px;
  color: #5F5A54;
}
.aisle-ad-sheet-chevron {
  font-size: 22px;
  color: #5F5A54;
}
.aisle-ad-sheet-cancel,
.aisle-ad-outline-btn {
  display: block;
  width: 100%;
  height: 48px;
  margin-top: 12px;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.aisle-ad-sheet-cancel {
  border: 1px solid #D6CDBE;
  background: #F7F1E6;
  color: #1C1917;
}
.aisle-ad-outline-btn {
  border: 1.5px solid #1F7A4D;
  background: transparent;
  color: #1F7A4D;
}

/* Why Am I Seeing This?, pushed inside the sheet. */
.aisle-ad-why-back {
  width: 44px;
  height: 44px;
  margin-left: -12px;
  border: 0;
  background: transparent;
  color: #1C1917;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.aisle-ad-why-title {
  margin: 4px 0 8px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
}
.aisle-ad-why-body {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.45;
}
.aisle-ad-why-tier {
  color: #5F5A54;
}
.aisle-ad-why-link {
  color: #1F7A4D;
  font-weight: 600;
  text-decoration: none;
}

/* Undo toast, 4 seconds. */
.aisle-ad-toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 1150;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 448px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px 10px 16px;
  border-radius: 12px;
  background: #1C1917;
  color: #F7F1E6;
  font-family: Outfit, "Pretendard", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  font-size: 15px;
}
.aisle-ad-toast-text {
  flex: 1;
  min-width: 0;
}
.aisle-ad-toast-undo {
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #D7E6D4;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* Receipts card: a white card below the newest receipt (mock 2-receipts),
   48pt sage tile, name with Sponsored tag, deal line up to 2 lines, ⋯. */
.aisle-ad-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-sizing: border-box;
  margin: 0 0 10px;
  padding: 16px 4px 16px 16px;
  background: #FFFFFF;
  border: 1px solid rgba(28, 25, 23, 0.08);
  border-radius: 16px;
  font-family: Outfit, "Pretendard", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  color: #1C1917;
  overflow: hidden;
  /* Only for the hide collapse; tall enough for 3 chips stacked at 375pt. */
  max-height: 480px;
  transition: max-height 240ms ease-out, opacity 240ms ease-out, margin 240ms ease-out, padding 240ms ease-out;
}
.aisle-ad-card.is-collapsing {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.aisle-ad-card-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 2px;
}
.aisle-ad-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  min-width: 0;
}
/* The whole store name shows on Receipts; a long one pushes the tag to the
   next line. Only the Matches row truncates (design, Nov 12). */
.aisle-ad-card-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}
.aisle-ad-card-line {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.35;
}
.aisle-ad-card-more {
  margin-top: -10px;
}

/* Discover: a card in the swipe deck (mock 3-discover). 16:9 photo area,
   Sponsored tag 12pt in from the photo's top-left, × top-right, name, deal
   line, then the round skip button and "Swipe to keep browsing". No like
   button. */
.aisle-ad-discover {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  box-sizing: border-box;
  font-family: Outfit, "Pretendard", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  color: #1C1917;
  transition: opacity 240ms ease-out;
}
.screen.active.discover-deck > .aisle-ad-discover {
  flex: 0 0 auto;
  margin-top: 12px;
}
.aisle-ad-discover.is-collapsing {
  opacity: 0;
}
.aisle-ad-discover-card {
  position: relative;
  overflow: hidden;
  background: #FFFFFF;
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(28, 25, 23, 0.08);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.aisle-ad-discover-media {
  position: relative;
}
.aisle-ad-discover-photo {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: #D7E6D4;
  background-image: repeating-linear-gradient(135deg, #D7E6D4 0 22px, #E3EEE0 22px 44px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.aisle-ad-discover-sparkle {
  display: inline-flex;
}
/* A sponsor's Discover photo (section 2): cover-fit from the center. */
.aisle-ad-discover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
}
.aisle-ad-discover-tag {
  position: absolute;
  top: 12px;
  left: 12px;
}
.aisle-ad-discover-x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 22px;
  background: #F7F1E6;
  color: #1C1917;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
/* On a sponsor's real photo (design, #414): a hairline and soft shadow so the
   tag and close circle keep their edges on white or cream photos. Not on the
   sage art or the placeholder. */
.aisle-ad-discover-photo.has-photo ~ .aisle-ad-discover-tag .aisle-ad-tag,
.aisle-ad-discover-photo.has-photo ~ .aisle-ad-discover-x {
  box-shadow: 0 0 0 1px rgba(28, 25, 23, 0.12), 0 1px 4px rgba(28, 25, 23, 0.18);
}
.aisle-ad-discover-body {
  padding: 20px 20px 24px;
}
.aisle-ad-discover-name {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.aisle-ad-discover-line {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aisle-ad-discover-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 0 8px;
}
.aisle-ad-discover-skip {
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 32px;
  background: #FFFFFF;
  box-shadow: 0 4px 14px rgba(28, 25, 23, 0.1);
  color: #1C1917;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}
.aisle-ad-discover-hint {
  margin: 0;
  color: #5F5A54;
  font-size: 15px;
}
.aisle-ad-sr-btn {
  border: 0;
  padding: 0;
  background: transparent;
}
.aisle-ad-discover-x:focus-visible,
.aisle-ad-discover-skip:focus-visible,
.aisle-ad-sr-btn:focus {
  outline: 2px solid #1F7A4D;
  outline-offset: 2px;
}

/* Map: the sparkle pin (store pin A's teardrop in produce, LOCKED.md) and
   the ad sheet above the tab bar. Idle 34x35.5, selected 1.2x with a
   produce halo and an ink label pill with a muted Ad tag. Never tomato. */
.map-screen .aisle-ad-pin {
  position: absolute;
  display: block;
  width: 34px;
  height: 31.5px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  overflow: visible;
  transition: opacity 240ms ease;
}
.map-screen .aisle-ad-pin .aisle-ad-pin-art {
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 35.5px;
  display: block;
  pointer-events: none;
}
.map-screen .aisle-ad-pin.sel {
  width: 40.8px;
  height: 37.8px;
}
.map-screen .aisle-ad-pin.sel .aisle-ad-pin-art {
  width: 40.8px;
  height: 42.6px;
}
.map-screen .aisle-ad-pin.sel::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 42%;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  border-radius: 50%;
  background: rgba(31, 122, 77, 0.14);
  box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.22);
  pointer-events: none;
}
.map-screen .aisle-ad-pin::after {
  /* A 44pt tap area centered on the pin (::before is the halo). */
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}
.map-screen .aisle-ad-pin.is-collapsing {
  opacity: 0;
}
.map-screen .aisle-ad-pin-label {
  position: absolute;
  left: 50%;
  top: calc(100% + 4px);
  transform: translate(-50%, 0);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: Outfit, "Pretendard", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #1C1917;
  white-space: nowrap;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 2px #fff;
  /* Tappable: the label sits inside its pin's button, so a tap on
     "Ad · Albertsons" opens that sponsor's sheet (design, Nov 18). */
  pointer-events: auto;
}
.map-screen .aisle-ad-pin .aisle-ad-pin-tag {
  /* The tag spec as everywhere else: 11/600, uppercase, 18pt tall. */
  height: 18px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  text-shadow: none;
}
.map-screen .aisle-ad-pin .aisle-ad-pin-name {
  display: block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.map-screen .aisle-ad-pin.sel .aisle-ad-pin-label {
  top: calc(100% + 4.8px);
  background: #1C1917;
  color: #fff;
  text-shadow: none;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(28, 25, 23, 0.2);
}

.map-screen .aisle-ad-mapsheet {
  position: absolute;
  z-index: 45;
  left: 0;
  right: 0;
  bottom: calc(83px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  background: #fff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 28px rgba(28, 25, 23, 0.12);
  padding: 0 16px 20px;
  font-family: Outfit, "Pretendard", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  color: #1C1917;
  transition: opacity 240ms ease;
}
.map-screen .aisle-ad-mapsheet.is-collapsing {
  opacity: 0;
}
.map-screen .aisle-ad-mapsheet-grab {
  display: block;
  box-sizing: content-box;
  width: 36px;
  height: 4px;
  margin: 4px auto 8px;
  padding: 6px 40px;
  border: none;
  border-radius: 2px;
  background: #DDD6CB;
  background-clip: content-box;
  cursor: pointer;
}
.map-screen .aisle-ad-mapsheet-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.map-screen .aisle-ad-mapsheet-tile {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}
.map-screen .aisle-ad-mapsheet-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.map-screen .aisle-ad-mapsheet-name {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.map-screen .aisle-ad-mapsheet-more {
  margin: -6px -10px 0 0;
}
.map-screen .aisle-ad-mapsheet-line {
  margin-top: 14px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

/* Featured item chips: cream pills, 15 muted, wrap to a second row. */
.aisle-ad-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.aisle-ad-chip {
  max-width: 100%;
  padding: 5px 12px;
  border-radius: 10px;
  background: #F7F1E6;
  color: #5F5A54;
  font-size: 15px;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* "See this week's deals": outlined produce, 16/600 (locked CTA). */
.aisle-ad-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  box-sizing: border-box;
  border: 1.5px solid #1F7A4D;
  border-radius: 12px;
  background: transparent;
  color: #1F7A4D;
  font-family: Outfit, "Pretendard", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.aisle-ad-cta:focus-visible,
.aisle-ad-outline-btn:focus-visible {
  outline: 2px solid #1F7A4D;
  outline-offset: 2px;
}

/* Deals screen: pushed from the right inside the current tab, above the tab
   bar. Cream page, white cards, 16pt edges, 480pt column. */
.aisle-ad-deals {
  position: fixed;
  z-index: 1100;
  top: 0;
  bottom: calc(83px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  width: 100%;
  max-width: 480px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  background: #F7F1E6;
  font-family: Outfit, "Pretendard", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  color: #1C1917;
  animation: aisle-ad-deals-in 280ms ease-out;
}
@keyframes aisle-ad-deals-in {
  from { transform: translateX(-50%) translateX(100%); }
  to { transform: translateX(-50%); }
}
.aisle-ad-deals-nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: calc(env(safe-area-inset-top, 0px) + 4px) 8px 4px;
  min-height: 44px;
}
.aisle-ad-deals-back {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #1C1917;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 12px;
}
/* Back gets focus when the screen opens (VoiceOver). A tap shows no ring;
   the keyboard gets the green ring the other ad buttons use (QA, Nov 13). */
.aisle-ad-deals-back:focus:not(:focus-visible) {
  outline: none;
}
.aisle-ad-deals-back:focus-visible {
  outline: 2px solid #1F7A4D;
  outline-offset: 2px;
}
.aisle-ad-deals-title {
  flex: 1 1 auto;
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
}
.aisle-ad-deals-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 16px 24px;
}
.aisle-ad-deals-store {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  background: #FFFFFF;
}
.aisle-ad-deals-store-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.aisle-ad-deals-store-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.aisle-ad-deals-store-name {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.aisle-ad-deals-address,
.aisle-ad-deal-desc,
.aisle-ad-deals-state-body {
  font-size: 15px;
  color: #5F5A54;
}
.aisle-ad-deals-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
/* Visit Website (WEBSITE-SPEC.md): outlined secondary, full width, 48pt,
   12pt corners, dark text on white with a hairline; 16pt above the first
   deal. Never tomato. */
.aisle-ad-website {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  margin: 12px 0 4px;
  padding: 0 16px;
  border: 1px solid #E6DED0;
  border-radius: 12px;
  background: #FFFFFF;
  color: #1C1917;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.aisle-ad-website:focus:not(:focus-visible) {
  outline: none;
}
.aisle-ad-website:focus-visible {
  outline: 2px solid #1F7A4D;
  outline-offset: 2px;
}
.aisle-ad-website-icon {
  flex-shrink: 0;
}
.aisle-ad-deal {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  background: #FFFFFF;
}
.aisle-ad-deal .aisle-ad-deal-tile {
  width: 88px;
  height: 88px;
  border-radius: 12px;
}
/* A deal's photo (design's image spec, section 3): cover-fit, white behind,
   on the same 12pt corners as the sage tile (design, Nov 13). */
.aisle-ad-deal .aisle-ad-deal-tile.has-photo {
  position: relative;
  overflow: hidden;
  background: #FFFFFF;
}
.aisle-ad-tile-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
}
.aisle-ad-deal-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.aisle-ad-deal-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aisle-ad-deal-prices {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.aisle-ad-deal-price {
  font-size: 20px;
  font-weight: 700;
  color: #1C1917;
}
.aisle-ad-deal-was,
.aisle-ad-deal-fine,
.aisle-ad-deal-ends,
.aisle-ad-deals-foot {
  font-size: 13px;
  color: #5F5A54;
}
.aisle-ad-deal-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aisle-ad-deal-fine {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aisle-ad-deal-skeleton {
  /* The same height as a real deal card (88pt image plus 16pt padding). */
  height: 120px;
  box-sizing: border-box;
  background: #F7F1E6;
  box-shadow: inset 0 0 0 1px #EFE9DD;
}
.aisle-ad-deals-foot {
  margin: 16px 0 0;
  text-align: center;
}
.aisle-ad-deals-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 48px 16px;
  text-align: center;
}
.aisle-ad-deals-state-title {
  font-size: 20px;
  font-weight: 600;
}
.aisle-ad-deals-state-body {
  margin: 0;
}
.aisle-ad-deals-state .aisle-ad-outline-btn {
  min-height: 48px;
  min-width: 160px;
  margin-top: 8px;
  padding: 0 24px;
  border: 1.5px solid #1F7A4D;
  border-radius: 12px;
  background: transparent;
  color: #1F7A4D;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .aisle-ad-sheet { animation: none; }
  .match-card.aisle-match-row.aisle-ad-row { transition: opacity 200ms linear; }
  .aisle-ad-card { transition: opacity 200ms linear; }
  .aisle-ad-discover-card { transition: none !important; }
  .map-screen .aisle-ad-pin, .map-screen .aisle-ad-mapsheet { transition: opacity 200ms linear; }
  .aisle-ad-deals { animation: none; }
}

/* Sponsor pin labels step off store pins and each other (QA, Nov 12):
   right of the pin first, then left, below, above (design rule 3); hidden
   if every side is covered. sponsor-ads.js placeMapLabels picks the side. */
.map-screen .aisle-ad-pin-label.is-above {
  top: auto;
  bottom: calc(100% + 4px);
}
.map-screen .aisle-ad-pin-label.is-right {
  left: calc(100% + 4px);
  top: 50%;
  transform: translate(0, -50%);
}
.map-screen .aisle-ad-pin-label.is-left {
  left: auto;
  right: calc(100% + 4px);
  top: 50%;
  transform: translate(0, -50%);
}
.map-screen .aisle-ad-pin-label.is-off {
  visibility: hidden;
}
/* A store pin under a sponsor pin drops its name; the sponsor label already
   names the store (design, Nov 12). Store pins elsewhere keep theirs. */
.map-screen .gm-pin[data-aisle-ad-covered] .gm-plab {
  visibility: hidden;
}
.map-screen .aisle-ad-pin.sel .aisle-ad-pin-label.is-above {
  top: auto;
  bottom: calc(100% + 4.8px);
}
.map-screen .aisle-ad-pin.sel .aisle-ad-pin-label.is-right,
.map-screen .aisle-ad-pin.sel .aisle-ad-pin-label.is-left {
  top: 50%;
}

/* A sponsor pin taking over a store pin that was already showing fades in
   over 200ms while that pin fades out (design, Nov 13). */
@keyframes aisle-ad-pin-arrive {
  from { opacity: 0; }
  to { opacity: 1; }
}
.map-screen .aisle-ad-pin[data-arriving] {
  animation: aisle-ad-pin-arrive 200ms ease both;
}
@media (prefers-reduced-motion: reduce) {
  .map-screen .aisle-ad-pin[data-arriving] { animation: none; }
}

/* Tappable deal cards (design, Nov 13): the whole card is one button with a
   chevron on the right, and the description stays on one line. */
.aisle-ad-deal-btn {
  width: 100%;
  border: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.aisle-ad-deal-btn:active {
  background: #FBF8F2;
}
.aisle-ad-deal-btn:focus:not(:focus-visible) {
  outline: none;
}
.aisle-ad-deal-btn:focus-visible {
  outline: 2px solid #1F7A4D;
  outline-offset: 2px;
}
.aisle-ad-deal-btn .aisle-ad-deal-main {
  flex: 1 1 auto;
}
.aisle-ad-deal-btn .aisle-ad-deal-desc {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: unset;
}
.aisle-ad-deal-chevron {
  flex: 0 0 auto;
  align-self: center;
  display: inline-flex;
  color: #5F5A54;
}

/* The deal sheet: a bottom sheet over the deals screen with the X at the
   top right (44pt target), the large square photo, then the full text. */
.aisle-ad-dealsheet-layer {
  z-index: 1150;
}
.aisle-ad-dealsheet {
  display: flex;
  flex-direction: column;
  max-height: calc(100% - 48px - env(safe-area-inset-top, 0px));
  padding-left: 0;
  padding-right: 0;
}
.aisle-ad-dealsheet.is-dragging {
  transition: none;
}
.aisle-ad-dealsheet:not(.is-dragging) {
  transition: transform 200ms ease-out;
}
.aisle-ad-dealsheet-top {
  position: relative;
  flex: 0 0 auto;
  padding: 0 16px;
  touch-action: none;
  cursor: grab;
}
.aisle-ad-dealsheet-head {
  padding-right: 44px;
}
.aisle-ad-dealsheet-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: #1C1917;
  cursor: pointer;
}
.aisle-ad-dealsheet-close:focus:not(:focus-visible) {
  outline: none;
}
.aisle-ad-dealsheet-close:focus-visible {
  outline: 2px solid #1F7A4D;
  outline-offset: -2px;
}
.aisle-ad-dealsheet-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 16px;
}
.aisle-ad-dealsheet-photo {
  display: block;
  width: min(100%, 50vh);
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 0 auto 16px;
  border-radius: 12px;
}
.aisle-ad-tile.aisle-ad-dealsheet-photo {
  display: flex;
}
.aisle-ad-dealsheet-photo.has-photo {
  position: relative;
  overflow: hidden;
  background: #FFFFFF;
}
.aisle-ad-dealsheet-title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.aisle-ad-dealsheet-title:focus {
  outline: none;
}
.aisle-ad-dealsheet-prices {
  margin-bottom: 12px;
}
.aisle-ad-dealsheet-desc,
.aisle-ad-dealsheet-fine,
.aisle-ad-dealsheet-runs {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
.aisle-ad-dealsheet-desc {
  font-size: 15px;
  color: #5F5A54;
  line-height: 1.4;
}
.aisle-ad-dealsheet-fine,
.aisle-ad-dealsheet-runs {
  font-size: 13px;
  color: #5F5A54;
}
@keyframes aisle-ad-dealsheet-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .aisle-ad-dealsheet { animation: aisle-ad-dealsheet-fade 200ms linear; }
  .aisle-ad-dealsheet:not(.is-dragging) { transition: none; }
}
