/* AQUASSTAR catalogue - blue / teal / white */
:root {
  --blue: #0b4f8a;
  --blue-2: #0d6aa8;
  --teal: #0e9aa7;
  --teal-2: #12b5b0;
  --grad: linear-gradient(135deg, #0b4f8a 0%, #0d6aa8 45%, #0e9aa7 100%);
  --bg: #f2f7fb;
  --card: #ffffff;
  --ink: #0f2436;
  --muted: #5b6f80;
  --line: #d9e5ee;
  --soft: #e7f2f8;
  --soft-teal: #e3f5f5;
  --ws: #b45309;
  --ws-bg: #fff4e5;
  --danger: #c0262d;
  --ok: #117a4f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 79, 138, .06), 0 4px 14px rgba(11, 79, 138, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  background: var(--bg); color: var(--ink); -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------- welcome ---------------- */
.welcome {
  position: fixed; inset: 0; z-index: 30; background: var(--grad); color: #fff; overflow: hidden;
  display: grid; place-items: center; padding: 24px; text-align: center;
}
.welcome-inner { position: relative; max-width: 420px; width: 100%; animation: rise .6s ease-out; }
.welcome-logo {
  width: 112px; height: 112px; margin: 0 auto 18px; border-radius: 28px; background: #fff;
  display: grid; place-items: center; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.18);
  color: var(--blue); font-weight: 800; font-size: 40px;
}
.welcome-logo img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.welcome h1 { margin: 0; font-size: 34px; letter-spacing: .08em; }
.welcome-tag { margin: 6px 0 0; opacity: .9; font-size: 16px; }
.welcome-user { margin: 18px 0 0; font-size: 15px; background: rgba(255,255,255,.14); border-radius: 12px; padding: 10px; }
.welcome-actions { display: grid; gap: 10px; margin-top: 34px; }
.welcome-foot { margin-top: 22px; font-size: 13px; opacity: .8; }
.bubbles i {
  position: absolute; bottom: -80px; border-radius: 50%; background: rgba(255,255,255,.10);
  animation: bubble 14s linear infinite;
}
.bubbles i:nth-child(1) { left: 8%;  width: 40px; height: 40px; animation-delay: 0s; }
.bubbles i:nth-child(2) { left: 22%; width: 18px; height: 18px; animation-delay: 3s; animation-duration: 10s; }
.bubbles i:nth-child(3) { left: 48%; width: 60px; height: 60px; animation-delay: 6s; animation-duration: 18s; }
.bubbles i:nth-child(4) { left: 70%; width: 26px; height: 26px; animation-delay: 1s; animation-duration: 12s; }
.bubbles i:nth-child(5) { left: 86%; width: 46px; height: 46px; animation-delay: 8s; }
.bubbles i:nth-child(6) { left: 60%; width: 14px; height: 14px; animation-delay: 4s; animation-duration: 9s; }
@keyframes bubble { to { transform: translateY(-120vh); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.welcome.leaving { animation: fadeout .35s forwards; }
@keyframes fadeout { to { opacity: 0; visibility: hidden; } }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: 12px; border: 0; background: var(--blue); color: #fff; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.btn.teal { background: var(--teal); }
.btn.big { height: 52px; font-size: 16px; border-radius: 14px; }
.btn.light { background: #fff; color: var(--blue); }
.btn.outline-light { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.7); }
.btn.soft { background: var(--soft); color: var(--blue); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn.small { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }

/* ---------------- home header ---------------- */
.topbar {
  display: flex; align-items: center; gap: 10px; background: var(--grad); color: #fff;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px 14px;
}
.brand { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 42px; height: 42px; flex: none; border-radius: 11px; background: #fff; overflow: hidden;
  display: grid; place-items: center; color: var(--blue); font-weight: 800; font-size: 16px;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.brand-text { min-width: 0; }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: .06em; line-height: 1.15; }
.brand-sub { font-size: 12px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  position: relative; flex: none; width: 42px; height: 42px; border-radius: 12px; border: 0;
  background: rgba(255,255,255,.16); color: #fff; display: grid; place-items: center;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn.dark { background: var(--soft); color: var(--blue); }
.dot { position: absolute; top: 7px; right: 7px; width: 10px; height: 10px; border-radius: 50%; background: #ffb020; border: 2px solid #0d6aa8; }

/* ---------------- search / sort / filters ---------------- */
.controls {
  position: sticky; top: 0; z-index: 10; background: var(--bg); padding: 10px 12px 8px;
  border-bottom: 1px solid var(--line);
}
.controls > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.search-row { position: relative; display: flex; gap: 8px; }
.search {
  flex: 0 0 75%; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 13px; min-width: 0;
}
.search:focus-within { border-color: var(--teal); }
.search svg { width: 19px; height: 19px; color: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; }
.sort-btn {
  flex: 1; height: 46px; border-radius: 13px; border: 0; background: var(--grad); color: #fff;
  display: grid; place-items: center;
}
.sort-btn { display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; }
.sort-btn svg { width: 22px; height: 22px; }
.sort-label { display: none; }
@media (min-width: 760px) { .sort-label { display: inline; } }
.sort-menu {
  position: absolute; right: 0; top: 52px; z-index: 12; background: #fff; border-radius: 12px; min-width: 210px;
  box-shadow: 0 10px 30px rgba(11, 40, 70, .2); padding: 6px; display: grid;
}
.sort-menu button {
  text-align: left; background: none; border: 0; padding: 11px 12px; border-radius: 8px; font-size: 14.5px;
  display: flex; justify-content: space-between;
}
.sort-menu button:hover { background: var(--soft); }
.sort-menu button.on { color: var(--blue); font-weight: 700; }
.sort-menu button.on::after { content: "✓"; }
.filter-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.filter-row select {
  min-width: 0; width: 100%; height: 38px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff;
  padding: 0 6px; font-size: 13px; color: var(--ink);
}
.filter-row select.set { border-color: var(--teal); background: var(--soft-teal); font-weight: 600; }
.status-row { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; min-height: 28px; font-size: 13px; color: var(--muted); }

/* toggle switch */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 13.5px; color: var(--ink); font-weight: 600; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 44px; height: 26px; border-radius: 99px; background: #c4d3de; position: relative; transition: background .2s; flex: none; }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + .track { background: var(--teal); }
.switch input:checked + .track .knob { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------------- product list ---------------- */
.list { display: grid; gap: 10px; padding: 12px 12px 30px; max-width: 1200px; margin: 0 auto; }
.list > * { min-width: 0; }
.card {
  display: flex; gap: 12px; padding: 10px; width: 100%; text-align: left; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer;
}
.card:active { transform: scale(.99); }
.pic {
  width: 92px; height: 92px; flex: none; border-radius: 11px; overflow: hidden; background: var(--soft);
  display: grid; place-items: center; color: var(--blue-2); position: relative;
}
.pic img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pic .ph { font-weight: 800; font-size: 22px; opacity: .55; }
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.card-name { font-weight: 650; font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 99px; background: var(--soft); color: var(--blue); white-space: nowrap; }
.chip.teal { background: var(--soft-teal); color: #0a7480; }
.chip.muted { background: #eef2f5; color: var(--muted); }
.chip.red { background: #fde8e8; color: var(--danger); }
.prices { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: auto; padding-top: 2px; }
.pr { display: flex; flex-direction: column; line-height: 1.15; }
.pr small { font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.pr b { font-size: 15.5px; font-variant-numeric: tabular-nums; }
.pr.mrp b { font-size: 13.5px; font-weight: 500; color: var(--muted); }
.pr.sell b { color: var(--blue); }
.pr.ws b { color: var(--ws); }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 50px 16px; }

@media (min-width: 760px) {
  .list { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; padding: 16px; }
  .card { flex-direction: column; padding: 0; overflow: hidden; }
  .card .pic { width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 0; }
  .card-body { padding: 10px 12px 12px; }
  .controls { padding: 14px 16px 10px; }
  .filter-row { grid-template-columns: repeat(3, minmax(0, 220px)); }
  .search { flex-basis: 75%; }
}

/* ---------------- full page (product / admin) ---------------- */
.page { position: fixed; inset: 0; z-index: 15; background: var(--bg); overflow-y: auto; }
.page-bar {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; background: #fff;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px; border-bottom: 1px solid var(--line);
}
.page-title { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-body { max-width: 980px; margin: 0 auto; padding: 14px 14px calc(40px + env(safe-area-inset-bottom)); }

.detail { display: grid; gap: 18px; }
@media (min-width: 820px) { .detail { grid-template-columns: 420px 1fr; align-items: start; } }
.detail-pic {
  background: #fff; border-radius: 18px; border: 1px solid var(--line); aspect-ratio: 1 / 1; overflow: hidden;
  display: grid; place-items: center; color: var(--blue-2);
}
.detail-pic img { width: 100%; height: 100%; object-fit: contain; }
.detail-pic .ph { text-align: center; color: var(--muted); }
.detail-pic .ph b { display: block; font-size: 54px; color: var(--blue-2); opacity: .45; }
.detail-pic.nophoto { aspect-ratio: auto; height: 170px; background: var(--soft); }
.detail h1 { font-size: 21px; line-height: 1.3; margin: 0 0 6px; }
.price-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 14px 0; }
.pbox { border-radius: 14px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); }
.pbox small { display: block; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.pbox b { font-size: 20px; font-variant-numeric: tabular-nums; }
.pbox.sell { background: var(--soft); border-color: transparent; }
.pbox.sell b { color: var(--blue); }
.pbox.ws { background: var(--ws-bg); border-color: transparent; }
.pbox.ws b { color: var(--ws); }
.info { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.info td { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
.info tr:last-child td { border-bottom: 0; }
.info td:first-child { color: var(--muted); width: 38%; }
.specs { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 14.5px; line-height: 1.6; }
h3.sec { font-size: 15px; margin: 20px 0 8px; color: var(--blue); }

/* ---------------- sheet ---------------- */
.sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(6, 25, 40, .5); animation: fade .15s; }
.sheet-panel {
  position: relative; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: #fff;
  border-radius: 20px 20px 0 0; padding: 8px 18px calc(22px + env(safe-area-inset-bottom)); animation: up .2s ease-out;
}
@media (min-width: 760px) { .sheet { align-items: center; } .sheet-panel { border-radius: 20px; } }
.sheet-handle { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 10px; }
.sheet-close { position: absolute; top: 8px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--soft); font-size: 22px; line-height: 1; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.sheet h2 { margin: 2px 40px 4px 0; font-size: 19px; }
.sub { color: var(--muted); font-size: 13.5px; margin: 0 0 12px; }

.user-card { display: flex; gap: 12px; align-items: center; background: var(--grad); color: #fff; border-radius: 14px; padding: 14px; margin: 6px 0 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; font-weight: 700; flex: none; }
.user-card small { display: block; opacity: .85; }
.menu { display: grid; gap: 6px; }
.menu > button, .menu > .menu-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--bg); border: 0;
  border-radius: 12px; padding: 13px 14px; font-size: 15px; min-height: 52px;
}
.menu svg { width: 21px; height: 21px; color: var(--blue); flex: none; }
.menu .grow { flex: 1; min-width: 0; }
.menu small { display: block; font-size: 12.5px; color: var(--muted); }
.badge { background: #ffb020; color: #3b2400; font-size: 12px; font-weight: 700; border-radius: 99px; padding: 1px 8px; }

.notif { border-bottom: 1px solid var(--line); padding: 12px 0; }
.notif:last-child { border-bottom: 0; }
.notif b { display: block; }
.notif p { margin: 3px 0; white-space: pre-wrap; font-size: 14px; }
.notif small { color: var(--muted); font-size: 12px; }
.notif.new b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ffb020; margin-right: 6px; vertical-align: middle; }

/* ---------------- forms ---------------- */
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.field > span i { color: var(--danger); font-style: normal; }
.field input, .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 11px; background: #fff; padding: 0 12px; height: 46px; font-size: 16px;
}
.field textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--teal); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 4px 0 14px; }
.check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--teal); }
.err { color: var(--danger); font-size: 13.5px; white-space: pre-line; min-height: 1px; margin: 2px 0 10px; }
.note { font-size: 13.5px; color: var(--muted); margin: 0 0 12px; }
.warn { background: #fff4e5; color: #7a3e00; border-radius: 11px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 12px; }
.okbox { background: #e6f6ef; color: #0c5a3a; border-radius: 11px; padding: 10px 12px; font-size: 14px; margin: 10px 0; white-space: pre-line; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------------- admin ---------------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.tabs button { flex: none; border: 0; background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 8px 14px; font-weight: 600; font-size: 14px; color: var(--muted); }
.tabs button.on { background: var(--grad); color: #fff; border-color: transparent; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 14px; }
.panel h3 { margin: 0 0 6px; font-size: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 10px 0; }
.stat { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.stat b { display: block; font-size: 20px; color: var(--blue); }
.stat small { color: var(--muted); font-size: 12px; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.tbl td.wrap { white-space: normal; min-width: 160px; }
.up { color: var(--danger); } .down { color: var(--ok); }
.user-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.user-item:last-child { border-bottom: 0; }
.user-item .grow { flex: 1; min-width: 0; }
.user-item b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-item small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; text-transform: uppercase; letter-spacing: .03em; }
.role.customer { background: var(--soft-teal); color: #0a7480; }
.role.staff { background: var(--soft); color: var(--blue); }
.role.admin { background: #ede7fb; color: #5b34b0; }
.role.off { background: #eef2f5; color: var(--muted); }
.seg { display: flex; background: var(--bg); border-radius: 11px; padding: 3px; gap: 3px; margin-bottom: 12px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 9px; padding: 8px 4px; font-weight: 600; font-size: 13.5px; color: var(--muted); }
.seg button.on { background: #fff; color: var(--blue); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.logo-preview { width: 84px; height: 84px; border-radius: 18px; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; background: #fff; }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }

.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  background: #0f2436; color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14px; max-width: calc(100% - 32px);
  box-shadow: 0 6px 20px rgba(0,0,0,.25); white-space: pre-line;
}

.ws-note { font-size: 12px; font-weight: 700; color: var(--ws); background: var(--ws-bg); padding: 3px 10px; border-radius: 99px; }

/* ---------------- photo gallery ---------------- */
.gallery { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.g-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 1 / 1; }
.g-track::-webkit-scrollbar { display: none; }
.g-slide { flex: 0 0 100%; scroll-snap-align: center; display: grid; place-items: center; cursor: zoom-in; }
.g-slide img { width: 100%; height: 100%; object-fit: contain; }
.g-count { position: absolute; right: 10px; bottom: 10px; background: rgba(15, 36, 54, .72); color: #fff; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 99px; }
.g-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.92); color: var(--blue); box-shadow: 0 2px 8px rgba(0,0,0,.15); display: none; place-items: center;
}
.g-nav svg { width: 20px; height: 20px; }
.g-nav.prev { left: 10px; } .g-nav.next { right: 10px; }
@media (hover: hover) and (min-width: 760px) { .g-nav { display: grid; } }
.g-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 4px; scrollbar-width: thin; }
.g-thumbs button { flex: none; width: 62px; height: 62px; padding: 0; border-radius: 10px; overflow: hidden; background: #fff; border: 2px solid var(--line); }
.g-thumbs button.on { border-color: var(--teal); }
.g-thumbs img { width: 100%; height: 100%; object-fit: contain; }

.viewer { position: fixed; inset: 0; z-index: 70; background: #05121c; }
.v-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.v-track::-webkit-scrollbar { display: none; }
.v-slide { flex: 0 0 100%; scroll-snap-align: center; display: grid; place-items: center; }
.v-slide img { max-width: 100%; max-height: 100%; object-fit: contain; }
.v-close { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; font-size: 28px; line-height: 1; }
.v-count { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom)); color: #fff; font-size: 14px; background: rgba(255,255,255,.14); padding: 4px 12px; border-radius: 99px; }

.ph-admin { background: #fff; border: 1px dashed var(--teal); border-radius: 14px; padding: 12px; margin-top: 12px; }
.ph-admin-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.ph-tile { position: relative; aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.ph-tile img { width: 100%; height: 100%; object-fit: contain; }
.ph-no { position: absolute; left: 4px; top: 4px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; }
.ph-act { position: absolute; bottom: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); box-shadow: 0 1px 4px rgba(0,0,0,.2); display: grid; place-items: center; font-size: 15px; font-weight: 700; color: var(--blue); cursor: pointer; }
.ph-act:not(.rm) { left: 4px; }
.ph-act.rm { right: 4px; color: var(--danger); font-size: 18px; }
.ph-act.sure { background: var(--danger); color: #fff; }

/* ---------------- photos always fit fully inside their box ---------------- */
.pic, .g-slide, .v-slide, .g-thumbs button, .ph-tile, .detail-pic, .logo-preview, .brand-logo, .welcome-logo { position: relative; overflow: hidden; }
.pic img, .g-slide img, .v-slide img, .g-thumbs img, .ph-tile img, .detail-pic img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  object-fit: contain; object-position: center; box-sizing: border-box; background: #fff;
}
.pic img { padding: 4px; }
.g-slide img { padding: 10px; }
.g-thumbs img, .ph-tile img { padding: 3px; }
.v-slide img { background: transparent; padding: 12px; }
.g-slide, .v-slide { min-width: 0; min-height: 0; height: 100%; }
.g-track { height: auto; }
.v-track { height: 100%; }

/* ---------------- image boxes: always white ---------------- */
.pic, .detail-pic, .detail-pic.nophoto, .gallery, .g-slide, .g-thumbs button, .ph-tile, .card .pic { background: #fff; }
.pic { border: 1px solid var(--line); }
.pic .ph { color: #9fb3c2; opacity: 1; }
.detail-pic.nophoto { border: 1px solid var(--line); }
.detail-pic.nophoto .ph b { color: #9fb3c2; opacity: 1; }
@media (min-width: 760px) {
  .card .pic { border: 0; border-bottom: 1px solid var(--line); }
}

/* ---------------- description & specifications ---------------- */
.specs.desc { padding: 12px 14px 12px 12px; }
.desc-list { margin: 0; padding: 0; list-style: none; }
.desc-list li { position: relative; padding: 4px 0 4px 18px; line-height: 1.55; }
.desc-list li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.desc-head { font-weight: 700; color: var(--blue); margin: 10px 0 2px; }
.desc-head:first-child { margin-top: 0; }
.specs.spec-box { padding: 0; overflow: hidden; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec-table th, .spec-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th { width: 42%; font-weight: 600; color: var(--muted); background: var(--bg); }
.spec-table tr:nth-child(even) td { background: #fbfdfe; }

/* ---------------- clear filters ---------------- */
.status-right { display: inline-flex; align-items: center; gap: 8px; }
.clear-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px 0 8px; border-radius: 99px;
  border: 1.5px solid var(--teal); background: #fff; color: #0a7480; font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.clear-btn svg { width: 14px; height: 14px; stroke-width: 2.6; }
.clear-btn:disabled { border-color: var(--line); color: #a9b8c4; cursor: default; }
.clear-btn:not(:disabled):hover { background: var(--soft-teal); }
.status-row { flex-wrap: wrap; gap: 6px; }
@media (max-width: 400px) { .ws-note { font-size: 11px; padding: 3px 8px; } }

/* ---------------- home button ---------------- */
.page-title { flex: 1; min-width: 0; }
.home-btn svg { width: 21px; height: 21px; }

/* ---------------- advertisement banner ---------------- */
.banner { position: relative; max-width: 1200px; margin: 12px auto 0; padding: 0 12px; }
.bn-frame { position: relative; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow), 0 0 0 1px var(--line); background: #fff; aspect-ratio: 2 / 1; }
.bn-track { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.bn-track::-webkit-scrollbar { display: none; }
.bn-slide { position: relative; flex: 0 0 100%; scroll-snap-align: center; overflow: hidden; }
.bn-slide.link { cursor: pointer; }
.bn-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bn-title {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px; color: #fff; font-weight: 700; font-size: 15px;
  background: linear-gradient(to top, rgba(6, 30, 50, .75), rgba(6, 30, 50, 0)); text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.bn-dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.bn-dots button { pointer-events: auto; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: rgba(255,255,255,.6); box-shadow: 0 0 0 1px rgba(0,0,0,.15); transition: width .2s; }
.bn-dots button.on { width: 20px; background: #fff; }
.bn-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.9); color: var(--blue); box-shadow: 0 2px 8px rgba(0,0,0,.18); display: none; place-items: center;
}
.bn-nav svg { width: 18px; height: 18px; }
.bn-nav.prev { left: 10px; } .bn-nav.next { right: 10px; }
@media (hover: hover) and (min-width: 760px) { .bn-nav { display: grid; } }
@media (min-width: 760px) { .banner { padding: 0 16px; margin-top: 16px; max-width: 932px; } }
.banner:has(.bn-title) .bn-dots { bottom: auto; top: 10px; justify-content: flex-end; padding-right: 12px; }
.bn-slide { height: 100%; }

.bn-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.bn-item:last-child { border-bottom: 0; }
.bn-item.off { opacity: .55; }
.bn-item .grow { flex: 1; min-width: 0; }
.bn-item b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bn-item small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bn-thumb { flex: none; width: 120px; aspect-ratio: 2 / 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; position: relative; }
.bn-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bn-thumb.big { width: 100%; margin-bottom: 12px; }
@media (max-width: 420px) { .bn-thumb { width: 96px; } .bn-item .btn.small { padding: 0 9px; } }

/* ---------------- share as PDF ---------------- */
.pdf-btn { border-color: var(--blue); color: var(--blue); }
.pdf-btn:not(:disabled):hover { background: var(--soft); }
.pdf-btn:disabled { opacity: .5; }
.ws-note, .clear-btn { white-space: nowrap; }
.status-right { flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }

/* ================= upgrades: stock, badges, enquiry basket, sharing, activity ================= */
.page-title { flex: 1; min-width: 0; }
.bcount {
  position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: #ffb020; color: #3b2400; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
}
.chip.green { background: #e3f4ec; color: var(--ok); }
.chip.new { background: #fff1c9; color: #7a4b00; }
.chip.down { background: #e3f4ec; color: var(--ok); }
.chip.up { background: #fff0e3; color: #a3470a; }

/* quick filters: New / Price changed / In stock / Out of stock */
.quick-row { display: flex; gap: 6px; overflow-x: auto; margin-top: 7px; scrollbar-width: none; }
.quick-row::-webkit-scrollbar { display: none; }
.quick-row button {
  flex: none; height: 30px; padding: 0 11px; border-radius: 99px; border: 1.5px solid var(--line); background: #fff;
  font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.quick-row button b { font-weight: 700; color: var(--ink); margin-left: 3px; }
.quick-row button.on { border-color: var(--teal); background: var(--soft-teal); color: #0a6570; }

/* product card with an "add to enquiry" button */
.card { position: relative; }
.card:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.card .prices { padding-right: 44px; }
.add-btn {
  position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: var(--soft); color: var(--blue); display: grid; place-items: center; font-weight: 800; font-size: 14px;
}
.add-btn svg { width: 20px; height: 20px; stroke-width: 2.4; }
.add-btn.in { background: var(--teal); color: #fff; }
.add-btn:active { transform: scale(.92); }
.pbox s { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }

/* product page actions */
.buy-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; }
.buy-row .btn { flex: 1 1 150px; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; height: 44px; overflow: hidden; flex: none; }
.stepper button { width: 40px; height: 100%; border: 0; background: none; font-size: 20px; color: var(--blue); }
.stepper input { width: 52px; height: 100%; border: 0; text-align: center; font-size: 16px; font-weight: 700; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper.sm { height: 36px; border-radius: 10px; }
.stepper.sm button { width: 32px; font-size: 18px; }
.stepper.sm input { width: 44px; font-size: 15px; }
.btn.wa { background: #1fa855; }
.btn.outline { background: #fff; color: var(--blue); border: 1.5px solid var(--line); }
.btn svg { width: 19px; height: 19px; }

/* basket */
.b-item { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.b-item:last-of-type { border-bottom: 0; }
.b-pic { width: 54px; height: 54px; flex: none; border-radius: 10px; border: 1px solid var(--line); background: #fff; position: relative; overflow: hidden; display: grid; place-items: center; color: var(--muted); font-weight: 700; font-size: 13px; }
.b-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.b-main { flex: 1; min-width: 0; }
.b-name { font-weight: 650; font-size: 14px; line-height: 1.3; }
.b-meta { font-size: 12.5px; color: var(--muted); margin: 2px 0 6px; }
.b-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.b-line b { font-variant-numeric: tabular-nums; margin-left: auto; }
.b-rm { border: 0; background: none; color: var(--muted); font-size: 22px; line-height: 1; padding: 2px 4px; }
.b-total { display: flex; justify-content: space-between; align-items: baseline; background: var(--soft); border-radius: 12px; padding: 12px 14px; margin: 10px 0 12px; }
.b-total b { font-size: 20px; color: var(--blue); font-variant-numeric: tabular-nums; }
.b-send { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 520px) { .b-send { grid-template-columns: 1fr; } }
.enq .tbl td.wrap { min-width: 130px; }
.b-links { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.linkbtn { border: 0; background: none; color: var(--blue); font-weight: 600; font-size: 14px; padding: 6px 0; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn.danger { color: var(--danger); }
.done-box { text-align: center; padding: 8px 0 4px; }
.done-box .tick { width: 58px; height: 58px; border-radius: 50%; background: #e3f4ec; color: var(--ok); display: grid; place-items: center; margin: 4px auto 10px; }
.done-box .tick svg { width: 30px; height: 30px; stroke-width: 2.6; }
.msg-preview { white-space: pre-wrap; background: var(--bg); border-radius: 12px; padding: 10px 12px; font-size: 13px; max-height: 220px; overflow-y: auto; text-align: left; margin: 10px 0; }

/* admin: enquiries & activity */
.enq { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.enq.new { border-color: var(--teal); box-shadow: inset 3px 0 0 var(--teal); }
.enq-head { display: flex; gap: 10px; align-items: flex-start; }
.enq-head .grow { flex: 1; min-width: 0; }
.enq-head small { display: block; color: var(--muted); font-size: 12.5px; }
.enq-total { text-align: right; font-weight: 700; color: var(--blue); white-space: nowrap; }
.enq-total small { font-weight: 500; }
.enq details { margin-top: 8px; }
.enq summary { cursor: pointer; color: var(--blue); font-weight: 600; font-size: 13.5px; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--soft); color: var(--blue); text-transform: uppercase; letter-spacing: .03em; }
.pill.wa { background: #e3f4ec; color: var(--ok); }
.pill.new { background: #fff1c9; color: #7a4b00; }
.pill.fail { background: #fde8e8; color: var(--danger); }
.act-row { cursor: pointer; }
.act-row:hover td { background: var(--bg); }
.seen-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #c4d3de; margin-right: 6px; vertical-align: middle; }
.seen-dot.on { background: #1fa855; }
