/* ========== Base & tokens ========== */
:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #5c687c;
  --line: #e4eaf3;
  --brand: #0f766e;
  --brand-dark: #0b5c56;
  --brand-2: #2563eb;
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
  --radius: 18px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html[dir="rtl"] body { font-family: 'Cairo', Tahoma, Arial, sans-serif; }
.container { width: min(1160px, calc(100% - 32px)); margin-inline: auto; }
a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; }
button { cursor: pointer; }
section { scroll-margin-top: 80px; }

/* ========== Announce + header ========== */
.announce { background: #0b3d39; color: #e7fffb; font-size: 0.82rem; }
.announce-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
}
.lang-btn {
  border: 1px solid rgba(255,255,255,.35);
  background: transparent;
  color: inherit;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}
.lang-btn:hover { background: rgba(255,255,255,.15); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-block-end: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: .5px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.02rem; }
.brand-text small { color: var(--muted); font-size: 0.7rem; }

.main-nav { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.main-nav a {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}
.main-nav a:hover { background: #eef4f3; color: var(--brand); }

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
}
.cart-count {
  display: grid; place-items: center;
  min-width: 22px; height: 22px;
  padding-inline: 5px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.72rem;
}
.menu-btn {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 7px 11px;
  font-size: 1.1rem;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(15,118,110,.25); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-light { background: #fff; color: #0b3d39; flex-shrink: 0; }
.btn-small { padding: 9px 14px; font-size: 0.82rem; border-radius: 10px; }

/* ========== Hero ========== */
.hero { padding: 64px 0 72px; background: linear-gradient(180deg, #eef7f5 0%, var(--bg) 100%); }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: #d9f0ec;
  color: var(--brand-dark);
  font-size: 0.8rem;
  font-weight: 700;
}
.hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1.18;
  margin: 18px 0 14px;
  letter-spacing: -0.02em;
}
.hero-copy > p { color: var(--muted); max-width: 58ch; margin: 0 0 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-block-start: 34px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.35rem; }
.hero-stats span { color: var(--muted); font-size: 0.78rem; }

.hero-art { position: relative; min-height: 350px; display: grid; place-items: center; }
.hero-phone {
  position: absolute;
  width: 170px; height: 320px;
  border-radius: 30px;
  border: 5px solid #16233b;
  background: linear-gradient(150deg, #d9e7ff, #bcd0f5 45%, #8fa9da);
  box-shadow: 0 25px 50px rgba(15,23,42,.2);
}
.hero-phone-back { transform: translate(-46px, 18px) rotate(-9deg) scale(.92); background: linear-gradient(150deg, #b9e6dd, #7fc9bd); }
html[dir="rtl"] .hero-phone-back { transform: translate(46px, 18px) rotate(9deg) scale(.92); }
.hero-phone-front { transform: translate(34px, -10px) rotate(6deg); display: flex; flex-direction: column; align-items: center; padding-block-start: 12px; }
html[dir="rtl"] .hero-phone-front { transform: translate(-34px, -10px) rotate(-6deg); }
.hero-notch { width: 58px; height: 12px; border-radius: 0 0 12px 12px; background: #16233b; }
.hero-screen-line { width: 66%; height: 10px; border-radius: 8px; background: rgba(255,255,255,.65); margin-block-start: 18px; }
.hero-screen-line.two { width: 48%; }
.hero-screen-line.three { width: 76%; height: 46px; background: rgba(255,255,255,.4); }
.hero-badge {
  position: absolute;
  inset-block-end: 26px;
  inset-inline-start: 8%;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 0.85rem;
}
html[dir="rtl"] .hero-badge { inset-inline-start: auto; inset-inline-end: 8%; }

/* ========== Sections ========== */
.section { padding: 72px 0; }
.section-tint { background: #edf2f8; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-block-end: 26px; flex-wrap: wrap; }
.eyebrow { color: var(--brand); font-weight: 800; font-size: 0.78rem; text-transform: uppercase; letter-spacing: .06em; }
.section-head h2 { margin: 6px 0 0; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.25; }
.section-sub { margin: 8px 0 0; color: var(--muted); max-width: 68ch; }
.link { color: var(--brand); font-weight: 700; font-size: 0.9rem; border-block-end: 2px solid currentColor; }

/* ========== Product cards ========== */
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 20px; }
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(15,23,42,.12); }
.product-media {
  position: relative;
  height: 180px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 35%, #eaf2ff, #dfe8f5 70%);
}
.badge {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  z-index: 2;
}
html[dir="rtl"] .badge { inset-inline-start: auto; inset-inline-end: 12px; }
.badge--new { background: #dcfce7; color: #166534; }
.badge--used { background: #fef3c7; color: #92400e; }
.badge--accessory { background: #e0e7ff; color: #3730a3; }

.phone-art {
  position: relative;
  width: 82px; height: 145px;
  border-radius: 16px;
  border: 3px solid #16233b;
  background: linear-gradient(150deg, var(--phone-color), #ffffff 140%);
  box-shadow: 0 12px 24px rgba(15,23,42,.18);
}
.phone-art::before {
  content: '';
  position: absolute;
  inset-block-start: 7px;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  width: 26px; height: 6px;
  border-radius: 0 0 6px 6px;
  background: #16233b;
}
html[dir="rtl"] .phone-art::before { transform: translateX(50%); }
.phone-art .phone-screen {
  position: absolute;
  inset: 18px 7px 7px;
  border-radius: 9px;
  background: linear-gradient(160deg, rgba(255,255,255,.5), rgba(255,255,255,.1));
}

.extra-art {
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(150deg, var(--phone-color), #ffffff 140%);
  box-shadow: 0 12px 24px rgba(15,23,42,.14);
}
.extra-art--card { width: 104px; height: 104px; font-size: 2.8rem; }
.extra-art--modal { width: 150px; height: 150px; font-size: 4rem; }
.product-card--extra .product-media { background: radial-gradient(circle at 50% 35%, #f3f0ff, #e6ebf7 70%); }
.product-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.photo-count {
  position: absolute;
  inset-block-end: 10px;
  inset-inline-end: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .78);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  z-index: 2;
}

.product-body { display: flex; flex-direction: column; gap: 10px; padding: 18px; flex: 1; }
.product-body h3 { margin: 0; font-size: 1rem; line-height: 1.35; }
.spec-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.spec-list li { color: var(--muted); font-size: 0.8rem; padding-inline-start: 16px; position: relative; }
.spec-list li::before { content: '✓'; position: absolute; inset-inline-start: 0; color: var(--brand); font-weight: 800; }
.card-note { margin: 0; color: var(--brand-dark); background: #edf7f5; padding: 8px 10px; border-radius: 9px; font-size: 0.78rem; font-weight: 600; }
.mini-specs { list-style: none; margin: 0; padding: 8px 10px; border-radius: 10px; background: #f4f6fa; display: grid; gap: 3px; font-size: 0.77rem; }
.mini-specs li { display: flex; justify-content: space-between; gap: 8px; }
.mini-specs span { color: var(--muted); }
.mini-specs strong { text-align: end; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-block-start: auto; padding-block-start: 6px; }
.price { font-size: 1.2rem; color: var(--brand-dark); }
.add-btn { background: var(--brand-2); color: #fff; }
.add-btn:hover { background: #1d4ed8; }
.empty-state { text-align: center; color: var(--muted); padding: 36px 0; }

/* ========== Filters ========== */
.filters {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-block-end: 24px;
  display: grid;
  gap: 16px;
}
.filter-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.filter-row--wrap { padding-block-start: 14px; border-block-start: 1px dashed var(--line); }
.filter-label { font-size: 0.85rem; font-weight: 800; color: var(--muted); flex-shrink: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 700;
}
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.select { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: #fff; color: var(--ink); min-width: 110px; }
.price-control { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-inline-start: auto; }
.price-input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  background: #fff;
  color: var(--ink);
  width: 150px;
}
.filter-hint { margin: 0; color: var(--brand-dark); font-size: 0.82rem; font-weight: 600; }

/* ========== Accessories & trust ========== */
.accessory-grid, .trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.accessory-card, .trust-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.acc-icon, .trust-card > span { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #eaf5f3; font-size: 1.3rem; margin-block-end: 12px; }
.accessory-card h3, .trust-card h3 { margin: 0 0 6px; font-size: 1rem; }
.accessory-card p, .trust-card p { margin: 0; color: var(--muted); font-size: 0.86rem; }

/* ========== Table ========== */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.compare-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.compare-table th, .compare-table td { padding: 16px 18px; text-align: start; border-block-end: 1px solid var(--line); font-size: 0.9rem; }
.compare-table thead th { background: #f0f5f4; font-size: 0.82rem; text-transform: uppercase; letter-spacing: .04em; }
.compare-table tbody th { color: var(--muted); width: 24%; }
.compare-table tr:last-child th, .compare-table tr:last-child td { border-block-end: 0; }

/* ========== CTA & footer ========== */
.cta { background: linear-gradient(120deg, #0b3d39, #115e59 60%, #1d4ed8); color: #fff; padding: 48px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta h2 { margin: 0 0 8px; font-size: clamp(1.4rem, 2.4vw, 2rem); }
.cta p { margin: 0; max-width: 62ch; color: #d5eee9; }
.site-footer { background: #0b1f2a; color: #c9d6e2; padding: 26px 0; font-size: 0.86rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-inner p { margin: 0; }

/* ========== Toast ========== */
.toast {
  position: fixed;
  inset-block-end: 24px;
  inset-inline-end: 24px;
  background: #0f172a;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-weight: 700;
  z-index: 50;
  animation: toast-in .2s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ========== Admin ========== */
.admin-shell { padding: 44px 0 64px; min-height: 60vh; }
.admin-shell h1 { margin: 0 0 6px; font-size: clamp(1.7rem, 3vw, 2.4rem); }
.login-card {
  max-width: 430px;
  margin: 24px auto;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.login-card .field { margin: 16px 0; }
.login-card .btn { width: 100%; }
.link-button {
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  padding: 0;
}
.notice {
  background: #fff8e6;
  border: 1px solid #f2d99a;
  color: #7a5a10;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.84rem;
  margin: 18px 0 26px;
}
.admin-grid { display: grid; grid-template-columns: 1.35fr .85fr; gap: 22px; align-items: start; }
.form-card, .admin-list-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.form-card h2, .admin-list-card h2 { margin: 0 0 18px; font-size: 1.15rem; }
.field { display: flex; flex-direction: column; gap: 6px; margin-block-end: 14px; flex: 1; min-width: 0; }
.field label { font-size: 0.8rem; font-weight: 800; color: var(--muted); }
.field input, .field select, .field textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  width: 100%;
  font-size: 0.9rem;
}
.field textarea { resize: vertical; line-height: 1.5; }
.field--color input { height: 42px; padding: 4px; }
.field-row { display: flex; gap: 14px; flex-wrap: wrap; }
.field-row[hidden], .field[hidden] { display: none; }
.field-hint { margin: -6px 0 16px; color: var(--muted); font-size: 0.78rem; }
.field input[type="file"] { padding: 8px 10px; font-size: 0.82rem; }
.photo-preview { display: flex; gap: 10px; flex-wrap: wrap; margin-block-start: 6px; }
.photo-thumb { position: relative; width: 68px; height: 68px; margin: 0; }
.photo-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; border: 1px solid var(--line); border-radius: 10px; }
.photo-thumb button {
  position: absolute;
  inset-block-start: -6px;
  inset-inline-end: -6px;
  width: 22px; height: 22px;
  border: 0; border-radius: 50%;
  background: #b42318; color: #fff;
  font-size: 0.9rem; line-height: 1;
  cursor: pointer;
  z-index: 1;
}
.photo-thumb button:hover { background: #912018; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-block-start: 8px; }
.admin-list { display: grid; gap: 12px; }
.admin-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fbfcfe;
}
.admin-item-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-item-main strong { font-size: 0.92rem; }
.admin-item .badge { position: static; flex-shrink: 0; }
.admin-item p { margin: 6px 0 10px; color: var(--muted); font-size: 0.78rem; }
.danger { background: #b42318; color: #fff; }
.danger:hover { background: #912018; }
.footer-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-link { color: #8fd3c8; font-weight: 700; border-block-end: 1px solid currentColor; }

/* ========== AI Assist + comparison ========== */
.ai-btn {
  align-self: flex-start;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 6px 16px rgba(37,99,235,.2);
}
.ai-btn:hover { box-shadow: 0 10px 22px rgba(37,99,235,.3); }
#aiStatus { margin: 0; min-height: 1.2em; }
#aiStatus[data-kind="busy"] { color: var(--brand-2); font-weight: 700; }
#aiStatus[data-kind="ok"] { color: #166534; font-weight: 700; }
#aiStatus[data-kind="warn"] { color: #b42318; font-weight: 700; }

.compare-panel {
  margin-block-start: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.compare-panel .field-row { margin-block-end: 18px; }
.compare-panel .select { width: 100%; min-width: 0; }
.compare-result-table { min-width: 620px; }
.compare-result-table td { vertical-align: top; }
.compare-result-table thead th { min-width: 200px; padding-block: 14px; }
.compare-result-table .win-a, .compare-result-table .win-b {
  font-weight: 700;
  background: #f0fdf6;
}
.compare-result-table thead th.col-winner {
  background: linear-gradient(160deg, #e8f8f1, #dff1fb);
  box-shadow: inset 0 3px 0 var(--brand);
}
.win-mark { color: #166534; margin-inline-start: 6px; font-size: 0.85rem; font-weight: 800; }

.compare-winner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-block-end: 14px;
  padding: 14px 16px;
  border: 1px solid #bfe6d8;
  border-radius: 14px;
  background: linear-gradient(110deg, #ecfdf5, #e0f2fe);
}
.compare-winner .winner-icon { font-size: 1.6rem; line-height: 1; }
.compare-winner > div { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.compare-winner strong { font-size: 1rem; }
.compare-winner > div span { color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.compare-winner .winner-score {
  margin-inline-start: auto;
  flex-shrink: 0;
  background: #fff;
  color: var(--brand-dark);
  border: 1px solid #cfe9e3;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.85rem;
  font-weight: 800;
}
.compare-winner.is-tie { background: #f4f6fa; border-color: var(--line); }

.score-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.score-head .phone-name { text-transform: none; letter-spacing: 0; font-size: 0.85rem; }
.score-pill {
  text-transform: none;
  letter-spacing: 0;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.7rem;
  font-weight: 800;
}
.winner-crown {
  display: block;
  margin-block-start: 5px;
  color: #166534;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
}
.score-track {
  display: block;
  height: 6px;
  margin-block-start: 9px;
  border-radius: 999px;
  background: #dbe6e4;
  overflow: hidden;
}
.score-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width .4s ease;
}
.verdict-explain {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

/* ========== AI performance dashboard ========== */
.stats-panel {
  margin-block-start: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(160deg, #f7fbfa, #eef4fb);
}
.stat-card strong { font-size: 1.5rem; line-height: 1.2; color: var(--brand-dark); }
.stat-card span { color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.stats-panel .field-hint { margin: 14px 0 0; }

.verdict {
  margin-block-start: 18px;
  background: #edf7f5;
  border: 1px solid #cfe9e3;
  border-radius: 14px;
  padding: 14px 18px;
}
.verdict h3 { margin: 0 0 8px; font-size: 0.95rem; color: var(--brand-dark); }
.verdict-list { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; font-size: 0.87rem; }
.verdict-list li { color: var(--ink); }
.verdict .empty-state { padding: 10px 0; }

/* ========== Client comparison + details overlay ========== */
.ai-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: .04em;
  vertical-align: middle;
}
.compare-panel--client .field-row { margin-block-end: 18px; }
.compare-panel--client .select { width: 100%; min-width: 0; }

.ai-badge {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-end: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  z-index: 3;
}
.admin-item .ai-badge { position: static; flex-shrink: 0; }
.details-hint { color: var(--brand); font-size: 0.75rem; font-weight: 700; }
.product-card[data-detail] { cursor: pointer; }
.product-card[data-detail]:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; }

.modal[hidden] { display: none !important; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 32, .62);
  backdrop-filter: blur(4px);
  animation: modal-fade .22s ease-out both;
}
.modal-card {
  position: relative;
  width: min(720px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  background: var(--surface);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(8, 20, 32, .35);
  animation: modal-rise .3s cubic-bezier(.2, .9, .3, 1.15) both;
}
.modal-close {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-end: 12px;
  z-index: 2;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1;
  box-shadow: var(--shadow);
}
.modal-close:hover { background: #f1f5f9; }
.modal-media {
  position: relative;
  height: 190px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 35%, #eaf2ff, #dfe8f5 70%);
}
.modal-media .badge { position: absolute; inset-block-start: 14px; inset-inline-start: 14px; }
html[dir="rtl"] .modal-media .badge { inset-inline-start: auto; inset-inline-end: 14px; }
.modal-media .ai-badge { inset-inline-end: 56px; }
.modal-media .phone-art { transform: scale(1.3); }
.modal-media--photo { background: #0f172a; }
.gallery { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.gallery-main { width: 100%; height: 100%; object-fit: contain; display: block; }
.gallery-nav {
  position: absolute;
  inset-block-start: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: #0f172a;
  font-size: 1.5rem; line-height: 1;
  cursor: pointer;
  z-index: 4;
}
.gallery-nav:hover { background: #fff; }
.gallery-prev { inset-inline-start: 10px; }
.gallery-next { inset-inline-end: 10px; }
.gallery-position {
  position: absolute;
  inset-block-end: 10px;
  inset-inline-start: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .72);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  z-index: 3;
}
.gallery-thumbs {
  position: absolute;
  inset-block-end: 10px;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  display: flex; gap: 6px;
  max-width: calc(100% - 20px);
  overflow-x: auto;
  z-index: 3;
}
html[dir="rtl"] .gallery-thumbs { transform: translateX(50%); }
.gallery-thumb {
  width: 46px; height: 46px;
  padding: 0; flex-shrink: 0;
  border: 2px solid transparent; border-radius: 8px;
  background: transparent;
  overflow: hidden;
  cursor: pointer;
}
.gallery-thumb.is-active { border-color: #fff; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.modal-body { padding: 22px 24px 26px; }
.modal-body h2 { margin: 0 0 4px; font-size: 1.3rem; line-height: 1.3; }
.modal-body .price { font-size: 1.35rem; }
.modal-facts {
  list-style: none;
  margin: 16px 0 8px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #f4f6fa;
  display: grid;
  gap: 6px;
}
.modal-facts li { display: flex; justify-content: space-between; gap: 12px; font-size: 0.86rem; }
.modal-facts span { color: var(--muted); }
.modal-body h3 { margin: 18px 0 8px; font-size: 0.95rem; }
.modal-body .spec-list li { font-size: 0.85rem; }
.modal-body .card-note { margin-block-start: 14px; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-block-start: 18px; }
body.modal-open { overflow: hidden; }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-rise {
  from { opacity: 0; transform: translateY(26px) scale(.96); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .modal-backdrop, .modal-card { animation: none; }
  html { scroll-behavior: auto; }
}

/* ========== Responsive ========== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-art { min-height: 300px; }
  .main-nav {
    display: none;
    position: absolute;
    inset-block-start: 100%;
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #fff;
    padding: 12px 16px 18px;
    border-block-end: 1px solid var(--line);
  }
  .main-nav.is-open { display: flex; }
  .menu-btn { display: inline-flex; margin-inline-start: auto; }
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 52px 0; }
  .hero { padding: 44px 0 52px; }
  .hero-stats { gap: 18px; }
  .announce-inner { font-size: 0.74rem; }
  .cart-btn span:not(.cart-count):not([aria-hidden]) { display: none; }
  .price-control { margin-inline-start: 0; width: 100%; }
  .price-input { width: 100%; }
  .admin-grid { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .modal { padding: 12px; }
  .modal-card { max-height: 92vh; }
  .modal-media { height: 150px; }
  .modal-body { padding: 18px; }
  .compare-winner { flex-wrap: wrap; }
  .compare-winner .winner-score { margin-inline-start: 0; }
}
