/* Product sheet v2. Load after pdp-v1.css; retains its glass and 48px bar. */
#modal.pd2-dialog {
  --pd2-offer-fill: linear-gradient(135deg, #ed5c2b, #c63d20);
  --pd2-offer-shadow: inset 0 0 0 1px rgb(255 255 255 / 38%), 0 4px 12px rgb(198 61 32 / 18%);
}

/* One structure for every product; reserve the optional footer to prevent jumps. */
#modal.pd2-dialog .pd2-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  grid-template-rows: auto auto auto 48px 60px;
  column-gap: 10px;
  box-sizing: border-box;
  color: #233a30;
  backdrop-filter: blur(16px) saturate(135%);
}
#modal.pd2-dialog .pd2-card > :is(.pd2-brandrow, .pd2-title, .pd2-pack) {
  grid-column: 1 / -1;
  min-width: 0;
}
#modal.pd2-dialog .pd2-brandrow { grid-row: 1; }
#modal.pd2-dialog .pd2-title { grid-row: 2; }
#modal.pd2-dialog .pd2-pack { grid-row: 3; margin-bottom: 12px; }
#modal.pd2-dialog .pd2-priceblock {
  grid-area: 4 / 1;
  display: flex;
  flex-flow: row nowrap;
  align-items: baseline;
  align-self: center;
  gap: 6px;
  height: 32px;
  min-width: 0;
  white-space: nowrap;
}
#modal.pd2-dialog .pd2-now {
  flex: 0 0 auto;
  font-size: 26px !important;
  font-weight: 800 !important;
  line-height: 1.15;
  color: #1d5a37 !important;
  font-variant-numeric: tabular-nums;
}
#modal.pd2-dialog .pd2-was {
  flex: 0 0 auto;
  margin: 0 !important;
  font-size: 13px !important;
  line-height: 1;
  color: #7b8a7f !important;
}

/* Photo flag and inline pill share one warm offer treatment. */
#modal.pd2-dialog :is(.pd2-deal, .pd2-off) {
  box-sizing: border-box;
  background: var(--pd2-offer-fill) !important;
  color: #fff !important;
  font-weight: 800 !important;
  box-shadow: var(--pd2-offer-shadow) !important;
  animation: none !important;
  transform-origin: left center;
}
#modal.pd2-dialog .pd2-deal {
  gap: 5px !important;
  padding: 7px 10px !important;
  border-radius: 12px !important;
}
#modal.pd2-dialog .pd2-deal-pct {
  font-size: 16px !important;
  font-weight: 800;
  line-height: 1;
  text-shadow: none;
}
#modal.pd2-dialog .pd2-deal-txt {
  font-size: 10px !important;
  font-weight: 800;
  letter-spacing: .06em !important;
}
/* OFF moves into a fully clipped second line only when the pill must shrink.
   The real percentage and accessible offer label remain intact. */
#modal.pd2-dialog .pd2-off {
  display: inline-flex !important;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: baseline !important;
  align-content: flex-start;
  gap: 10px 4px !important;
  width: max-content;
  min-width: min-content;
  height: 26px;
  padding: 5px 7px !important;
  border: 0;
  border-radius: 9px !important;
  overflow: hidden;
  line-height: 16px;
}
#modal.pd2-dialog .pd2-off :is(b, i) {
  flex: none;
  font-weight: 800 !important;
  line-height: 16px !important;
  white-space: nowrap;
}
#modal.pd2-dialog .pd2-off b { font-size: 12px !important; }
#modal.pd2-dialog .pd2-off i {
  font-size: 9px !important;
  font-style: normal !important;
  letter-spacing: .03em !important;
}

/* In-flow ADD/quantity occupies the same cell with or without an offer. */
#modal.pd2-dialog .pd2-card-add {
  grid-area: 4 / 2;
  position: static !important;
  inset: auto !important;
  align-self: center;
  width: 104px;
  min-width: 0;
  z-index: auto;
}
#modal.pd2-dialog .pd2-card-add > :is(button, .qty, .sold-out) {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0 !important;
  height: 48px !important;
  min-height: 48px !important;
  border-radius: 14px !important;
  white-space: nowrap;
}
#modal.pd2-dialog .pd2-card-add > button { gap: 6px; padding: 0 10px !important; }
#modal.pd2-dialog .pd2-card-add .qty { justify-content: space-between; gap: 0; padding: 4px; }
#modal.pd2-dialog .pd2-card-add .qty button {
  flex: 0 0 34px;
  width: 34px !important;
  min-width: 34px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  box-shadow: none !important;
}
#modal.pd2-dialog .pd2-card-add .qty span { min-width: 20px; text-align: center; }
#modal.pd2-dialog .pd2-card-add button:focus-visible { outline: 3px solid #ed5c2b; outline-offset: 2px; }

/* Quiet mint footer: full card content width, one typographic baseline. */
#modal.pd2-dialog .pd2-save {
  grid-area: 5 / 1 / 6 / -1;
  box-sizing: border-box;
  display: flex;
  flex-flow: row nowrap;
  align-items: baseline;
  align-self: end;
  gap: 8px;
  width: 100%;
  min-width: 0;
  height: 48px;
  margin: 12px 0 0 !important;
  padding: 9px 12px !important;
  border-radius: 12px !important;
  border: 1px solid rgb(255 255 255 / 90%) !important;
  border-left: 3px solid #1d5a37 !important;
  background: linear-gradient(120deg, rgb(232 245 236 / 92%), rgb(246 243 233 / 62%)) !important;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 55%), 0 3px 10px rgb(29 90 55 / 4%) !important;
  backdrop-filter: blur(12px) saturate(130%);
  white-space: nowrap;
}
#modal.pd2-dialog .pd2-save > * { flex: 0 0 auto; }
#modal.pd2-dialog .pd2-save-kicker {
  font-size: 10px !important;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em !important;
  color: #1d5a37 !important;
}
#modal.pd2-dialog .pd2-save-amount {
  font-family: Georgia, Cambria, serif;
  font-size: 24px !important;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: #1d5a37 !important;
}
#modal.pd2-dialog .pd2-save-foot { font-size: 11.5px !important; }

#modal.pd2-dialog[open] .pd2-off { animation: pd2V2Offer 420ms cubic-bezier(.22, 1, .36, 1) 1 both !important; }
#modal.pd2-dialog[open] .pd2-save { animation: pd2V2Save 420ms ease-out 80ms 1 both; }
@keyframes pd2V2Offer {
  0% { transform: scale(.8); }
  65% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
@keyframes pd2V2Save {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  #modal.pd2-dialog[open] :is(.pd2-deal, .pd2-off, .pd2-save) {
    animation: none !important;
    transform: none !important;
    opacity: 1;
  }
}
