/* Garage template — dark "carbon" theme. Brand colors come from site.json (--primary, --accent, --bg). */
:root {
  --primary: #ff6a13;
  --accent: #ffb347;
  --bg: #0d0e10;
  --surface: #16181b;
  --surface-2: #1d2024;
  --line: #2a2e33;
  --text: #f2f3f5;
  --muted: #a3a9b1;
  --wa: #25d366;
  --radius: 16px;
  --font: "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Rajdhani", "Cairo", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.6;
  background-color: var(--bg);
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.022) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.022) 75%),
    linear-gradient(45deg, rgba(255,255,255,.022) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.022) 75%);
  background-size: 8px 8px;
  background-position: 0 0, 4px 4px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
.ic { width: 1.25em; height: 1.25em; flex: none; }

.wrap { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: 16px; }
.section { padding-block: 64px; }
.h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; }
.h2::after {
  content: ""; display: block; width: 56px; height: 4px; border-radius: 4px;
  margin-top: 10px; background: linear-gradient(90deg, var(--primary), var(--accent));
}
.sub { color: var(--muted); margin: 14px 0 0; max-width: 60ch; }
.grid { display: grid; gap: 16px; margin-top: 32px; }

.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: 999px;
  font-weight: 700; font-size: 1.05rem; border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: scale(.98); }
.btn-wa { background: var(--wa); color: #06210f; box-shadow: 0 6px 20px rgba(37,211,102,.25); }
.btn-wa:hover { box-shadow: 0 8px 28px rgba(37,211,102,.4); }
.btn-ghost { border-color: var(--line); background: rgba(255,255,255,.04); }
.btn-ghost:hover { border-color: var(--primary); color: var(--accent); }
.btn-sm { min-height: 42px; padding: 0 16px; font-size: .95rem; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(13,14,16,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-in { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; }
.brand img { border-radius: 50%; }
.nav { display: none; gap: 24px; margin-inline-start: 24px; color: var(--muted); font-weight: 600; }
.nav a:hover { color: var(--accent); }
.top-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.lang {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--line); font-weight: 700; font-size: .9rem;
}
.lang:hover { border-color: var(--primary); }
.call-top { display: none; }

/* Hero */
.hero { position: relative; padding-block: 40px 56px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 120%;
  background: radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--primary) 22%, transparent), transparent 60%);
  pointer-events: none;
}
.hero-in { position: relative; display: grid; gap: 28px; align-items: center; text-align: center; }
.hero-logo { order: -1; justify-self: center; width: min(68vw, 300px); }
.hero-logo img {
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(255,255,255,.04), 0 0 60px color-mix(in srgb, var(--primary) 45%, transparent);
}
.hero h1 { font-size: clamp(2.1rem, 7vw, 3.6rem); font-weight: 800; }
.tagline {
  margin: 10px 0 0; font-size: clamp(1.1rem, 3.2vw, 1.4rem); font-weight: 700;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.intro { color: var(--muted); margin: 14px auto 0; max-width: 56ch; font-size: 1.05rem; }
.hero .cta { justify-content: center; }
.hero .cta .btn { flex: 1 1 200px; max-width: 280px; }

.socials { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 20px; color: var(--muted); font-weight: 600; }
.soc {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); font-size: .92rem;
}
.soc:hover { border-color: var(--primary); color: var(--accent); }
@media (min-width: 900px) { .socials { justify-content: flex-start; } }

.status {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  padding: 4px 12px; border-radius: 999px; font-size: .85rem; font-weight: 700;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.is-open { color: #4ade80; }
.is-closed { color: #f87171; }

.feats { position: relative; display: grid; gap: 12px; margin-top: 40px; }
.feat {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 14px;
}
.feat strong { display: block; }
.feat span { color: var(--muted); font-size: .92rem; }
.feat-ic, .svc-ic {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; flex: none;
  color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
}
.feat-ic .ic, .svc-ic .ic { width: 24px; height: 24px; }

/* Services */
.svc-grid { grid-template-columns: 1fr; }
.svc { padding: 22px; transition: border-color .2s, transform .2s; }
.svc:hover { border-color: color-mix(in srgb, var(--primary) 55%, transparent); transform: translateY(-2px); }
.svc h3 { font-size: 1.2rem; margin-top: 16px; }
.svc p { color: var(--muted); margin: 8px 0 0; }
.price {
  display: inline-block; margin-top: 14px; padding: 4px 12px; border-radius: 999px;
  font-weight: 700; font-size: .9rem; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

/* Products */
.prod-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
.prod { overflow: hidden; display: flex; flex-direction: column; }
.ecu-art { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: #101113; border-bottom: 1px solid var(--line); }
img.ecu-art { background: #fff; }

.callout {
  display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: start;
  margin-top: 22px; padding: 16px 18px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--primary) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent);
}
.callout p { margin: 0; line-height: 1.7; }
.callout-ic {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  color: var(--primary); background: color-mix(in srgb, var(--primary) 15%, transparent);
}
.callout-ic .ic { width: 22px; height: 22px; }
.callout .btn { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 900px) {
  .callout { grid-template-columns: auto 1fr auto; align-items: center; }
  .callout .btn { grid-column: auto; }
}
.prod-body { padding: 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.maker { font-size: .8rem; color: var(--muted); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.model { font-family: var(--display); font-size: 1.25rem; font-weight: 700; }
.prod .btn { margin-top: auto; width: 100%; padding: 0 8px; gap: 6px; font-size: .85rem; white-space: nowrap; }
.prod-body .model { margin-bottom: 10px; }
[dir="rtl"] .model { text-align: right; }

/* Brands */
.brands { --cols: 3; --gap: 10px; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); margin-top: 28px; }
.brands > .brand-tile { flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); }
.brand-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 22px 8px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  transition: border-color .2s, transform .2s;
}
.brand-tile img { width: 44px; height: 44px; opacity: .8; transition: opacity .2s, transform .2s; }
.brand-name { font-size: .82rem; font-weight: 600; color: var(--muted); text-align: center; line-height: 1.2; }
.brand-tile:hover { border-color: color-mix(in srgb, var(--primary) 55%, transparent); transform: translateY(-2px); }
.brand-tile:hover img { opacity: 1; transform: scale(1.06); }
.brand-tile.is-featured { border-color: color-mix(in srgb, var(--primary) 60%, transparent); box-shadow: 0 0 24px color-mix(in srgb, var(--primary) 18%, transparent); }
.brand-tile.is-featured img { opacity: 1; }
.brand-tile.is-featured .brand-name { color: var(--text); }
.brand-badge {
  position: absolute; top: -9px; inset-inline-start: 50%; transform: translateX(-50%);
  padding: 1px 10px; border-radius: 999px; font-size: .7rem; font-weight: 800; white-space: nowrap;
  background: var(--primary); color: #fff;
}
[dir="rtl"] .brand-badge { transform: translateX(50%); }
/* "We program it" badge: same highlighted tile, outlined badge so it reads as a different tier from "Specialists". */
.is-programming .brand-badge { background: var(--bg); color: var(--accent); border: 1px solid var(--primary); }
/* "Electronics" badge: quiet grey pill on a normal tile — third tier. */
.is-electronics .brand-badge { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); font-weight: 700; }
.brands-sec .sub { margin-top: 14px; }

/* Visit */
.visit { display: grid; gap: 16px; }
.visit-info { padding: 24px; }
.addr { display: flex; gap: 10px; align-items: flex-start; margin: 22px 0 0; font-weight: 700; font-size: 1.1rem; }
.addr .ic { color: var(--primary); margin-top: 4px; }
.note { color: var(--muted); margin: 10px 0 0; }
.hours { margin-top: 22px; border-top: 1px solid var(--line); }
.hours-head { display: flex; align-items: center; gap: 10px; padding: 14px 0 6px; font-weight: 700; color: var(--muted); }
.hours-head .ic { color: var(--primary); }
.hrow { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.hrow span:last-child { color: var(--muted); }
.map { overflow: hidden; min-height: 300px; }
.map iframe { width: 100%; height: 100%; min-height: 300px; border: 0; display: block; filter: grayscale(.3) contrast(1.05); }

.find { margin-top: 36px; }
.find-title { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; font-weight: 800; }
.find-title .ic { color: var(--primary); }
.find-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.find-ph { position: relative; margin: 0; overflow: hidden; display: flex; flex-direction: column; }
.find-ph img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.find-ph figcaption { padding: 12px 14px; font-weight: 700; font-size: .95rem; display: flex; flex-direction: column; gap: 2px; }
.find-ph small { color: var(--muted); font-weight: 400; font-size: .75rem; }
.step {
  position: absolute; top: 10px; inset-inline-start: 10px; z-index: 1;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: #fff; font-weight: 800; box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
@media (min-width: 900px) { .find-grid { grid-template-columns: repeat(2, minmax(0, 340px)); } }

/* Sound toggle */
.sfx {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; padding: 0;
}
.sfx:hover { border-color: var(--primary); color: var(--accent); }
.sfx .ic { width: 20px; height: 20px; }
.sfx .ic-x { display: none; }
.sfx.is-muted { color: var(--muted); }
.sfx.is-muted .ic-wave { display: none; }
.sfx.is-muted .ic-x { display: inline; }
[dir="rtl"] .sfx .ic { transform: scaleX(-1); }

/* Footer */
.foot { border-top: 1px solid var(--line); padding-block: 36px 110px; margin-top: 24px; background: rgba(0,0,0,.25); }
.foot-in { display: grid; gap: 18px; justify-items: center; text-align: center; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; color: var(--muted); }
.foot-links a { display: inline-flex; align-items: center; gap: 8px; }
.foot-links a:hover { color: var(--accent); }
.copy { color: var(--muted); font-size: .85rem; margin: 0; }

/* Floating WhatsApp */
.wa-float {
  position: fixed; bottom: 18px; inset-inline-end: 18px; z-index: 30;
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: var(--wa); color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.45);
  animation: pulse 2.6s infinite;
}
.wa-float .ic { width: 32px; height: 32px; }
@keyframes pulse {
  0% { box-shadow: 0 8px 24px rgba(0,0,0,.45), 0 0 0 0 rgba(37,211,102,.55); }
  70% { box-shadow: 0 8px 24px rgba(0,0,0,.45), 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 8px 24px rgba(0,0,0,.45), 0 0 0 0 rgba(37,211,102,0); }
}
@media (prefers-reduced-motion: reduce) { .wa-float { animation: none; } html { scroll-behavior: auto; } }

/* Larger screens */
@media (min-width: 600px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .prod-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .feats { grid-template-columns: repeat(3, 1fr); }
  .brands { --cols: 4; }
}
@media (min-width: 900px) {
  .brands { --cols: 6; --gap: 14px; }
  .brand-tile img { width: 52px; height: 52px; }
}
@media (min-width: 900px) {
  .nav { display: flex; }
  .call-top { display: inline-flex; }
  .section { padding-block: 88px; }
  .hero { padding-block: 72px 80px; }
  .hero-in { grid-template-columns: 1.2fr 1fr; text-align: start; gap: 48px; }
  .hero-logo { order: 0; width: 100%; max-width: 400px; }
  .intro { margin-inline: 0; }
  .hero .cta { justify-content: flex-start; }
  .hero .cta .btn { flex: 0 1 auto; }
  .svc-grid { grid-template-columns: repeat(3, 1fr); }
  .prod-grid { grid-template-columns: repeat(4, 1fr); }
  .visit { grid-template-columns: 1fr 1fr; }
}
