:root {
  --ink: #202124;
  --muted: #667085;
  --line: #e5e7eb;
  --paper: #ffffff;
  --panel: #f7f7f5;
  --rose: #c94f63;
  --rose-dark: #9f3548;
  --green: #0f8a5f;
  --blue: #2563eb;
  --shadow: 0 18px 45px rgba(32, 33, 36, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--panel);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
}

.auth-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(201, 79, 99, 0.16), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(15, 138, 95, 0.13), transparent 26%),
    linear-gradient(135deg, #fff8f5 0%, #f7f7f5 52%, #eef7f2 100%);
}

.auth-card {
  width: min(390px, 100%);
  display: grid;
  gap: 16px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 20px;
  padding: clamp(22px, 5vw, 34px);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 26px 70px rgba(32, 33, 36, 0.12);
  backdrop-filter: blur(18px);
}

.auth-brand {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.auth-brand-centered {
  justify-content: center;
  text-align: center;
}

.auth-logo {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  font-size: 17px;
}

.auth-brand h1 {
  margin: 0;
  font-size: clamp(24px, 5vw, 30px);
  line-height: 1.15;
}

.auth-loading,
.auth-error {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.google-login-button,
.email-otp-form button {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  font-weight: 900;
}

.google-login-button {
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: center;
  background: var(--ink);
  color: white;
}

.google-login-button span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: white;
  color: var(--ink);
}

.email-login-toggle {
  width: fit-content;
  justify-self: center;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.email-login-toggle:hover {
  color: var(--rose-dark);
}

.email-otp-form {
  display: grid;
  gap: 10px;
}

.email-otp-form button {
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
}

.auth-error {
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(201, 79, 99, 0.08);
  color: var(--rose-dark);
  font-weight: 800;
}

.auth-loading {
  color: var(--green);
  font-weight: 800;
}

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

button {
  cursor: pointer;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 20px;
  align-items: center;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

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

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-weight: 800;
}

.brand strong,
.brand span:last-child {
  display: block;
}

.brand span:last-child {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}


.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
  padding: 22px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.workspace {
  min-width: 0;
}

.workspace-topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 68px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 247, 245, 0.92);
  backdrop-filter: blur(14px);
}

.side-nav {
  display: grid;
  align-content: start;
  gap: 22px;
}

.nav-section {
  display: grid;
  gap: 8px;
}

.nav-section-title {
  margin: 0;
  padding: 0 8px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.nav-link {
  width: calc(100% - 18px);
  justify-content: flex-start;
  text-align: left;
  min-height: 38px;
  margin-left: 18px;
  padding-left: 12px;
  font-size: 13px;
  font-weight: 600;
}
.main-tabs {
  display: flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f1f2f4;
}

.tab-button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.tab-button.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(32, 33, 36, 0.08);
}

.language-toggle,
.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-weight: 800;
}

.sync-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f7f7f5;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sync-status[data-state="online"] {
  border-color: rgba(15, 138, 95, 0.24);
  background: rgba(15, 138, 95, 0.08);
  color: var(--green);
}

.sync-status[data-state="error"] {
  border-color: rgba(201, 79, 99, 0.28);
  background: rgba(201, 79, 99, 0.08);
  color: var(--rose-dark);
}

.auth-user-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: white;
  box-shadow: 0 8px 24px rgba(32, 33, 36, 0.06);
}

.auth-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink) center/cover;
  color: white;
  font-weight: 900;
}

.auth-user-card strong,
.auth-user-card span:not(.auth-avatar) {
  display: block;
}

.auth-user-card span:not(.auth-avatar) {
  color: var(--muted);
  font-size: 11px;
  word-break: break-word;
}

.logout-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.workspace-topbar .auth-user-card {
  grid-template-columns: auto minmax(120px, auto) auto;
  max-width: min(100%, 460px);
}

.workspace-topbar .logout-button {
  grid-column: auto;
}

.small-avatar {
  width: 34px;
  height: 34px;
  font-size: 13px;
}

main {
  padding: 28px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.page-heading,
.store-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}


.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.breadcrumb span:last-child,
.breadcrumb-detail.visible:last-child {
  color: var(--ink);
}

.breadcrumb-detail {
  display: none;
}

.breadcrumb-detail.visible {
  display: inline;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--rose-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
}

.primary-action {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: var(--rose);
  color: white;
  font-weight: 800;
}

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

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--paper);
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

.toolbar,
.store-filters {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(201, 79, 99, 0.16);
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  margin-top: 18px;
}

.table-wrap,
.detail-panel,
.product-dialog form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover,
tbody tr.selected {
  background: #fff7f8;
}

.product-cell {
  display: grid;
  grid-template-columns: 58px minmax(170px, 1fr);
  gap: 12px;
  align-items: center;
}

.product-cell img,
.store-card img {
  width: 100%;
  object-fit: cover;
  background: #ececec;
}

.product-cell img {
  height: 58px;
  border-radius: 8px;
}

.product-name {
  margin: 0 0 4px;
  font-weight: 800;
}

.sku-line,
.muted {
  color: var(--muted);
  font-size: 13px;
}

.status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.status.active {
  background: #e8f7ef;
  color: var(--green);
}

.status.draft {
  background: #eef4ff;
  color: var(--blue);
}

.status.hidden {
  background: #f1f1f1;
  color: #555;
}

.detail-panel {
  padding: 18px;
  align-self: start;
}

.detail-panel img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 16px;
}

.detail-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.secondary-action,
.danger-action {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 800;
}

.secondary-action {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.danger-action {
  border: 1px solid #ffd5dc;
  background: #fff1f3;
  color: var(--rose-dark);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.detail-row span:first-child {
  color: var(--muted);
  font-size: 13px;
}

.variant-chips,
.store-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip,
.option-chip {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: white;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.store-hero {
  min-height: 260px;
  padding: 34px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.64)),
    url("https://images.unsplash.com/photo-1543163521-1bf539c55dd2?auto=format&fit=crop&w=1600&q=80") center/cover;
}

.store-hero p:not(.eyebrow) {
  max-width: 560px;
  color: var(--muted);
  font-size: 17px;
}

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

.store-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.store-card img {
  height: 290px;
}

.store-card-body {
  padding: 16px;
}

.store-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.price-line {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin: 10px 0 14px;
}

.price-line strong {
  color: var(--rose-dark);
  font-size: 20px;
}

.price-line del {
  color: var(--muted);
  font-size: 13px;
}

.store-options {
  margin-top: 10px;
}

.stock-note {
  display: block;
  margin-top: 14px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}


.category-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.mobile-product-detail {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(20, 16, 14, 0.18);
}

.mobile-detail-open {
  overflow: hidden;
}

.mobile-commerce-shell {
  height: 100dvh;
  width: min(430px, 100%);
  margin: 0 auto;
  overflow-y: auto;
  background: white;
  color: #1f1f1f;
  scroll-behavior: smooth;
}

.mobile-commerce-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px 36px;
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid #f0ece9;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
}

.mobile-icon-button,
.mobile-commerce-bottom-bar > :not(.mobile-buy-now) {
  display: grid;
  place-items: center;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: #f6f3f1;
  color: #252525;
  font-size: 18px;
  text-decoration: none;
}

.mobile-search-pill {
  min-width: 0;
  overflow: hidden;
  border-radius: 999px;
  padding: 10px 14px;
  background: #f6f3f1;
  color: #79716d;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mobile-commerce-tabs {
  position: sticky;
  top: 58px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 0;
  overflow: hidden;
  border-bottom: 1px solid #f0ece9;
  background: rgba(255, 255, 255, 0.96);
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: 180ms ease;
}

.mobile-commerce-tabs.visible {
  min-height: 46px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-commerce-tabs button {
  position: relative;
  border: 0;
  background: transparent;
  color: #6b625d;
  font-size: 13px;
}

.mobile-commerce-tabs button.active {
  color: #202124;
  font-weight: 800;
}

.mobile-commerce-tabs button.active::after {
  position: absolute;
  right: 16px;
  bottom: 0;
  left: 16px;
  height: 2px;
  border-radius: 999px;
  background: #c56d52;
  content: "";
}

.mobile-commerce-shell main {
  display: grid;
  gap: 10px;
  padding: 0 0 96px;
  background: #faf8f7;
}

.mobile-commerce-gallery {
  position: relative;
  background: white;
}

.mobile-gallery-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.mobile-gallery-track::-webkit-scrollbar {
  display: none;
}

.mobile-gallery-track img {
  width: 100%;
  min-width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  scroll-snap-align: start;
}

.mobile-gallery-count {
  position: absolute;
  right: 14px;
  bottom: 14px;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(31, 31, 31, 0.72);
  color: white;
  font-size: 12px;
}

.mobile-commerce-card {
  border-top: 1px solid #f0ece9;
  border-bottom: 1px solid #f0ece9;
  background: white;
  padding: 16px;
}

.mobile-price-line {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.mobile-price-line strong {
  color: #c56d52;
  font-size: 27px;
}

.mobile-price-line del {
  color: #8a817d;
}

.mobile-price-line span {
  border-radius: 999px;
  padding: 3px 7px;
  background: #fff0eb;
  color: #c56d52;
  font-size: 12px;
  font-weight: 800;
}

.mobile-price-card h1 {
  display: -webkit-box;
  overflow: hidden;
  margin: 10px 0 8px;
  font-size: 20px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mobile-price-card p,
.mobile-voucher-card p,
.mobile-policy-card p,
.mobile-commerce-card p {
  margin: 0;
  color: #746b67;
}

.mobile-policy-card {
  padding: 0;
}

.mobile-policy-card button {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  border: 0;
  padding: 16px;
  background: white;
  color: #202124;
  text-align: left;
}

.mobile-policy-card small {
  color: #746b67;
}

.mobile-policy-content {
  border-top: 1px solid #f0ece9;
  padding: 0 16px 16px;
}

.mobile-policy-content h3,
.mobile-commerce-card h3 {
  margin: 16px 0 6px;
  font-size: 15px;
}

.mobile-commerce-card h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.mobile-selected-variant {
  margin-bottom: 12px !important;
}

.mobile-variant-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
}

.mobile-variant-list button {
  display: grid;
  min-width: 68px;
  gap: 6px;
  justify-items: center;
  border: 1px solid #ece6e2;
  border-radius: 12px;
  padding: 7px;
  background: white;
}

.mobile-variant-list button.selected {
  border-color: #c56d52;
  box-shadow: 0 0 0 1px #c56d52 inset;
}

.mobile-variant-list img,
.mobile-variant-list span {
  width: 52px;
  height: 52px;
  border-radius: 9px;
  object-fit: cover;
  background: #f6f3f1;
}

.mobile-variant-list span {
  display: grid;
  place-items: center;
}

.mobile-variant-list em {
  color: #746b67;
  font-size: 12px;
  font-style: normal;
}

.mobile-detail-grid {
  display: grid;
  gap: 0;
}

.mobile-detail-grid > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  border-top: 1px solid #f0ece9;
  padding: 12px 0;
}

.mobile-detail-grid span {
  color: #746b67;
}

.mobile-detail-grid .extra {
  display: none;
}

.mobile-detail-grid.expanded .extra {
  display: grid;
}

.mobile-text-button {
  border: 0;
  padding: 8px 0 0;
  background: transparent;
  color: #c56d52;
  font-weight: 800;
}

.mobile-video-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #eee8e5;
}

.mobile-video-card video {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.mobile-video-card button {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: rgba(31, 31, 31, 0.72);
  color: white;
  transform: translate(-50%, -50%);
}

.mobile-size-guide table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
}

.mobile-size-guide th,
.mobile-size-guide td {
  padding: 11px 0;
  border-bottom: 1px solid #f0ece9;
  text-transform: none;
}

.mobile-rich-description [data-rich-description].collapsed {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
}

.mobile-commerce-bottom-bar {
  position: fixed;
  right: 50%;
  bottom: 0;
  left: 50%;
  width: min(430px, 100%);
  transform: translateX(-50%);
  z-index: 6;
  display: grid;
  grid-template-columns: 48px 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-top: 1px solid #eee7e3;
  padding: 10px 14px max(10px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
}

.mobile-buy-now {
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  padding: 8px 14px;
  background: #c56d52;
  color: white;
  text-align: left;
}

.mobile-buy-now strong,
.mobile-buy-now small {
  display: block;
}

.mobile-buy-now small {
  opacity: 0.82;
}

.accounts-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.account-form {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: white;
  box-shadow: var(--shadow);
}

.account-form h2 {
  margin: 0;
  font-size: 18px;
}

.account-cell .auth-avatar {
  flex: 0 0 auto;
}

.category-form {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.category-table-wrap table {
  min-width: 620px;
}
.product-dialog {
  width: min(820px, calc(100vw - 28px));
  border: 0;
  padding: 0;
  background: transparent;
}

.product-dialog::backdrop {
  background: rgba(32, 33, 36, 0.45);
}

.product-dialog form {
  padding: 22px;
}

.dialog-head,
.dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

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

.span-2 {
  grid-column: span 2;
}

.checkbox-field {
  grid-template-columns: auto 1fr;
  align-items: center;
  align-self: end;
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
}

.dialog-actions {
  justify-content: flex-end;
}

.dialog-actions button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  background: white;
  font-weight: 800;
}

.save-product-action {
  color: var(--ink);
}


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

.dialog-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.dialog-head h2 {
  font-size: 18px;
  font-weight: 800;
}

.product-dialog {
  width: min(1040px, calc(100vw - 28px));
}

.product-detail-form {
  gap: 18px;
}

.form-section {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfbfa;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.section-title-row h3 {
  margin: 0;
  font-size: 16px;
}

.section-title-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.compact-grid {
  margin: 0;
}

.detail-info-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.basic-image-uploader {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #eceef2;
  border-radius: 10px;
  background: white;
}

.video-uploader {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #eceef2;
  border-radius: 10px;
  background: white;
}

.video-picker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.video-preview {
  display: flex;
  align-items: stretch;
}

.video-preview-card {
  position: relative;
  width: 160px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.video-preview-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
}

.video-upload-tile {
  flex: 0 0 auto;
  width: 120px;
  min-height: 82px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 1px dashed #d4d8df;
  border-radius: 8px;
  background: #fafafa;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.video-upload-tile input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.remove-video-button {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 1;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(32, 33, 36, 0.7);
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.status-inline-field {
  min-width: 190px;
}

.status-inline-field select {
  min-height: 38px;
}

.image-uploader-head {
  display: grid;
  gap: 8px;
}

.image-uploader-head strong {
  font-size: 14px;
}

.image-uploader-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.required-mark {
  color: #e23b3b;
}

.image-upload-tile {
  flex: 0 0 auto;
  width: 82px;
  min-height: 82px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 1px dashed #d4d8df;
  border-radius: 8px;
  background: #fafafa;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.image-upload-tile input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f0f2f5;
  color: var(--ink);
}

.upload-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.image-picker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.ratio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f5f5f5;
  color: var(--ink);
}

.ratio-option input {
  width: 16px;
  min-height: 16px;
}

.ratio-option small {
  color: #9aa0a6;
  font-size: 13px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 800;
}

.variant-builder {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.variant-builder-head,
.variant-option-top {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  align-items: center;
}

.variant-builder-head h4 {
  margin: 0;
  font-size: 15px;
}

.add-variant-option {
  width: fit-content;
  min-height: 32px;
  border: 1px dashed #ccd2dc;
  border-radius: 7px;
  padding: 0 10px;
  background: white;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.add-variant-option[hidden] {
  display: none;
}

.variant-options {
  display: grid;
  gap: 10px;
}

.variant-option-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid #eceef2;
  border-radius: 8px;
  background: #fbfbfa;
}

.variant-option-top label {
  flex: 1;
}

.variant-value-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.variant-value-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 30px;
  padding: 0 8px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  font-size: 13px;
  font-weight: 800;
}

.variant-value-chip button,
.icon-delete-button {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #eef0f3;
  color: var(--muted);
  font-weight: 900;
}

.variant-value-chip button {
  width: 20px;
  height: 20px;
}

.icon-delete-button {
  width: 30px;
  height: 30px;
}

.variant-value-chip button:hover,
.icon-delete-button:hover {
  background: #fee2e2;
  color: #b42318;
}

.variant-value-list input {
  width: min(240px, 100%);
  min-height: 32px;
}

.variant-matrix {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}

.variant-matrix-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.variant-list-table {
  min-width: 780px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: white;
}

.variant-table-head,
.variant-color-group {
  display: grid;
  grid-template-columns: 120px minmax(90px, 0.7fr) minmax(160px, 1.2fr) minmax(140px, 1fr) minmax(180px, 1.3fr) 48px;
}

.variant-table-head {
  background: #f5f5f5;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.variant-table-head span,
.variant-color-cell,
.variant-row > * {
  min-height: 68px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.variant-table-head span {
  justify-content: center;
}

.variant-color-cell {
  grid-row: span var(--variant-row-count);
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.variant-size-rows {
  display: grid;
  grid-column: 2 / -1;
}

.color-image-upload {
  width: 58px;
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 3px;
  border: 1px solid #d4d8df;
  border-radius: 8px;
  background: #fafafa;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.color-image-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.color-image-upload img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 7px;
}

.variant-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.7fr) minmax(160px, 1.2fr) minmax(140px, 1fr) minmax(180px, 1.3fr) 48px;
}

.variant-row-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.variant-row input {
  min-height: 36px;
}

.variant-row > *:last-child,
.variant-table-head span:last-child {
  border-right: 0;
  justify-content: center;
}

.image-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.image-preview-item {
  position: relative;
  display: grid;
  gap: 6px;
  width: 82px;
  cursor: grab;
}

.image-preview-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.image-preview-item span {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 2px 5px;
  border-radius: 0 6px 0 8px;
  background: rgba(32, 33, 36, 0.58);
  color: white;
  font-size: 11px;
  font-weight: 800;
}

.remove-image-button {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 1;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(32, 33, 36, 0.7);
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.image-empty-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  align-self: center;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.editor-toolbar button {
  min-width: 34px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 9px;
  background: white;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.editor-toolbar button:hover {
  border-color: var(--rose);
  color: var(--rose-dark);
}

.rich-editor {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: white;
  outline: none;
  line-height: 1.6;
}

.rich-editor:empty::before {
  content: attr(data-i18n-placeholder);
  color: var(--muted);
}

.rich-editor h1 {
  font-size: 30px;
}

.rich-editor h2 {
  font-size: 24px;
}

.rich-editor h3 {
  font-size: 19px;
}

.rich-editor img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.rich-editor .seo-img-left {
  display: block;
  margin: 10px auto 10px 0;
}

.rich-editor .seo-img-center {
  display: block;
  margin: 10px auto;
}

.rich-editor .seo-img-right {
  display: block;
  margin: 10px 0 10px auto;
}
@media (max-width: 1040px) {
  .admin-layout,
  .product-grid,
  .accounts-layout {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    order: -1;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    grid-template-rows: auto auto auto;
  }

  .page-heading,
  .store-hero {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  main {
    padding: 16px;
  }

  .workspace-topbar {
    padding: 10px 16px;
  }

  .workspace-topbar .auth-user-card {
    width: 100%;
    grid-template-columns: auto 1fr;
  }

  .workspace-topbar .logout-button {
    grid-column: 1 / -1;
  }

  .side-nav,
  .category-layout,
  .toolbar,
  .store-filters,
  .metrics-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .language-toggle {
    position: absolute;
    top: 14px;
    right: 14px;
  }

  .store-hero {
    min-height: auto;
    padding: 22px;
  }

  .store-card img {
    height: 230px;
  }
}
