/* ===== YKI — minimalist design system (RTL first) ===== */
:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #6d6d6d;
  --line: #e6e6e6;
  --soft: #f5f5f4;
  --accent: #111111;
  --on-accent: #ffffff;
  --danger: #b3261e;
  --ok: #1d7a3e;
  --warn: #b26a00;
  --info: #1f5fbf;
  --radius: 2px;
  --maxw: 1320px;
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, -apple-system, sans-serif;
  --shadow: 0 8px 30px rgba(0, 0, 0, .12);
}
[data-theme="bulk"] {
  --bg: #f4f6f9;
  --fg: #0f1b2d;
  --muted: #5d6b80;
  --line: #d9e0ea;
  --soft: #e8edf4;
  --accent: #12305a;
  --radius: 10px;
}
[data-theme="admin"] {
  --bg: #f7f7f5;
  --soft: #efefec;
  --line: #e2e2dd;
  --radius: 8px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body[data-theme="shop"] { background: #fff; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 600; line-height: 1.3; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; display: inline-block; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 1rem; }
.grow { flex: 1; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 460px; margin: 0 auto; }
.mid { max-width: 880px; margin: 0 auto; }
.page { padding-top: 24px; padding-bottom: 64px; }

/* ----- icons ----- */
.ico { display: inline-flex; width: 1.25em; height: 1.25em; vertical-align: middle; }
.ico svg { width: 100%; height: 100%; }
[dir="rtl"] .flip-rtl svg { transform: scaleX(-1); }

/* ----- buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: 0 22px;
  background: var(--accent); color: var(--on-accent);
  border: 1px solid var(--accent); border-radius: var(--radius);
  font-weight: 500; cursor: pointer; text-align: center;
  transition: opacity .15s, background .15s;
}
.btn:hover { opacity: .88; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
.btn.outline { background: transparent; color: var(--fg); border-color: var(--fg); }
.btn.ghost { background: transparent; color: var(--fg); border-color: transparent; }
.btn.ghost:hover { background: var(--soft); opacity: 1; }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.danger.outline { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.ok { background: var(--ok); border-color: var(--ok); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: .88rem; }
.btn.block { display: flex; width: 100%; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; background: none; border: 0; cursor: pointer; border-radius: 50%;
  position: relative; color: inherit;
}
.icon-btn:hover { background: var(--soft); }
.icon-btn .count {
  position: absolute; top: 4px; inset-inline-end: 2px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--fg); color: #fff; font-size: 11px; line-height: 18px; text-align: center;
}
.link { text-decoration: underline; text-underline-offset: 3px; cursor: pointer; background: none; border: 0; padding: 0; }

/* ----- forms ----- */
.field { display: block; margin-bottom: 14px; }
.field > span.lbl { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 8px 12px;
  background: #fff; border: 1px solid #cfcfcf; border-radius: var(--radius);
  outline: none;
}
.textarea { min-height: 90px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--fg); box-shadow: 0 0 0 3px rgba(0,0,0,.06); }
.input.sm, .select.sm { min-height: 34px; padding: 4px 8px; font-size: .9rem; }
.input[type="number"] { direction: ltr; text-align: start; }
.input[dir="ltr"], .ltr { direction: ltr; text-align: start; }
.field-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.check { display: flex; gap: .6rem; align-items: center; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--fg); }
.radio-card {
  display: flex; gap: .75rem; align-items: flex-start; padding: 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer;
}
.radio-card:has(input:checked) { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.radio-card input { margin-top: 5px; accent-color: var(--fg); }
.err { color: var(--danger); font-size: .88rem; margin: -6px 0 12px; }
.form-error { background: #fdeceb; color: var(--danger); padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; font-size: .92rem; }
.form-note { background: var(--soft); padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; font-size: .92rem; }

/* ----- badges / chips ----- */
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 500;
  background: var(--soft); color: var(--fg); white-space: nowrap;
}
.badge.ok { background: #e3f4e8; color: var(--ok); }
.badge.warn { background: #fff1d6; color: var(--warn); }
.badge.danger { background: #fdeceb; color: var(--danger); }
.badge.info { background: #e4eefc; color: var(--info); }
.badge.dark { background: var(--fg); color: #fff; }
.chip {
  display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 40px; padding: 0 14px;
  border: 1px solid #cfcfcf; border-radius: var(--radius); background: #fff; cursor: pointer; user-select: none;
}
.chip:hover { border-color: var(--fg); }
.chip.sel { background: var(--fg); color: #fff; border-color: var(--fg); }
.chip.off { color: #b5b5b5; border-style: dashed; text-decoration: line-through; cursor: not-allowed; background: #fafafa; }
.chip.last { border-color: var(--warn); }

/* ----- cards / tables ----- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card + .card { margin-top: 16px; }
.card h3:first-child { margin-top: 0; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-weight: 500; color: var(--muted); font-size: .8rem; white-space: nowrap; background: #fafafa; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr.click:hover { background: #fafafa; }
.table td.actions { white-space: nowrap; text-align: end; }
.thumb { width: 48px; height: 60px; object-fit: cover; background: var(--soft); border-radius: 2px; }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; font-size: .94rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }

/* ----- tabs ----- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 10px 14px; background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; color: var(--muted); }
.tab.on { color: var(--fg); border-bottom-color: var(--fg); font-weight: 600; }
.tab .n { margin-inline-start: 6px; font-size: .75rem; background: var(--fg); color: #fff; border-radius: 99px; padding: 1px 7px; }

/* ===== shop shell ===== */
.announce { background: var(--fg); color: #fff; text-align: center; font-size: .82rem; padding: 7px 12px; }
.demo-bar { background: #fff4cc; color: #6b5200; text-align: center; font-size: .8rem; padding: 6px 12px; }
.demo-bar button { color: inherit; }
.shop-header {
  position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 60px; padding: 0 8px;
}
.shop-header .brand { font-size: 1.35rem; font-weight: 700; letter-spacing: .04em; display: flex; align-items: center; gap: 8px; justify-content: center; }
.shop-header .brand img { height: 30px; width: auto; }
.shop-header .side { display: flex; align-items: center; }
.shop-header .side.end { justify-content: flex-end; }
.lang-btn { font-size: .85rem; font-weight: 600; min-width: 42px; }
.cat-nav { display: flex; gap: 22px; overflow-x: auto; padding: 0 16px; border-bottom: 1px solid var(--line); background: #fff; scrollbar-width: none; justify-content: center; }
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav a { padding: 12px 0; font-size: .92rem; white-space: nowrap; border-bottom: 2px solid transparent; color: var(--muted); }
.cat-nav a.on, .cat-nav a:hover { color: var(--fg); border-bottom-color: var(--fg); }
@media (max-width: 700px) { .cat-nav { justify-content: flex-start; } }
.shop-footer { border-top: 1px solid var(--line); padding: 36px 16px 48px; font-size: .9rem; color: var(--muted); }
.shop-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; max-width: var(--maxw); margin: 0 auto; }
.shop-footer h4 { color: var(--fg); font-size: .85rem; letter-spacing: .06em; margin-bottom: 8px; }
.shop-footer a:hover { color: var(--fg); text-decoration: underline; }

.hero { padding: 36px 0 18px; text-align: center; }
.hero h1 { font-size: 2rem; font-weight: 600; }
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 8px 0 30px; }
.cat-tile { border: 1px solid var(--line); padding: 22px 12px; text-align: center; font-weight: 500; transition: .15s; }
.cat-tile:hover { background: var(--fg); color: #fff; border-color: var(--fg); }

.grid-products { display: grid; gap: 22px 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .grid-products { grid-template-columns: repeat(3, 1fr); gap: 28px 14px; } }
@media (min-width: 1000px) { .grid-products { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1300px) { .grid-products { grid-template-columns: repeat(5, 1fr); } }
.pcard { display: block; position: relative; }
.pcard .ph { aspect-ratio: 3 / 4; background: var(--soft); overflow: hidden; position: relative; }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s; }
.pcard .ph img + img { position: absolute; inset: 0; opacity: 0; }
.pcard:hover .ph img + img { opacity: 1; }
.pcard .nm { margin-top: 8px; font-size: .9rem; line-height: 1.4; }
.pcard .pr { font-size: .9rem; color: var(--fg); margin-top: 2px; }
.pcard .pr s { color: var(--muted); margin-inline-start: 6px; }
.pcard .pr .sale { color: var(--danger); }
.tag { position: absolute; top: 8px; inset-inline-start: 8px; background: #fff; font-size: .72rem; padding: 2px 8px; border: 1px solid var(--fg); z-index: 2; }
.tag.out { background: var(--fg); color: #fff; }
.tag.last { background: #fff; color: var(--warn); border-color: var(--warn); }
.pcard.soldout .ph img { opacity: .45; }

.pdp { display: grid; gap: 28px; }
@media (min-width: 860px) { .pdp { grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: start; } }
.gallery { display: grid; gap: 8px; }
.gallery .main { aspect-ratio: 3 / 4; background: var(--soft); overflow: hidden; }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.gallery .thumbs { display: flex; gap: 8px; overflow-x: auto; }
.gallery .thumbs img { width: 64px; height: 84px; object-fit: cover; cursor: pointer; border: 1px solid transparent; opacity: .7; }
.gallery .thumbs img.on { border-color: var(--fg); opacity: 1; }
.pdp .price { font-size: 1.2rem; margin: 6px 0 18px; }
.pdp .price s { color: var(--muted); margin-inline-start: 8px; font-size: 1rem; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.stock-note { font-size: .88rem; margin-bottom: 14px; min-height: 1.4em; }
.stock-note.warn { color: var(--warn); }
.stock-note.danger { color: var(--danger); }

.cart-line { display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.cart-line img { width: 84px; height: 110px; object-fit: cover; background: var(--soft); }
.qty { display: inline-flex; align-items: center; border: 1px solid #cfcfcf; border-radius: var(--radius); background: #fff; }
.qty button { width: 34px; height: 34px; border: 0; background: none; cursor: pointer; font-size: 1.1rem; }
.qty span { min-width: 30px; text-align: center; }
.summary { background: var(--soft); padding: 18px; }
.summary .line { display: flex; justify-content: space-between; padding: 4px 0; }
.summary .total { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
.two-col { display: grid; gap: 28px; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1.4fr 1fr; align-items: start; } }

.timeline { display: flex; gap: 0; margin: 14px 0 6px; }
.timeline .st { flex: 1; text-align: center; font-size: .78rem; color: var(--muted); position: relative; padding-top: 22px; }
.timeline .st::before { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 2px; background: var(--line); }
.timeline .st::after { content: ""; position: absolute; top: 0; inset-inline-start: 50%; width: 14px; height: 14px; margin-inline-start: -7px; border-radius: 50%; background: #fff; border: 2px solid var(--line); }
.timeline .st.done { color: var(--fg); }
.timeline .st.done::before { background: var(--fg); }
.timeline .st.done::after { background: var(--fg); border-color: var(--fg); }

.proof-preview { max-width: 220px; border: 1px solid var(--line); margin-top: 8px; }
.drop {
  border: 1px dashed #bdbdbd; padding: 18px; text-align: center; color: var(--muted); cursor: pointer; background: #fff; border-radius: var(--radius);
}
.drop:hover { border-color: var(--fg); color: var(--fg); }

/* ===== auth chooser ===== */
.choose { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); max-width: 760px; margin: 0 auto; }
.choose a { border: 1px solid var(--line); padding: 28px 22px; display: block; background: #fff; }
.choose a:hover { border-color: var(--fg); }
.choose a h3 { margin-bottom: 6px; }
.choose a.bulk { background: #12305a; color: #fff; border-color: #12305a; }
.choose a.bulk p { color: #cfd9e8; }

/* ===== bulk shell ===== */
.bulk-top { background: var(--accent); color: #fff; }
.bulk-top .bar { display: flex; align-items: center; gap: 14px; height: 62px; }
.bulk-top .brand { font-weight: 700; font-size: 1.1rem; }
.bulk-top .brand small { display: block; font-size: .72rem; font-weight: 400; opacity: .75; margin-top: -4px; }
.bulk-top nav { display: flex; gap: 4px; margin-inline-start: 18px; }
.bulk-top nav a { padding: 8px 14px; border-radius: 8px; font-size: .92rem; opacity: .8; }
.bulk-top nav a.on, .bulk-top nav a:hover { background: rgba(255,255,255,.14); opacity: 1; }
.bulk-top .icon-btn:hover { background: rgba(255,255,255,.14); }
@media (max-width: 700px) { .bulk-top nav { display: none; } }
.bulk-bottom { display: none; position: fixed; bottom: 0; inset-inline: 0; background: #fff; border-top: 1px solid var(--line); z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
.bulk-bottom a { flex: 1; text-align: center; padding: 10px 4px; font-size: .75rem; color: var(--muted); }
.bulk-bottom a.on { color: var(--accent); font-weight: 600; }
@media (max-width: 700px) { .bulk-bottom { display: flex; } body[data-theme="bulk"] .page { padding-bottom: 96px; } }
.bulk-hero { background: linear-gradient(135deg, #12305a, #1d4a86); color: #fff; padding: 42px 0; border-radius: 0 0 var(--radius) var(--radius); }
.bulk-hero h1 { font-size: 1.9rem; }
.bulk-hero p { color: #d3deee; max-width: 560px; }
.bulk-hero .btn { background: #fff; color: var(--accent); border-color: #fff; }
.bulk-hero .btn.outline { background: transparent; color: #fff; border-color: #fff; }
.feature-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 22px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.garment-pick { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.garment-pick button { padding: 16px 8px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); cursor: pointer; }
.garment-pick button:hover { border-color: var(--accent); background: var(--soft); }
.gsec { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.gsec > header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--soft); gap: 8px; flex-wrap: wrap; }
.gsec .scroll { overflow-x: auto; }
.mtable { width: 100%; border-collapse: collapse; min-width: 640px; }
.mtable th { font-size: .75rem; color: var(--muted); font-weight: 500; padding: 8px 6px; text-align: start; white-space: nowrap; }
.mtable td { padding: 4px 4px; }
.mtable .input { min-height: 36px; padding: 4px 8px; min-width: 64px; }
.mtable td.idx { color: var(--muted); font-size: .8rem; padding-inline: 10px; }
.sticky-total { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 12px 16px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 700px) { .sticky-total { bottom: 56px; } }

/* ===== admin shell ===== */
.admin { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: #111; color: #e9e9e9; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { font-weight: 700; font-size: 1.15rem; padding: 6px 12px 18px; letter-spacing: .04em; }
.sidebar .brand small { display: block; font-size: .72rem; font-weight: 400; color: #999; letter-spacing: 0; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 8px; color: #bdbdbd; font-size: .94rem; }
.sidebar nav a:hover { background: #1d1d1d; color: #fff; }
.sidebar nav a.on { background: #fff; color: #111; font-weight: 600; }
.sidebar nav .n { margin-inline-start: auto; background: var(--danger); color: #fff; font-size: .72rem; padding: 0 7px; border-radius: 99px; line-height: 18px; }
.sidebar .foot { margin-top: 24px; padding-top: 14px; border-top: 1px solid #2a2a2a; font-size: .82rem; color: #999; }
.admin-main { min-width: 0; }
.admin-top { display: none; background: #111; color: #fff; align-items: center; justify-content: space-between; padding: 0 8px; height: 54px; position: sticky; top: 0; z-index: 30; }
.admin-content { padding: 26px 24px 80px; max-width: 1180px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; font-size: 1.45rem; }
@media (max-width: 900px) {
  .admin { display: block; }
  .sidebar { position: fixed; z-index: 60; inset-block: 0; inset-inline-start: 0; width: 260px; transform: translateX(110%); transition: transform .2s; height: 100%; }
  [dir="ltr"] .sidebar { transform: translateX(-110%); }
  .sidebar.open { transform: none !important; }
  .admin-top { display: flex; }
  .admin-content { padding: 18px 14px 80px; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 55; }
}
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat .lbl { font-size: .8rem; color: var(--muted); }
.stat .val { font-size: 1.5rem; font-weight: 600; margin-top: 2px; }
.stat .sub { font-size: .78rem; color: var(--muted); }
.stat.pos .val { color: var(--ok); }
.stat.neg .val { color: var(--danger); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input, .toolbar .select { width: auto; min-width: 160px; }
.chart-box { position: relative; height: 280px; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 110px; gap: 10px; align-items: center; padding: 5px 0; font-size: .88rem; }
.bar-row .track { background: var(--soft); height: 10px; border-radius: 5px; overflow: hidden; }
.bar-row .fill { height: 100%; background: var(--fg); border-radius: 5px; }
.bar-row .fill.neg { background: var(--danger); }
.bar-row .v { text-align: end; }
.var-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.var-row .input { width: 110px; }
.img-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.img-item { width: 96px; height: 124px; position: relative; border: 1px solid var(--line); background: var(--soft); }
.img-item img { width: 100%; height: 100%; object-fit: cover; }
.img-item button { position: absolute; top: 3px; inset-inline-end: 3px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; cursor: pointer; line-height: 1; font-size: 15px; }
.img-item .first { position: absolute; bottom: 0; inset-inline: 0; background: rgba(0,0,0,.7); color: #fff; font-size: .68rem; text-align: center; }
.img-add { width: 96px; height: 124px; border: 1px dashed #aaa; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); background: #fff; }
.img-add:hover { border-color: var(--fg); color: var(--fg); }

/* ===== modal / toast ===== */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 4vh 12px; overflow-y: auto; }
.modal { background: #fff; width: 100%; max-width: 560px; border-radius: var(--radius); box-shadow: var(--shadow); color: #111; }
.modal.wide { max-width: 820px; }
.modal > header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal > header h3 { margin: 0; }
.modal .body { padding: 18px; }
.modal > footer { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
#toasts { position: fixed; bottom: 18px; inset-inline: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 200; pointer-events: none; padding: 0 12px; }
.toast { background: #111; color: #fff; padding: 11px 18px; border-radius: 6px; font-size: .92rem; box-shadow: var(--shadow); animation: up .2s ease; max-width: 92vw; }
.toast.err { background: var(--danger); }
.toast.ok { background: var(--ok); }
@keyframes up { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.spinner { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--fg); border-radius: 50%; animation: spin .7s linear infinite; margin: 60px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== print ===== */
@media print {
  .shop-header, .cat-nav, .shop-footer, .sidebar, .admin-top, .bulk-top, .bulk-bottom, .toolbar, .no-print, .btn, #toasts, .demo-bar, .announce { display: none !important; }
  .admin { display: block; }
  .admin-content { padding: 0; max-width: none; }
  body { background: #fff; }
  .card, .table-wrap { border-color: #999; }
}

/* ===== responsive helpers ===== */
.cols2 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 1150px) { .cols2 { grid-template-columns: 1fr; } }
.bar-row { grid-template-columns: minmax(70px, 130px) 1fr auto; }
.bar-row .v { min-width: 90px; }
@media (max-width: 700px) { .hide-sm { display: none; } }
@media (min-width: 860px) { .two-col > .summary { position: sticky; top: 130px; } }
