.rightbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.pmc-account-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  padding: 8px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.pmc-account-icon:hover,
.pmc-account-icon:focus-visible {
  background: rgba(31, 70, 37, 0.1);
}

.pmc-account-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

.pmc-popover {
  position: fixed;
  z-index: 1300;
  max-height: min(70vh, 560px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(31, 70, 37, 0.18);
  border-radius: 14px;
  background: #fbfdfb;
  color: #1f2a1c;
  box-shadow: 0 12px 32px rgba(13, 30, 17, 0.2);
}

.pmc-popover[hidden],
.pmc-sidebar-backdrop[hidden] {
  display: none;
}

.pmc-popover h2,
.pmc-sidebar-header h2 {
  margin: 0;
  font: 600 19px/1.3 "SurtBold", "Cabinet Grotesk", sans-serif;
}

.pmc-popover-list {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.pmc-empty-state {
  margin: 0;
  padding: 16px 4px;
  color: #566253;
}

.pmc-product-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(31, 70, 37, 0.12);
}

.pmc-product-row > img {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  background: #e9efe8;
}

.pmc-product-detail {
  display: grid;
  min-width: 0;
  gap: 3px;
  font-size: 13px;
}

.pmc-product-detail strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pmc-product-detail span {
  color: #566253;
  overflow-wrap: anywhere;
}

.pmc-remove-item,
.pmc-panel-action,
.pmc-logout,
.pmc-close-sidebar {
  border: 0;
  background: transparent;
  color: #25572c;
  font: inherit;
  cursor: pointer;
}

.pmc-remove-item {
  align-self: start;
  padding: 4px;
  font-size: 12px;
}

.pmc-panel-action {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #25572c;
  border-radius: 8px;
  font-weight: 600;
}

.pmc-panel-action:hover:not(:disabled) {
  background: #25572c;
  color: #fff;
}

.pmc-panel-action:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.pmc-order-status {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: #25572c;
}

.pmc-sidebar-backdrop {
  position: fixed;
  z-index: 1390;
  inset: 0;
  background: rgba(10, 20, 12, 0.24);
}

.pmc-settings-sidebar {
  position: fixed;
  z-index: 1400;
  inset: 0 0 0 auto;
  display: flex;
  width: min(390px, 92vw);
  padding: 26px;
  flex-direction: column;
  gap: 24px;
  background: #fbfdfb;
  color: #1f2a1c;
  box-shadow: -12px 0 36px rgba(13, 30, 17, 0.16);
  clip-path: inset(0 0 0 100%);
  pointer-events: none;
  transition: clip-path 220ms ease;
}

.pmc-settings-sidebar.is-open {
  clip-path: inset(0);
  pointer-events: auto;
}

.pmc-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pmc-close-sidebar {
  width: 36px;
  height: 36px;
  font-size: 28px;
  line-height: 1;
}

.pmc-account-details,
.pmc-appearance {
  display: grid;
  gap: 10px;
}

.pmc-account-details h3,
.pmc-appearance h3 {
  margin: 0;
  font: 600 15px/1.4 "SurtBold", "Cabinet Grotesk", sans-serif;
}

.pmc-account-details p {
  margin: 0;
  overflow-wrap: anywhere;
  color: #566253;
}

.pmc-appearance {
  padding-top: 20px;
  border-top: 1px solid rgba(31, 70, 37, 0.18);
}

.pmc-appearance label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pmc-appearance input {
  width: 18px;
  height: 18px;
  accent-color: #25572c;
}

.pmc-logout {
  align-self: flex-start;
  padding: 8px 0;
  text-decoration: underline;
}

.pmc-local-notice {
  margin: auto 0 0;
  font-size: 12px;
  color: #566253;
}

.pmc-notice {
  position: fixed;
  z-index: 1500;
  right: 20px;
  bottom: 20px;
  max-width: min(400px, calc(100vw - 40px));
  padding: 12px 16px;
  border-radius: 8px;
  background: #16331b;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.pmc-notice.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 700px) {
  .rightbar {
    gap: 4px;
  }

  .pmc-account-icon {
    width: 34px;
    height: 34px;
  }

  .pmc-popover {
    max-height: 65vh;
  }

  .pmc-settings-sidebar {
    width: min(100vw, 390px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pmc-settings-sidebar,
  .pmc-notice {
    transition: none;
  }
}
