:root {
  --brand: #0e5aa7;
  --brand-dark: #083d76;
  --accent: #1faa59;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1c2733;
  --muted: #5d6b7a;
  --line: #e3e8ee;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: "Segoe UI", "Noto Sans", "Noto Sans Arabic", system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.55; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { background: var(--brand); color: #fff; font-weight: 800; border-radius: 10px; padding: 8px 10px; letter-spacing: 1px; }
.brand-text { font-weight: 800; font-size: 18px; display: flex; flex-direction: column; line-height: 1.1; }
.brand-text small { color: var(--muted); font-weight: 600; font-size: 11px; letter-spacing: 2px; }
.nav { display: flex; gap: 6px; margin-inline-start: auto; }
.nav a { padding: 8px 14px; border-radius: 10px; color: var(--text); font-weight: 600; font-size: 15px; }
.nav a:hover, .nav a.active { background: #eaf2fb; color: var(--brand); }
.top-actions { display: flex; align-items: center; gap: 10px; }
#langSel { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 14px; background: #fff; }
.cart-btn { position: relative; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 12px; font-size: 16px; }
.cart-count { position: absolute; top: -7px; inset-inline-end: -7px; background: var(--accent); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 6px; font-weight: 700; }
.menu-btn { display: none; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 12px; font-size: 16px; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--brand-dark), var(--brand) 55%, #2f7fd0); color: #fff; padding: 72px 0 84px; }
.hero h1 { font-size: clamp(26px, 4vw, 42px); line-height: 1.2; max-width: 720px; }
.hero p.sub { margin-top: 14px; font-size: 17px; max-width: 640px; opacity: .93; }
.hero .cta { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 12px; padding: 13px 22px; font-weight: 700; font-size: 15px; border: none; transition: .15s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.5); }
.btn-ghost:hover { background: rgba(255,255,255,.24); }
.btn-outline { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn-wa { background: #25d366; color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 900px; margin: -44px auto 0; padding: 0 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; text-align: center; box-shadow: 0 8px 24px rgba(13,43,84,.08); }
.stat b { display: block; font-size: 24px; color: var(--brand); }
.stat span { color: var(--muted); font-size: 13px; }

/* Sections */
.section { padding: 46px 0; }
.section h2 { font-size: 24px; margin-bottom: 6px; }
.section .lead { color: var(--muted); margin-bottom: 22px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.feature h3 { font-size: 16px; margin: 8px 0 6px; }
.feature .ico { font-size: 26px; }
.feature p { color: var(--muted); font-size: 14px; }

/* Toolbar + product grid */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 600; }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.search { flex: 1; min-width: 200px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 15px; background: #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(13,43,84,.10); }
.card .thumb { aspect-ratio: 1; background: #eef1f5; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { font-size: 15px; line-height: 1.35; min-height: 2.7em; }
.card .meta { color: var(--muted); font-size: 13px; }
.card .price { color: var(--brand); font-weight: 800; font-size: 16px; }
.card .row { margin-top: auto; display: flex; gap: 8px; padding-top: 8px; }
.card .row .btn { padding: 9px 12px; font-size: 13px; flex: 1; justify-content: center; }
.badge { display: inline-block; background: #eaf2fb; color: var(--brand); font-size: 11px; font-weight: 700; border-radius: 6px; padding: 2px 8px; }
.badge.custom { background: #fef3e2; color: #b26a00; }

/* Detail */
.crumbs { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.gallery .main { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery .thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; cursor: pointer; }
.gallery .thumbs img.on { border-color: var(--brand); }
.specs { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.specs td { border-bottom: 1px solid var(--line); padding: 9px 6px; }
.specs td:first-child { color: var(--muted); width: 42%; }
.qty-row { display: flex; gap: 10px; align-items: center; margin-top: 16px; }
.qty-row input { width: 120px; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font-size: 15px; }
.warn { color: #b26a00; background: #fef3e2; border-radius: 8px; padding: 8px 12px; font-size: 13px; margin-top: 10px; }

/* Drawer / cart */
.drawer-mask { position: fixed; inset: 0; background: rgba(10,20,35,.45); opacity: 0; pointer-events: none; transition: .2s; z-index: 90; }
.drawer-mask.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; inset-inline-end: 0; width: min(430px, 100vw); height: 100%; background: #fff; z-index: 100; transform: translateX(105%); transition: .25s; display: flex; flex-direction: column; }
[dir="rtl"] .drawer { transform: translateX(-105%); }
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-body { padding: 16px 18px; overflow-y: auto; flex: 1; }
.icon-btn { border: none; background: none; font-size: 18px; }
.cart-item { display: flex; gap: 12px; border-bottom: 1px solid var(--line); padding: 12px 0; }
.cart-item img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; }
.cart-item .info { flex: 1; font-size: 14px; }
.cart-item .qty { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.cart-item .qty input { width: 90px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 13px; }
.cart-item .rm { border: none; background: none; color: #c0392b; font-size: 13px; }
.cart-total { font-size: 16px; font-weight: 800; padding: 14px 0; display: flex; justify-content: space-between; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.field input, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: inherit; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* About / contact */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.panel h3 { margin-bottom: 10px; }
.panel ul { padding-inline-start: 18px; color: var(--muted); font-size: 14px; display: grid; gap: 6px; }
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.contact-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; }
.contact-card .ico { font-size: 30px; }

/* Footer */
.footer { background: #10233c; color: #c9d6e6; margin-top: 40px; padding: 34px 0 0; }
.footer-in { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-bottom: 22px; font-size: 14px; }
.footer a { color: #9cc4ee; }
.copyright { border-top: 1px solid rgba(255,255,255,.12); text-align: center; padding: 14px; font-size: 12px; color: #8fa4bd; }

/* Toast */
.toast { position: fixed; bottom: 24px; inset-inline-start: 50%; transform: translateX(50%); background: var(--text); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 200; }
.toast.show { opacity: .95; }

@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 64px; inset-inline: 0; background: #fff; flex-direction: column; border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .nav.open { display: flex; }
  .menu-btn { display: block; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .features, .contact-cards, .about-grid { grid-template-columns: 1fr; }
  .detail { grid-template-columns: 1fr; }
}
