:root {
  --ink: #172033;
  --muted: #687386;
  --line: #e1e5ea;
  --soft-line: #edf0f3;
  --surface: #ffffff;
  --canvas: #f3f5f7;
  --navy: #1b344e;
  --navy-strong: #12283d;
  --navy-soft: #e9eef4;
  --copper: #a86634;
  --copper-soft: #f6ece2;
  --success: #167a43;
  --success-soft: #e7f5ec;
  --warning: #946200;
  --warning-soft: #fff4d8;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --shadow: 0 12px 28px rgba(20, 38, 56, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  font-size: 14px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

button,
a,
label {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(168, 102, 52, 0.22);
  outline-offset: 1px;
}

.admin-app {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.is-hidden {
  display: none !important;
}

.store-view {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #eef1f4 0, #f3f5f7 320px, #f3f5f7 100%);
}

.store-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: auto minmax(240px, 420px) auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.store-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.store-brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--navy);
  font-size: 21px;
  font-weight: 800;
}

.store-brand > div:last-child {
  display: grid;
  gap: 2px;
}

.store-brand strong {
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.store-brand span {
  color: var(--muted);
  font-size: 11px;
}

.store-search {
  display: flex;
  height: 42px;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8f9fa;
}

.store-search svg {
  width: 18px;
  height: 18px;
  color: #8490a1;
}

.store-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.store-admin-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #c7d0d9;
  border-radius: 7px;
  color: #314054;
  background: #fff;
  font-weight: 650;
}

.store-admin-button:hover {
  border-color: #9eadba;
  background: #f7f9fb;
}

.store-admin-button svg {
  width: 17px;
  height: 17px;
}

.store-content {
  width: min(1320px, calc(100% - 56px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

.store-company {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 18px;
  padding: 30px 34px;
  border-radius: 8px;
  color: #fff;
  text-align: center;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.08), transparent 54%),
    var(--navy);
}

.company-flip-shell {
  min-height: 172px;
  overflow: hidden;
  border-radius: 8px;
}

.company-flip-inner {
  position: relative;
  display: grid;
  min-height: 172px;
}

.company-face {
  grid-area: 1 / 1;
  min-height: 172px;
  will-change: transform, opacity;
}

.company-front {
  transform: translateY(0);
  opacity: 1;
}

.company-back {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 30px 34px 34px;
  border: 1px solid var(--navy);
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.07), transparent 55%),
    #162d45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-105%);
}

.company-flip-shell.show-back .company-front {
  opacity: 0;
  pointer-events: none;
  transform: translateY(105%);
}

.company-flip-shell.show-back .company-back {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.company-flip-shell.animating-to-back .company-front {
  animation: companySlideDownOut 900ms cubic-bezier(0.22, 0.72, 0.25, 1)
    forwards;
}

.company-flip-shell.animating-to-back .company-back {
  animation: companySlideDownIn 900ms cubic-bezier(0.22, 0.72, 0.25, 1)
    forwards;
}

.company-flip-shell.show-back.animating-to-front .company-front {
  animation: companySlideDownIn 900ms cubic-bezier(0.22, 0.72, 0.25, 1)
    forwards;
}

.company-flip-shell.show-back.animating-to-front .company-back {
  animation: companySlideDownOut 900ms cubic-bezier(0.22, 0.72, 0.25, 1)
    forwards;
}

@keyframes companySlideDownOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(105%);
  }
}

@keyframes companySlideDownIn {
  from {
    opacity: 0;
    transform: translateY(-105%);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.company-back-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.company-back-head h2 {
  margin: 8px 0 0;
  color: #fff;
  font-size: 23px;
}

.company-back .store-sales-departments {
  margin-top: 22px;
  padding-top: 0;
  border-top: 0;
}

.store-company-main {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}

.store-company-logo {
  display: grid;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
}

.store-company-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.store-company-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-direction: column;
}

.company-logo-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--navy);
  font-size: 32px;
  font-weight: 850;
}

.store-eyebrow {
  color: #aebfd0;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.store-company h1 {
  margin: 8px 0 0;
  font-size: 26px;
  line-height: 1.3;
}

.store-company p {
  max-width: 620px;
  margin: 8px auto 0;
  color: #cad6e2;
  font-size: 13px;
  line-height: 1.6;
}

.store-summary {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}

.store-summary strong {
  font-size: 24px;
  line-height: 1;
}

.store-summary span {
  color: #b9c8d6;
  font-size: 12px;
}

.store-sales-departments {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.store-sales-department {
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
}

.store-sales-department h3 {
  margin: 0;
  color: #fff;
  font-size: 14px;
}

.store-sales-department p {
  margin: 8px 0 0;
  color: #c6d3df;
  font-size: 12px;
  line-height: 1.55;
}

.store-sales-department a {
  display: inline-block;
  margin-top: 9px;
  color: #f0c69f;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.sales-department-contact span {
  display: inline-block;
  margin-top: 9px;
  color: #9fb0c1;
  font-size: 12px;
}

.sales-department-empty {
  grid-column: 1 / -1;
  padding: 34px 20px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  color: #9fb0c1;
  text-align: center;
  font-size: 12px;
}

.store-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 30px 0 18px;
}

.store-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.store-category-card {
  display: flex;
  min-height: 138px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  background: #fff;
  box-shadow: 0 8px 22px rgba(20, 38, 56, 0.05);
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.store-category-card:hover {
  border-color: #b9c5d0;
  box-shadow: 0 12px 28px rgba(20, 38, 56, 0.1);
  transform: translateY(-2px);
}

.store-category-card:focus-visible {
  outline: 3px solid rgba(168, 102, 52, 0.28);
  outline-offset: 2px;
}

.store-category-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
}

.store-category-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.store-category-count {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--copper);
  font-size: 24px;
  font-weight: 800;
}

.store-category-count span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.store-section-head h2 {
  margin: 0;
  font-size: 20px;
}

.store-section-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.store-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.store-head-actions .secondary-button {
  min-height: 38px;
  padding: 0 12px;
  font-size: 12px;
}

.store-filter-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.store-filter-field {
  display: grid;
  gap: 6px;
  color: #526174;
  font-size: 11px;
  font-weight: 650;
}

.store-filter-field input,
.store-filter-field select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d7dde4;
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  font-weight: 400;
}

.store-filter-panel .secondary-button {
  min-height: 38px;
  padding: 0 12px;
  font-size: 12px;
}

.network-banner {
  position: fixed;
  z-index: 180;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  background: #7a3e16;
  box-shadow: var(--shadow);
  font-size: 13px;
}

.network-banner button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  color: #fff;
  background: transparent;
  font-size: 12px;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.store-product-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  background: #fff;
  box-shadow: 0 8px 22px rgba(20, 38, 56, 0.05);
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.store-product-card:hover {
  border-color: #b9c5d0;
  box-shadow: 0 12px 28px rgba(20, 38, 56, 0.1);
  transform: translateY(-2px);
}

.store-product-card:focus-visible {
  outline: 3px solid rgba(168, 102, 52, 0.28);
  outline-offset: 2px;
}

.store-product-image {
  display: grid;
  height: 250px;
  place-items: center;
  overflow: hidden;
  background: #e8e5df;
}

.store-product-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fabric-swatch.store-fabric {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
}

.store-product-body {
  padding: 18px;
}

.store-product-title {
  display: grid;
  gap: 5px;
}

.store-product-title h3 {
  display: -webkit-box;
  min-height: 44px;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.store-product-title > span {
  color: #8b5a2b;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.03em;
}

.store-product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.store-product-tags span {
  padding: 4px 8px;
  border-radius: 5px;
  color: #526174;
  background: #f0f2f5;
  font-size: 11px;
}

.store-product-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
  margin: 15px 0 0;
}

.store-product-info div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--soft-line);
}

.store-product-info div:last-child {
  grid-column: 1 / -1;
}

.store-product-info dt {
  flex: 0 0 auto;
  color: #7b8794;
  font-size: 11px;
}

.store-product-info dd {
  margin: 0;
  color: #354357;
  font-size: 11px;
  line-height: 1.45;
  text-align: right;
  word-break: break-word;
}

.store-empty {
  padding: 80px 20px;
  color: var(--muted);
  text-align: center;
}

.store-pagination {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 28px;
}

.store-pagination button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #4e5b6d;
  background: #fff;
}

.store-pagination button.active {
  color: #fff;
  border-color: var(--navy);
  background: var(--navy);
}

.product-detail-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #eef1f4 0, #f3f5f7 360px, #f3f5f7 100%);
}

.detail-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.detail-brand,
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #364457;
  text-decoration: none;
}

.detail-brand > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: var(--navy);
  font-weight: 800;
}

.detail-brand strong {
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.detail-back {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-size: 13px;
  font-weight: 650;
}

.detail-back:hover {
  border-color: #bac5cf;
  background: #f8f9fa;
}

.detail-back svg {
  width: 16px;
  height: 16px;
}

.detail-content {
  display: grid;
  width: min(1240px, calc(100% - 56px));
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 26px;
  margin: 0 auto;
  padding: 36px 0 70px;
}

.detail-gallery,
.detail-info {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(20, 38, 56, 0.05);
}

.detail-gallery {
  overflow: hidden;
}

.detail-main-image {
  display: grid;
  height: 620px;
  place-items: center;
  overflow: hidden;
  background: #e8e5df;
}

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

.fabric-swatch.detail-fabric {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border: 0;
  border-radius: 0;
}

.detail-fabric span {
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 6px;
  color: #fff;
  background: rgba(15, 28, 43, 0.28);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.05em;
}

.detail-thumbnails {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 14px;
}

.detail-thumbnails:empty {
  display: none;
}

.detail-thumbnails button {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 7px;
  background: #e8e5df;
}

.detail-thumbnails button.active {
  border-color: var(--copper);
}

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

.detail-info {
  align-self: start;
  padding: 32px;
}

.detail-category {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 6px;
  color: #8b5a2b;
  background: var(--copper-soft);
  font-size: 12px;
  font-weight: 750;
}

.detail-code {
  margin-top: 18px;
  color: #758194;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.detail-specs {
  display: grid;
  margin: 26px 0 0;
}

.detail-specs div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--soft-line);
}

.detail-specs dt {
  color: #758194;
  font-size: 13px;
}

.detail-specs dd {
  margin: 0;
  color: #2f3d50;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.detail-actions .primary-button,
.detail-actions .secondary-button {
  min-height: 40px;
  padding: 0 13px;
  font-size: 12px;
}

.image-lightbox {
  position: fixed;
  z-index: 240;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 48px 64px;
  background: rgba(8, 16, 25, 0.94);
  touch-action: pinch-zoom;
}

.image-lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 96px);
  object-fit: contain;
  user-select: none;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  z-index: 1;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.lightbox-close {
  top: 18px;
  right: 18px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-nav.prev {
  left: 14px;
}

.lightbox-nav.next {
  right: 14px;
}

.lightbox-close svg,
.lightbox-nav svg {
  width: 20px;
  height: 20px;
}

.detail-not-found {
  display: grid;
  width: min(520px, calc(100% - 40px));
  justify-items: center;
  gap: 16px;
  margin: 120px auto;
  padding: 52px 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-not-found strong {
  font-size: 19px;
}

.detail-not-found a {
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}

.sidebar-actions {
  display: grid;
  gap: 6px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-action {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  color: #b9c7d4;
  background: transparent;
  text-align: left;
}

.sidebar-action:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-action svg {
  width: 16px;
  height: 16px;
}

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: 248px;
  flex-direction: column;
  padding: 24px 18px 18px;
  color: #dbe5ee;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 36%),
    var(--navy-strong);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 8px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--copper);
  font-size: 21px;
  font-weight: 800;
}

.brand-name {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-sub {
  margin-top: 3px;
  color: #91a5b8;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 6px;
  margin-top: 24px;
}

.nav-item {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #b9c7d4;
  background: transparent;
  text-align: left;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.nav-item svg,
.icon-button svg,
.primary-button svg,
.secondary-button svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.9;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 16px 8px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #355a78;
  font-size: 13px;
  font-weight: 700;
}

.admin-meta {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.admin-meta strong {
  color: #f5f8fa;
  font-size: 13px;
}

.admin-meta span {
  overflow: hidden;
  color: #8fa3b5;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-shell {
  grid-column: 2;
  min-width: 0;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 18px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.menu-button {
  display: none !important;
}

.topbar-title {
  display: grid;
  min-width: 160px;
  gap: 3px;
}

.topbar-title strong {
  font-size: 15px;
}

.topbar-title span {
  color: var(--muted);
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.global-search,
.table-search {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #8490a1;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8f9fa;
}

.global-search {
  width: min(360px, 34vw);
  height: 40px;
  padding: 0 13px;
}

.global-search svg,
.table-search svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.global-search input,
.table-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.global-search input::placeholder,
.table-search input::placeholder {
  color: #9aa4b2;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #4e5b6d;
  background: #fff;
}

.icon-button:hover:not(:disabled) {
  color: var(--navy);
  border-color: #bec8d2;
  background: #f7f9fb;
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.icon-button.small {
  width: 32px;
  height: 32px;
}

.icon-button.small svg {
  width: 15px;
  height: 15px;
}

.icon-button.danger-icon {
  color: var(--danger);
  border-color: #efc4bf;
}

.icon-button.danger-icon:hover:not(:disabled) {
  color: var(--danger);
  border-color: #dd9189;
  background: var(--danger-soft);
}

.content {
  padding: 28px;
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: view-in 180ms ease-out;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.page-heading h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.page-heading p,
.panel-head p,
.modal-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 7px;
  font-weight: 650;
}

.primary-button {
  color: #fff;
  border: 1px solid var(--navy);
  background: var(--navy);
  box-shadow: 0 6px 14px rgba(27, 52, 78, 0.14);
}

.primary-button:hover {
  border-color: #254664;
  background: #254664;
}

.secondary-button {
  color: #3c4b5c;
  border: 1px solid var(--line);
  background: #fff;
}

.secondary-button:hover {
  border-color: #c3ccd5;
  background: #f8f9fa;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(20, 38, 56, 0.03);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--soft-line);
}

.panel-head h2,
.modal-head h2 {
  margin: 0;
  font-size: 16px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.metric-card {
  position: relative;
  min-height: 122px;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.metric-card::after {
  position: absolute;
  right: -24px;
  bottom: -38px;
  width: 106px;
  height: 106px;
  border-radius: 50%;
  background: var(--metric-tint, var(--navy-soft));
  content: "";
}

.metric-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  color: var(--navy);
  background: var(--navy-soft);
}

.metric-icon svg {
  width: 17px;
  height: 17px;
}

.metric-value {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.metric-label {
  position: relative;
  z-index: 1;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.breakdown {
  display: grid;
  gap: 18px;
  padding: 22px 20px;
}

.breakdown-row {
  display: grid;
  gap: 8px;
}

.breakdown-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #445366;
  font-size: 13px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf0f3;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--navy);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.segmented {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.segmented button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  color: #596779;
  background: transparent;
  font-size: 13px;
}

.segmented button:hover {
  background: #f4f6f8;
}

.segmented button.active {
  color: #fff;
  background: var(--navy);
}

.table-search {
  width: 286px;
  height: 40px;
  padding: 0 12px;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.data-table th {
  padding: 13px 16px;
  color: #6a7585;
  background: #fafbfc;
  font-size: 12px;
  font-weight: 650;
  text-align: left;
}

.data-table td {
  padding: 15px 16px;
  border-top: 1px solid var(--soft-line);
  color: #344255;
  font-size: 13px;
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: #fbfcfd;
}

.align-right {
  text-align: right !important;
}

.product-cell {
  display: flex;
  min-width: 250px;
  align-items: center;
  gap: 12px;
}

.product-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.product-editor-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(20, 38, 56, 0.03);
}

.product-image-area {
  position: relative;
  display: grid;
  min-height: 320px;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--soft-line);
  background: #ebe8e2;
}

.product-image-area::after {
  position: absolute;
  inset: 10px;
  border: 2px dashed transparent;
  border-radius: 7px;
  pointer-events: none;
  content: "";
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.product-image-area.dragover::after {
  border-color: var(--copper);
  background: rgba(168, 102, 52, 0.08);
}

.product-image-area img {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: contain;
}

.fabric-swatch.product-placeholder {
  display: grid;
  width: 100%;
  height: 320px;
  place-items: center;
  border: 0;
  border-radius: 0;
}

.product-placeholder span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 6px;
  color: #fff;
  background: rgba(15, 28, 43, 0.28);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.05em;
}

.image-config {
  padding: 16px 18px;
  border-bottom: 1px solid var(--soft-line);
  background: #fafbfc;
}

.image-config-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.image-config-head > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.image-config-head strong {
  color: #314054;
  font-size: 13px;
}

.image-config-head span {
  overflow: hidden;
  color: #7b8794;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-button {
  display: inline-flex;
  min-height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid #c8d0d8;
  border-radius: 7px;
  color: var(--navy);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.upload-button:hover {
  border-color: #9aabba;
  background: #f4f7f9;
}

.upload-button svg {
  width: 16px;
  height: 16px;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.image-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 13px;
  overflow-x: auto;
  padding: 2px 2px 4px;
}

.image-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid #d7dde4;
  border-radius: 7px;
  background: #e7e3dd;
}

.image-thumb.cover {
  border-color: var(--copper);
  box-shadow: 0 0 0 2px rgba(168, 102, 52, 0.14);
}

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

.thumb-actions {
  position: absolute;
  inset: auto 3px 3px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.thumb-actions button,
.cover-label {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  padding: 0 5px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 5px;
  color: #fff;
  background: rgba(17, 31, 47, 0.74);
  font-size: 10px;
}

.thumb-actions button {
  cursor: pointer;
}

.thumb-actions button:hover {
  background: rgba(17, 31, 47, 0.95);
}

.thumb-actions svg {
  width: 12px;
  height: 12px;
}

.product-editor-body {
  padding: 20px 18px 18px;
}

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

.product-code-badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border-radius: 6px;
  color: #475467;
  background: #f0f2f5;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

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

.editor-grid .field input,
.editor-grid .field select {
  min-height: 39px;
  padding: 8px 10px;
  font-size: 12px;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: #fafbfc;
}

.product-card-footer > span {
  color: #7b8794;
  font-size: 11px;
}

.product-card-footer > div {
  display: flex;
  gap: 8px;
}

.product-card-footer .primary-button,
.product-card-footer .secondary-button {
  min-height: 36px;
  padding: 0 13px;
  font-size: 12px;
}

.product-card-footer svg {
  width: 15px;
  height: 15px;
}

.fabric-swatch {
  position: relative;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-radius: 7px;
  background-color: var(--fabric-base, #294b6c);
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(0deg, rgba(7, 16, 29, 0.13) 0 1px, transparent 1px 4px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.18));
}

.fabric-swatch.small {
  width: 38px;
  height: 38px;
  border-radius: 6px;
}

.fabric-indigo {
  --fabric-base: #294b6c;
}

.fabric-deep {
  --fabric-base: #172f4a;
}

.fabric-light {
  --fabric-base: #86a6c4;
}

.fabric-black {
  --fabric-base: #252a31;
}

.fabric-ecru {
  --fabric-base: #cabf9f;
}

.fabric-copper {
  --fabric-base: #8f5c36;
}

.product-name {
  display: block;
  max-width: 250px;
  overflow: hidden;
  color: var(--ink);
  font-weight: 700;
  text-overflow: ellipsis;
}

.product-code {
  display: block;
  margin-top: 5px;
  color: #7b8794;
  font-size: 12px;
}

.status {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 0 9px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 650;
}

.status.published {
  color: var(--success);
  background: var(--success-soft);
}

.status.draft {
  color: var(--warning);
  background: var(--warning-soft);
}

.status.archived {
  color: #5f6b7b;
  background: #eef1f4;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.table-empty {
  padding: 58px 20px;
  color: var(--muted);
  text-align: center;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 2px 0;
  color: var(--muted);
  font-size: 12px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 5px;
}

.page-number {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #556274;
  background: #fff;
}

.page-number.active {
  color: #fff;
  border-color: var(--navy);
  background: var(--navy);
}

.toggle {
  position: relative;
  display: inline-flex;
  width: 38px;
  height: 22px;
  align-items: center;
  padding: 2px;
  border: 0;
  border-radius: 99px;
  background: #c7ced6;
  transition: background 160ms ease;
}

.toggle::after {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: transform 160ms ease;
  content: "";
}

.toggle.on {
  background: var(--success);
}

.toggle.on::after {
  transform: translateX(16px);
}

.form-panel {
  max-width: 920px;
  padding: 24px;
}

.company-logo-editor {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px dashed #c9d1d9;
  border-radius: 8px;
  background: #fafbfc;
}

.company-logo-preview {
  display: grid;
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.company-logo-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.company-logo-copy {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.company-logo-copy strong {
  color: #314054;
  font-size: 14px;
}

.company-logo-copy > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.company-logo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.company-logo-actions .secondary-button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
}

.sales-department-editor {
  margin-bottom: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.sales-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.sales-editor-head > div {
  display: grid;
  gap: 4px;
}

.sales-editor-head strong {
  color: #314054;
  font-size: 14px;
}

.sales-editor-head span {
  color: var(--muted);
  font-size: 12px;
}

.sales-editor-head .secondary-button {
  min-height: 38px;
  flex: 0 0 auto;
  padding: 0 13px;
  font-size: 12px;
}

.sales-editor-list {
  display: grid;
  gap: 12px;
}

.sales-editor-empty {
  padding: 28px 18px;
  border: 1px dashed #ccd3da;
  border-radius: 8px;
  color: var(--muted);
  background: #fafbfc;
  text-align: center;
  font-size: 12px;
}

.sales-editor-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(220px, 1.4fr) minmax(150px, 0.9fr) auto;
  align-items: end;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
}

.sales-editor-row .field input {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 12px;
}

.sales-remove-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 1px solid #efc4bf;
  border-radius: 7px;
  color: var(--danger);
  background: #fff;
}

.sales-remove-button:hover {
  background: var(--danger-soft);
}

.sales-remove-button svg {
  width: 16px;
  height: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
  color: #435165;
  font-size: 13px;
  font-weight: 650;
}

.field.full {
  grid-column: 1 / -1;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #d7dde4;
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  font-weight: 400;
}

.field textarea {
  min-height: 104px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #7890a6;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--soft-line);
}

.upload-zone {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px dashed #c8d0d8;
  border-radius: 8px;
  background: #fafbfc;
}

.upload-placeholder {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6d7988;
}

.upload-placeholder svg {
  width: 20px;
  height: 20px;
  color: var(--copper);
}

.upload-placeholder span {
  font-size: 12px;
  font-weight: 400;
}

.upload-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.image-choice {
  position: relative;
  width: 72px;
  height: 72px;
}

.image-choice .fabric-swatch {
  width: 72px;
  height: 72px;
}

.image-choice button {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--danger);
}

.image-choice button svg {
  width: 12px;
  height: 12px;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(13, 25, 38, 0.52);
}

.modal-backdrop.open {
  display: flex;
}

.modal-panel {
  display: flex;
  width: min(820px, 100%);
  max-height: calc(100vh - 48px);
  flex-direction: column;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(8, 18, 30, 0.26);
}

.small-modal {
  width: min(480px, 100%);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.modal-body {
  overflow-y: auto;
  padding: 22px;
}

.modal-body .field + .field {
  margin-top: 20px;
}

.import-modal {
  width: min(920px, 100%);
}

.import-textarea {
  width: 100%;
  min-height: 260px;
  padding: 15px;
  border: 1px solid #d7dde4;
  border-radius: 8px;
  color: var(--ink);
  background: #fbfcfd;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 13px;
  line-height: 1.65;
  resize: vertical;
}

.import-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 24px 0 12px;
}

.import-preview-head strong {
  font-size: 14px;
}

.import-preview-head .secondary-button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
}

.import-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
}

.import-preview-empty {
  grid-column: 1 / -1;
  padding: 38px 18px;
  border: 1px dashed #ccd3da;
  border-radius: 8px;
  color: var(--muted);
  background: #fafbfc;
  text-align: center;
  font-size: 12px;
}

.import-preview-item {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.import-preview-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.import-preview-item strong {
  color: var(--ink);
  font-size: 13px;
}

.import-preview-item p {
  margin: 8px 0 0;
  color: #5f6b7b;
  font-size: 11px;
  line-height: 1.6;
  word-break: break-word;
}

.import-status {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 5px;
  color: var(--success);
  background: var(--success-soft);
  font-size: 10px;
  font-weight: 700;
}

.import-status.duplicate {
  color: var(--warning);
  background: var(--warning-soft);
}

.import-status.invalid {
  color: var(--danger);
  background: var(--danger-soft);
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  background: #fafbfc;
}

.toast {
  position: fixed;
  z-index: 200;
  right: 26px;
  bottom: 26px;
  max-width: min(360px, calc(100vw - 40px));
  padding: 12px 16px;
  border-radius: 7px;
  color: #fff;
  background: #17283a;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .product-editor-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .detail-header {
    padding: 0 16px;
  }

  .detail-content {
    width: calc(100% - 32px);
    grid-template-columns: 1fr;
    padding-top: 22px;
  }

  .detail-main-image {
    height: 520px;
  }

  .store-header {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 12px 16px;
  }

  .store-search {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }

  .store-content {
    width: calc(100% - 32px);
    padding-top: 20px;
  }

  .store-company {
    padding: 26px 24px;
  }

  .store-company-main {
    align-items: center;
    gap: 18px;
  }

  .store-company-logo {
    width: 72px;
    height: 72px;
    padding: 8px;
  }

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

  .store-filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-sales-departments {
    grid-template-columns: 1fr;
  }

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

  .admin-app {
    display: block;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-shell {
    grid-column: auto;
  }

  .menu-button {
    display: inline-grid !important;
  }

  .topbar {
    padding: 10px 16px;
  }

  .topbar-title span,
  .global-search {
    display: none;
  }

  .content {
    padding: 18px 16px 32px;
  }

  .page-heading {
    align-items: flex-start;
  }

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

  .segmented {
    overflow-x: auto;
  }

  .table-search {
    width: 100%;
  }

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

  .field.full {
    grid-column: auto;
  }

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

  .product-editor-card {
    display: flex;
    flex-direction: column;
  }

  .product-card-footer {
    order: -1;
    align-items: stretch;
    flex-direction: column;
    border-top: 0;
    border-bottom: 1px solid var(--line);
  }

  .product-card-footer > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  }
}

@media (max-width: 560px) {
  .store-content {
    width: calc(100% - 28px);
    padding-bottom: calc(46px + env(safe-area-inset-bottom));
  }

  .detail-brand strong {
    display: none;
  }

  .detail-main-image {
    height: 360px;
  }

  .detail-info {
    padding: 24px 20px;
  }

  .detail-info h1 {
    font-size: 24px;
  }

  .detail-specs div {
    grid-template-columns: 88px minmax(0, 1fr);
  }

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

  .detail-actions .primary-button {
    grid-column: 1 / -1;
  }

  .image-lightbox {
    padding: 56px 12px;
  }

  .lightbox-nav {
    top: auto;
    bottom: 14px;
    transform: none;
  }

  .store-brand span {
    display: none;
  }

  .store-admin-button {
    min-width: 92px;
    justify-content: center;
    padding: 0 10px;
    font-size: 12px;
  }

  .store-company {
    align-items: center;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    gap: 8px;
    padding: 14px 18px;
    text-align: center;
  }

  .store-company h1 {
    margin-top: 4px;
    font-size: 20px;
  }

  .store-company p {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.4;
  }

  .store-company .store-eyebrow {
    font-size: 9px;
  }

  .store-company-main {
    gap: 7px;
  }

  .store-company-copy {
    gap: 0;
  }

  .store-summary {
    justify-content: center;
    gap: 4px;
  }

  .store-summary strong {
    font-size: 18px;
  }

  .store-summary span {
    font-size: 10px;
  }

  .store-company-logo {
    width: 50px;
    height: 50px;
    padding: 5px;
  }

  .company-flip-shell,
  .company-flip-inner,
  .company-face {
    height: 32vh;
    min-height: 220px;
    max-height: 285px;
  }

  .company-back {
    overflow: hidden;
    padding: 14px 16px;
  }

  .company-back-head h2 {
    margin-top: 4px;
    font-size: 18px;
  }

  .company-back .store-sales-departments {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    max-height: calc(100% - 48px);
    margin-top: 10px;
    overflow-y: auto;
  }

  .store-sales-department {
    padding: 8px 9px;
  }

  .store-sales-department h3 {
    font-size: 11px;
  }

  .store-sales-department p,
  .store-sales-department a,
  .sales-department-contact span {
    margin-top: 4px;
    font-size: 9px;
    line-height: 1.4;
  }

  .company-back {
    padding: 14px 16px;
  }

  .company-back-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .store-category-grid {
    grid-template-columns: 1fr;
  }

  .company-logo-editor {
    align-items: flex-start;
    flex-direction: column;
  }

  .company-logo-actions {
    width: 100%;
  }

  .company-logo-actions .upload-button,
  .company-logo-actions .secondary-button {
    width: 100%;
  }

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

  .sales-editor-head .secondary-button {
    width: 100%;
  }

  .sales-editor-row {
    grid-template-columns: 1fr;
  }

  .sales-remove-button {
    width: 100%;
  }

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

  .store-filter-panel {
    grid-template-columns: 1fr 1fr;
    padding: 12px;
  }

  .store-filter-panel .secondary-button {
    width: 100%;
    grid-column: 1 / -1;
  }

  .store-head-actions {
    width: 100%;
  }

  .store-head-actions .secondary-button {
    flex: 1;
  }

  .store-product-image {
    height: 92px;
  }

  .store-product-body {
    padding: 7px;
  }

  .store-product-info {
    display: none;
  }

  .store-product-info div:last-child {
    grid-column: auto;
  }

  .store-product-title h3 {
    display: none;
  }

  .store-product-title > span {
    overflow: hidden;
    font-size: 10px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .store-product-tags {
    display: none;
  }

  .store-product-card {
    border-radius: 7px;
  }

  .store-pagination button {
    width: 40px;
    height: 40px;
  }

  .modal-foot {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .modal-foot .primary-button,
  .modal-foot .secondary-button {
    width: 100%;
  }

  .import-preview {
    grid-template-columns: 1fr;
  }

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

  .import-preview-head .secondary-button {
    width: 100%;
  }

  .sidebar {
    width: min(280px, 86vw);
  }

  .upload-button {
    min-height: 42px;
  }

  .product-card-footer .primary-button,
  .product-card-footer .secondary-button {
    min-height: 42px;
  }

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

  .page-heading {
    display: grid;
  }

  .page-heading .primary-button {
    width: 100%;
  }

  .page-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .page-actions .primary-button,
  .page-actions .secondary-button {
    width: 100%;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal-panel {
    width: 100%;
    max-height: 92vh;
    border-radius: 14px 14px 0 0;
  }

  .table-footer {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .upload-button {
    width: 100%;
  }

  .product-image-area,
  .product-image-area img,
  .fabric-swatch.product-placeholder {
    height: 260px;
    min-height: 260px;
  }
}

