/* Lmlih Shop — navy + gold, light/dark */

:root {
  --navy: #0c1d3d;
  --navy-2: #152a54;
  --gold: #c9a227;
  --gold-2: #e4c35a;
  --gold-soft: rgba(201, 162, 39, 0.16);
  --bg: #f4f6fb;
  --bg-2: #e8edf6;
  --card: #ffffff;
  --ink: #0c1d3d;
  --muted: #5b6b86;
  --line: #d7deeb;
  --btn: #0c1d3d;
  --btn-hover: #152a54;
  --cta: linear-gradient(180deg, #d4af37, #c9a227);
  --cta-text: #0c1d3d;
  --danger: #c0392b;
  --ok: #1f7a4d;
  --shadow: 0 20px 50px rgba(12, 29, 61, 0.1);
  --radius: 18px;
  --font-ar: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Noto Sans Arabic", Arial, sans-serif;
  --font-lat: "Segoe UI", Tahoma, Arial, sans-serif;
  --header: rgba(255, 255, 255, 0.88);
  --ship: #0c1d3d;
  --ship-text: #fff;
}

[data-theme="dark"] {
  --bg: #070b14;
  --bg-2: #0d1422;
  --card: #121a2b;
  --ink: #f3f6fb;
  --muted: #9aa8c2;
  --line: #253049;
  --btn: #d4af37;
  --btn-hover: #e4c35a;
  --cta: linear-gradient(180deg, #e4c35a, #c9a227);
  --cta-text: #0c1d3d;
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
  --header: rgba(10, 16, 28, 0.86);
  --ship: #0a1220;
  --ship-text: #f6e7b2;
  --gold-soft: rgba(228, 195, 90, 0.14);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
  max-width: 100%;
}

html[dir="rtl"] body,
body { font-family: var(--font-ar); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  transition: background 0.25s ease, color 0.25s ease;
  padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
  overflow-x: clip;
  max-width: 100%;
}

body.checkout-open { overflow: hidden; }

body[data-page="product"],
body[data-page="home"] {
  background: var(--bg);
}

img, video, iframe { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; font-size: 16px; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button, a.btn { touch-action: manipulation; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.02em; }
p { margin: 0; }

.wrap { width: min(1240px, calc(100% - 32px)); margin-inline: auto; max-width: 100%; }
.wrap-s { width: min(560px, calc(100% - 32px)); margin-inline: auto; max-width: 100%; }

main, .pdp, .desc-section, .info-col, .gallery {
  max-width: 100%;
  min-width: 0;
}

/* shipping ticker */
.offline-bar {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px calc(12px + env(safe-area-inset-top));
  background: #9b1c1c;
  color: #fff;
  text-align: center;
  box-shadow: 0 8px 24px rgba(155, 28, 28, 0.28);
}
.offline-bar[hidden] { display: none !important; }
.offline-bar strong { font-size: 1.02rem; }
.offline-bar span { font-size: 0.92rem; opacity: 0.95; }
body.is-offline .ship { display: none; }

.ship {
  background: var(--ship);
  color: var(--ship-text);
  overflow: hidden;
  overflow: clip;
  border-bottom: 2px solid var(--gold);
  min-height: 42px;
  max-width: 100%;
  direction: ltr;
  contain: layout paint;
}

.ship-track {
  display: flex;
  gap: 48px;
  width: max-content;
  max-width: none;
  animation: marquee 28s linear infinite;
  padding: 10px 0;
  font-weight: 800;
  font-size: 0.92rem;
  will-change: transform;
}

.ship-track span { white-space: nowrap; }
.ship-track b { color: var(--gold-2); }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

html[dir="rtl"] .ship-track { animation-name: marquee-rtl; }
@keyframes marquee-rtl {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}

/* header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--header);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}

.topbar-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.12rem;
  color: var(--ink);
}

.logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #fff;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--card);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--ink);
}

.icon-btn:hover { border-color: var(--ink); }

.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  border-radius: 8px;
  font-weight: 800;
  padding: 11px 18px;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.btn:active { transform: translateY(1px); }

.btn-dark { background: var(--navy); color: #fff; }
[data-theme="dark"] .btn-dark { background: #23345a; }

.btn-main {
  background: var(--navy);
  color: #fff;
  box-shadow: none;
}

.btn-main:hover { filter: brightness(1.08); }
[data-theme="dark"] .btn-main {
  background: var(--gold);
  color: var(--navy);
}
.btn-wide { width: 100%; padding: 14px; font-size: 1.02rem; }
.btn-buy { border-radius: 8px; letter-spacing: 0.01em; }
.btn[disabled] { opacity: 0.65; cursor: wait; }

.intro {
  padding: 28px 0 4px;
  text-align: start;
}

.intro h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 6px;
}

.intro p { color: var(--muted); font-size: 0.98rem; max-width: 720px; }

.ico {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: #111;
}
[data-theme="dark"] .ico { color: #e8eef8; }

.svc {
  list-style: none;
  margin: 0;
  padding: 4px 0 10px;
  border-top: 1px solid var(--line);
}

.svc li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.svc div { min-width: 0; }
.svc strong { display: block; font-size: 0.92rem; font-weight: 700; line-height: 1.3; }
.svc span { display: block; color: var(--muted); font-size: 0.8rem; font-weight: 500; margin-top: 1px; }

.svc-home {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0 18px;
  margin: 18px 0 8px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.svc-home li { border-bottom: 0; padding: 10px 0; }

.pdp {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 28px;
  align-items: start;
  padding: 22px 0 8px;
}

.info-col h1 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  position: sticky;
  top: 88px;
}

.main-photo {
  position: relative;
  display: block;
  background: transparent;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 1;
  max-height: min(82vh, 680px);
  cursor: zoom-in;
}

.slide-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-img.is-active { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .slide-img { transition: none; opacity: 1; }
}

.main-photo img,
.slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
}

.photo-empty {
  width: 100%;
  min-height: 280px;
  background: var(--bg-2);
  border-radius: 12px;
}

.thumbs {
  display: flex;
  flex-direction: row;
  gap: 10px;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 4px 6px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.thumb {
  border: 2px solid var(--line);
  padding: 0;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--card);
  flex: 0 0 auto;
  scroll-snap-align: start;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.thumb.is-on {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-soft);
  transform: scale(1.04);
  outline: none;
}

.thumb img { width: 100%; height: 100%; object-fit: contain; }

.price-box {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 14px 10px;
  margin-bottom: 4px;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.now { font-size: 1.85rem; font-weight: 800; color: var(--navy); letter-spacing: -0.03em; }
[data-theme="dark"] .now { color: var(--gold-2); }
.was { color: var(--muted); text-decoration: line-through; font-size: 0.95rem; }
.off {
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 3px 7px;
  border-radius: 3px;
}
[data-theme="dark"] .off { background: var(--gold); color: var(--navy); }

.muted { color: var(--muted); }

.buy-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 12px;
  flex-wrap: nowrap;
}

.ali-qty {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
}

.ali-qty-label {
  font-weight: 700;
  color: var(--muted);
  font-size: 0.92rem;
}

.qty-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--card);
  height: 44px;
}

.qty-stepper button {
  width: 44px;
  height: 44px;
  border: 0;
  background: var(--card);
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
}

.qty-stepper button:hover { background: var(--bg-2); }

.qty-stepper input {
  width: 52px;
  height: 44px;
  border: 0;
  border-inline: 1px solid var(--line);
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
  background: var(--card);
  color: var(--ink);
  -moz-appearance: textfield;
}

.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.buy-row .btn-buy {
  height: 44px;
  padding: 0 16px;
  min-width: 120px;
  flex: 1 1 auto;
  white-space: nowrap;
}

.deal-box {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  margin: 0 0 14px;
  font-size: 0.88rem;
  line-height: 1.55;
}

.deal-box strong { color: var(--ink); }
.deal-box s { color: var(--muted); margin-inline-start: 6px; }
.unit-line { margin: 0; font-size: 0.82rem; }

.section { padding: 32px 0; }
.section h2 { margin-bottom: 12px; font-size: 1.35rem; }

.desc-section {
  width: min(760px, 100%);
  margin-inline: auto;
  margin-block: 8px 48px;
  padding: 28px 36px 36px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.desc-section > h2 {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 1.18rem;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.desc-section > h2::after {
  content: "";
  width: 40px;
  height: 3px;
  margin-top: 10px;
  border-radius: 99px;
  background: var(--gold);
}

.desc { font-size: 1.02rem; color: var(--ink); line-height: 1.9; margin-bottom: 8px; position: relative; overflow: hidden; overflow-x: clip; max-width: 100%; word-break: break-word; overflow-wrap: anywhere; }
.desc-c { color: var(--c-l, var(--ink)) !important; }
[data-theme="dark"] .desc-c { color: var(--c-d, var(--ink)) !important; }
.desc::after { content: ""; display: table; clear: both; }
.desc p { margin: 0 0 16px; }
.desc ul, .desc ol { margin: 0 0 16px; padding-inline-start: 1.4em; }
.desc li { margin-bottom: 8px; }
.desc h1, .desc h2, .desc h3 { color: var(--navy); margin: 18px 0 10px; line-height: 1.35; }
[data-theme="dark"] .desc h1,
[data-theme="dark"] .desc h2,
[data-theme="dark"] .desc h3 { color: var(--gold-2); }
.desc hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.extra { display: grid; gap: 16px; margin-top: 12px; }
.desc-section .desc-frame--left {
  float: inline-start !important;
  margin-inline: 0 16px !important;
}
.desc-section .desc-frame--right {
  float: inline-end !important;
  margin-inline: 16px 0 !important;
}

.desc-img, .desc-video, .video-wrap {
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
}

.desc-img { object-fit: contain; max-height: 760px; background: #0b0b0b; }
.desc-video { width: 100%; max-height: 420px; background: #000; }
.video-wrap { position: relative; padding-top: 56.25%; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.desc-pic, .desc img, .rte-area img {
  height: auto;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.desc-pic--left { float: left; margin: 6px 16px 10px 0; }
.desc-pic--right { float: right; margin: 6px 0 10px 16px; }
.desc-pic--center { display: block; float: none; margin: 12px auto; clear: both; }
.desc-pic--full {
  display: block;
  float: none;
  width: 100%;
  max-width: 100%;
  margin: 12px 0;
  clear: both;
}
.desc-pic-w-sm { width: 28%; }
.desc-pic-w-md { width: 48%; }
.desc-pic-w-lg { width: 72%; }
.desc-pic-w-full,
.desc-pic.desc-pic--full { width: 100%; max-width: 100%; }

.desc-frame {
  position: relative;
  max-width: 100%;
  width: var(--dw, 100%);
  box-sizing: border-box;
  line-height: 0;
  min-height: 48px;
}
.desc-frame img,
.desc .desc-frame img,
.rte-area .desc-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  border: 0;
  border-radius: inherit;
  background: none;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: auto;
}
.desc .desc-frame img { cursor: zoom-in; }
.desc-frame--left { float: left; clear: none; }
.desc-frame--right { float: right; clear: none; }
.desc-frame--inline {
  display: block;
  float: none;
  clear: none;
  vertical-align: top;
}
.desc-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 100%;
  margin: 16px 0 20px;
  clear: both;
  overflow: hidden;
}
.desc-row .desc-frame {
  float: none !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  min-height: 80px;
  aspect-ratio: auto;
  overflow: visible;
  position: relative;
}
.desc-row .desc-frame img {
  position: static;
  inset: auto;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}
.desc-row .desc-frame.is-fixedh {
  aspect-ratio: var(--ar, auto);
  overflow: hidden;
}
.desc-row .desc-frame.is-fixedh img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: var(--fit, contain);
}
.desc-frame--free {
  position: relative;
  z-index: 1;
  margin: 12px auto;
}
.desc-frame--center,
.desc-frame--full {
  display: block;
  float: none;
  clear: both;
}
.desc-frame--full { width: 100%; }
.desc-frame.is-fixedh { aspect-ratio: var(--ar, auto); overflow: hidden; }
.desc .desc-frame.is-empty { display: none !important; }
.desc-fstyle--round { overflow: hidden; }
.rte-area .desc-frame.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  background: rgba(255, 255, 255, 0.04);
  border: 2px dashed rgba(212, 175, 55, 0.45) !important;
  cursor: pointer;
}
.rte-area .desc-frame.is-empty.desc-fstyle--plain {
  border: 2px dashed rgba(255, 255, 255, 0.22) !important;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none !important;
}
.rte-area .desc-frame.is-empty.is-fixedh { min-height: 0; }
.desc-slot-plus {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(212, 175, 55, 0.7);
  color: var(--gold);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.25);
}
.desc-slot-plus:hover {
  background: rgba(212, 175, 55, 0.18);
  border-color: var(--gold);
}
.desc-frame.is-fixedh img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: var(--fit, contain);
  object-position: center;
}
.desc-cap {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 12px;
  box-sizing: border-box;
  pointer-events: none;
}
.desc-cap span {
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.35;
  text-align: center;
  max-width: 100%;
  word-break: break-word;
}
.desc-cap--sz-sm span { font-size: 0.78rem; }
.desc-cap--sz-md span { font-size: 1rem; }
.desc-cap--sz-lg span { font-size: 1.28rem; }
.desc-cap--top { top: 0; bottom: auto; transform: none; }
.desc-cap--center {
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}
.desc-cap--bottom { top: auto; bottom: 0; transform: none; }
.desc-cap--bar { background: rgba(0, 0, 0, 0.58); }
.desc-cap--dim {
  inset: 0;
  top: 0;
  bottom: 0;
  transform: none;
  background: rgba(0, 0, 0, 0.45);
}
.desc-cap--grad {
  top: auto;
  bottom: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
  padding-top: 36px;
  transform: none;
}
.desc-cap--none {
  background: none;
}
.desc-cap--none span { text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9); }
.desc-cap--gold {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.92), rgba(180, 140, 30, 0.95));
}
.desc-cap--gold span { color: #0c1d3d; text-shadow: none; }
.desc-cap--pill {
  background: none;
  padding: 0;
}
.desc-cap--pill span {
  background: rgba(255, 255, 255, 0.94);
  color: #0c1d3d;
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
}
.desc-cap--outline {
  background: none;
}
.desc-cap--outline span {
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.92);
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
}
.desc-cap--tag {
  top: 10px;
  bottom: auto;
  left: 10px;
  right: auto;
  width: auto;
  transform: none;
  background: none;
  padding: 0;
  justify-content: flex-start;
}
.desc-cap--tag span {
  background: var(--gold, #d4af37);
  color: #0c1d3d;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 0.88em;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
}
.desc-cap--neon {
  background: none;
}
.desc-cap--neon span {
  color: #fff;
  text-shadow:
    0 0 8px rgba(212, 175, 55, 0.95),
    0 0 18px rgba(212, 175, 55, 0.65),
    0 2px 8px rgba(0, 0, 0, 0.85);
}
.desc-cap--dim.desc-cap--center span,
.desc-cap--dim.desc-cap--top span,
.desc-cap--dim.desc-cap--bottom span { max-width: 92%; }
.desc .desc-tools,
.desc .desc-resize,
.desc .desc-size,
.desc .desc-guide,
.desc .desc-frame-del,
.desc .desc-frame-drag,
.desc .desc-crop-badge { display: none !important; }
.desc-guide { display: none; }
.rte-area .desc-guide {
  display: block;
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 5;
  background: rgba(201, 162, 39, 0.95);
  color: #0c1d3d;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  pointer-events: none;
}
.rte-area .desc-frame.is-selected .desc-guide { opacity: 0; }
.rte-area .desc-frame {
  outline: 1px dashed rgba(201, 162, 39, 0.55);
}
.rte-area .desc-row {
  outline: 1px dashed rgba(201, 162, 39, 0.5);
  outline-offset: 6px;
  padding: 18px 8px 10px;
  background: rgba(201, 162, 39, 0.06);
  position: relative;
}
.rte-area .desc-row::before {
  content: "صف صور — يظهر لك فقط";
  position: absolute;
  top: -9px;
  right: 8px;
  background: var(--card);
  color: #c9a227;
  font-size: 10px;
  font-weight: 800;
  padding: 0 6px;
  pointer-events: none;
}
.desc-tools-cap { width: 100%; }
.desc-tools-cap input {
  flex: 1;
  min-width: 140px;
  border: 0;
  border-radius: 6px;
  padding: 5px 8px;
  min-height: 28px;
  font-size: 0.78rem;
  font-weight: 700;
}
.rte-area .desc-frame.is-selected { outline: 2px solid #2271b1; outline-offset: 2px; }
.desc-frame-del {
  position: absolute;
  top: -10px;
  right: -10px;
  z-index: 20;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: #c0392b;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.desc-frame-del:hover { background: #e74c3c; transform: scale(1.08); }
.desc-frame-drag {
  position: absolute;
  top: -10px;
  left: -10px;
  z-index: 20;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(12, 29, 61, 0.88);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 28px;
  text-align: center;
  cursor: grab;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  user-select: none;
}
.desc-frame-drag:active { cursor: grabbing; }
.rte-imgbar-delrow {
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
.rte-img-del-btn {
  font-weight: 800;
}
.rte-img-del-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.rte-imgbar-tip {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
}
.rte-imgbar-cap input[type="text"] {
  flex: 1 1 220px;
  min-width: 160px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 12px;
  min-height: 36px;
  font-size: 0.9rem;
  font-weight: 700;
}
.rte-imgbar-cap-styles {
  gap: 5px;
}
.rte-imgbar-cap-styles button {
  padding: 5px 8px;
  font-size: 0.78rem;
}
.desc-crop-box {
  position: absolute;
  inset: 0;
  border: 2px dashed rgba(34, 113, 177, 0.9);
  pointer-events: none;
  z-index: 2;
  border-radius: inherit;
  box-sizing: border-box;
}
.desc-crop-badge {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  background: rgba(34, 113, 177, 0.94);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 4px;
  pointer-events: none;
  white-space: nowrap;
}
.rte-area .desc-resize {
  width: 12px;
  height: 12px;
  background: #2271b1;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
  z-index: 6;
}
.desc-resize--nw { left: -6px; top: -6px; transform: none; cursor: nwse-resize; }
.desc-resize--ne { right: -6px; top: -6px; transform: none; cursor: nesw-resize; }
.desc-resize--sw { left: -6px; bottom: -6px; transform: none; cursor: nesw-resize; }
.desc-resize--se { right: -6px; bottom: -6px; transform: none; cursor: nwse-resize; }
.desc-frame.is-selected { outline: 2px solid var(--gold); outline-offset: 2px; }
.desc-frame.is-dragging { opacity: 0.55; }
.desc-frame.is-dragging .desc-tools,
.desc-frame.is-dragging .desc-size { display: none; }
.rte-area .desc-frame { cursor: grab; }
.rte-area .desc-frame.is-dragging { cursor: grabbing; opacity: 0.92; z-index: 40 !important; }
.desc-resize {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.25);
  z-index: 4;
}
.desc-resize--l { left: -6px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.desc-resize--r { right: -6px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.desc-resize--n { top: -6px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.desc-resize--s { bottom: -6px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.desc-tools {
  position: absolute;
  top: 6px;
  left: 0;
  right: auto;
  width: max-content;
  min-width: min(340px, 92vw);
  max-width: min(430px, 92vw);
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: 2px;
  border: 1px solid var(--gold);
  background: rgba(12, 29, 61, 0.97);
  box-shadow: 0 8px 18px rgba(0,0,0,.3);
  pointer-events: auto;
}
.desc-tools-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.desc-tools-lab {
  color: #f6e7b2;
  font-size: 0.72rem;
  font-weight: 800;
  margin-inline-end: 2px;
}
.desc-tools button {
  border: 0;
  background: #fff;
  color: #0c1d3d;
  border-radius: 2px;
  padding: 4px 8px;
  min-height: 28px;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}
.desc-tools button.is-on { background: var(--gold); }
.desc-tools button.danger { background: #c0392b; color: #fff !important; }
.desc-tools button[data-t="preview"] { background: #1e4d8c; color: #fff; }
.desc-size {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  z-index: 7;
  text-align: center;
  background: rgba(12, 29, 61, 0.88);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  pointer-events: none;
}
.desc-insert-mark { display: none !important; }
  display: block;
  width: 100%;
  height: 6px;
  background: var(--gold);
  border-radius: 4px;
  margin: 8px 0;
  box-shadow: 0 0 0 3px var(--gold-soft);
}

@media (max-width: 720px) {
  .desc-frame {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin-inline: 0 !important;
    margin-block: 12px !important;
    display: block !important;
  }
  .desc-frame[data-mplace="stack"],
  .desc-frame[data-mplace="center"],
  .desc-frame[data-mplace="keep"] {
    float: none !important;
    display: block !important;
    margin-inline: auto !important;
    margin-block: 12px !important;
  }
  .desc-frame--inline { width: 100% !important; max-width: 100% !important; }
  .desc-row { grid-template-columns: 1fr; gap: 10px; }
  .desc-row .desc-frame { width: 100% !important; max-width: 100% !important; }
  .desc img, .desc-frame img { max-width: 100% !important; width: 100% !important; height: auto !important; position: static !important; }
  .desc-row .desc-frame.is-fixedh { aspect-ratio: auto; min-height: 0; }
  .desc-row .desc-frame.is-fixedh img { position: static !important; inset: auto !important; height: auto !important; }
}

.order-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px;
}

.checkout {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.checkout-bg {
  position: absolute;
  inset: 0;
  background: rgba(7, 11, 20, 0.5);
}

.checkout-panel {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: min(420px, 100%);
  background: var(--card);
  border-inline-start: 1px solid var(--line);
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.checkout-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.checkout-head .icon-btn {
  font-size: 1.4rem;
  line-height: 1;
}

.wa-float {
  position: fixed;
  right: 18px;
  left: auto;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 10050;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45);
}
html[dir="rtl"] .wa-float {
  right: 18px;
  left: auto;
}
.wa-float[hidden] { display: none !important; }
.wa-float svg { width: 32px; height: 32px; display: block; }
.wa-float:hover { filter: brightness(1.06); transform: none; }
@media (max-width: 900px) {
  body[data-page="product"] .wa-float {
    bottom: calc(90px + env(safe-area-inset-bottom));
  }
}
body.checkout-open .wa-float {
  bottom: calc(20px + env(safe-area-inset-bottom));
}

.buy-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  bottom: 0;
  z-index: 25;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
}

.buy-bar .btn { flex: 0 0 auto; min-width: 140px; min-height: 44px; }
.buy-bar strong { font-size: 1.15rem; }

body.checkout-open .buy-bar { display: none; }

.total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.total strong { font-size: 1.25rem; }

.field { display: grid; gap: 5px; margin-bottom: 10px; font-weight: 700; font-size: 0.86rem; }

.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  background: var(--card);
  font-weight: 500;
}

.field textarea { min-height: 64px; resize: vertical; }

.field input:focus, .field select:focus, .field textarea:focus {
  outline: 1px solid var(--navy);
  border-color: var(--navy);
}

.field.bad input, .field.bad select { border-color: var(--danger); }
.err { min-height: 1em; color: var(--danger); font-size: 0.78rem; font-weight: 600; }
.hint { font-weight: 500; color: var(--muted); font-size: 0.78rem; }

.city-box { position: relative; }
.city-list {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 4px);
  z-index: 12;
  max-height: 240px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
}
.city-group {
  padding: 8px 12px 4px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
}
.city-item {
  display: block;
  width: 100%;
  text-align: start;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 0.95rem;
  min-height: 40px;
}
.city-item:hover, .city-item.is-on { background: var(--bg-2); }
.city-item--other {
  font-weight: 800;
  color: var(--navy);
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
[data-theme="dark"] .city-item--other { color: var(--gold); }
.city-empty { padding: 12px; color: var(--muted); font-size: 0.85rem; }
#cityOtherWrap[hidden] { display: none !important; }

.card h2:empty,
.card-price:empty {
  min-height: 1.15em;
}

.catalog {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 14px 0 56px;
  min-height: 380px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.card:hover { border-color: var(--ink); }
.card-img { position: relative; aspect-ratio: 1; background: var(--card); border-radius: 8px; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: contain; }
.card h2 {
  font-size: 0.95rem;
  padding: 10px 12px 2px;
  font-weight: 700;
  min-height: 2.4em;
}
.card-price {
  padding: 0 12px 12px;
  font-weight: 800;
  min-height: 1.4em;
}
.card-price s { color: var(--muted); font-weight: 500; }
.tag {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  background: var(--navy);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 3px;
}

.foot {
  margin-top: 20px;
  padding: 28px 16px 40px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.foot-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin: 0 auto 10px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: #fff;
}

.foot strong { color: var(--ink); display: block; margin-bottom: 6px; }

.modal[hidden], [hidden] { display: none !important; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-bg { position: absolute; inset: 0; background: rgba(7, 11, 20, 0.55); }

.modal-card {
  position: relative;
  background: var(--card);
  width: min(400px, 100%);
  border-radius: 24px;
  padding: 28px 22px;
  text-align: center;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.modal-card img { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px; border: 1px solid var(--line); }
.modal-card h2 { margin-bottom: 8px; }
.modal-card p { color: var(--muted); margin-bottom: 16px; }

.missing { padding: 80px 0; text-align: center; }

.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 24px 0 12px; }
.admin-tabs {
  display: flex;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 6px;
  margin: 20px 0 8px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 72px;
  z-index: 20;
}
.admin-tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 12px 10px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
}
.admin-tab.is-on {
  background: var(--navy);
  color: #fff;
}
[data-theme="dark"] .admin-tab.is-on { background: var(--gold); color: var(--navy); }
.admin-pane { padding-bottom: 40px; }
.editor-block {
  margin: 0 0 22px;
  padding: 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.editor-block h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--navy);
}
[data-theme="dark"] .editor-block h3 { color: var(--gold-2); }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.desc-langs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; align-items: center; }
.desc-langs .btn-main { min-height: 40px; padding: 8px 16px; }
.status-btn {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.88rem;
}
.status-btn.is-on { background: var(--navy); color: #fff; border-color: var(--navy); }
[data-theme="dark"] .status-btn.is-on { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.rte-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
}
.rte-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.rte-bar button, .rte-bar select {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  min-height: 34px;
  font-size: 0.85rem;
}
.rte-bar .rte-add-img,
.desc-media-box #descMediaUpload {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
  font-weight: 800;
}
.rte-bar .rte-add-img:hover,
.desc-media-box #descMediaUpload:hover {
  filter: brightness(1.08);
}
.desc-media-box {
  margin-bottom: 14px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
}
.desc-media-box:focus,
.desc-media-box.is-drop {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}
.desc-media-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}
.desc-media-head span { color: var(--muted); font-size: 0.82rem; font-weight: 500; }
.desc-drop-zone {
  margin-top: 12px;
  min-height: 140px;
  border: 2px dashed var(--gold);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--gold-soft);
  cursor: copy;
  text-align: center;
  padding: 18px 14px;
}
.desc-drop-zone strong { font-size: 1.05rem; }
.desc-drop-zone span { color: var(--muted); font-size: 0.84rem; max-width: 420px; }
.desc-media-box.is-drop .desc-drop-zone {
  background: rgba(212, 175, 55, 0.28);
  border-style: solid;
  transform: scale(1.01);
}
.desc-media-preview {
  margin-top: 12px;
  padding: 16px;
  background: #fff;
  color: #0c1d3d;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  min-height: 120px;
}
.desc-media-preview::before {
  content: "معاينة الحجم والموضع";
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: #5b6b86;
  margin-bottom: 10px;
}
.desc-media-list { display: grid; gap: 10px; margin-top: 10px; }
.desc-media-slider { width: 100%; margin-top: 6px; }
.desc-media-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  align-items: start;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
}
.desc-media-item.is-new {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.22);
}
.desc-media-item img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}
.desc-media-box button, .desc-media-box input[type="url"] {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 8px;
  padding: 6px 10px;
  min-height: 34px;
  font-size: 0.82rem;
}
.desc-media-box button { cursor: pointer; }
.desc-media-box button:hover { border-color: var(--gold); }
.desc-media-box input[type="url"] {
  flex: 1 1 180px;
  min-width: 140px;
}
.rte-fs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.rte-bar button.is-on, .desc-media-item button.is-on {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
[data-theme="dark"] .rte-bar button.is-on,
[data-theme="dark"] .desc-media-item button.is-on {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.rte-bar input[type="color"] {
  width: 38px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px;
  background: var(--card);
  cursor: pointer;
}
.rte-colors {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}
.rte-colors label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.rte-area {
  min-height: 320px;
  padding: 16px;
  outline: none;
  font-weight: 500;
  line-height: 1.75;
  overflow: auto;
  color: var(--ink);
  position: relative;
  cursor: text;
}
.rte-area p { margin: 0 0 10px; min-height: 1.7em; }
.rte-area::after { content: ""; display: table; clear: both; }
.rte-area:focus { box-shadow: inset 0 0 0 2px var(--gold-soft); }
.rte-area.is-drop { box-shadow: inset 0 0 0 2px var(--gold); background: var(--gold-soft); }
.rte-area img.is-selected {
  box-shadow: 0 0 0 3px var(--gold);
  cursor: pointer;
}
.rte-area.is-phone {
  width: min(390px, 100%);
  margin-inline: auto;
  min-height: 420px;
  border: 1px dashed var(--gold);
  background: var(--bg);
}
.rte-area.is-phone .desc-frame {
  width: var(--mw, 100%) !important;
}
.rte-area.is-phone .desc-frame[data-mplace="stack"],
.rte-area.is-phone .desc-frame[data-mplace="center"] {
  float: none !important;
  display: block !important;
  margin-inline: auto !important;
  margin-block: 12px !important;
}
.rte-area.is-phone .desc-frame[data-mplace="keep"].desc-frame--left { float: left !important; }
.rte-area.is-phone .desc-frame[data-mplace="keep"].desc-frame--right { float: right !important; }
.rte-imgbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.rte-imgbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.rte-imgbar-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--muted);
  margin-inline-end: 4px;
}
.rte-imgbar-help {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}
.rte-imgbar:not(.has-selection) .rte-img-controls {
  opacity: 0.55;
}
.rte-imgbar .rte-img-controls button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.rte-style-status {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--gold);
  min-width: 120px;
}
.rte-img-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}
.rte-range, .rte-color {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}
.rte-range input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
}
.rte-color {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.rte-imgbar button, .rte-imgbar input[type="url"] {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 8px;
  padding: 6px 10px;
  min-height: 34px;
  font-size: 0.82rem;
}
.rte-imgbar button { cursor: pointer; }
.rte-imgbar button:hover { border-color: var(--gold); }
.rte-imgbar button.is-on {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
[data-theme="dark"] .rte-imgbar button.is-on {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.rte-imgbar button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.rte-imgbar input[type="url"] {
  flex: 1 1 220px;
  min-width: 160px;
}
.rte-imgbar input[type="color"] {
  width: 38px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px;
  background: var(--card);
}
.admin-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 16px; }
.admin-row, .order-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.order-row { grid-template-columns: 22px 1fr auto; cursor: pointer; }
.order-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--gold); }
.order-row button { min-height: 40px; }
.orders-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
}
.orders-toolbar .order-search { flex: 1 1 220px; margin: 0; }
.order-select-all {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 700;
  cursor: pointer;
}
.order-select-all input { width: 18px; height: 18px; accent-color: var(--gold); }
.admin-row img, .mini { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--bg-2); }
.admin-row span, .order-row .muted { display: block; font-weight: 500; color: var(--muted); font-size: 0.85rem; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-actions button, .admin-actions a {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.85rem;
}
.danger { color: var(--danger) !important; }
.badge-draft {
  display: inline-block;
  margin-inline-start: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f4e6c3;
  color: #6a4b00;
  font-size: 0.72rem;
  font-weight: 800;
  vertical-align: middle;
}
[data-theme="dark"] .badge-draft {
  background: #3d3218;
  color: #f4e6c3;
}
.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.editor-save-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.editor-save-row .btn { min-height: 46px; }
.editor-save-row .btn-main { flex: 1 1 160px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

@media (max-width: 1024px) {
  .pdp { grid-template-columns: minmax(0, 1fr) minmax(280px, 0.95fr); gap: 18px; }
  .catalog, .svc-home { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .pdp { grid-template-columns: 1fr; }
  .gallery { position: static; }
  .top-actions .btn-main { display: none; }
  .buy-bar { display: flex; }
  body[data-page="product"] { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (max-width: 768px) {
  .checkout-panel {
    inset: auto 0 0;
    width: 100%;
    max-height: min(92dvh, 92vh);
    border-inline-start: 0;
    border-radius: 16px 16px 0 0;
    padding-top: 10px;
  }
  .svc-home { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .catalog, .svc-home, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .admin-row { grid-template-columns: 56px 1fr; }
  .order-row { grid-template-columns: 22px 1fr; }
  .order-row button { grid-column: 1 / -1; }
  .admin-actions { grid-column: 1 / -1; }
  .brand span { display: none; }
  .ship-track { font-size: 0.8rem; }
  .admin-tabs { flex-direction: column; top: calc(56px + env(safe-area-inset-top)); }
  .wrap { width: min(1240px, calc(100% - 20px)); }
  .top-actions { gap: 6px; }
  .desc-section { padding: 20px 16px 24px; border-radius: 8px; margin-block: 4px 28px; }
  .desc-pic--left, .desc-pic--right {
    float: none;
    display: block;
    width: min(100%, 320px);
    margin: 10px auto;
  }
  .desc-media-item { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ship-track { animation: none; }
}

.img-preview {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 8, 14, 0.92);
  padding: 28px 16px;
  cursor: zoom-out;
}
.img-preview[hidden] { display: none !important; }
.img-preview img {
  display: block;
  max-width: min(96vw, 1200px);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--gold);
  border-radius: 2px;
  background: #0b0b0b;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  cursor: default;
}
.img-preview-x {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--gold);
  border-radius: 2px;
  background: #0c1d3d;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
