:root {
  --brand-navy-900: #2d1b4e;
  --brand-navy-800: #3d2b5e;
  --brand-navy-700: #4d3b6e;
  --brand-gold-500: #14b8a6;
  --brand-gold-400: #2dd4bf;
  --accent-blue: #8b5cf6;

  --bg: #f0fdfa;
  --surface: #ffffff;
  --text: #1e1b4b;
  --muted: #64748b;
  --line: #ccfbf1;

  --radius: 10px;
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  display: grid;
  grid-template-columns: 240px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 20px;
  background: var(--brand-navy-900);
  border-bottom: 1px solid #0b1220;
  position: sticky;
  top: 0;
  z-index: 30;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  width: 100px;
  max-width: 100%;
  height: auto;
  display: block;
}

.search-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  border: 1px solid var(--brand-navy-700);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.search-wrap input {
  border: 0;
  padding: 11px 12px;
  font-size: 0.95rem;
  outline: none;
}

.search-btn {
  border: 0;
  background: var(--brand-gold-500);
  color: #1f2937;
  font-weight: 700;
  padding: 0 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
}

.search-btn svg {
  width: 18px;
  height: 18px;
}

.search-btn:hover {
  background: var(--brand-gold-400);
}

.top-actions {
  display: flex;
  gap: 8px;
}

.ghost-btn {
  border: 1px solid var(--brand-navy-700);
  background: transparent;
  color: #f8fafc;
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.cart-anchor {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cart-anchor svg {
  width: 18px;
  height: 18px;
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--brand-gold-500);
  color: #1f2937;
  font-size: 0.78rem;
  font-weight: 800;
}

.main-nav {
  display: flex;
  gap: 2px;
  padding: 0 20px;
  background: var(--brand-navy-800);
  border-bottom: 1px solid #0f172a;
  overflow-x: auto;
}

.main-nav-link {
  color: #dbe5f3;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 11px 14px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.main-nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.main-nav-link.active {
  color: #ffffff;
  border-bottom-color: var(--brand-gold-500);
}

.account-link[aria-current="page"] {
  border-color: var(--brand-gold-500);
  background: rgba(255, 255, 255, 0.08);
}

.account-link .is-signed-in {
  max-width: 18ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

.subnav {
  display: flex;
  gap: 10px;
  padding: 10px 20px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.pill {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 500;
  white-space: nowrap;
  color: #1f2937;
}

.pill:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
  color: #0f172a;
}

.pill.active {
  border-color: #334155;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px #334155;
}

main {
  width: min(1200px, 95vw);
  margin: 18px auto 34px;
}

.hero {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: #475569;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 2.1rem);
  line-height: 1.22;
  max-width: 30ch;
}

.sub {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 70ch;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-logo-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.hero-app-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  font-weight: 500;
  color: #1f2937;
  font-size: 0.9rem;
}

.hero-app-btn:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
  color: #0f172a;
}

.deals-mode-explainer {
  margin-top: 6px;
}

.products-section {
  margin-top: 22px;
}

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

.section-head h2 {
  margin: 0;
}

.controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-count {
  color: var(--muted);
  font-size: 0.92rem;
}

.sort-select {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  color: #0f172a;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.view-link {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.view-link:hover {
  text-decoration: underline;
}

.card:has(.card-link:hover) {
  border-color: #cbd5e1;
}

.thumb {
  height: 126px;
  border-radius: 8px;
  border: 1px solid #dbe1ea;
  background: linear-gradient(135deg, #edf2f7, #f8fafc);
}

.badge {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #6b4f1d;
  background: #f5ead3;
  border: 1px solid #ecdcb9;
  border-radius: 999px;
  padding: 4px 8px;
}

.card h3 {
  margin: 10px 0 6px;
  font-size: 0.98rem;
  line-height: 1.35;
}

.meta {
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 8px;
}

.price {
  font-weight: 800;
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.add {
  width: 100%;
  border: 1px solid #d6b372;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  background: #dcbf83;
  color: #1f2937;
  font-weight: 700;
}

.add:hover {
  background: #d2b171;
}

.detail-main {
  width: min(1200px, 95vw);
  margin: 18px auto 34px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: var(--accent-blue);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.detail-card {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.detail-media {
  min-height: 320px;
  border-radius: 10px;
  border: 1px solid #dbe1ea;
  background: linear-gradient(135deg, #edf2f7, #f8fafc);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.detail-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.detail-panel {
  display: flex;
  flex-direction: column;
}

.detail-category {
  margin: 0;
  color: #64748b;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.detail-title {
  margin: 8px 0 10px;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.2;
}

.detail-rating {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.detail-price {
  margin: 12px 0 8px;
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
}

.detail-badge {
  margin: 0;
  display: inline-flex;
  width: fit-content;
  font-size: 0.8rem;
  font-weight: 700;
  color: #6b4f1d;
  background: #f5ead3;
  border: 1px solid #ecdcb9;
  border-radius: 999px;
  padding: 4px 10px;
}

.detail-copy {
  color: var(--muted);
  margin: 16px 0;
  max-width: 60ch;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.not-found {
  grid-template-columns: 1fr;
}

.stub-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.stub-list {
  margin: 12px 0;
  padding-left: 20px;
  color: var(--muted);
}

.listing-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.local-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}

.local-pill {
  font-size: 0.86rem;
}

.category-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 8px;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #dbe1ea;
  background: #f8fafc;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.83rem;
  color: #334155;
  font-weight: 600;
}

.seller-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}

.seller-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #f8fafc;
}

.seller-card h3 {
  margin: 0 0 6px;
  font-size: 0.96rem;
}

.cart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

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

.clear-cart {
  color: #f8fafc;
  background: var(--brand-navy-800);
  border-color: var(--brand-navy-700);
}

.clear-cart:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #475569;
}

.signout-btn {
  color: #0f172a;
  background: #e2e8f0;
  border-color: #94a3b8;
}

.signout-btn:hover {
  background: #cbd5e1;
  color: #0f172a;
  border-color: #64748b;
}

.cart-items {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  align-items: center;
}

.cart-item-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.cart-item h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.cart-item-right {
  display: flex;
  align-items: end;
  gap: 12px;
}

.qty-input {
  width: 68px;
  margin-left: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
}

.cart-summary {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 10px;
}

.cart-checkout-row {
  margin-top: 14px;
}

.checkout-link {
  width: 100%;
  justify-content: center;
  text-decoration: none;
}

.cart-note {
  margin-top: 18px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}

.checkout-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.checkout-form {
  display: grid;
  gap: 14px;
}

.checkout-form fieldset {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.checkout-form legend {
  font-weight: 700;
  color: #334155;
  padding: 0 6px;
}

.checkout-form label {
  display: grid;
  gap: 6px;
  font-size: 0.92rem;
  color: #334155;
}

.checkout-form input[type="text"],
.checkout-form input[type="email"],
.checkout-form input[type="password"],
.checkout-form select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 0.95rem;
  background: #ffffff;
}

.checkout-form input[type="radio"] {
  margin-right: 8px;
}

.checkout-form.blocked {
  opacity: 0.6;
}

.checkout-status {
  margin-top: 12px;
  color: #334155;
}

.checkout-status.ok {
  color: #14532d;
}

.checkout-guard {
  margin-bottom: 20px;
}

.saved-address-picker {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.saved-address-hint {
  margin: 0;
  color: #475569;
}

.qa-tools {
  margin-top: 8px;
}

.qa-tools-copy {
  margin: 0;
}

.qa-tools-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.qa-tools-actions .address-secondary-btn {
  padding: 9px 12px;
}

.qa-tools-status {
  margin: 0;
}

.summary-card h2 {
  margin-top: 0;
}

.summary-items {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.summary-item-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 6px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.auth-form {
  display: grid;
  gap: 10px;
  max-width: 480px;
}

.auth-form label {
  color: #334155;
  font-size: 0.92rem;
  font-weight: 600;
}

.auth-form input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 0.95rem;
}

.auth-submit {
  margin-top: 6px;
}

.auth-status {
  margin-top: 14px;
  color: #334155;
}

.auth-status.ok {
  color: #14532d;
}

.auth-actions {
  margin-top: 12px;
}

.auth-help {
  margin-top: 12px;
  color: #475569;
}

.field-error {
  margin: -4px 0 2px;
  font-size: 0.82rem;
  color: #b42318;
  min-height: 1.05rem;
}

.account-links {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.account-role-tools,
.account-qa-tools {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.account-role-tools legend,
.account-qa-tools legend {
  font-weight: 700;
  color: #334155;
  padding: 0 6px;
}

.account-role-copy,
.account-qa-tools-copy {
  margin: 0;
  color: #475569;
}

.account-role-actions,
.account-qa-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.account-role-actions .address-secondary-btn,
.account-qa-actions .address-secondary-btn {
  padding: 9px 12px;
}

.account-role-status,
.account-qa-status {
  margin-top: 10px;
  margin-bottom: 0;
}

.address-secondary-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.order-history-list {
  margin-top: 14px;
}

.order-details {
  margin-top: 16px;
}

.order-summary {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}

.order-summary h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--text);
}

.order-items {
  margin-bottom: 14px;
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #e5e7eb;
}

.order-item-row:last-child {
  border-bottom: 0;
}

.order-totals {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.95rem;
}

.total-row.total {
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.order-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.history-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 14px;
}

.history-item h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.history-details {
  margin: 10px 0 0;
  display: grid;
  gap: 8px;
}

.history-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  align-items: baseline;
}

.history-row dt {
  margin: 0;
  color: #475569;
  font-weight: 600;
}

.history-row dd {
  margin: 0;
}

.address-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.address-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 14px;
}

.address-item h2 {
  margin: 0 0 6px;
  font-size: 1.03rem;
}

.address-item p {
  margin: 0 0 4px;
}

.address-item-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.address-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.address-action-btn {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.address-action-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.address-action-btn.remove {
  border-color: #fecaca;
  color: #991b1b;
}

.address-action-btn.remove:hover {
  border-color: #fca5a5;
  background: #fef2f2;
}

.address-form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.address-form-actions .auth-submit {
  margin-top: 0;
}

.address-secondary-btn {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}

.address-secondary-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.seller-crud-shell {
  margin-bottom: 16px;
}

.seller-product-form {
  max-width: 100%;
  margin-bottom: 14px;
}

.seller-product-form select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 0.95rem;
  background: #ffffff;
}

.seller-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.seller-product-actions .auth-submit {
  margin-top: 0;
}

.seller-product-toolbar {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto minmax(150px, 180px) auto minmax(150px, 180px) auto;
  gap: 8px;
  align-items: center;
  margin: 10px 0 14px;
}

.seller-product-toolbar label {
  color: #334155;
  font-size: 0.88rem;
  font-weight: 600;
}

.seller-product-toolbar input,
.seller-product-toolbar select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.9rem;
  background: #ffffff;
}

.seller-product-list {
  display: grid;
  gap: 10px;
}

.seller-product-item strong {
  color: #1f2937;
}

.inventory-hint {
  margin: -4px 0 6px;
  color: #475569;
  font-size: 0.84rem;
}

.inventory-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.inventory-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.inventory-chip.in {
  background: #ecfdf3;
  color: #166534;
  border-color: #bbf7d0;
}

.inventory-chip.low {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.inventory-chip.out {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.is-readonly {
  background: #f8fafc;
}

.admin-shell {
  margin-bottom: 16px;
}

.consignment-shell {
  margin-bottom: 16px;
}

.consignment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.consignment-block {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 12px;
}

.consignment-block h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.consignment-form {
  max-width: 100%;
}

.consignment-form select,
.consignment-form textarea,
.consignment-form input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 0.95rem;
  background: #ffffff;
}

.consignment-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: #334155;
}

.consignment-toolbar {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) auto minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 14px 0 10px;
}

.consignment-payout-toolbar {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto minmax(220px, 1.4fr);
  gap: 8px;
  align-items: center;
  margin: 0 0 12px;
}

.consignment-payout-toolbar-advanced {
  grid-template-columns: auto minmax(180px, 1fr) auto minmax(180px, 1fr) auto auto;
  margin-top: 8px;
}

.consignment-payout-toolbar input[type="number"] {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.9rem;
  background: #ffffff;
}

.consignment-note-config {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  margin: 8px 0 12px;
  background: #f8fafc;
}

.consignment-note-config h3 {
  margin: 0 0 8px;
  font-size: 0.96rem;
}

.consignment-note-grid {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) minmax(220px, 1.2fr);
  gap: 8px;
  align-items: center;
}

.consignment-note-grid label {
  color: #334155;
  font-size: 0.88rem;
  font-weight: 600;
}

.consignment-note-grid select,
.consignment-note-grid input,
.consignment-note-grid textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.9rem;
  background: #ffffff;
}

.consignment-note-grid .sub {
  grid-column: 2 / span 2;
  margin: 0;
}

.consignment-payout-toolbar label {
  color: #334155;
  font-size: 0.88rem;
  font-weight: 600;
}

.consignment-payout-toolbar select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.9rem;
  background: #ffffff;
}

.consignment-history-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.consignment-history-links .address-action-btn {
  margin: 0;
}

.consignment-grid-secondary {
  margin-top: 12px;
}

.consignment-advanced-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  margin: 10px 0 12px;
  background: #f8fafc;
}

.consignment-advanced-panel > summary {
  cursor: pointer;
  font-weight: 700;
  color: #1f2937;
  list-style: none;
}

.consignment-advanced-panel > summary::-webkit-details-marker {
  display: none;
}

.consignment-advanced-panel > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 6px;
  color: #475569;
  transform: translateY(-1px);
}

.consignment-advanced-panel[open] > summary::before {
  content: "▾";
}

.consignment-advanced-panel > .sub {
  margin: 8px 0 10px;
}

.consignment-advanced-panel:not([open]) > :not(summary) {
  display: none;
}

.consignment-detail-readout {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.consignment-detail-readout p {
  margin: 0;
}

.consignment-timeline {
  display: grid;
  gap: 8px;
}

.consignment-timeline-item {
  border: 1px solid #dbe1ea;
  border-radius: 8px;
  background: #fff;
  padding: 10px 11px;
}

.consignment-timeline-item.severity-info {
  border-left: 4px solid #94a3b8;
}

.consignment-timeline-item.severity-success {
  border-left: 4px solid #22c55e;
}

.consignment-timeline-item.severity-warning {
  border-left: 4px solid #f59e0b;
}

.consignment-timeline-item.severity-critical {
  border-left: 4px solid #ef4444;
}

.consignment-timeline-item p {
  margin: 0;
}

.consignment-timeline-item .sub {
  margin-top: 2px;
}

.consignment-item-card[data-selected="true"] {
  border: 2px solid var(--brand-gold-500);
}

.consignment-parity-item {
  border-left: 4px solid #cbd5e1;
}

.consignment-parity-item[data-parity-state="published_listing"] {
  border-left-color: #2563eb;
}

.consignment-parity-item[data-parity-state="closed_listing"] {
  border-left-color: #7c3aed;
}

.consignment-parity-item[data-parity-state="approved_staging"] {
  border-left-color: #b18b40;
}

.consignment-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.85rem;
}

.consignment-toolbar label {
  color: #334155;
  font-size: 0.88rem;
  font-weight: 600;
}

.consignment-toolbar select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.9rem;
  background: #ffffff;
}

.consignment-access-message {
  margin: 8px 0 6px;
}

.consignment-payout-anomalies {
  margin-top: 10px;
}

.consignment-payout-anomalies ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

@media (max-width: 900px) {
  .consignment-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .consignment-toolbar,
  .consignment-payout-toolbar,
  .consignment-note-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .consignment-note-grid .sub {
    grid-column: auto;
  }
}

.admin-controls-wrap[hidden] {
  display: none;
}

.admin-access-message {
  margin-bottom: 10px;
}

.seller-access-message {
  margin: 8px 0 12px;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  align-items: center;
  margin: 10px 0 12px;
}

.admin-toolbar .result-count {
  grid-column: 1 / -1;
  justify-self: start;
  white-space: normal;
  overflow-wrap: anywhere;
}

.admin-toolbar label {
  color: #334155;
  font-size: 0.88rem;
  font-weight: 600;
}

.admin-toolbar select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.9rem;
  background: #ffffff;
}

.admin-pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
}

.admin-pagination .address-secondary-btn {
  padding: 7px 12px;
}

.admin-decision-note-label {
  display: inline-block;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.admin-decision-note-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 0.92rem;
  background: #ffffff;
  resize: vertical;
  min-height: 74px;
}

.admin-decision-note-help {
  margin: 6px 0 8px;
}

.admin-latest-decision {
  margin: 0 0 6px;
  color: #334155;
  font-size: 0.88rem;
}

.admin-note-history {
  margin: 0 0 10px;
}

.admin-latest-decision-line {
  margin: 0;
}

.admin-note-history-details {
  margin-top: 8px;
}

.admin-note-history-details summary {
  cursor: pointer;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 600;
}

.admin-note-history-details ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

.admin-note-history-details li {
  margin-bottom: 4px;
  color: #334155;
  font-size: 0.88rem;
}

.seller-moderation-context {
  border: 1px solid #dbe1ea;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
  margin: 2px 0 6px;
}

.seller-moderation-context p {
  margin: 0 0 5px;
}

.seller-moderation-context p:last-child {
  margin-bottom: 0;
}

.admin-analytics {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
}

.admin-analytics-group h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  color: #1f2937;
}

.admin-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #dbe1ea;
  background: #f8fafc;
  color: #334155;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 700;
}

.moderation-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.moderation-chip.pending {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.moderation-chip.approved {
  background: #ecfdf3;
  color: #166534;
  border-color: #bbf7d0;
}

.moderation-chip.archived {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.address-action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .seller-product-toolbar {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .admin-toolbar {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .admin-pagination {
    flex-wrap: wrap;
  }

  .seller-product-toolbar .result-count,
  .admin-toolbar .result-count {
    margin-top: 2px;
  }

  .history-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .account-links {
    align-items: flex-start;
    gap: 6px;
  }
}

.footer {
  text-align: center;
  color: var(--muted);
  padding: 18px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 940px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "brand search"
      "actions actions";
    gap: 10px 12px;
    align-items: center;
  }

  .brand {
    grid-area: brand;
    min-width: 0;
  }

  .search-wrap {
    grid-area: search;
    min-width: 0;
  }

  .brand-logo {
    width: 150px;
  }

  .top-actions {
    grid-area: actions;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .detail-card {
    grid-template-columns: 1fr;
  }

  .detail-media {
    min-height: 240px;
  }

  .detail-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-actions .view-link {
    text-align: center;
  }

  .cart-head {
    flex-direction: column;
    align-items: stretch;
  }

  .cart-item {
    grid-template-columns: 1fr;
  }

  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .seller-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    grid-template-columns: 80px 1fr auto;
    gap: 8px;
    padding: 10px 8px;
  }

  .brand-logo {
    width: 80px;
  }

  .search-wrap input {
    padding: 9px 10px;
    font-size: 0.9rem;
  }

  .search-btn {
    padding: 0 12px;
    min-width: 44px;
    min-width: max-content;
  }

  .main-nav {
    padding: 0 12px;
  }

  .main-nav-link {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .subnav {
    padding: 8px 12px;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .subnav::-webkit-scrollbar {
    display: none;
  }

  .pill {
    padding: 7px 12px;
    font-size: 0.85rem;
  }
}

/* Carousel styles for multiple product images */
.carousel-arrows {
  position: relative;
  display: flex;
  align-items: center;
}

.carousel-track {
  overflow: hidden;
  width: 100%;
  max-width: 500px;
  position: relative;
}

.carousel-slide {
  display: none;
  width: 100%;
  text-align: center;
}

.carousel-slide.active {
  display: block;
}

.carousel-slide img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--brand-navy-700);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
}

.carousel-arrow:hover {
  background: var(--brand-gold-400);
}

.carousel-arrow-left {
  left: 8px;
}

.carousel-arrow-right {
  right: 8px;
}

.carousel-arrow svg {
  width: 16px;
  height: 16px;
}

.carousel-dot-indicator {
  display: flex;
  justify-content: center;
  gap: 6px;
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-navy-700);
  opacity: 0.4;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s;
}

.carousel-dot.active {
  opacity: 1;
  background: var(--brand-gold-500);
}

.carousel-dot:hover {
  opacity: 0.7;
}
