.pdv-portal {
  --portal-bg: #f7f8f5;
  --portal-surface: #ffffff;
  --portal-surface-soft: #eff4ec;
  --portal-border: #e4e8df;
  --portal-border-strong: #cbd4c7;
  --portal-text: #1b2922;
  --portal-muted: #667168;
  --portal-brand: #173e2e;
  --portal-brand-soft: #2e674b;
  --portal-accent: #ffd27a;
  --portal-danger-bg: #fff2f2;
  --portal-danger: #8a1f1f;
  /* The public storefront stays light when the ERP preference is dark. */
  --surface-primary: #fff;
  --surface-secondary: #fff;
  --surface-tertiary: #eff4ec;
  --text-primary: var(--portal-text);
  --text-secondary: var(--portal-muted);
  --text-disabled: #73806f;
  --border-default: var(--portal-border);
  --accent-primary: var(--portal-brand-soft);
  width: 100%;
  height: 100dvh;
  min-height: 100vh;
  background: var(--portal-bg);
  color: var(--portal-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
  line-height: 1.5;
  color-scheme: light;
}

.pdv-portal,
.pdv-portal * {
  box-sizing: border-box;
}

.pdv-portal :where(button, input, select, textarea) {
  font: inherit;
}

.pdv-portal button {
  cursor: pointer;
}

.pdv-portal button:disabled {
  cursor: not-allowed;
}

.pdv-portal :is(button, input, select, textarea, a):focus-visible {
  outline: 3px solid #548b3c;
  outline-offset: 3px;
}

.pdv-portal__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
}

.pdv-portal__wrap {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 12px 16px calc(128px + env(safe-area-inset-bottom));
}

.pdv-portal__topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  margin: 0 -16px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 44px;
  gap: 10px;
  align-items: center;
  background: rgba(247, 248, 245, 0.97);
  border-bottom: 1px solid var(--portal-border);
  backdrop-filter: blur(14px);
}

.pdv-portal__brand {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.pdv-portal__brand-copy {
  min-width: 0;
}

.pdv-portal__unit-button {
  display: grid;
  gap: 2px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--portal-text);
  text-align: left;
}

.pdv-portal__unit-button span {
  color: var(--portal-muted);
  font-size: 11px;
}

.pdv-portal__unit-button strong {
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.pdv-portal__logo {
  width: 80px;
  height: 80px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--portal-brand-soft);
  display: grid;
  place-items: center;
  font-weight: 900;
  cursor: pointer;
  padding: 0;
}

.pdv-portal__logo:focus-visible {
  outline: 3px solid rgba(47, 93, 58, 0.28);
  outline-offset: 3px;
}

.pdv-portal__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pdv-portal__store-name {
  max-width: 100%;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdv-portal__info-button,
.pdv-portal__cart-button,
.pdv-portal__customer-button,
.pdv-portal__ghost-button {
  border: 0;
  background: transparent;
  color: var(--portal-text);
}

.pdv-portal__info-button {
  margin-top: 3px;
  padding: 0;
  color: var(--portal-muted);
  font-size: 12px;
  font-weight: 500;
}

.pdv-portal__cart-button {
  grid-column: 3;
  grid-row: 1;
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  background: var(--portal-brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  font-weight: 700;
}

.pdv-portal__customer-button {
  grid-column: 2;
  grid-row: 1;
  min-height: 44px;
  border: 1px solid var(--portal-border);
  border-radius: 999px;
  background: var(--portal-surface);
  color: var(--portal-brand);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.pdv-portal__cart-button span:last-child {
  display: none;
}

.pdv-portal__cart-count {
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  color: var(--portal-brand);
  display: grid;
  place-items: center;
  font-size: 12px;
}

.pdv-portal__search {
  grid-column: 1 / -1;
  grid-row: 2;
  position: relative;
  min-width: 0;
}

.pdv-portal__search > .pdv-portal__icon {
  position: absolute;
  left: 15px;
  top: 14px;
  color: var(--portal-muted);
  pointer-events: none;
}

.pdv-portal__search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--portal-border);
  border-radius: 999px;
  background: var(--portal-surface);
  color: var(--portal-text);
  padding: 0 16px 0 44px;
  outline: none;
  font-size: 16px;
}

.pdv-portal__search input:focus,
.pdv-portal__sort select:focus,
.pdv-portal__field input:focus,
.pdv-portal__field select:focus,
.pdv-portal__field textarea:focus {
  border-color: var(--portal-brand-soft);
  box-shadow: 0 0 0 3px rgba(47, 93, 58, 0.16);
}

.pdv-portal__hero {
  margin-top: 18px;
  border-radius: 20px;
  padding: 22px;
  background: var(--portal-brand);
  color: #fff;
  display: grid;
  gap: 20px;
  overflow: hidden;
}

.pdv-portal__hero-copy {
  min-width: 0;
}

.pdv-portal__eyebrow {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  gap: 7px;
  color: #ddefaf;
  font-size: 11px;
  font-weight: 500;
}

.pdv-portal__hero h1 {
  margin: 8px 0 10px;
  font-size: clamp(25px, 6.5vw, 32px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.pdv-portal__hero h1 span {
  display: block;
  color: var(--portal-accent);
}

.pdv-portal__hero p {
  margin: 0;
  max-width: 720px;
  color: #d6e2d9;
  line-height: 1.45;
  font-size: 13px;
}

.pdv-portal__pickup-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 15px;
  border: 1px solid #4a6655;
  border-radius: 14px;
  background: #284d3a;
  text-align: left;
  color: #fff;
  min-width: 0;
}

.pdv-portal__pickup-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #395f47;
  color: var(--portal-accent);
}

.pdv-portal__pickup-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  font-size: 12px;
}

.pdv-portal__pickup-copy strong {
  font-size: 14px;
  font-weight: 600;
}

.pdv-portal__pickup-address,
.pdv-portal__pickup-hours {
  color: #d6e2d9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdv-portal__pickup-hours .pdv-portal__icon {
  width: 12px;
  height: 12px;
}

.pdv-portal__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.pdv-portal__operating {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--portal-accent);
  font-size: 11px;
}

.pdv-portal__operating--closed {
  color: #ffe0a3;
}

.pdv-portal__closed-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  padding: 12px;
  background: #fff2d8;
  color: #6b4b12;
  font-size: 13px;
}

.pdv-portal__categories {
  margin: 20px -16px 0;
  padding: 0 16px 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #cad6c1 transparent;
}

.pdv-portal__subcategories {
  margin: 0 -14px 0;
  padding: 0 14px 10px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.pdv-portal__catalog-links,
.pdv-portal__share {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-block: 4px 12px;
  font-size: 13px;
}

.pdv-portal__catalog-links a:not(.pdv-portal__category-chip),
.pdv-portal__share a,
.pdv-portal__share button {
  color: var(--portal-text);
  text-decoration: underline;
}

.pdv-portal__catalog-links details {
  max-width: 100%;
}

.pdv-portal__catalog-links summary {
  cursor: pointer;
  width: max-content;
}

.pdv-portal__catalog-links details .pdv-portal__categories {
  margin-inline: 0;
  padding-inline: 0;
}

.pdv-portal__category-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--portal-border);
  border-radius: 999px;
  background: var(--portal-surface);
  color: var(--portal-text);
  padding: 0 14px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}

.pdv-portal__category-count {
  margin-left: 6px;
  opacity: 0.75;
  font-size: 11px;
}

.pdv-portal__category-chip--sub {
  min-height: 34px;
  background: #fff;
  color: var(--portal-muted);
  font-size: 12px;
}

.pdv-portal__category-chip--active {
  border-color: var(--portal-brand);
  background: var(--portal-brand);
  color: #fff;
}

.pdv-portal__catalog-layout {
  margin-top: 12px;
  display: grid;
  gap: 18px;
}

.pdv-portal__catalog {
  min-width: 0;
}

.pdv-portal__catalog-toolbar {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.pdv-portal__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.pdv-portal__product-summary {
  margin: 6px 0 0;
  color: var(--portal-muted);
  font-size: 13px;
  font-weight: 500;
}

.pdv-portal__product-menu {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 10px;
}

.pdv-portal__segmented {
  min-height: 42px;
  padding: 4px;
  border: 1px solid var(--portal-border);
  border-radius: 10px;
  background: var(--portal-surface);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.pdv-portal__segmented button,
.pdv-portal__sort select,
.pdv-portal__pagination button {
  border: 0;
}

.pdv-portal__segmented button {
  min-height: 34px;
  border-radius: 999px;
  background: transparent;
  color: var(--portal-muted);
  font-weight: 900;
}

.pdv-portal__view-button {
  display: grid;
  place-items: center;
}

.pdv-portal__view-icon {
  width: 18px;
  height: 18px;
}

.pdv-portal__segmented-button--active {
  background: var(--portal-brand) !important;
  color: #fff !important;
}

.pdv-portal__sort {
  display: grid;
  gap: 5px;
  color: var(--portal-muted);
  font-size: 12px;
  font-weight: 600;
}

.pdv-portal__sort select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--portal-border);
  border-radius: 10px;
  background: var(--portal-surface);
  color: var(--portal-text);
  padding: 0 14px;
  font-weight: 600;
}

.pdv-portal__state {
  border: 1px solid var(--portal-border);
  border-radius: 16px;
  background: var(--portal-surface);
  padding: 32px 18px;
  color: var(--portal-muted);
  font-weight: 500;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.pdv-portal__products {
  display: grid;
  gap: 12px;
}

.pdv-portal__products--grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pdv-portal__product {
  min-width: 0;
  border: 1px solid var(--portal-border);
  border-radius: 16px;
  background: var(--portal-surface);
  overflow: hidden;
  transition: border-color 160ms, box-shadow 160ms;
}

.pdv-portal__product:hover,
.pdv-portal__product--selected {
  border-color: #abc39c;
  box-shadow: 0 5px 18px #18392408;
}

.pdv-portal__products--list .pdv-portal__product {
  min-height: 136px;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
}

.pdv-portal__products--list .pdv-portal__product-actions {
  grid-column: 2;
}

.pdv-portal__products--grid .pdv-portal__product {
  min-height: 264px;
  display: flex;
  flex-direction: column;
  padding: 10px;
}

.pdv-portal__product-image,
.pdv-portal__product-placeholder {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  background: #f7f8f5;
}

.pdv-portal__product-image {
  object-fit: contain;
  padding: 8px;
}

.pdv-portal__product-placeholder {
  display: grid;
  place-items: center;
  color: var(--portal-muted);
  font-size: 10px;
  text-align: center;
  align-content: center;
  gap: 10px;
}

.pdv-portal__product-placeholder .pdv-portal__icon {
  width: 32px;
  height: 32px;
  opacity: 0.5;
}

.pdv-portal__product-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding-top: 12px;
}

.pdv-portal__product-name {
  color: var(--portal-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.pdv-portal__product-code,
.pdv-portal__product-status {
  margin-top: 7px;
  color: var(--portal-muted);
  font-size: 11px;
  font-weight: 800;
}

.pdv-portal__product-price {
  margin-top: auto;
  padding-top: 12px;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.035em;
}

.pdv-portal__unavailable-label {
  display: block;
  margin-top: 7px;
  color: #705424;
  font-size: 11px;
  font-weight: 500;
}

.pdv-portal__product-actions {
  margin-top: 10px;
  display: inline-grid;
  grid-template-columns: 40px minmax(24px, 1fr) 40px;
  gap: 6px;
  align-items: center;
}

.pdv-portal__products--grid .pdv-portal__product-actions {
  align-self: stretch;
}

.pdv-portal__product-actions button {
  width: 40px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--portal-border-strong);
  background: var(--portal-surface);
  color: var(--portal-text);
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pdv-portal__product-actions button:last-child {
  border-color: var(--portal-brand);
  background: var(--portal-brand);
  color: #fff;
}

.pdv-portal__product-actions > span {
  min-height: 44px;
  display: grid;
  place-items: center;
  font-weight: 600;
}

.pdv-portal__product-actions--empty {
  grid-template-columns: minmax(0, 1fr);
}

.pdv-portal__product-actions--empty button {
  width: 100%;
  background: var(--portal-surface-soft);
  border-color: var(--portal-surface-soft);
  color: var(--portal-brand);
  font-size: 16px;
}

.pdv-portal__add-label {
  font-size: 12px;
  font-weight: 600;
}

.pdv-portal__product-actions button:disabled {
  opacity: 1;
  color: #777c74;
  background: #f0f1ec;
  border-color: #f0f1ec;
}

.pdv-portal__load-more {
  margin: 24px 0 24px;
  display: flex;
  justify-content: center;
  scroll-margin-bottom: calc(128px + env(safe-area-inset-bottom));
}

.pdv-portal__load-more .pdv-portal__primary {
  min-width: min(100%, 260px);
}

.pdv-portal__pagination {
  display: none;
}

.pdv-portal__bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--portal-border);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: stretch;
  gap: 14px;
  box-shadow: 0 -5px 24px rgba(23, 37, 27, 0.06);
  backdrop-filter: blur(14px);
}

.pdv-portal__primary {
  border: 0;
  border-radius: 12px;
  min-height: 48px;
  padding: 0 18px;
  background: var(--portal-brand);
  color: #fff;
  font-weight: 600;
}

.pdv-portal__primary:disabled {
  opacity: 0.5;
}

.pdv-portal__mobile-cart {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  border: 0;
  border-radius: 14px;
  background: var(--portal-brand);
  color: #fff;
  font-size: 13px;
}

.pdv-portal__mobile-cart strong {
  margin-right: auto;
  font-weight: 600;
}

.pdv-portal__mobile-count {
  display: grid;
  place-items: center;
  min-width: 28px;
  min-height: 28px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ffffff20;
}

.pdv-portal__mobile-cart > span:nth-last-child(2) {
  white-space: nowrap;
  font-weight: 600;
}

.pdv-portal__desktop-cart {
  display: none;
}

.pdv-portal__drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.45);
  display: grid;
  align-items: end;
}

.pdv-portal__drawer-panel {
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  max-height: 88vh;
  overflow: auto;
  background: var(--portal-surface);
  border-radius: 22px 22px 0 0;
  padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
}

.pdv-portal__drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pdv-portal__drawer-head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.pdv-portal__section-label {
  color: var(--portal-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.pdv-portal__icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--portal-surface-soft);
  color: var(--portal-text);
}

.pdv-portal__empty-cart {
  display: grid;
  justify-items: center;
  padding: 30px 4px 18px;
  text-align: center;
  font-size: 14px;
}

.pdv-portal__empty-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin-bottom: 18px;
  border-radius: 22px;
  background: var(--portal-surface-soft);
  color: var(--portal-brand-soft);
}

.pdv-portal__empty-icon .pdv-portal__icon {
  width: 30px;
  height: 30px;
}

.pdv-portal__empty-cart p {
  margin: 8px 0 20px;
  max-width: 230px;
  color: var(--portal-muted);
  font-size: 13px;
}

.pdv-portal__browse-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--portal-brand);
  font-size: 12px;
  font-weight: 600;
}

.pdv-portal__cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #edf0ea;
  align-items: start;
  font-size: 13px;
}

.pdv-portal__cart-line > div:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pdv-portal__cart-line strong {
  font-weight: 600;
}

.pdv-portal__line-price {
  color: var(--portal-muted);
  margin: 5px 0;
  font-size: 12px;
}

.pdv-portal__cart-line .pdv-portal__ghost-button {
  padding: 4px 0;
  min-height: 32px;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pdv-portal__cart-totals {
  padding: 16px 0;
}

.pdv-portal__cart-total,
.pdv-portal__discount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.pdv-portal__cart-total strong {
  font-size: 23px;
  white-space: nowrap;
  letter-spacing: -0.04em;
}

.pdv-portal__discount-row {
  margin-bottom: 8px;
  color: var(--portal-brand-soft);
  font-size: 12px;
}

.pdv-portal__cart-pickup {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: var(--portal-surface-soft);
  font-size: 12px;
}

.pdv-portal__cart-pickup div {
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.pdv-portal__cart-pickup span {
  color: var(--portal-muted);
}

.pdv-portal__confirmation-note {
  margin: 10px 0 20px;
  color: var(--portal-muted);
  font-size: 11px;
  line-height: 1.6;
}

.pdv-portal__customer-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-top: 1px solid var(--portal-border);
  padding-top: 12px;
  font-size: 13px;
}

.pdv-portal__customer-caption > span {
  font-size: 11px;
  color: var(--portal-brand-soft);
}

.pdv-portal__age-confirmation {
  display: flex;
  align-items: start;
  gap: 10px;
  margin-top: 16px;
  font-size: 13px;
}

.pdv-portal__age-confirmation input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--portal-brand);
}

.pdv-portal__coupon {
  margin-top: 16px;
  font-size: 12px;
}

.pdv-portal__coupon-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 1px solid var(--portal-border);
  border-radius: 10px;
}

.pdv-portal__coupon-input input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: var(--portal-surface);
  color: var(--portal-text);
  font-size: 16px;
}

.pdv-portal__coupon button {
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--portal-brand);
  font-weight: 600;
}

.pdv-portal__coupon-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 10px;
  padding-left: 10px;
  background: var(--portal-surface-soft);
  color: var(--portal-brand);
}

.pdv-portal__coupon-error {
  color: var(--portal-danger);
}

.pdv-portal__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 18px;
  padding: 12px 10px;
  font-size: 13px;
}
}

.pdv-portal__qty {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.pdv-portal__qty button {
  width: 40px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--portal-border);
  background: var(--portal-surface);
}

.pdv-portal__field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--portal-text);
  font-size: 13px;
  font-weight: 600;
}

.pdv-portal__field input,
.pdv-portal__field select,
.pdv-portal__field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--portal-border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--portal-surface);
  outline: none;
  color: var(--portal-text);
  font-size: 16px;
}

.pdv-portal__field select {
  appearance: none;
  background-color: var(--portal-surface);
  color: var(--portal-text);
}

.pdv-portal__field select option {
  background-color: var(--portal-surface);
  color: var(--portal-text);
}

.pdv-portal__field input[readonly] {
  background: #f4f6f2;
  color: var(--portal-muted);
}

.pdv-portal__pin-display {
  min-height: 44px;
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  background: var(--portal-surface);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  align-items: center;
  justify-items: center;
  padding: 8px 12px;
}

.pdv-portal__pin-dot {
  width: 12px;
  height: 12px;
  border: 1px solid var(--portal-border);
  border-radius: 50%;
  background: #ffffff;
}

.pdv-portal__pin-dot--filled {
  border-color: var(--portal-brand);
  background: var(--portal-brand);
}

.pdv-portal__pin-pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.pdv-portal__pin-key {
  min-height: 48px;
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  background: #f9faf7;
  color: var(--portal-text);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.pdv-portal__pin-key:active {
  transform: translateY(1px);
}

.pdv-portal__pin-key--muted {
  color: var(--portal-muted);
  font-size: 13px;
}

.pdv-portal__profile-grid {
  display: grid;
  gap: 0 10px;
}

.pdv-portal__profile-field--wide {
  grid-column: 1 / -1;
}

.pdv-portal__cep-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.pdv-portal__secondary-button {
  min-height: 44px;
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  background: #edf4ee;
  color: var(--portal-brand);
  padding: 0 12px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.pdv-portal__secondary-button:disabled {
  cursor: progress;
  opacity: 0.68;
}

.pdv-portal__success {
  margin-top: 14px;
  border-radius: 8px;
  padding: 14px;
  background: #e8f8ed;
  color: #155724;
  font-weight: 800;
}

.pdv-portal__error {
  background: var(--portal-danger-bg);
  color: var(--portal-danger);
}

.pdv-portal__checkout-message {
  margin-top: 12px;
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.pdv-portal__checkout-message--error {
  background: var(--portal-danger-bg);
  color: var(--portal-danger);
}

.pdv-portal__checkout-message--success {
  background: #e8f8ed;
  color: #155724;
}

.pdv-portal__checkout-message--warning {
  background: #fff6db;
  color: #6f4f00;
}

.pdv-portal__customer-panel {
  display: grid;
  gap: 4px;
}

.pdv-portal__customer-head {
  justify-content: flex-end;
}

.pdv-portal__customer-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--portal-border);
  border-radius: 50%;
  background: var(--portal-surface);
  color: var(--portal-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.pdv-portal__customer-close:hover {
  background: #f4f6f2;
}

.pdv-portal__customer-step-title {
  margin: 0;
  color: var(--portal-text);
  font-size: 18px;
  line-height: 1.2;
}

.pdv-portal__security-note {
  margin: 2px 0 0;
  color: var(--portal-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.pdv-portal__customer-logout {
  width: 100%;
  margin-top: 10px;
  min-height: 40px;
  color: var(--portal-muted);
  font-weight: 900;
}

.pdv-portal__customer-reset,
.pdv-portal__customer-wa {
  width: 100%;
  margin-top: 10px;
  min-height: 40px;
  font-weight: 900;
}

.pdv-portal__customer-wa {
  border-radius: 8px;
  background: #1f7a3c;
}

.pdv-portal__honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (min-width: 700px) {
  .pdv-portal__product-menu {
    grid-template-columns: 84px 160px;
    justify-content: end;
  }

  .pdv-portal__products--grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 860px) {
  .pdv-portal__wrap {
    padding: 24px 28px 48px;
  }

  .pdv-portal__topbar {
    margin: 0 -28px;
    padding: 16px 28px;
    grid-template-columns: minmax(180px, 270px) minmax(180px, 1fr) auto auto;
    gap: 16px;
  }

  .pdv-portal__brand,
  .pdv-portal__search {
    grid-column: auto;
    grid-row: auto;
  }

  .pdv-portal__customer-button,
  .pdv-portal__cart-button {
    grid-column: auto;
    grid-row: auto;
  }

  .pdv-portal__cart-button {
    min-width: 138px;
  }

  .pdv-portal__cart-button span:last-child {
    display: inline;
  }

  .pdv-portal__hero {
    margin-top: 24px;
    padding: 28px;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: center;
  }

  .pdv-portal__hero h1 {
    font-size: clamp(30px, 3vw, 42px);
    max-width: 860px;
  }

  .pdv-portal__categories {
    margin: 18px 0 0;
    padding: 0 0 6px;
  }

  .pdv-portal__subcategories {
    margin: 0;
    padding: 0 0 6px;
  }

  .pdv-portal__catalog-layout {
    margin-top: 20px;
    grid-template-columns: minmax(0, 1fr) 310px;
    align-items: start;
  }

  .pdv-portal__catalog-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 20px;
  }

  .pdv-portal__title {
    font-size: 23px;
  }

  .pdv-portal__products {
    gap: 16px;
  }

  .pdv-portal__products--grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  }

  .pdv-portal__products--grid .pdv-portal__product {
    min-height: 310px;
    padding: 12px;
  }

  .pdv-portal__products--grid .pdv-portal__product-image,
  .pdv-portal__products--grid .pdv-portal__product-placeholder {
    height: 184px;
    aspect-ratio: auto;
  }

  .pdv-portal__products--list {
    grid-template-columns: 1fr;
  }

  .pdv-portal__products--list .pdv-portal__product {
    min-height: 164px;
    grid-template-columns: 146px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 12px;
  }

  .pdv-portal__products--list .pdv-portal__product-image,
  .pdv-portal__products--list .pdv-portal__product-placeholder {
    width: 146px;
    height: 146px;
  }

  .pdv-portal__products--list .pdv-portal__product-actions {
    margin-top: 0;
    align-self: center;
    grid-template-columns: 40px 32px 40px;
    grid-column: auto;
  }

  .pdv-portal__products--list .pdv-portal__product-actions button {
    width: 40px;
    height: 44px;
  }

  .pdv-portal__products--list .pdv-portal__product-actions--empty {
    grid-template-columns: minmax(112px, 1fr);
  }

  .pdv-portal__products--list .pdv-portal__product-actions--empty button {
    width: 100%;
  }

  .pdv-portal__load-more {
    display: none;
  }

  .pdv-portal__pagination {
    margin: 28px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--portal-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
  }

  .pdv-portal__pagination strong,
  .pdv-portal__pagination span {
    display: block;
  }

  .pdv-portal__pagination span {
    margin-top: 4px;
    color: var(--portal-muted);
    font-size: 13px;
    font-weight: 800;
  }

  .pdv-portal__pagination-actions {
    display: inline-flex;
    gap: 8px;
  }

  .pdv-portal__pagination button {
    min-height: 40px;
    border-radius: 999px;
    background: var(--portal-brand);
    color: #fff;
    padding: 0 16px;
    font-weight: 950;
  }

  .pdv-portal__pagination button:disabled {
    background: #e1e6df;
    color: #788174;
  }

  .pdv-portal__desktop-cart {
    position: sticky;
    top: 92px;
    display: block;
    max-height: calc(100vh - 112px);
    overflow: auto;
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    background: var(--portal-surface);
    padding: 18px;
    box-shadow: 0 6px 24px rgba(23, 37, 27, 0.03);
  }

  .pdv-portal__desktop-cart--highlight {
    border-color: var(--portal-brand-soft);
    box-shadow: 0 0 0 3px rgba(47, 93, 58, 0.16), 0 18px 42px rgba(23, 37, 27, 0.08);
  }

  .pdv-portal__drawer--customer {
    align-items: center;
    justify-items: center;
    padding: 24px;
  }

  .pdv-portal__drawer--customer .pdv-portal__drawer-panel {
    width: min(100%, 620px);
    max-height: min(720px, calc(100vh - 48px));
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(23, 37, 27, 0.24);
  }

  .pdv-portal__profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pdv-portal__bottom-bar {
    display: none;
  }
}

@media (max-width: 859px) {
  .pdv-portal__hero {
    padding: 16px;
    gap: 12px;
  }

  .pdv-portal__hero .pdv-portal__eyebrow {
    display: none;
  }

  .pdv-portal__hero h1 {
    font-size: 24px;
    margin-top: 0;
  }

  .pdv-portal__hero p {
    font-size: 12px;
  }

  .pdv-portal__pickup-card {
    padding: 12px;
  }

  .pdv-portal__pickup-copy {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
  }

  .pdv-portal__pickup-copy strong {
    font-size: 12px;
  }

  .pdv-portal__pickup-address,
  .pdv-portal__pickup-hours {
    grid-column: 1 / -1;
  }

  .pdv-portal__operating {
    grid-row: 1;
    grid-column: 2;
    font-size: 10px;
  }

  .pdv-portal__operating--closed {
    grid-row: auto;
    grid-column: 1 / -1;
  }

  .pdv-portal__info-button {
    white-space: nowrap;
  }

  .pdv-portal__customer-button > .pdv-portal__icon {
    display: none;
  }

  .pdv-portal__sort > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .pdv-portal__cep-row {
    grid-template-columns: 1fr;
  }

  .pdv-portal__cart-button > .pdv-portal__icon {
    display: none;
  }

  .pdv-portal__products--grid .pdv-portal__product-name {
    font-size: 13px;
  }

  .pdv-portal__products--grid .pdv-portal__product-actions {
    grid-template-columns: 40px minmax(20px, 1fr) 40px;
  }

  .pdv-portal__products--grid .pdv-portal__product-actions--empty {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  .pdv-portal__products--list .pdv-portal__product {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .pdv-portal__product-name {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pdv-portal__product {
    transition: none;
  }
}
