/* Layout: هيدر ثابت + شريط إعلانات متحرك + بانر بصور، أقسام بأيقونات، شبكة منتجات (عمودان على الهاتف) ونافذة تفاصيل */
:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --ink: #121826;
  --muted: #5d6779;
  --line: #dde2ea;
  --accent: #1f5cff;
  --accent-2: #0f3fcc;
  --accent-ink: #ffffff;
  --volt: #ffc21a;
  --volt-ink: #1a1400;
  --danger: #d23b3b;
  --ok: #138a4b;
  --wa: #1fa855;
  --band: #121826;
  --band-ink: #f3f5f8;
  --shadow: 0 1px 2px rgba(18, 24, 38, .06), 0 8px 24px rgba(18, 24, 38, .06);
  --font-display: "Readex Pro", "IBM Plex Sans Arabic", Tahoma, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --img-bg: #ffffff;
  --top-h: 68px;
  color-scheme: light;
}
/* dark: follows the device unless the visitor picked a theme in the side menu */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1119; --surface: #161c27; --surface-2: #1d2533; --ink: #e9edf4; --muted: #98a2b4; --line: #273042;
    --accent: #3f74ff; --accent-2: #2a5be0; --accent-ink: #ffffff; --volt: #ffcf4a; --volt-ink: #1a1400;
    --danger: #ff6b6b; --ok: #3fcf83; --wa: #25c060; --band: #05070b; --band-ink: #e9edf4;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --img-bg: #f4f6f9;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1119; --surface: #161c27; --surface-2: #1d2533; --ink: #e9edf4; --muted: #98a2b4; --line: #273042;
  --accent: #3f74ff; --accent-2: #2a5be0; --accent-ink: #ffffff; --volt: #ffcf4a; --volt-ink: #1a1400;
  --danger: #ff6b6b; --ok: #3fcf83; --wa: #25c060; --band: #05070b; --band-ink: #e9edf4;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --img-bg: #f4f6f9;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-padding-top: calc(var(--top-h) + 12px); -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.6; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); font-weight: 400; font-size: 15px; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* ---------- buttons ---------- */
.btn { border: 1px solid var(--line); background: var(--surface); padding: 8px 16px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; transition: border-color .15s, background .15s; }
.btn:hover { border-color: var(--accent); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); }
.btn.wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn.big { padding: 12px 22px; font-size: 16px; }
.btn.sm { padding: 4px 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- header ---------- */
header.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 16px; padding-block: 12px; min-height: var(--top-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand-mark { width: 40px; height: 40px; border-radius: 11px; background: var(--volt); color: var(--volt-ink); display: grid; place-items: center; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -0.01em; line-height: 1.2; }
.brand-name small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 12px; color: var(--muted); }
.search-box { flex-direction: row !important; flex: 1; max-width: 520px; margin-inline: auto; display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid transparent; border-radius: 12px; padding: 0 14px; transition: border-color .15s, background .15s; }
.search-box:focus-within { border-color: var(--accent); background: var(--surface); }
.search-box svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search-box input { border: 0; background: transparent; outline: none; padding: 10px 0; width: 100%; min-width: 0; }
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.wa-top { flex: none; background: var(--wa); border-color: var(--wa); color: #fff; font-weight: 600; }
.wa-top:hover { border-color: var(--wa); filter: brightness(1.06); }
.nav { display: flex; gap: 8px; flex-wrap: wrap; margin-inline-start: auto; }

/* ---------- ticker: always one line ---------- */
.ticker { background: var(--band); color: var(--band-ink); overflow: hidden; white-space: nowrap; font-size: 14px; }
.ticker-track { display: flex; flex-wrap: nowrap; width: max-content; padding-block: 9px; will-change: transform; }
.ticker-group { display: flex; flex: none; flex-wrap: nowrap; }
.ticker:hover .ticker-track { animation-play-state: paused !important; }
.ticker-item { display: inline-flex; align-items: center; gap: 12px; padding-inline: 22px; white-space: nowrap; font-weight: 500; flex: none; }
.ticker-item::before { content: ""; width: 7px; height: 7px; background: var(--volt); transform: rotate(45deg); flex: none; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* ---------- hero slider ---------- */
.hero { padding-block: 20px 4px; }
.slider { position: relative; display: grid; border-radius: 20px; overflow: hidden; color: var(--accent-ink);
  background: radial-gradient(120% 140% at 0% 100%, rgba(255, 194, 26, .28), transparent 55%), linear-gradient(135deg, var(--accent), var(--accent-2)); }
.slider::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 28px 28px; mask-image: linear-gradient(to left, transparent 30%, #000); -webkit-mask-image: linear-gradient(to left, transparent 30%, #000); }
.slide { grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 20px; padding: 32px 36px 44px; min-height: 240px;
  opacity: 0; visibility: hidden; transform: translateX(-28px); transition: opacity .6s ease, transform .6s ease, visibility 0s .6s; position: relative; z-index: 1; }
.slide.on { opacity: 1; visibility: visible; transform: none; transition: opacity .6s ease, transform .6s ease; }
.slide.has-img { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.slide-text { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; min-width: 0; }
.slide .tag { background: var(--volt); color: var(--volt-ink); font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 5px; letter-spacing: .02em; }
.slide h2 { font-size: clamp(22px, 3.6vw, 40px); line-height: 1.2; font-weight: 700; max-width: 20ch; }
.slide p { margin: 0; opacity: .9; max-width: 46ch; }
.slide-cta { margin-top: 6px; border: 0; background: var(--surface); color: var(--ink); padding: 10px 20px; border-radius: 999px; font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.slide-cta:hover { background: var(--volt); color: var(--volt-ink); }
.slide-img { display: grid; place-items: center; height: 100%; min-height: 0; }
.slide-img img { max-height: 230px; width: auto; max-width: 100%; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(0,0,0,.28)); }
.dots { position: absolute; z-index: 2; bottom: 16px; right: 36px; display: flex; gap: 6px; }
.dots button { width: 8px; height: 8px; border-radius: 4px; border: 0; background: var(--accent-ink); opacity: .45; padding: 0; transition: width .3s ease, opacity .3s; }
.dots button.on { opacity: 1; width: 24px; }

/* ---------- skeletons ---------- */
.sk { display: block; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.slider .sk { background: rgba(255,255,255,.18); animation: none; }
.sk-tag { width: 70px; height: 20px; } .sk-h { width: min(420px, 70vw); height: 34px; } .sk-p { width: min(300px, 55vw); height: 16px; }
.sk-line { height: 14px; width: 90%; } .sk-line.short { width: 40%; } .sk-line.mid { width: 60%; height: 20px; margin-top: 8px; }
.sk-card .card-img.sk { border-radius: 0; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---------- categories ---------- */
.cats { display: flex; gap: 10px; overflow-x: auto; padding-block: 18px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.cats::-webkit-scrollbar { display: none; }
.cat-btn { flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 8px 14px 8px 10px; transition: border-color .15s, background .15s; }
.cat-btn:hover { border-color: var(--accent); }
.cat-ico { width: 32px; height: 32px; border-radius: 9px; background: var(--surface-2); color: var(--accent); display: grid; place-items: center; }
.cat-ico svg { width: 18px; height: 18px; }
.cat-name { font-weight: 500; }
.cat-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cat-btn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cat-btn.on .cat-ico { background: var(--volt); color: var(--volt-ink); }
.cat-btn.on .cat-count { color: inherit; opacity: .7; }

/* ---------- sections ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 18px 12px; flex-wrap: wrap; }
.section-head h2 { font-size: 22px; }
.head-tools { display: flex; align-items: center; gap: 10px; }
.count { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.sort { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 7px 10px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 240px); gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }

/* ---------- product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-bottom: 48px; }
@media (max-width: 1080px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; transition: transform .2s ease, box-shadow .2s ease, border-color .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.card-hit { position: absolute; inset: 0; z-index: 2; background: transparent; border: 0; border-radius: inherit; }
.card-img { aspect-ratio: 1 / 1; max-width: 100%; background: var(--img-bg); display: grid; place-items: center; position: relative; color: var(--muted); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: contain; padding: 8%; transition: transform .35s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.ph { display: grid; place-items: center; width: 100%; height: 100%; background: var(--surface-2); color: var(--muted); }
.ph svg { width: 34%; height: 34%; max-width: 72px; opacity: .7; }
.flags { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.flag { background: var(--volt); color: var(--volt-ink); font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 5px; line-height: 1.5; }
.flag.deal { background: var(--danger); color: #fff; font-variant-numeric: tabular-nums; }
.soldout { position: absolute; inset: auto 0 0 0; background: rgba(18, 24, 38, .78); color: #fff; font-size: 12px; text-align: center; padding: 4px; font-weight: 500; }
.card.out .card-img img { opacity: .55; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.cat { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.card h3 { font-size: 15.5px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.specs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.spec { font-family: var(--font-mono); font-size: 11px; background: var(--surface-2); border-radius: 4px; padding: 1px 6px; direction: ltr; color: var(--muted); }
.price-row { margin-top: auto; padding-top: 8px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price { font-family: var(--font-display); font-weight: 700; font-size: 19px; font-variant-numeric: tabular-nums; color: var(--ink); }
.old { color: var(--muted); text-decoration: line-through; font-size: 13px; font-variant-numeric: tabular-nums; }

.empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 48px 16px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); background: var(--surface); }
.empty h3 { color: var(--ink); }
.empty p { margin: 0; }

/* ---------- product dialog ---------- */
.pd { border: 0; padding: 0; width: min(980px, calc(100% - 32px)); max-height: calc(100% - 48px); border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.35); overflow: auto; overscroll-behavior: contain; }
.pd::backdrop { background: rgba(8, 11, 18, .6); backdrop-filter: blur(3px); }
.pd[open] { animation: pd-in .25s ease; }
@keyframes pd-in { from { opacity: 0; transform: translateY(16px); } }
.pd-close { position: absolute; top: 14px; left: 14px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; }
.pd-close svg { width: 18px; height: 18px; }
.pd-body { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; padding: 24px; }
.pd-gallery { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pd-main { aspect-ratio: 1 / 1; border-radius: 16px; background: var(--img-bg); display: grid; place-items: center; overflow: hidden; }
.pd-main img { width: 100%; height: 100%; object-fit: contain; padding: 6%; }
.pd-main .ph { border-radius: 16px; }
.pd-thumbs { display: flex; gap: 8px; overflow-x: auto; }
.pd-thumbs button { flex: none; width: 64px; height: 64px; border-radius: 10px; border: 2px solid var(--line); background: var(--img-bg); padding: 4px; }
.pd-thumbs button.on { border-color: var(--accent); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pd-info { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; min-width: 0; }
.pd-info h2 { font-size: clamp(22px, 3vw, 30px); line-height: 1.3; }
.pd-price { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pd-price .price { font-size: 30px; }
.pd-price .old { font-size: 16px; }
.stock { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stock.yes { color: var(--ok); } .stock.no { color: var(--danger); }
.pd-info .spec { font-size: 12.5px; padding: 3px 10px; }
.pd-desc { margin: 0; color: var(--muted); white-space: pre-line; }
.pd-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.pd-actions .wa { flex: 1 1 220px; }
.pd-note { margin: 0; font-size: 13px; color: var(--muted); min-height: 1.2em; word-break: break-all; }

/* ---------- floating WhatsApp ---------- */

/* ---------- footer ---------- */
.site-foot { background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; padding-block: 32px 20px; }
.foot-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.foot-col > strong { color: var(--ink); font-family: var(--font-display); font-weight: 600; }
.foot-brand { font-size: 19px; }
.foot-col p { margin: 0; max-width: 40ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--accent); }
.contact { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.contact li { display: flex; gap: 10px; }
.contact span { min-width: 56px; }
.contact b { color: var(--ink); font-weight: 500; }
.contact a { color: var(--accent); text-decoration: none; }
.foot-bottom { border-top: 1px solid var(--line); padding-block: 14px calc(14px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }

/* ---------- phones ---------- */
@media (max-width: 720px) {
  :root { --top-h: 112px; }
  .top-row { flex-wrap: wrap; gap: 10px; padding-block: 10px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-name { font-size: 19px; }
  .search-box { order: 3; flex-basis: 100%; max-width: none; }

  .hero { padding-block: 12px 0; }
  .slider { border-radius: 16px; }
  .slide { padding: 20px 18px 36px; min-height: 170px; gap: 10px; }
  .slide.has-img { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .slide h2 { font-size: 20px; }
  .slide p { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .slide-cta { padding: 7px 14px; font-size: 13px; }
  .slide-img img { max-height: 130px; }
  .dots { right: 18px; bottom: 12px; }

  .cats { padding-block: 14px 2px; gap: 8px; }
  .cat-btn { padding: 6px 12px 6px 8px; border-radius: 12px; }
  .cat-ico { width: 28px; height: 28px; }
  .cat-count { display: none; }
  .section-head { padding-block: 14px 10px; }
  .section-head h2 { font-size: 18px; }
  .count { display: none; }
  .rail { grid-auto-columns: 44%; gap: 10px; }

  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { border-radius: 14px; }
  .card:hover { transform: none; }
  .card-body { padding: 10px 10px 12px; }
  .card h3 { font-size: 14px; }
  .card .specs { display: none; }
  .price { font-size: 16px; }
  .old { font-size: 12px; }
  .flags { top: 8px; right: 8px; }
  .flag { font-size: 11px; padding: 1px 6px; }

  .pd { width: 100%; max-width: 100%; max-height: 92%; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .pd[open] { animation: sheet-in .28s ease; }
  .pd-body { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 8px 16px calc(20px + env(safe-area-inset-bottom, 0px)); }
  .pd-body { padding-top: 56px; }
  .pd-close { top: 10px; left: 10px; }
  .pd-main { aspect-ratio: 4 / 3; }
  .pd-price .price { font-size: 26px; }
  .pd-actions { position: sticky; bottom: 0; background: var(--surface); padding-block: 10px 4px; }
  .pd-actions .btn { flex: 1 1 100%; }

  .foot-grid { grid-template-columns: 1fr; gap: 20px; padding-block: 24px 16px; }
}
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }

/* ---------- admin ---------- */
.login-wrap { display: grid; place-items: center; padding-block: 56px; }
.login { width: 100%; max-width: 380px; }
.login h1 { font-size: 24px; }
.admin-head { padding-block: 22px 6px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-head p { color: var(--muted); margin: 4px 0 0; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; min-width: 96px; }
.stat b { display: block; font-family: var(--font-display); font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat span { font-size: 12px; color: var(--muted); }
.stat.warn b { color: var(--danger); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 14px; overflow-x: auto; scrollbar-width: none; }
.tab { flex: none; border: 0; background: none; padding: 10px 16px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.on { color: var(--accent); border-bottom-color: var(--accent); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; padding-block: 18px 48px; align-items: start; }
@media (max-width: 900px) { .admin-grid { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel h2 { font-size: 19px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .full { grid-column: 1 / -1; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 480px) { .form { grid-template-columns: 1fr; } .panel { padding: 16px; } }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 500; }
.hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.field { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 10px 12px; width: 100%; min-width: 0; font-size: 15px; }
.field:focus { outline: none; border-color: var(--accent); background: var(--surface); }
textarea.field { resize: vertical; min-height: 84px; }
.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.checks { display: flex; gap: 18px; flex-wrap: wrap; }
.images { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.img-tile { position: relative; aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line); background: var(--img-bg); overflow: hidden; }
.img-tile img { width: 100%; height: 100%; object-fit: contain; }
.img-tile .x { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(18,24,38,.75); color: #fff; font-size: 14px; line-height: 1; display: grid; place-items: center; }
.img-tile .main-tag { position: absolute; bottom: 4px; right: 4px; background: var(--accent); color: #fff; font-size: 10px; padding: 0 6px; border-radius: 4px; }
.img-tile .mv { position: absolute; bottom: 4px; left: 4px; width: 22px; height: 22px; border-radius: 6px; border: 0; background: rgba(18,24,38,.6); color: #fff; font-size: 12px; display: grid; place-items: center; }
.img-add { aspect-ratio: 1; border-radius: 10px; border: 1.5px dashed var(--line); display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 12px; cursor: pointer; background: var(--bg); padding: 4px; }
.img-add:hover { border-color: var(--accent); color: var(--accent); }
.img-add input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.img-add svg { width: 22px; height: 22px; display: block; margin: 0 auto 2px; }
.msg { font-size: 13px; min-height: 1.4em; margin: 0; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--ok); }
.list { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; background: var(--surface); }
.row.editing { border-color: var(--accent); }
.row-thumb { width: 52px; height: 52px; border-radius: 8px; background: var(--img-bg); display: grid; place-items: center; flex: none; overflow: hidden; color: var(--muted); border: 1px solid var(--line); }
.row-thumb img { width: 100%; height: 100%; object-fit: contain; }
.row-thumb .ph svg { width: 22px; height: 22px; }
.row-main { flex: 1; min-width: 0; }
.row-main strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.row-main span { font-size: 13px; color: var(--muted); }
.row-actions { display: flex; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 480px) { .row { flex-wrap: wrap; } .row-actions { width: 100%; } .row-actions .btn { flex: 1; } }
.notice { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--muted); margin: 0; }
.list-search { max-width: 220px; padding: 7px 12px; }

@media (prefers-reduced-motion: reduce) {
  .slide, .card, .card-img img, .dots button, .pd[open], .sk { transition: none; animation: none; }
}

/* ---------- side menu, social, floating buttons ---------- */
.icon-btn { position: relative; flex: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; transition: border-color .15s; }
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; }
.dot-badge { position: absolute; top: 7px; left: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); border: 2px solid var(--surface); }
.pill { background: var(--accent); color: var(--accent-ink); font-size: 11px; min-width: 18px; height: 18px; border-radius: 9px; display: inline-grid; place-items: center; padding: 0 5px; font-variant-numeric: tabular-nums; }
.filter-btn { padding: 6px 12px; border-radius: 10px; }

.active-filters { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 12px; }
.af { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border-radius: 999px; padding: 3px 12px; font-size: 13px; }
.af span { font-size: 16px; line-height: 1; }
.af.clear { border-color: var(--line); color: var(--muted); background: var(--surface); }

.drawer { margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(360px, 88vw); max-width: 100%; border: 0; padding: 0; background: var(--surface); color: var(--ink); display: none; flex-direction: column; box-shadow: -20px 0 60px rgba(0,0,0,.3); }
.drawer[open] { display: flex; animation: drawer-in .28s ease; }
.drawer::backdrop { background: rgba(8, 11, 18, .55); backdrop-filter: blur(2px); }
@keyframes drawer-in { from { transform: translateX(100%); } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 14px; border-bottom: 1px solid var(--line); }
.drawer-head .brand-mark { width: 34px; height: 34px; border-radius: 9px; }
.drawer-head .brand-name { font-size: 18px; }
.drawer-body { overflow-y: auto; overscroll-behavior: contain; padding: 6px 18px calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; }
.d-sec { display: flex; flex-direction: column; gap: 10px; padding-block: 16px; border-bottom: 1px solid var(--line); }
.d-sec:last-child { border-bottom: 0; }
.d-sec h3 { font-size: 12px; font-family: var(--font-body); font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.d-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.d-contact .btn { padding: 10px; }
.d-contact .btn:only-child { grid-column: 1 / -1; }
.d-cats { display: flex; flex-direction: column; gap: 2px; }
.d-cat { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 7px 8px; border-radius: 10px; text-align: start; font-weight: 500; }
.d-cat:hover { background: var(--surface-2); }
.d-cat b { margin-inline-start: auto; font-weight: 500; font-size: 12px; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 0 8px; font-variant-numeric: tabular-nums; }
.d-cat.on { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); }
.d-cat .cat-ico { width: 30px; height: 30px; }
.switch { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink); font-size: 14.5px; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 12px; background: var(--line); position: relative; cursor: pointer; transition: background .2s; flex: none; order: 2; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(-18px); }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.price-range .field, .d-label .field { padding: 8px 10px; }
.d-label { gap: 6px; }
.d-row { display: flex; gap: 8px; }
.d-row .btn { flex: 1; padding: 10px; }
.d-links { display: flex; flex-direction: column; }
.d-links a { color: var(--ink); text-decoration: none; padding: 8px; border-radius: 8px; font-weight: 500; }
.d-links a:hover { background: var(--surface-2); color: var(--accent); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: none; border-radius: 9px; padding: 7px; font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); font-weight: 600; }

.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.soc { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); text-decoration: none; transition: background .15s, color .15s, transform .15s; }
.soc svg { width: 19px; height: 19px; }
.soc:hover { transform: translateY(-2px); color: #fff; }
.soc-whatsapp:hover { background: #1fa855; } .soc-facebook:hover { background: #1877f2; } .soc-instagram:hover { background: #d62976; }
.soc-tiktok:hover { background: #111; } .soc-telegram:hover { background: #229ed9; } .soc-youtube:hover { background: #ff0000; } .soc-x:hover { background: #111; }
.socials.big { display: grid; grid-template-columns: 1fr 1fr; }
.socials.big .soc { width: auto; height: auto; display: flex; justify-content: flex-start; gap: 8px; padding: 9px 12px; font-size: 14px; font-weight: 500; }

.side-rail { position: fixed; z-index: 20; left: env(safe-area-inset-left, 0px); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-left: 0; border-radius: 0 14px 14px 0; padding: 6px; box-shadow: var(--shadow); }
.side-rail .soc { background: none; width: 40px; height: 40px; }

.card-wa { position: absolute; z-index: 3; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 4px; background: var(--wa); color: #fff; text-decoration: none; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; box-shadow: 0 4px 12px rgba(0,0,0,.18); opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s; }
.card-wa svg { width: 15px; height: 15px; }
.card:hover .card-wa, .card-wa:focus-visible { opacity: 1; transform: none; }

.fabs { position: fixed; z-index: 25; left: calc(18px + env(safe-area-inset-left, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.fab { position: relative; border: 0; height: 48px; min-width: 48px; border-radius: 24px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 8px 22px rgba(0,0,0,.22); text-decoration: none; transition: transform .2s; }
.fab:hover { transform: translateY(-2px); }
.fab svg { width: 24px; height: 24px; }
.top-fab { background: var(--surface); color: var(--ink); border: 1px solid var(--line); width: 44px; min-width: 44px; height: 44px; }
.wa-float { background: var(--wa); color: #fff; height: 54px; padding: 0 18px 0 16px; border-radius: 27px; font-weight: 600; }
.wa-float svg { width: 27px; height: 27px; }
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--wa); animation: wa-ring 2.4s ease-out infinite; pointer-events: none; }
@keyframes wa-ring { from { opacity: .8; transform: scale(1); } to { opacity: 0; transform: scale(1.35); } }

@media (max-width: 1320px) { .side-rail { display: none; } }
@media (max-width: 720px) {
  .menu-btn { order: -1; }
  .top-actions { margin-inline-start: auto; }
  .wa-top { padding: 8px 12px; }
  .wa-top span { display: none; }
  .card-wa { opacity: 1; transform: none; top: auto; bottom: 10px; left: 10px; padding: 0; width: 34px; height: 34px; justify-content: center; }
  .card-wa span { display: none; }
  .card .price-row { padding-left: 40px; }
  .wa-float { height: 52px; width: 52px; padding: 0; }
  .wa-float .fab-label { display: none; }
  .socials.big .soc { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) { .wa-float::before, .drawer[open] { animation: none; } }
.warn-notice { margin-top: 12px; border-color: var(--volt); color: var(--ink); }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; }
