:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #f2f5f8;
  --text: #18202b;
  --muted: #697586;
  --line: #d9e0e8;
  --brand: #17211d;
  --green: #1d8f66;
  --green-soft: #e9f7f0;
  --blue: #3478d4;
  --blue-soft: #ebf3ff;
  --orange: #c87326;
  --orange-soft: #fff2e4;
  --red: #c44949;
  --red-soft: #ffeded;
  --purple: #7752c7;
  --purple-soft: #f1ecff;
  --shadow: 0 8px 24px rgba(26, 42, 58, .09);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); touch-action: manipulation; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; letter-spacing: 0; touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
img, video { display: block; max-width: 100%; }

.site-header { position: sticky; top: 0; z-index: 30; min-height: 58px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 7px clamp(12px, 3vw, 34px); background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--brand); }
.brand-logo { width: 36px; height: 36px; object-fit: contain; }
.desktop-nav { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 2.3vw, 30px); font-weight: 650; }
.desktop-nav a, .header-tool { padding: 8px 4px; border-bottom: 2px solid transparent; }
.desktop-nav a:hover { border-color: var(--brand); }
.header-actions { display: flex; align-items: center; gap: 7px; }
.header-tool, .language-control { min-height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; white-space: nowrap; }
.header-tool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.header-tool b { min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; border-radius: 9px; color: #fff; background: var(--red); font-size: 11px; }
.header-tool b[hidden] { display: none; }
.language-control select { max-width: 98px; border: 0; background: transparent; outline: none; }
.mobile-header-nav { display: none; }
.app-shell { min-height: calc(100vh - 140px); }
.diy-active { overflow: hidden; }
.diy-active .site-footer { display: none; }

.page-width { width: min(1240px, calc(100% - 28px)); margin: 0 auto; }
.page-band { padding: 22px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h1, .section-head h2 { margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--muted); }
.eyebrow { color: var(--purple); font-weight: 750; }

.hero { min-height: 470px; position: relative; display: grid; align-items: end; overflow: hidden; background: #dfe6e2 url('/assets/products/aquamarine.jpg') center/cover no-repeat; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,20,18,.04) 25%, rgba(15,20,18,.72) 100%); }
.hero-content { position: relative; z-index: 1; width: min(1240px, calc(100% - 28px)); margin: 0 auto; padding: 0 0 38px; color: #fff; }
.hero h1 { max-width: 760px; margin: 0; font-size: clamp(32px, 5vw, 66px); line-height: 1.03; }
.hero p { max-width: 580px; margin: 13px 0 20px; font-size: 17px; }
.button-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); font-weight: 700; }
.btn:hover { border-color: #9ba7b4; }
.btn-primary { border-color: var(--brand); background: var(--brand); color: #fff; }
.btn-danger { border-color: #e7baba; background: var(--red-soft); color: var(--red); }
.btn-purple { border-color: #d3c5f5; background: var(--purple-soft); color: var(--purple); }
.btn:disabled { cursor: not-allowed; opacity: .45; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 19px; }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.product-card { min-width: 0; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.product-card img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface-soft); }
.product-card-body { padding: 11px; }
.product-card h3 { margin: 0 0 6px; font-size: 16px; }
.product-card-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); }
.price { color: var(--text); font-size: 18px; font-weight: 800; }
.favorite { position: absolute; z-index: 2; top: 8px; right: 8px; width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.8); border-radius: 50%; background: rgba(255,255,255,.86); }
.favorite.active { color: var(--red); }

.feature-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.feature-item { min-height: 118px; display: flex; flex-direction: column; justify-content: end; padding: 14px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); }
.feature-item:nth-child(1) { background: var(--green-soft); }
.feature-item:nth-child(2) { background: var(--blue-soft); }
.feature-item:nth-child(3) { background: var(--orange-soft); }
.feature-item:nth-child(4) { background: var(--purple-soft); }
.feature-item strong { font-size: 18px; }

.catalog-toolbar { display: grid; grid-template-columns: minmax(180px, 1fr) repeat(2, auto); gap: 8px; margin-bottom: 12px; }
.field, .select-field, textarea { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); outline: none; }
.field:focus, .select-field:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(52,120,212,.12); }

.product-detail { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); gap: 22px; align-items: start; padding-top: 18px; }
.media-panel { min-width: 0; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 9px; position: sticky; top: 76px; }
.media-thumbs { display: flex; flex-direction: column; gap: 7px; max-height: 680px; overflow: auto; }
.media-thumb { width: 68px; height: 68px; padding: 0; border: 2px solid transparent; border-radius: 5px; overflow: hidden; background: var(--surface-soft); }
.media-thumb.active { border-color: var(--brand); }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-main { position: relative; min-height: 520px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.media-main img, .media-main video { width: 100%; min-height: 520px; max-height: 720px; object-fit: contain; background: #f2f3f1; }
.purchase-panel { position: sticky; top: 76px; padding: 2px 0 18px; }
.purchase-panel h1 { margin: 0 0 8px; font-size: 28px; }
.rating-line { display: flex; align-items: center; gap: 10px; margin: 8px 0 14px; }
.variant-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 9px 0 14px; }
.variant-btn { min-height: 42px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.variant-btn.selected { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.variant-btn.sold-out { color: #9aa2ac; background: #eceff2; text-decoration: line-through; cursor: not-allowed; }
.quantity-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stepper { display: grid; grid-template-columns: 38px 48px 38px; height: 38px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.stepper button { border: 0; background: var(--surface-soft); }
.stepper span { display: grid; place-items: center; border-inline: 1px solid var(--line); }
.shipping-box { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 12px 0; }
.shipping-box div { padding: 10px; background: var(--blue-soft); border-left: 3px solid var(--blue); }
.shipping-box small { display: block; color: var(--muted); margin-bottom: 3px; }
.buy-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary { padding: 13px 2px; cursor: pointer; font-weight: 750; }
.accordion p { color: var(--muted); line-height: 1.75; }
.long-detail { width: min(900px, 100%); margin: 28px auto; }
.long-detail img { width: 100%; height: auto; margin: 0 auto 10px; object-fit: contain; background: #fff; }

.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; }
.cart-list { display: grid; gap: 9px; }
.cart-line { display: grid; grid-template-columns: 108px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); background: #fff; }
.cart-line img { width: 108px; height: 108px; object-fit: contain; background: var(--surface-soft); }
.cart-summary { position: sticky; top: 76px; padding: 15px; border: 1px solid var(--line); background: #fff; }
.summary-row { display: flex; justify-content: space-between; gap: 10px; margin: 8px 0; }

.site-footer { display: grid; grid-template-columns: minmax(180px,.7fr) minmax(420px,1.3fr) minmax(260px,.8fr); gap: 24px; padding: 24px clamp(14px,3vw,40px) 12px; border-top: 1px solid var(--line); background: #fff; }
.site-footer p { color: var(--muted); margin: 5px 0 0; }
.footer-columns { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.footer-columns section { display: grid; align-content: start; gap: 7px; }
.footer-columns h2 { margin: 0 0 3px; font-size: 15px; }
.footer-columns a { color: var(--muted); font-size: 13px; }
.footer-newsletter { display: grid; align-content: start; gap: 9px; }
.footer-newsletter label { display: grid; gap: 4px; }
.footer-newsletter label span { color: var(--muted); font-size: 12px; }
.footer-newsletter > div { display: grid; grid-template-columns: minmax(0,1fr) auto; }
.footer-newsletter input { min-width: 0; min-height: 40px; padding: 8px; border: 1px solid var(--line); }
.footer-trust { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.footer-trust > div { display: grid; gap: 3px; }
.footer-trust span { color: var(--muted); font-size: 13px; }
.footer-trust nav { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px 14px; }
.footer-trust a { color: var(--green); font-weight: 700; }
.footer-legal { grid-column: 1 / -1; display: flex; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translate(-50%, 20px); padding: 10px 15px; border-radius: 6px; background: #18211e; color: #fff; opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal-backdrop { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(15,20,25,.55); }
.modal { width: min(720px, 100%); max-height: 88vh; overflow: auto; padding: 16px; background: #fff; border-radius: 8px; box-shadow: var(--shadow); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.confirmation-modal { width: min(420px, 100%); }
.confirmation-modal > p { margin: 0 0 18px; line-height: 1.6; color: var(--muted); }
.confirmation-modal > .button-row { justify-content: flex-end; flex-wrap: nowrap; }
.background-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.background-option { min-height: 150px; padding: 8px; border: 1px solid var(--line); background: #fff; }
.plate-swatch { width: 100%; aspect-ratio: 1; border-radius: 50%; border: 9px solid var(--outer); background: radial-gradient(circle, var(--center), var(--inner) 68%, var(--outer) 70%); box-shadow: inset 0 8px 16px rgba(255,255,255,.6), inset 0 -10px 18px rgba(0,0,0,.12); }

/* Admin */
.admin-body { overflow: hidden; }
.admin-body small { font-size: 12px; }
.admin-body .check-row { min-width: 0; display: flex; align-items: center; gap: 8px; }
.admin-body .check-row input[type="checkbox"], .admin-body .check-row input[type="radio"] { width: 18px; height: 18px; flex: 0 0 18px; }
.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: #edf2f6; }
.login-panel { width: min(420px, 100%); padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.login-panel h1 { margin: 0 0 6px; }
.form-stack { display: grid; gap: 10px; }
.admin-shell { height: 100vh; display: grid; grid-template-columns: 206px minmax(0, 1fr); overflow: hidden; }
.admin-sidebar { padding: 10px; overflow-y: auto; color: #25313e; background: #eef3f7; border-right: 1px solid var(--line); }
.admin-brand { display: flex; align-items: center; gap: 8px; padding: 5px 5px 12px; font-weight: 850; }
.admin-nav { display: grid; gap: 4px; }
.admin-nav button { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 0; border-left: 4px solid transparent; border-radius: 5px; background: transparent; text-align: left; font-weight: 700; }
.admin-nav button.active { border-color: var(--nav-color); background: var(--nav-soft); color: var(--nav-color); }
.nav-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--nav-color); }
.admin-main { min-width: 0; display: grid; grid-template-rows: 54px minmax(0, 1fr); overflow: hidden; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 14px; border-bottom: 1px solid var(--line); background: #fff; }
.admin-breadcrumb { min-width: 150px; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.admin-breadcrumb span, .admin-breadcrumb b { color: var(--muted); font-weight: 500; }
.admin-global-search { width: min(520px,42vw); position: relative; display: grid; grid-template-columns: 28px minmax(0,1fr); align-items: center; border: 1px solid var(--line); background: #f7f9fa; }
.admin-global-search > span { color: var(--muted); text-align: center; font-size: 20px; }
.admin-global-search > input { width: 100%; min-height: 36px; padding: 6px 8px 6px 0; border: 0; background: transparent; outline: none; font-size: 14px; }
.admin-search-results { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; max-height: min(560px,70vh); overflow: auto; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.admin-search-results button { width: 100%; display: grid; grid-template-columns: 46px minmax(0,1fr); gap: 8px; align-items: center; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; }
.admin-search-results button:hover { background: var(--blue-soft); }
.admin-search-results button > span:last-child { min-width: 0; }
.admin-search-results strong, .admin-search-results small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-search-results small { margin-top: 2px; color: var(--muted); }
.admin-search-results > p { margin: 0; padding: 18px; color: var(--muted); text-align: center; }
.search-kind { padding: 3px 5px; color: var(--blue); background: var(--blue-soft); text-align: center; font-size: 12px; font-weight: 750; }
.admin-topbar-actions { display: flex; align-items: center; gap: 4px; }
.topbar-action { min-height: 36px; display: flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid transparent; color: var(--text); background: transparent; text-decoration: none; cursor: pointer; white-space: nowrap; }
.topbar-action:hover, .admin-topbar-menu[open] > .topbar-action { border-color: var(--line); background: #f4f7f8; }
.password-required-action { border-color: #e2a461; color: #8b4617; background: var(--orange-soft); }
.topbar-action > b { font-size: 13px; }
.topbar-action > em { min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 4px; color: #fff; background: var(--red); border-radius: 10px; font-size: 10px; font-style: normal; }
.admin-topbar-menu { position: relative; }
.admin-topbar-menu > summary { list-style: none; }
.admin-topbar-menu > summary::-webkit-details-marker { display: none; }
.admin-avatar { width: 25px; height: 25px; display: grid; place-items: center; color: #fff; background: var(--blue); font-size: 12px; font-weight: 850; }
.topbar-popover { width: 330px; position: absolute; z-index: 32; top: calc(100% + 7px); right: 0; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.topbar-popover > header { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; border-bottom: 1px solid var(--line); background: #f4f7f8; }
.alert-popover > button { width: 100%; display: grid; grid-template-columns: 7px minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 9px 10px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; }
.alert-popover > button:hover { background: #f7f9fa; }
.alert-popover > button span { min-width: 0; }
.alert-popover > button strong, .alert-popover > button small { display: block; }
.alert-popover > button small { margin-top: 2px; color: var(--muted); }
.alert-tone { width: 5px; height: 34px; background: var(--blue); }
.alert-tone.orange { background: var(--orange); }
.alert-tone.red { background: var(--red); }
.alert-tone.purple { background: var(--purple); }
.account-popover { width: 230px; padding: 6px; }
.account-popover > div { display: grid; gap: 2px; padding: 7px 8px 9px; border-bottom: 1px solid var(--line); }
.account-popover small { color: var(--muted); overflow-wrap: anywhere; }
.account-popover > button { width: 100%; min-height: 35px; padding: 6px 8px; border: 0; background: #fff; text-align: left; }
.account-popover > button:hover { background: #f2f5f7; }
.admin-content { min-height: 0; overflow: auto; padding: 12px; }
.admin-content h1 { margin: 0; font-size: 23px; }
.admin-section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.metric-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.metric { padding: 13px; border: 1px solid var(--line); border-top: 4px solid var(--metric-color); background: #fff; }
.metric strong { display: block; margin-top: 5px; font-size: 25px; }
.workbench { height: calc(100vh - 90px); min-height: 600px; display: grid; grid-template-columns: var(--list-width, 360px) 7px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.workbench-list { min-width: 0; overflow: auto; border-right: 1px solid var(--line); }
.list-pagination { position: sticky; bottom: 0; z-index: 2; min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 6px 8px; border-top: 1px solid var(--line); background: rgba(255,255,255,.97); }
.list-pagination span { color: var(--muted); font-size: 13px; }
.admin-content[aria-busy="true"] { cursor: progress; }
.admin-content[aria-busy="true"]::after { content: "正在读取数据"; position: fixed; right: 18px; bottom: 18px; z-index: 80; padding: 7px 11px; border: 1px solid var(--line); border-radius: 5px; color: var(--text); background: #fff; box-shadow: var(--shadow); font-weight: 700; }
.workbench-resizer { cursor: col-resize; background: #edf1f5; border-inline: 1px solid #d2d9e2; }
.workbench-resizer:hover { background: var(--blue-soft); }
.workbench-editor { min-width: 0; overflow-x: hidden; overflow-y: auto; padding: 12px; }
.list-toolbar { position: sticky; top: 0; z-index: 2; display: grid; gap: 7px; padding: 8px; background: #fff; border-bottom: 1px solid var(--line); }
.product-filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.product-filter-row .select-field { min-width: 0; }
.product-list-item { display: grid; grid-template-columns: minmax(0,1fr) 34px; align-items: stretch; border-bottom: 1px solid var(--line); background: #fff; }
.product-list-item .list-row { border-bottom: 0; }
.product-list-order { display: grid; grid-template-rows: 1fr 1fr; border-left: 1px solid var(--line); }
.product-list-order .icon-btn { width: 34px; height: auto; min-height: 34px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 14px; }
.product-list-order .icon-btn:last-child { border-bottom: 0; }
.list-row { width: 100%; display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 9px; padding: 8px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; }
.list-row.active { background: var(--blue-soft); box-shadow: inset 4px 0 var(--blue); }
.list-row img { width: 54px; height: 54px; object-fit: cover; }
.list-row strong, .list-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row small { color: var(--muted); margin-top: 4px; }
.list-row em { display: flex; gap: 4px; margin-top: 5px; font-style: normal; }
.list-row em .status { min-height: 21px; padding: 2px 5px; font-size: 12px; }
.form-section { margin-bottom: 10px; padding: 11px; border: 1px solid var(--line); border-left: 4px solid var(--section-color, var(--blue)); background: #fff; }
.form-section h2 { margin: 0 0 9px; font-size: 17px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-label { display: grid; gap: 4px; color: var(--muted); font-size: 13px; }
.form-label small { font-size: 12px; line-height: 1.4; }
.form-label input, .form-label select, .form-label textarea { color: var(--text); font-size: 15px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.sku-table { width: 100%; border-collapse: collapse; }
.sku-table th, .sku-table td { padding: 6px; border-bottom: 1px solid var(--line); text-align: left; }
.sku-table input { min-width: 90px; width: 100%; min-height: 36px; padding: 6px; border: 1px solid var(--line); }
.sticky-editor-head { position: sticky; z-index: 8; top: -12px; flex-wrap: wrap; margin: -12px 0 10px; padding: 10px 0; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.product-editor-actions { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.product-editor-actions .btn { min-height: 36px; padding: 6px 10px; }
.product-editor-actions .icon-btn { width: 36px; height: 36px; }
.editor-save-state { display: inline-flex; margin-left: 5px; padding: 2px 5px; color: var(--green); background: var(--green-soft); font-size: 12px; font-weight: 750; }
.editor-save-state.dirty { color: var(--orange); background: var(--orange-soft); }
.editor-closed { min-height: 260px; display: grid; place-items: center; align-content: center; gap: 5px; color: var(--muted); text-align: center; }
.editor-closed strong { color: var(--text); font-size: 18px; }
.editor-closed p { margin: 0; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.section-title-row h2 { margin-bottom: 2px; }
.section-title-row p { margin: 0; color: var(--muted); font-size: 13px; }
.compact-toggle { min-height: 40px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); }
.product-media-editor { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 10px; }
.video-media-column, .image-media-column { min-width: 0; display: grid; align-content: start; gap: 7px; }
.product-media-dropzone { min-height: 136px; display: grid; place-items: center; align-content: center; gap: 4px; padding: 9px; border: 2px dashed #b8c5d2; background: #f7f9fb; text-align: center; cursor: pointer; }
.product-media-dropzone.image-drop { min-height: 72px; }
.product-media-dropzone.dragging, .sku-image-drop.dragging { border-color: var(--blue); background: var(--blue-soft); }
.product-media-dropzone small { color: var(--muted); }
.product-media-dropzone > input { display: none; }
.video-admin-preview { width: 100%; height: 108px; display: grid; place-items: center; overflow: hidden; background: #e9edf0; color: var(--muted); font-weight: 800; }
.video-admin-preview video { width: 100%; height: 100%; object-fit: contain; }
.product-media-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap: 7px; }
.product-media-card { min-width: 0; display: grid; grid-template-rows: 116px auto auto; gap: 5px; padding: 5px; border: 1px solid var(--line); background: #fff; cursor: grab; }
.product-media-card > * { min-width: 0; }
.product-media-card.dragging { opacity: .45; }
.product-media-card .icon-btn.selected { color: #fff; border-color: var(--blue); background: var(--blue); }
.product-media-card img { width: 100%; height: 116px; object-fit: contain; background: #eef1f2; }
.product-media-card strong, .product-media-card span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-media-card span { color: var(--muted); font-size: 12px; }
.detail-media-list { margin-top: 8px; grid-template-columns: repeat(auto-fill,minmax(135px,1fr)); }
.product-information-grid textarea { min-height: 88px; }
.media-card-actions { display: grid; grid-template-columns: repeat(3,32px); justify-content: end; gap: 4px; }
.product-media-card[data-media-kind="gallery"] .media-card-actions { grid-template-columns: repeat(4,32px); }
.media-card-actions .icon-btn, .sku-remove { width: 32px; height: 32px; min-height: 32px; font-size: 16px; }
.sku-table-wrap { width: 100%; overflow: auto; }
.sku-table { min-width: 1160px; }
.sku-table th:nth-child(1) { min-width: 132px; }
.sku-table th:nth-child(2), .sku-table th:nth-child(3) { min-width: 130px; }
.sku-table th:nth-child(4), .sku-table th:nth-child(5), .sku-table th:nth-child(6), .sku-table th:nth-child(7) { min-width: 90px; }
.sku-table th:nth-child(9) { min-width: 190px; }
.sku-enabled { min-height: 36px; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.sku-enabled input { min-width: 18px; width: 18px; min-height: 18px; }
.sku-image-drop { display: grid; grid-template-columns: 42px minmax(120px,1fr); gap: 4px 6px; align-items: center; padding: 4px; border: 1px dashed #c7d0d8; background: #fafbfc; }
.sku-image-drop img { grid-row: span 2; width: 42px; height: 42px; object-fit: contain; background: #eef1f2; }
.sku-image-drop input[data-sku-image-file] { display: none; }
.sku-image-drop input[data-field="image"] { min-width: 120px; min-height: 31px; }
.sku-image-drop span { color: var(--muted); font-size: 12px; }
.status { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 8px; border-radius: 4px; font-weight: 750; font-size: 12px; }
.status.green { color: var(--green); background: var(--green-soft); }
.status.orange { color: var(--orange); background: var(--orange-soft); }
.status.red { color: var(--red); background: var(--red-soft); }
.status.purple { color: var(--purple); background: var(--purple-soft); }
.admin-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.admin-card { padding: 11px; border: 1px solid var(--line); background: #fff; }
.admin-card h3 { margin: 0 0 8px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.toggle-row input { width: 20px; height: 20px; }
.memory-item { padding: 10px; border-left: 4px solid var(--purple); background: var(--purple-soft); margin-bottom: 8px; }
.memory-item h3 { margin: 0 0 4px; }
.memory-item p { margin: 3px 0; color: #4f5968; }

@media (max-width: 900px) {
  .site-header { grid-template-columns: minmax(0, 1fr) auto; height: 46px; min-height: 46px; gap: 7px; padding: 3px 7px; }
  .brand { display: none; }
  .desktop-nav { display: none; }
  .mobile-header-nav { min-width: 0; display: flex; align-items: center; gap: 5px; }
  .mobile-home-menu { position: relative; }
  .mobile-home-menu summary, .mobile-diy-link { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-weight: 750; list-style: none; white-space: nowrap; }
  .mobile-home-menu summary::-webkit-details-marker { display: none; }
  .mobile-home-menu summary b { font-size: 15px; transition: transform .16s ease; }
  .mobile-home-menu[open] summary b { transform: rotate(180deg); }
  .mobile-home-menu > div { position: absolute; z-index: 50; left: 0; top: calc(100% + 7px); width: 150px; display: grid; padding: 5px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
  .mobile-home-menu > div a { min-height: 38px; display: flex; align-items: center; padding: 7px 9px; border-bottom: 1px solid #edf0f3; font-weight: 700; }
  .mobile-home-menu > div a:last-child { border-bottom: 0; }
  .header-actions { justify-content: end; }
  .hero { min-height: 410px; }
  .hero-content { padding-bottom: 28px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .product-card-meta { flex-wrap: wrap; gap: 3px 6px; }
  .product-card-meta .stars { flex: 0 0 100%; }
  .feature-strip { grid-template-columns: repeat(2, 1fr); }
  .product-detail { grid-template-columns: 1fr; }
  .media-panel, .purchase-panel { position: static; }
  .media-panel { display: block; }
  .media-thumbs { order: 2; flex-direction: row; max-height: none; overflow-x: auto; margin-top: 7px; }
  .media-main { min-height: 340px; }
  .media-main img, .media-main video { min-height: 340px; max-height: 500px; }
  .shipping-box { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .site-footer { grid-template-columns: 1fr; }
  .footer-columns { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .admin-shell { grid-template-columns: 68px minmax(0, 1fr); }
  .admin-sidebar { padding: 8px 5px; }
  .admin-brand span:last-child, .admin-nav button span:last-child { display: none; }
  .admin-nav button { justify-content: center; padding: 8px; }
  .admin-breadcrumb, .topbar-action > b { display: none; }
  .admin-topbar { padding-inline: 8px; }
  .admin-global-search { min-width: 120px; width: auto; flex: 1; }
  .admin-topbar-actions > a { display: none; }
  .topbar-action { padding-inline: 7px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .workbench { grid-template-columns: 1fr; height: auto; min-height: 0; overflow: visible; }
  .workbench-list { max-height: 260px; }
  .workbench-resizer { display: none; }
  .workbench-editor { overflow: visible; }
  .product-editor-actions { width: 100%; justify-content: flex-start; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: auto; }
  .admin-cards { grid-template-columns: 1fr; }
  .product-media-editor { grid-template-columns: 1fr; }
  .product-media-list { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .site-header { grid-template-columns: auto minmax(0,1fr) auto; gap: 9px; padding-inline: 10px; }
  .brand { gap: 5px; font-size: 15px; }
  .brand-logo { width: 29px; height: 29px; }
  .desktop-nav { gap: 12px; font-size: 13px; }
  .header-actions { gap: 4px; }
  .header-tool, .language-control { padding-inline: 7px; font-size: 13px; }
  .language-control select { max-width: 78px; font-size: 13px; }
}

@media (max-width: 520px) {
  .footer-columns { grid-template-columns: 1fr 1fr; }
  .footer-columns section:last-child { grid-column: 1 / -1; }
  .footer-legal { align-items: start; flex-direction: column; gap: 4px; }
  .footer-trust { align-items: start; flex-direction: column; }
  .footer-trust nav { justify-content: start; }
  .product-media-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body { font-size: 14px; }
  .site-header { height: 36px; min-height: 36px; gap: 3px; padding: 0 4px; }
  .header-actions { gap: 2px; }
  .header-tool, .language-control { min-height: 34px; padding: 3px 5px; }
  .header-tool { position: relative; gap: 3px; font-size: 11px; }
  .header-tool svg { width: 16px; height: 16px; }
  .header-tool b { position: absolute; z-index: 2; top: 0; right: 4px; min-width: 16px; height: 16px; padding: 0 3px; }
  .language-control { gap: 3px; }
  .language-control select { width: auto; max-width: 58px; font-size: 11px; }
  .mobile-header-nav { gap: 3px; }
  .mobile-home-menu summary, .mobile-diy-link { min-height: 34px; padding: 3px 5px; font-size: 12px; }
  .hero h1 { font-size: 36px; }
  .page-band { padding: 16px 0; }
  .feature-item { min-height: 95px; }
  .purchase-panel h1 { font-size: 23px; }
  .buy-actions { grid-template-columns: 1fr; }
  .cart-line { grid-template-columns: 82px minmax(0, 1fr); }
  .cart-line img { width: 82px; height: 82px; }
  .cart-line > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 380px) {
  .site-header { padding-inline: 3px; gap: 2px; }
  .mobile-header-nav { gap: 2px; }
  .mobile-home-menu summary, .mobile-diy-link { padding-inline: 4px; font-size: 11px; }
  .header-actions { gap: 1px; }
  .header-tool, .language-control { padding-inline: 3px; gap: 2px; }
  .header-tool { font-size: 10px; }
  .header-tool svg { width: 14px; height: 14px; }
  .language-control > span { font-size: 13px; }
  .language-control select { max-width: 52px; font-size: 10px; }
}
