/* ============================================================
   Pétala Morena — carrinho de pedido pelo WhatsApp
   Mobile-first. Material 3 orienta estrutura, estados e tokens;
   a identidade visual do salão continua branca/preta com cobre.
   Verde fica reservado às ações que realmente abrem o WhatsApp.
   ============================================================ */

#pm-cart-root {
  --pm-cart-error: #8a1f11;
  --pm-cart-surface: var(--md-sys-color-surface, #fff);
  --pm-cart-on-surface: var(--md-sys-color-on-surface, #111);
  --pm-cart-on-surface-variant: var(--md-sys-color-on-surface-variant, #57504b);
  --pm-cart-outline: var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.13));
}

.pm-cart-is-open { overflow: hidden; }

.pm-cart-backdrop[hidden],
.pm-cart-drawer[hidden],
.pm-cart-count[hidden],
.pm-cart-view[hidden],
.pm-cart-list[hidden],
.pm-cart-summary[hidden],
.pm-cart-empty[hidden],
.pm-cart-snackbar[hidden] {
  display: none !important;
}

#pm-cart-root button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- acesso flutuante ao carrinho ----------
   Mesma geometria do botão flutuante de WhatsApp, menor ênfase visual.
   Em MD3 ele se comporta como um surface FAB / icon action secundário. */
.pm-cart-button {
  position: fixed;
  right: 24px;
  bottom: 112px;
  z-index: 40;
  width: 76px;
  height: 76px;
  min-width: 76px;
  min-height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--pm-cart-outline);
  border-radius: 50%;
  background: #242424;
  color: #ffdcc2;
  box-shadow: none;
  transition:
    transform var(--duration-normal, 200ms) var(--ease-standard, ease),
    background var(--duration-fast, 150ms) linear,
    border-color var(--duration-fast, 150ms) linear;
}

.pm-cart-button:hover {
  background: #303030;
  border-color: rgba(255, 220, 194, 0.42);
  box-shadow: none;
  transform: scale(1.04);
}

.pm-cart-button:active { transform: scale(0.97); }
.pm-cart-button.is-bumped { animation: pm-cart-bump 320ms var(--ease-emphasized, ease); }

@keyframes pm-cart-bump {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.09); }
}

.pm-cart-button svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pm-cart-button > span:not(.pm-cart-count) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.pm-cart-count {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border: 2px solid #242424;
  border-radius: var(--md-sys-shape-corner-full, 999px);
  background: var(--md-sys-color-primary, #8d4613);
  color: var(--md-sys-color-on-primary, #fff);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.pm-cart-added-notice {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 10080;
  min-height: 72px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto 40px;
  align-items: center;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto;
  padding: 10px 8px 10px 12px;
  border-radius: var(--md-sys-shape-corner-large-increased, 20px);
  background: var(--md-sys-color-inverse-surface, #302e2c);
  color: var(--md-sys-color-inverse-on-surface, #fff);
  box-shadow: var(--md-sys-elevation-level3, 0 8px 24px rgba(0, 0, 0, 0.24));
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition: opacity 200ms var(--md-sys-motion-easing-emphasized, ease), transform 250ms var(--md-sys-motion-easing-emphasized-decelerate, ease-out);
}

.pm-cart-added-notice[hidden] { display: none; }
.pm-cart-added-notice.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.pm-cart-added-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--md-sys-color-inverse-primary, #f4bd95); color: #4c2208; }
.pm-cart-added-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pm-cart-added-copy { min-width: 0; display: grid; gap: 2px; }
.pm-cart-added-copy strong { font-size: 13px; }
.pm-cart-added-copy > span { overflow: hidden; color: color-mix(in srgb, currentColor 76%, transparent); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.pm-cart-added-notice > button { min-height: 48px; border-radius: var(--md-sys-shape-corner-full, 999px); color: var(--md-sys-color-inverse-primary, #f4bd95); font-size: 12px; font-weight: 800; }
.pm-cart-added-open { padding: 0 12px; }
.pm-cart-added-close { width: 40px; min-width: 40px; font-size: 21px !important; color: var(--md-sys-color-inverse-on-surface, #fff) !important; }

/* ---------- quantity stepper compartilhado ---------- */
.pm-cart-qty {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--pm-cart-outline);
  border-radius: var(--md-sys-shape-corner-full, 999px);
  overflow: hidden;
  background: var(--pm-cart-surface);
}

.pm-cart-qty button {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--pm-cart-on-surface);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  transition:
    transform var(--duration-fast, 150ms) var(--ease-standard, ease),
    opacity var(--duration-fast, 150ms) linear,
    background var(--duration-fast, 150ms) linear;
}

.pm-cart-qty button:hover:not(:disabled) {
  background: color-mix(in srgb, var(--pm-cart-surface) 92%, var(--pm-cart-on-surface) 8%);
}

.pm-cart-qty button:active:not(:disabled) { transform: scale(0.92); }
.pm-cart-qty button:disabled { opacity: 0.38; cursor: default; }

.pm-cart-qty-value {
  min-width: 30px;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}

.pm-cart-review-button,
.pm-cart-checkout {
  min-height: 56px;
  border-radius: var(--md-sys-shape-corner-full, 999px);
  font-size: 14px;
  font-weight: 800;
  transition:
    transform var(--duration-fast, 150ms) var(--ease-standard, ease),
    background var(--duration-fast, 150ms) linear,
    opacity var(--duration-fast, 150ms) linear;
}

/* ---------- scrim ---------- */
.pm-cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10050;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.54);
  opacity: 0;
  transition: opacity var(--md-sys-motion-duration-short4, 200ms) var(--md-sys-motion-easing-emphasized, ease);
  cursor: default;
}

.pm-cart-backdrop.is-open { opacity: 1; }

/* ---------- modal bottom sheet mobile ---------- */
.pm-cart-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10060;
  width: 100%;
  height: min(92dvh, 820px);
  max-height: calc(100dvh - max(12px, env(safe-area-inset-top, 0px)));
  display: flex;
  flex-direction: column;
  background: var(--pm-cart-surface);
  color: var(--pm-cart-on-surface);
  border-top: 1px solid var(--pm-cart-outline);
  border-radius: var(--md-sys-shape-corner-extra-large, 28px) var(--md-sys-shape-corner-extra-large, 28px) 0 0;
  box-shadow: var(--md-sys-elevation-level2, 0 -8px 28px rgba(0, 0, 0, 0.18));
  overflow: hidden;
  opacity: 0;
  transform: translateY(100%);
  transition:
    transform var(--md-sys-motion-duration-short4, 200ms) var(--md-sys-motion-easing-emphasized-accelerate, ease-in),
    opacity var(--md-sys-motion-duration-short4, 200ms) var(--md-sys-motion-easing-emphasized, ease);
  will-change: transform, opacity;
}

.pm-cart-drawer.is-open {
  opacity: 1;
  transform: translateY(0);
  transition-duration: var(--md-sys-motion-duration-medium4, 400ms), var(--md-sys-motion-duration-short4, 200ms);
  transition-timing-function: var(--md-sys-motion-easing-emphasized-decelerate, ease-out), var(--md-sys-motion-easing-emphasized, ease);
}

.pm-cart-drawer.is-entering .pm-cart-header > *,
.pm-cart-drawer.is-entering .pm-cart-view:not([hidden]) > * {
  animation: pm-cart-content-enter var(--md-sys-motion-duration-medium1, 250ms)
    var(--md-sys-motion-easing-emphasized-decelerate, ease-out) both;
}

.pm-cart-drawer.is-entering .pm-cart-view:not([hidden]) > * { animation-delay: 60ms; }

@keyframes pm-cart-content-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.pm-cart-header {
  flex: 0 0 auto;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 18px 12px;
  border-bottom: 1px solid var(--pm-cart-outline);
  background: var(--pm-cart-surface);
}

.pm-cart-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--md-sys-color-primary, #8d4613);
  font-family: var(--font-label, sans-serif);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.pm-cart-header h2 {
  margin: 0;
  font-family: var(--font-display, Georgia, serif);
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.pm-cart-header-support {
  margin: 5px 0 0;
  color: var(--pm-cart-on-surface-variant);
  font-size: 12px;
  line-height: 1.35;
}

.pm-cart-close {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid var(--pm-cart-outline);
  border-radius: var(--md-sys-shape-corner-full, 999px);
  background: var(--pm-cart-surface);
  color: var(--pm-cart-on-surface);
  font-size: 25px;
  line-height: 1;
  transition:
    transform var(--duration-fast, 150ms) var(--ease-standard, ease),
    background var(--duration-fast, 150ms) linear;
}

.pm-cart-close:hover {
  background: color-mix(in srgb, var(--pm-cart-surface) 92%, var(--pm-cart-on-surface) 8%);
}

.pm-cart-close:active { transform: scale(0.94); }

.pm-cart-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--pm-cart-surface);
}

/* ---------- vazio ---------- */
.pm-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: auto 0;
  padding: 40px 24px;
  text-align: center;
}

.pm-cart-empty > svg {
  width: 42px;
  height: 42px;
  margin-bottom: 8px;
  fill: none;
  stroke: var(--md-sys-color-primary, #8d4613);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pm-cart-empty strong {
  font-family: var(--font-display, Georgia, serif);
  font-size: 24px;
  line-height: 1.15;
}

.pm-cart-empty span {
  max-width: 290px;
  color: var(--pm-cart-on-surface-variant);
  font-size: 14px;
  line-height: 1.5;
}

.pm-cart-secondary-action {
  min-height: 48px;
  margin-top: 16px;
  padding: 0 20px;
  border: 1px solid var(--pm-cart-outline);
  border-radius: var(--md-sys-shape-corner-full, 999px);
  color: var(--md-sys-color-primary, #8d4613);
  font-size: 13px;
  font-weight: 800;
}

.pm-cart-secondary-action:hover {
  background: color-mix(in srgb, var(--pm-cart-surface) 94%, var(--md-sys-color-primary, #8d4613) 6%);
}

/* ---------- itens ---------- */
.pm-cart-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 12px 16px;
  background: #f2f2f2;
}

.pm-cart-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 8px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--pm-cart-outline) 72%, transparent);
  border-radius: var(--md-sys-shape-corner-large-increased, 20px);
  background: var(--md-sys-color-surface-container-lowest, #fff);
  transition:
    background var(--md-sys-motion-duration-short3, 150ms) linear,
    transform var(--md-sys-motion-duration-short3, 150ms) var(--md-sys-motion-easing-emphasized, ease);
}

.pm-cart-item:focus-within {
  background: var(--md-sys-color-surface-container-low, #f7f4f1);
}

.pm-cart-item-media {
  width: 76px;
  height: 96px;
  display: block;
  overflow: hidden;
  border: 1px solid var(--pm-cart-outline);
  border-radius: var(--md-sys-shape-corner-medium, 12px);
  background: var(--pm-cart-surface);
}

.pm-cart-item-media.is-empty::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, transparent 49%, var(--pm-cart-outline) 50%, transparent 51%),
    var(--pm-cart-surface);
}

.pm-cart-item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pm-cart-item-body { min-width: 0; }

.pm-cart-item-name {
  display: block;
  margin: 0 0 4px;
  color: var(--pm-cart-on-surface);
  font-family: var(--font-ui, sans-serif);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
}

.pm-cart-item-name:hover { color: var(--md-sys-color-primary, #8d4613); }

.pm-cart-item-color,
.pm-cart-item-price,
.pm-cart-item-warning {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.pm-cart-item-color { color: var(--pm-cart-on-surface-variant); }
.pm-cart-item-price { margin-top: 4px; color: var(--pm-cart-on-surface); font-weight: 700; }
.pm-cart-item-warning { margin-top: 6px; color: var(--pm-cart-error); }

.pm-cart-item-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

.pm-cart-item-controls .pm-cart-qty {
  min-height: 48px;
  background: var(--pm-cart-surface);
}

.pm-cart-item-controls .pm-cart-qty button {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  font-size: 18px;
}

.pm-cart-item-controls .pm-cart-qty-value {
  min-width: 28px;
  font-size: 12px;
}

.pm-cart-remove {
  min-height: 48px;
  padding: 0 12px;
  border-radius: var(--md-sys-shape-corner-full, 999px);
  color: var(--pm-cart-error);
  font-size: 12px;
  font-weight: 800;
}

.pm-cart-remove:hover {
  background: color-mix(in srgb, var(--pm-cart-surface) 94%, var(--pm-cart-error) 6%);
}

/* ---------- resumo do carrinho ---------- */
.pm-cart-summary {
  flex: 0 0 auto;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--pm-cart-outline);
  background: var(--md-sys-color-surface-container-lowest, #fff);
  box-shadow: 0 -8px 28px rgba(77, 39, 14, 0.08);
}

.pm-cart-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.pm-cart-summary-count {
  color: var(--pm-cart-on-surface-variant);
  font-size: 12px;
  font-weight: 700;
}

.pm-cart-clear {
  min-height: 48px;
  padding: 0 10px;
  border-radius: var(--md-sys-shape-corner-full, 999px);
  color: var(--pm-cart-error);
  font-size: 12px;
  font-weight: 800;
}

.pm-cart-clear:hover {
  background: color-mix(in srgb, var(--pm-cart-surface) 94%, var(--pm-cart-error) 6%);
}

.pm-cart-total-row > div {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.pm-cart-total-row span {
  max-width: 210px;
  color: var(--pm-cart-on-surface-variant);
  font-size: 12px;
}

.pm-cart-total-row strong {
  font-family: var(--font-display, Georgia, serif);
  font-size: 25px;
  line-height: 1;
}

.pm-cart-review-button {
  width: 100%;
  padding: 0 18px;
  background: var(--md-sys-color-primary, #8d4613);
  color: var(--md-sys-color-on-primary, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pm-cart-review-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pm-cart-summary-assurance {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--md-sys-shape-corner-medium, 12px);
  background: var(--md-sys-color-surface-container-low, #f7f4f1);
  color: var(--pm-cart-on-surface-variant);
  font-size: 11px;
  line-height: 1.45;
}

.pm-cart-summary-assurance svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--md-sys-color-primary, #8d4613);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pm-cart-review-button:hover:not(:disabled) {
  background: color-mix(in srgb, var(--md-sys-color-primary, #8d4613) 90%, #000 10%);
}

.pm-cart-review-button:active:not(:disabled) { transform: scale(0.985); }
.pm-cart-review-button:disabled { opacity: 0.38; cursor: default; }

#pm-cart-inline-add:disabled {
  opacity: 0.6;
  cursor: wait;
}

.pm-cart-text-action {
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  border-radius: var(--md-sys-shape-corner-full, 999px);
  color: var(--md-sys-color-primary, #8d4613);
  font-size: 12px;
  font-weight: 800;
}

.pm-cart-text-action:hover {
  background: color-mix(in srgb, var(--pm-cart-surface) 94%, var(--md-sys-color-primary, #8d4613) 6%);
}

/* ---------- revisão ---------- */
.pm-cart-review { background: var(--pm-cart-surface); }

.pm-cart-review-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 12px 18px;
}

.pm-cart-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 2px 16px;
  padding: 0;
  list-style: none;
}

.pm-cart-progress::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 17%;
  right: 17%;
  height: 2px;
  background: var(--pm-cart-outline);
}

.pm-cart-progress li {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: var(--pm-cart-on-surface-variant);
  font-size: 10px;
}

.pm-cart-progress li > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 2px solid var(--pm-cart-outline);
  border-radius: 50%;
  background: var(--pm-cart-surface);
  font-weight: 800;
}

.pm-cart-progress .is-done > span,
.pm-cart-progress .is-current > span {
  border-color: var(--md-sys-color-primary, #8d4613);
  background: var(--md-sys-color-primary, #8d4613);
  color: var(--md-sys-color-on-primary, #fff);
}

.pm-cart-progress .is-current { color: var(--pm-cart-on-surface); }

.pm-cart-back-action {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 2px 8px;
  padding: 0 12px 0 8px;
  border-radius: var(--md-sys-shape-corner-full, 999px);
  color: var(--md-sys-color-primary, #8d4613);
  font-size: 12px;
  font-weight: 800;
}

.pm-cart-back-action:hover {
  background: color-mix(in srgb, var(--pm-cart-surface) 94%, var(--md-sys-color-primary, #8d4613) 6%);
}

.pm-cart-back-action svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pm-cart-review-card {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--pm-cart-outline);
  border-radius: var(--md-sys-shape-corner-large-increased, 20px);
  background: var(--md-sys-color-surface-container-lowest, #fff);
}

.pm-cart-review-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pm-cart-review-card-head h3 {
  margin: 0;
  font-family: var(--font-display, Georgia, serif);
  font-size: 19px;
  line-height: 1.2;
}

.pm-cart-section-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--md-sys-color-primary, #8d4613);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.pm-cart-section-intro {
  margin: -2px 0 16px;
  color: var(--pm-cart-on-surface-variant);
  font-size: 12px;
  line-height: 1.5;
}

.pm-cart-form-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 0;
  color: var(--pm-cart-on-surface);
  font-size: 13px;
}

.pm-cart-form-group-title > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--md-sys-color-primary-container, #f1e2d6);
  color: var(--md-sys-color-on-primary-container, #4c2208);
  font-size: 11px;
}

.pm-cart-review-card-head > span {
  color: var(--pm-cart-on-surface-variant);
  font-size: 11px;
  font-weight: 700;
}

.pm-cart-review-list { display: grid; gap: 0; }

.pm-cart-review-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--pm-cart-outline);
}

.pm-cart-review-item:first-child { border-top: 0; padding-top: 0; }
.pm-cart-review-item:last-child { padding-bottom: 0; }
.pm-cart-review-item > div { min-width: 0; display: grid; gap: 2px; }
.pm-cart-review-item strong { font-size: 13px; line-height: 1.4; }
.pm-cart-review-item > div span { color: var(--pm-cart-on-surface-variant); font-size: 11px; }
.pm-cart-review-price { align-self: start; white-space: nowrap; font-size: 12px; font-weight: 800; }

.pm-cart-field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.pm-cart-field > span {
  color: var(--pm-cart-on-surface);
  font-size: 12px;
  font-weight: 800;
}

.pm-cart-field small {
  color: var(--pm-cart-on-surface-variant);
  font-size: 11px;
  font-weight: 600;
}

.pm-cart-required {
  color: var(--pm-cart-error);
  font: inherit;
}

.pm-cart-field-hint {
  display: block;
  margin-top: -2px;
  color: var(--pm-cart-on-surface-variant);
  font-size: 11px;
  line-height: 1.35;
}

.pm-cart-field input,
.pm-cart-field textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 14px;
  border: 1px solid #d3d3d3;
  border-radius: var(--md-sys-shape-corner-medium, 12px);
  outline: 0;
  background: #f1f1f1;
  color: var(--pm-cart-on-surface);
  font: 500 16px/1.5 var(--font-ui, sans-serif);
  resize: vertical;
}

.pm-cart-field textarea { min-height: 96px; max-height: 192px; }
.pm-cart-field input::placeholder,
.pm-cart-field textarea::placeholder {
  color: color-mix(in srgb, var(--pm-cart-on-surface-variant) 72%, transparent);
}

.pm-cart-field input:focus,
.pm-cart-field textarea:focus {
  border-color: var(--md-sys-color-primary, #8d4613);
  box-shadow: inset 0 0 0 1px var(--md-sys-color-primary, #8d4613);
}

.pm-cart-field input[aria-invalid="true"],
.pm-cart-field textarea[aria-invalid="true"] {
  border-color: var(--pm-cart-error);
  box-shadow: inset 0 0 0 1px var(--pm-cart-error);
}

.pm-cart-fulfillment,
.pm-cart-payment {
  min-width: 0;
  margin: 16px 0 0;
  padding: 0;
  border: 0;
}

.pm-cart-fulfillment[aria-invalid="true"],
.pm-cart-payment[aria-invalid="true"] {
  outline: 2px solid var(--pm-cart-error);
  outline-offset: 6px;
  border-radius: var(--md-sys-shape-corner-medium, 12px);
}

.pm-cart-other-neighborhood-action {
  min-height: 48px;
  margin-top: 8px;
  padding: 0 12px;
  border-radius: var(--md-sys-shape-corner-full, 999px);
  color: var(--md-sys-color-primary, #8d4613);
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.pm-cart-other-neighborhood-action:hover {
  background: color-mix(in srgb, var(--pm-cart-surface) 94%, var(--md-sys-color-primary, #8d4613) 6%);
}

.pm-cart-fulfillment legend,
.pm-cart-payment legend {
  margin-bottom: 8px;
  color: var(--pm-cart-on-surface);
  font-size: 12px;
  font-weight: 800;
}

.pm-cart-fulfillment-options,
.pm-cart-payment-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pm-cart-fulfillment-options label,
.pm-cart-payment-options label { position: relative; }
.pm-cart-fulfillment-options .pm-cart-fulfillment-wide { grid-column: 1 / -1; }
.pm-cart-fulfillment-options input,
.pm-cart-payment-options input { position: absolute; opacity: 0; }
.pm-cart-fulfillment-options span,
.pm-cart-payment-options span {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--md-sys-shape-corner-full, 999px);
  background: #e9e9e9;
  color: var(--pm-cart-on-surface);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
  cursor: pointer;
}
.pm-cart-fulfillment-options input:checked + span,
.pm-cart-payment-options input:checked + span {
  background: var(--md-sys-color-primary, #8d4613);
  color: var(--md-sys-color-on-primary, #fff);
  box-shadow: 0 2px 8px rgba(80, 38, 8, 0.24);
}
.pm-cart-fulfillment-options input:focus-visible + span,
.pm-cart-payment-options input:focus-visible + span {
  outline: 2px solid var(--md-sys-color-primary, #8d4613);
  outline-offset: 3px;
}
.pm-cart-fulfillment > p,
.pm-cart-payment > p,
.pm-cart-delivery-note {
  margin: 8px 2px 0;
  color: var(--pm-cart-on-surface-variant);
  font-size: 12px;
  line-height: 1.45;
}
.pm-cart-delivery-note {
  padding: 12px;
  border-radius: var(--md-sys-shape-corner-medium, 12px);
  background: #fff;
}
.pm-cart-delivery-note strong {
  display: block;
  margin-bottom: 3px;
  color: var(--pm-cart-on-surface);
}
.pm-cart-fulfillment .pm-cart-field-error { color: var(--pm-cart-error); font-weight: 700; }
.pm-cart-delivery-warning {
  margin: 12px 0 0;
  padding: 12px;
  border-radius: var(--md-sys-shape-corner-medium, 12px);
  background: color-mix(in srgb, var(--pm-cart-error) 8%, var(--pm-cart-surface));
  color: var(--pm-cart-error);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}
.pm-cart-delivery-warning[hidden] { display: none; }
.pm-cart-customer-courier-note {
  margin-top: 14px;
  padding: 14px;
  border-left: 4px solid var(--md-sys-color-primary, #8d4613);
  border-radius: 0 var(--md-sys-shape-corner-medium, 12px) var(--md-sys-shape-corner-medium, 12px) 0;
  background: #f2f2f2;
  color: var(--pm-cart-on-surface);
  font-size: 12px;
  line-height: 1.5;
}
.pm-cart-customer-courier-note[hidden] { display: none; }
.pm-cart-customer-courier-note strong { display: block; margin-bottom: 6px; font-size: 13px; }
.pm-cart-customer-courier-note ol { margin: 0; padding-left: 20px; }
.pm-cart-customer-courier-note p { margin: 8px 0 0; color: var(--pm-cart-on-surface-variant); }
.pm-cart-payment-options input:disabled + span {
  opacity: 0.45;
  cursor: not-allowed;
}
.pm-cart-field-error[hidden] { display: none; }
.pm-cart-delivery-fields[hidden],
.pm-cart-field[hidden] { display: none; }
.pm-cart-payment-options { grid-template-columns: repeat(2, 1fr); }
.pm-cart-delivery-fields {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--pm-cart-outline);
  border-radius: var(--md-sys-shape-corner-large, 16px);
  background: #f2f2f2;
}
.pm-cart-delivery-fields .pm-cart-field:first-child { margin-top: 0; }

.pm-cart-review-footer {
  flex: 0 0 auto;
  padding: 13px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--pm-cart-outline);
  background: var(--md-sys-color-surface-container-lowest, #fff);
  box-shadow: 0 -8px 28px rgba(77, 39, 14, 0.08);
}

.pm-cart-review-total-row > div {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.pm-cart-review-total-row > div span {
  color: var(--pm-cart-on-surface-variant);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pm-cart-review-total-row strong {
  font-family: var(--font-display, Georgia, serif);
  font-size: 22px;
  line-height: 1;
}

.pm-cart-review-total-row p {
  margin: 8px 0 12px;
  color: var(--pm-cart-on-surface-variant);
  font-size: 11px;
  line-height: 1.45;
}

.pm-cart-checkout {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 60px;
  padding: 0 18px;
  background: var(--whatsapp, #137d3d);
  color: #fff;
}

.pm-cart-checkout > span {
  display: grid;
  justify-items: start;
  gap: 1px;
  margin-right: auto;
  text-align: left;
}

.pm-cart-checkout strong { font-size: 14px; }
.pm-cart-checkout small { font-size: 10px; font-weight: 600; opacity: 0.82; }
.pm-cart-checkout .pm-cart-checkout-arrow {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pm-cart-checkout:hover { background: var(--whatsapp-deep, #0f6d35); }
.pm-cart-checkout:active { transform: scale(0.985); }
.pm-cart-checkout svg { width: 21px; height: 21px; fill: currentColor; }

.pm-cart-checkout-note {
  margin: 8px 6px 0;
  color: var(--pm-cart-on-surface-variant);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

/* ---------- snackbar / desfazer ---------- */
.pm-cart-snackbar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 10;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 8px 16px;
  border-radius: var(--md-sys-shape-corner-medium, 12px);
  background: #111;
  color: #fff;
  box-shadow: var(--md-sys-elevation-level2, 0 2px 8px rgba(0, 0, 0, 0.18));
  font-size: 12px;
  font-weight: 650;
  animation: pm-cart-snackbar-enter var(--md-sys-motion-duration-medium1, 250ms)
    var(--md-sys-motion-easing-emphasized-decelerate, ease-out) both;
}

@keyframes pm-cart-snackbar-enter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.pm-cart-snackbar span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm-cart-snackbar button {
  min-height: 48px;
  flex: 0 0 auto;
  padding: 0 12px;
  border-radius: var(--md-sys-shape-corner-full, 999px);
  color: var(--brand-orange, #ff9d00);
  font-size: 12px;
  font-weight: 800;
}

.pm-cart-snackbar button:hover { background: rgba(255, 255, 255, 0.09); }

/* ---------- mobile / narrow screens ---------- */
@media (max-width: 800px) {
  .pm-cart-added-notice {
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }

  .pm-cart-review-footer {
    padding-top: 10px;
  }

  .pm-cart-review-total-row p {
    margin: 6px 0 10px;
  }
}

@media (max-width: 640px) {
  .pm-cart-button {
    right: 16px;
    bottom: calc(94px + env(safe-area-inset-bottom, 0px));
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
  }
  .pm-cart-button svg { width: 28px; height: 28px; }
}

@media (min-width: 641px) {
  .pm-cart-button {
    right: 24px;
    bottom: 24px;
    width: 68px;
    height: 68px;
    min-width: 68px;
    min-height: 68px;
  }
  .pm-cart-button svg { width: 32px; height: 32px; }
}

@media (max-width: 360px) {
  .pm-cart-item {
    grid-template-columns: 64px minmax(0, 1fr);
    padding: 10px;
    gap: 10px;
  }

  .pm-cart-item-media {
    width: 64px;
    height: 82px;
  }
}

/* ---------- desktop / tablet largo ---------- */
@media (min-width: 721px) {
  .pm-cart-drawer {
    top: 0;
    left: auto;
    right: 0;
    bottom: auto;
    width: min(460px, 100vw);
    height: 100dvh;
    max-height: 100dvh;
    border-top: 0;
    border-left: 1px solid var(--pm-cart-outline);
    border-radius: var(--md-sys-shape-corner-extra-large, 28px) 0 0 var(--md-sys-shape-corner-extra-large, 28px);
    transform: translateX(100%);
  }

  .pm-cart-drawer.is-open { transform: translateX(0); }
  .pm-cart-header { padding: 22px 22px 14px; }
  .pm-cart-header h2 { font-size: 31px; }
  .pm-cart-list { padding: 12px 16px 20px; }
  .pm-cart-item { grid-template-columns: 80px minmax(0, 1fr); padding: 14px; }
  .pm-cart-item-media { width: 80px; height: 100px; }
  .pm-cart-summary { padding: 14px 20px 20px; }
  .pm-cart-review-scroll { padding: 14px 16px 20px; }
  .pm-cart-review-footer { padding: 15px 20px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .pm-cart-button,
  .pm-cart-backdrop,
  .pm-cart-drawer,
  .pm-cart-button.is-bumped,
  .pm-cart-qty button,
  .pm-cart-close,
  .pm-cart-review-button,
  .pm-cart-checkout {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .pm-cart-added-notice { transition-duration: 0.01ms !important; }

  .pm-cart-drawer.is-entering .pm-cart-header > *,
  .pm-cart-drawer.is-entering .pm-cart-view:not([hidden]) > *,
  .pm-cart-snackbar {
    animation: none !important;
  }
}
