/* Functional commerce surfaces inherit the store's silver, ink, and editorial typography. */
:root {
  --commerce-ink: #282b30;
  --commerce-muted: #555c65;
  --commerce-line: #d9dde1;
  --commerce-paper: #f6f7f8;
  --commerce-accent: #775c31;
  --commerce-error: #9c2433;
}
/* Match the header's Lucide icon family with readable benefit-section strokes. */
.benefits p {
  color: var(--commerce-muted);
}
.benefits svg {
  width: 34px;
  height: 34px;
  color: var(--commerce-ink);
  stroke-width: 1.75;
  fill: none;
  display: block;
  margin: 0 auto 20px;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid var(--commerce-accent);
  outline-offset: 4px;
}
::selection {
  background: #dfd5c4;
  color: #202329;
}
input,
textarea {
  caret-color: var(--commerce-accent);
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
.environment-banner {
  padding: 9px 20px;
  background: #e9e3d9;
  color: #443927;
  text-align: center;
  font:
    500 12px/1.5 "DM Sans",
    Arial,
    sans-serif;
}
body[data-admin="true"] {
  display: block;
}
body[data-admin="true"] .environment-banner {
  margin-left: 252px;
}
.live-main {
  max-width: 1280px;
  margin: auto;
  padding: 48px 5vw 80px;
  min-height: 55vh;
}
.live-heading {
  margin-bottom: 28px;
  border-bottom: 1px solid var(--commerce-line);
  padding-bottom: 24px;
}
.live-heading h1 {
  margin: 0;
  color: var(--commerce-ink);
  font-family: var(--serif, "Italiana", Georgia, serif);
  font-size: clamp(2.25rem, 4vw, 3.75rem);
  font-weight: 400;
  overflow-wrap: anywhere;
}
.live-main h2,
.main #pageContent h2 {
  font-size: 1.35rem;
  margin: 28px 0 16px;
  line-height: 1.35;
}
.live-main p,
.main #pageContent p {
  line-height: 1.7;
  max-width: 72ch;
}
.live-main a:not(.btn),
.main #pageContent a:not(.btn) {
  text-underline-offset: 4px;
}
.page-intro {
  color: var(--commerce-muted);
  font-size: 16px;
  margin-bottom: 28px;
}
.commerce-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: 48px;
  align-items: start;
}
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  max-width: 960px;
  margin: 36px auto;
}
.auth-copy {
  padding: 28px 0;
}
.auth-copy h2 {
  font-family: var(--serif, "Italiana", Georgia, serif);
  font-size: 2.5rem;
  font-weight: 400;
}
.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 24px;
  font-size: 13px;
  text-decoration: underline;
}
.live-form {
  display: grid;
  gap: 20px;
  max-width: 760px;
}
.live-form label,
.field-pair label,
#savedAddress {
  min-width: 0;
}
.live-form label,
.quantity-field,
#pageContent > label {
  display: grid;
  gap: 8px;
  color: var(--commerce-ink);
  font-size: 14px;
  font-weight: 500;
}
.live-form input,
.live-form select,
.live-form textarea,
.quantity-field input,
#savedAddress {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #aeb5bd;
  background: white;
  border-radius: 2px;
  color: var(--commerce-ink);
  font: inherit;
}
.live-form textarea {
  resize: vertical;
  min-height: 120px;
}
.live-form input::placeholder,
.live-form textarea::placeholder {
  color: #626973;
}
.live-form .check-field {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-weight: 400;
}
.check-field input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  accent-color: #282b30;
}
.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field-help {
  font-size: 13px;
  color: var(--commerce-muted);
  margin: 0;
}
.form-status:empty,
#pageStatus:empty {
  display: none;
}
.form-status,
#pageStatus {
  padding: 12px 0;
  margin: 0;
  font-size: 14px;
}
.error {
  color: var(--commerce-error);
}
.inline-notice {
  background: #f0ece4;
  color: #443927;
  padding: 16px 20px;
}
.order-summary {
  background: var(--commerce-paper);
  padding: 28px;
}
.order-summary h2:first-child {
  margin-top: 0;
}
.order-summary small {
  display: block;
  margin: 4px 0 18px;
  color: var(--commerce-muted);
}
.order-summary .btn {
  width: 100%;
  margin-top: 12px;
}
.order-totals {
  margin: 24px 0;
  font-variant-numeric: tabular-nums;
}
.order-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}
.order-totals dd {
  margin: 0;
  text-align: right;
}
.order-totals .grand-total {
  border-top: 1px solid #b9bfc6;
  margin-top: 12px;
  padding-top: 18px;
  font-size: 19px;
  font-weight: 600;
}
.bag-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--commerce-line);
}
.bag-row:first-child {
  padding-top: 0;
}
.bag-row img {
  width: 100px;
  aspect-ratio: 1;
  object-fit: cover;
}
.bag-row h2 {
  margin: 0 0 8px;
  font: 500 17px/1.4 var(--sans, "DM Sans", Arial, sans-serif);
}
.bag-row strong {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}
.quantity-field {
  display: inline-grid;
  width: 80px;
  margin-right: 12px;
}
.text-button {
  border: 0;
  background: none;
  color: inherit;
  padding: 8px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  font: inherit;
}
.account-tabs {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding: 0 0 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--commerce-line);
}
.account-tabs a {
  color: var(--commerce-muted);
  padding: 8px 0;
}
.account-tabs [aria-current="page"] {
  color: var(--commerce-ink);
  text-decoration: underline;
  font-weight: 600;
}
.address-record {
  border-bottom: 1px solid var(--commerce-line);
  padding: 0 0 24px;
  margin-bottom: 24px;
}
.address-record h2 {
  margin-top: 0;
}
.table-scroll {
  width: 100%;
  overflow: auto;
}
.live-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}
.live-table th {
  color: var(--commerce-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 14px 16px;
  background: #f1f3f5;
}
.live-table td {
  padding: 17px 16px;
  border-bottom: 1px solid var(--commerce-line);
  line-height: 1.6;
  vertical-align: top;
  font-variant-numeric: tabular-nums;
}
.live-table a {
  text-decoration: underline;
}
.live-table img {
  width: 52px;
  height: 52px;
  object-fit: cover;
}
.live-table input {
  max-width: 90px;
  padding: 9px;
  border: 1px solid #aeb5bd;
}
.status-tag {
  display: inline-block;
  padding: 3px 8px;
  background: #e9edf1;
  color: #36424d;
  font-size: 12px;
  white-space: nowrap;
}
.status-paid,
.status-delivered,
.status-completed {
  color: #24503a;
  background: #e3eee7;
}
.status-payment_review,
.status-awaiting_payment,
.status-refund_pending {
  color: #70501c;
  background: #f4ecd9;
}
.status-failed,
.status-cancelled,
.status-rejected {
  color: #8c2633;
  background: #f6e7e9;
}
.order-heading {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 24px;
}
.order-heading > span:last-child {
  font-size: 13px;
  color: var(--commerce-muted);
}
.empty-state {
  padding: 40px 0;
  grid-column: 1/-1;
}
.empty-state h2 {
  font-family: var(--serif, "Italiana", Georgia, serif);
  font-size: 2rem;
}
.empty-state .btn {
  margin-top: 16px;
}
.availability {
  display: block;
  font-size: 12px;
  color: var(--commerce-muted);
  margin: 8px 0;
}
.currency-label {
  font-size: 12px;
  white-space: nowrap;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}
.btn,
.main #pageContent button:not(.text-button) {
  min-height: 44px;
  cursor: pointer;
}
.main #pageContent .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border: 1px solid #282b30;
  background: #282b30;
  color: white;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.main #pageContent .btn.outline {
  background: white;
  color: #282b30;
}
.main #pageContent .live-form {
  padding: 0;
  background: none;
}
.admin-toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.admin-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  padding: 24px 0;
  border-bottom: 1px solid var(--commerce-line);
  margin-bottom: 24px;
}
.admin-facts p {
  margin: 0;
  color: var(--commerce-muted);
}
.admin-facts strong {
  display: block;
  font-size: 26px;
  color: var(--commerce-ink);
  font-variant-numeric: tabular-nums;
}
.readiness-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  columns: 2;
}
.readiness-list li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--commerce-line);
  padding: 12px 0;
  break-inside: avoid;
}
.variant-row {
  display: grid;
  grid-template-columns: 1fr 120px auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}
.image-preview {
  width: 160px;
  height: 160px;
  object-fit: cover;
  margin: 16px 0;
}
.policy-copy {
  white-space: pre-wrap;
  line-height: 1.8;
  max-width: 72ch;
}
.shipping-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.narrow-panel {
  max-width: 700px;
}
details {
  padding: 20px 0;
  border-bottom: 1px solid var(--commerce-line);
}
summary {
  cursor: pointer;
  font-weight: 500;
}
details .live-form {
  margin-top: 24px;
}
@media (max-width: 900px) {
  .commerce-columns {
    gap: 28px;
    grid-template-columns: 1fr 1fr;
  }
  .auth-layout {
    gap: 32px;
  }
  .shipping-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 700px) {
  .live-main {
    padding: 32px 20px 56px;
  }
  .commerce-columns,
  .auth-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .auth-copy {
    padding: 0;
  }
  .auth-layout {
    margin: 0;
  }
  .order-summary {
    padding: 22px;
  }
  .bag-row {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
  }
  .bag-row img {
    width: 76px;
  }
  .bag-row > strong {
    grid-column: 2;
  }
  .field-pair {
    grid-template-columns: 1fr;
  }
  .readiness-list {
    columns: 1;
  }
  body[data-admin="true"] .environment-banner {
    margin-left: 0;
  }
  body[data-admin="true"] .sidebar {
    position: static;
    width: 100%;
    min-height: auto;
    padding: 20px;
  }
  body[data-admin="true"] .sidebar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
  }
  body[data-admin="true"] .sidebar nav a {
    padding: 7px 0;
  }
  body[data-admin="true"] .main {
    margin-left: 0;
    padding: 24px 16px;
    width: 100%;
  }
  .variant-row {
    grid-template-columns: minmax(0, 1fr) 90px;
  }
  .variant-row button {
    grid-column: 1/-1;
  }
  .live-table th,
  .live-table td {
    padding: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Account overview: real activity takes priority; personal details sit alongside it. */
.account-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 56px;
}
.account-main,
.account-details {
  min-width: 0;
}
.account-section + .account-section {
  margin-top: 48px;
}
.account-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.account-section-heading h2,
.account-details h2 {
  margin: 0;
  font-size: 24px;
  font-family: var(--serif, "Italiana", Georgia, serif);
  font-weight: 400;
}
.account-section-heading > a {
  flex-shrink: 0;
  font-size: 13px;
}
.account-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px 24px;
  padding: 22px 0;
  border-top: 1px solid var(--commerce-line);
  color: var(--commerce-ink);
  text-decoration: none;
}
.account-order-row:hover {
  background: var(--commerce-paper);
}
.account-order-row span:first-child {
  min-width: 0;
}
.account-order-row strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.account-order-row small {
  display: block;
  margin-top: 8px;
  color: var(--commerce-muted);
}
.account-order-row span:nth-child(2) {
  text-align: right;
}
.account-order-row span:nth-child(2) strong {
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
}
.account-order-action {
  grid-column: 1 / -1;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.account-details {
  padding: 28px;
  background: var(--commerce-paper);
  align-self: start;
}
.account-details section + section {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--commerce-line);
}
.account-details p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--commerce-muted);
  margin: 12px 0;
}
.account-details .account-owner {
  color: var(--commerce-ink);
  margin-bottom: 0;
  font-weight: 500;
}
.account-details .account-email {
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.account-details .text-button,
.account-detail-link {
  font-size: 13px;
  display: inline-block;
  padding: 6px 0;
}
.account-detail-link {
  display: block;
  margin-top: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.account-details .account-verified {
  color: var(--commerce-ink);
  font-weight: 500;
}
.account-empty {
  padding: 36px;
  background: var(--commerce-paper);
}
.account-empty h3 {
  font-family: var(--serif, "Italiana", Georgia, serif);
  font-size: 32px;
  font-weight: 400;
  margin: 0 0 16px;
}
.account-empty p,
.account-wishlist-empty p {
  max-width: 52ch;
  line-height: 1.8;
  color: var(--commerce-muted);
}
.account-empty .btn {
  margin-top: 16px;
}
.account-wishlist-empty {
  border-top: 1px solid var(--commerce-line);
  padding: 20px 0;
}
.account-saved-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.account-saved-piece {
  color: var(--commerce-ink);
  text-decoration: none;
}
.account-saved-piece img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--commerce-paper);
}
.account-saved-piece h3 {
  font-size: 14px;
  line-height: 1.6;
  margin: 12px 0 6px;
  font-weight: 500;
}
.account-saved-piece p {
  font-size: 13px;
  margin: 0;
  color: var(--commerce-muted);
}
.account-saved-piece:hover h3 {
  text-decoration: underline;
  text-underline-offset: 4px;
}
@media (max-width: 900px) {
  .account-overview {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
  .account-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
  .account-details section + section {
    margin: 0;
    padding: 0;
    border: 0;
  }
}
@media (max-width: 600px) {
  .account-details {
    display: block;
    padding: 24px;
  }
  .account-details section + section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--commerce-line);
  }
  .account-section-heading {
    align-items: start;
    gap: 12px;
  }
  .account-section-heading h2 {
    font-size: 23px;
  }
  .account-saved-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .account-empty {
    padding: 24px;
  }
  .account-order-row {
    gap: 12px;
  }
}
