/* ===== مرسال — نظام تصميم عربي زخرفي فاخر (Jewel-Tone Arabesque) ===== */
:root {
  --bg: #0e1f18;
  --panel: #143327;
  --panel-2: #1c4433;
  --ink: #f2e8d0;
  --gold: #c9a24a;
  --gold-light: #e3c375;
  --burgundy: #7a2334;
  --burgundy-light: #a63347;
  --muted: #a8b8ab;
  --line: rgba(201, 162, 74, 0.35);
  --line-soft: rgba(242, 232, 208, 0.14);
  --danger: #c2554a;
  --ok: #7a9a5b;
  --radius-arch: 120px 120px 8px 8px;
  --shadow: 0 20px 44px rgba(0, 0, 0, 0.5);
  --font-brand: 'Lateef', serif;
  --font-head: 'Katibeh', serif;
  --font-body: 'Cairo', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.85;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(900px 500px at 90% -10%, rgba(201, 162, 74, 0.1), transparent 60%),
    radial-gradient(800px 500px at 0% 110%, rgba(122, 35, 52, 0.14), transparent 55%);
}

img, svg { max-width: 100%; display: block; }
a { color: var(--gold-light); text-decoration: none; }
main { flex: 1; }
.container { width: min(1120px, 92%); margin-inline: auto; }
h1, h2, h3 { font-family: var(--font-head); color: var(--gold-light); font-weight: 400; line-height: 1.3; letter-spacing: 0.01em; }
::selection { background: var(--burgundy); color: var(--ink); }

/* زخرفة هندسية متكررة تُستخدم كفاصل زينة */
.gold-rule {
  width: 220px; height: 22px; margin: 1.2rem auto 0; position: relative;
  background-image: repeating-linear-gradient(45deg, var(--gold) 0 2px, transparent 2px 10px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
  opacity: 0.75;
}
.gold-rule::after {
  content: '✦'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -55%);
  color: var(--gold-light); font-size: 1rem; background: var(--bg); padding-inline: 0.8rem;
}
.story .gold-rule::after, .panel .gold-rule::after { background: var(--panel); }

/* ===== الترويسة ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, #0b1a14, rgba(11, 26, 20, 0.94));
  border-bottom: 2px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.85rem; }
.brand { font-family: var(--font-brand); font-size: 2.1rem; color: var(--gold-light); white-space: nowrap; }
.brand small { display: block; font-family: var(--font-body); font-size: 0.62rem; color: var(--muted); letter-spacing: 0.04em; }
.main-nav { display: flex; align-items: center; gap: 1.4rem; }
.main-nav a { color: var(--ink); font-size: 0.92rem; padding-block: 0.3rem; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--gold-light); border-bottom-color: var(--gold); }
.cart-link { position: relative; display: inline-flex; align-items: center; gap: 0.4rem; }
.cart-badge { min-width: 1.3rem; height: 1.3rem; padding-inline: 0.3rem; border-radius: 50%; background: var(--burgundy); color: var(--ink); font-size: 0.72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--gold); }
.cart-badge:empty, .cart-badge[data-n="0"] { display: none; }

/* ===== الأزرار ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 0.96rem;
  padding: 0.75rem 2rem; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--gold);
  background: linear-gradient(135deg, var(--gold), #9c7a30);
  color: #1a1206;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}
.btn:hover { filter: brightness(1.1); box-shadow: 0 8px 26px rgba(201, 162, 74, 0.32); transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; color: var(--gold-light); }
.btn-ghost:hover { background: rgba(201, 162, 74, 0.12); box-shadow: none; }
.btn-sm { padding: 0.4rem 1.1rem; font-size: 0.82rem; }
.btn-danger { border-color: var(--danger); background: transparent; color: var(--danger); }
.btn-danger:hover { background: rgba(194, 85, 74, 0.14); box-shadow: none; }

/* ===== الهيرو: قوس محراب حول الصورة ===== */
.hero { padding-block: 3rem 4rem; }
.hero .container { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.8rem; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 1.1rem; }
.hero h1 .brand-word { font-family: var(--font-brand); color: var(--gold); }
.hero p.lead { color: var(--muted); font-size: 1.05rem; max-width: 32rem; margin-bottom: 1.9rem; }
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }

.mabkhara-scene { position: relative; display: grid; place-items: center; min-height: 340px; }
.hero-photo {
  width: 100%; max-width: 460px; height: auto; border-radius: var(--radius-arch);
  border: 3px solid var(--gold); box-shadow: var(--shadow), 0 0 0 8px rgba(201, 162, 74, 0.12);
}
.mabkhara-glow { position: absolute; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(201, 162, 74, 0.18), transparent 65%); }
.smoke-wisp {
  position: absolute; bottom: 60%; left: 50%; width: 42px; height: 140px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(242, 232, 208, 0.26), rgba(242, 232, 208, 0.03) 70%, transparent);
  filter: blur(9px); opacity: 0; animation: smoke-rise 7s ease-out infinite; pointer-events: none;
}
.smoke-wisp:nth-child(2) { animation-delay: 2.3s; width: 30px; }
@keyframes smoke-rise {
  0% { transform: translate(-50%, 30px) scale(0.5); opacity: 0; }
  15% { opacity: 0.8; }
  50% { transform: translate(calc(-50% + 18px), -100px) scale(1.05); opacity: 0.4; }
  100% { transform: translate(calc(-50% - 22px), -220px) scale(1.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .smoke-wisp { animation: none; opacity: 0.3; } html { scroll-behavior: auto; } }

/* ===== الأقسام ===== */
.section { padding-block: 3.6rem; }
.section-head { text-align: center; margin-bottom: 2.4rem; }
.section-head h2 { font-size: 2rem; }
.section-head p { color: var(--muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--gold); font-size: 0.85rem; font-weight: 600; margin-bottom: 1.1rem; }
.eyebrow::before, .eyebrow::after { content: ''; width: 28px; height: 1px; background: var(--gold); opacity: 0.6; }

/* ===== بطاقات المنتجات: إطار مزدوج ذهبي ===== */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; }
.product-card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel) 45%);
  border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; display: flex; flex-direction: column; position: relative;
  box-shadow: inset 0 0 0 3px rgba(201, 162, 74, 0.08);
  transition: transform 0.2s, box-shadow 0.25s, border-color 0.25s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow), inset 0 0 0 3px rgba(201, 162, 74, 0.18); border-color: var(--gold); }
.product-card .thumb { aspect-ratio: 4 / 3; background: var(--panel-2); display: block; overflow: hidden; border-bottom: 1px solid var(--line); }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .thumb img { transform: scale(1.05); }
.product-card .body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.product-card h3 { font-size: 1.15rem; font-family: var(--font-body); font-weight: 700; color: var(--ink); }
.product-card .cat { font-size: 0.76rem; color: var(--gold); }
.price { font-family: var(--font-head); font-weight: 400; color: var(--gold-light); font-size: 1.35rem; }
.price small { font-family: var(--font-body); color: var(--muted); font-weight: 400; font-size: 0.74rem; }
.product-card .actions { margin-top: auto; display: flex; gap: 0.6rem; padding-top: 0.7rem; }

/* ===== الفلاتر ===== */
.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-bottom: 2rem; }
.filter-btn { font-family: var(--font-body); font-size: 0.88rem; font-weight: 600; cursor: pointer; padding: 0.45rem 1.3rem; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); transition: all 0.2s; }
.filter-btn:hover { border-color: var(--gold); }
.filter-btn.active { background: var(--burgundy); color: var(--ink); border-color: var(--burgundy-light); font-weight: 700; }

/* ===== الخط الزمني ===== */
.timeline { list-style: none; margin-top: 2.2rem; position: relative; padding-right: 1.8rem; }
.timeline::before { content: ''; position: absolute; right: 6px; top: 8px; bottom: 8px; width: 2px; background: repeating-linear-gradient(to bottom, var(--gold) 0 6px, transparent 6px 12px); opacity: 0.6; }
.timeline li { position: relative; padding-bottom: 1.7rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: '◆'; position: absolute; right: -1.85rem; top: -0.15rem; color: var(--gold); font-size: 0.85rem; }
.timeline .year { font-family: var(--font-head); font-weight: 400; color: var(--gold-light); font-size: 1.3rem; display: block; }
.timeline p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ===== حكاية مرسال ===== */
.story { background: var(--panel); border-block: 2px solid var(--line); }
.story .container { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; padding-block: 3.6rem; }
.story h2 { font-size: 2rem; margin-bottom: 1rem; }
.story p { color: var(--muted); margin-bottom: 0.9rem; }
.story-marks { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.story-mark { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 1.2rem; text-align: center; }
.story-mark strong { display: block; font-family: var(--font-head); color: var(--gold-light); font-size: 1.6rem; font-weight: 400; }
.story-mark span { color: var(--muted); font-size: 0.85rem; }

/* ===== صفحة المنتج ===== */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; padding-block: 3rem; }
.product-detail .thumb { background: var(--panel); border: 3px solid var(--gold); border-radius: var(--radius-arch); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 1 / 1; }
.product-detail .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-detail h1 { font-size: 2.2rem; margin-bottom: 0.4rem; }
.product-detail .cat { color: var(--gold); margin-bottom: 1rem; }
.product-detail .price { font-size: 1.7rem; display: block; margin-bottom: 1.2rem; }
.product-detail .desc { color: var(--muted); margin-bottom: 1.8rem; max-width: 36rem; }
.qty-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--panel); }
.qty-control button { width: 2.6rem; height: 2.6rem; border: 0; background: transparent; color: var(--gold-light); font-size: 1.25rem; cursor: pointer; font-family: var(--font-body); }
.qty-control button:hover { background: rgba(201, 162, 74, 0.14); }
.qty-control .qty { min-width: 2.6rem; text-align: center; font-weight: 700; }

/* ===== السلة ===== */
.cart-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: start; padding-block: 2.5rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1.7rem; }
.panel h2 { font-size: 1.4rem; margin-bottom: 1.2rem; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 1rem; align-items: center; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.cart-item:last-of-type { border-bottom: 0; }
.cart-item .thumb { width: 64px; height: 64px; background: var(--panel-2); border-radius: 8px; overflow: hidden; display: block; }
.cart-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item h3 { font-size: 1.02rem; font-family: var(--font-body); font-weight: 700; }
.cart-item .meta { font-size: 0.82rem; color: var(--muted); }
.cart-item .side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; }
.remove-btn { background: none; border: 0; color: var(--danger); cursor: pointer; font-family: var(--font-body); font-size: 0.8rem; }
.totals-row { display: flex; justify-content: space-between; padding-block: 0.5rem; color: var(--muted); }
.totals-row.grand { color: var(--ink); font-weight: 700; font-size: 1.15rem; border-top: 1px solid var(--line); margin-top: 0.5rem; padding-top: 0.9rem; }
.tax-note { font-size: 0.78rem; color: var(--muted); text-align: center; margin-top: 0.6rem; }

/* ===== النماذج ===== */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.86rem; margin-bottom: 0.35rem; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.65rem 0.9rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 0.95rem;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form-grid .full { grid-column: 1 / -1; }
.form-msg { padding: 0.7rem 1rem; border-radius: 10px; font-size: 0.9rem; margin-bottom: 1rem; display: none; }
.form-msg.error { display: block; background: rgba(194, 85, 74, 0.14); border: 1px solid rgba(194, 85, 74, 0.4); color: #e8b2a5; }
.form-msg.ok { display: block; background: rgba(122, 154, 91, 0.14); border: 1px solid rgba(122, 154, 91, 0.4); color: #c3d7a5; }

/* ===== صفحة الشكر ===== */
.thanks-wrap { max-width: 560px; margin-inline: auto; text-align: center; padding-block: 4rem; }
.thanks-icon { width: 92px; height: 92px; margin: 0 auto 1.4rem; border-radius: var(--radius-arch); display: grid; place-items: center; font-size: 2.5rem; }
.thanks-icon.ok { background: rgba(122, 154, 91, 0.15); border: 2px solid rgba(122, 154, 91, 0.4); }
.thanks-icon.fail { background: rgba(194, 85, 74, 0.15); border: 2px solid rgba(194, 85, 74, 0.4); }
.thanks-icon.wait { background: rgba(201, 162, 74, 0.14); border: 2px solid var(--line); }
.order-ref { display: inline-block; background: var(--panel); border: 1px dashed var(--gold); border-radius: 10px; padding: 0.5rem 1.4rem; margin-block: 1rem; font-weight: 700; color: var(--gold-light); }

/* ===== حالات ===== */
.status-badge { display: inline-block; padding: 0.15rem 0.8rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.status-paid { background: rgba(122, 154, 91, 0.15); color: var(--ok); border: 1px solid rgba(122, 154, 91, 0.4); }
.status-pending { background: rgba(201, 162, 74, 0.14); color: var(--gold-light); border: 1px solid var(--line); }
.status-failed { background: rgba(194, 85, 74, 0.14); color: var(--danger); border: 1px solid rgba(194, 85, 74, 0.4); }

/* ===== التذييل ===== */
.site-footer { border-top: 2px solid var(--line); background: var(--panel); margin-top: 3rem; }
.site-footer .brand { font-size: 1.6rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; padding-block: 2.6rem; align-items: start; }
.footer-about p { color: var(--muted); font-size: 0.85rem; margin-top: 0.7rem; max-width: 24rem; }
.footer-col { display: flex; flex-direction: column; gap: 0.45rem; }
.footer-col h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.footer-col a, .footer-col span { color: var(--muted); font-size: 0.88rem; }
.footer-col a { transition: color 0.15s; }
.footer-col a:hover { color: var(--gold-light); }
.footer-bottom { border-top: 1px solid var(--line); }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1rem; color: var(--muted); font-size: 0.8rem; }

/* ===== صفحات المحتوى ===== */
.prose { max-width: 760px; margin-inline: auto; }
.prose h2 { font-size: 1.4rem; margin: 2rem 0 0.6rem; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-right: 1.3rem; margin-block: 0.5rem; }
.prose .panel { margin-top: 1.5rem; }

/* ===== الأسئلة الشائعة ===== */
.faq-list { max-width: 760px; margin-inline: auto; display: flex; flex-direction: column; gap: 0.8rem; }
.faq-list details { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.3rem; transition: border-color 0.2s; }
.faq-list details[open] { border-color: var(--gold); }
.faq-list summary { cursor: pointer; font-weight: 600; color: var(--gold-light); font-size: 1.02rem; list-style: none; position: relative; padding-left: 1.6rem; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; position: absolute; left: 0; top: -0.1rem; color: var(--gold); font-size: 1.3rem; }
.faq-list details[open] summary::after { content: '−'; }
.faq-list details p { color: var(--muted); padding-top: 0.6rem; font-size: 0.93rem; }

/* ===== تواصل ===== */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; max-width: 920px; margin-inline: auto; }
.contact-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1.8rem 1.4rem; text-align: center; transition: border-color 0.2s, transform 0.2s; }
.contact-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.contact-card .icon { font-size: 2rem; margin-bottom: 0.5rem; }
.contact-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.contact-card p { color: var(--muted); font-size: 0.88rem; margin-bottom: 0.9rem; }

/* ===== تجاوب ===== */
@media (max-width: 900px) {
  .hero .container, .story .container, .product-detail, .cart-layout { grid-template-columns: 1fr; }
  .mabkhara-scene { min-height: 300px; order: -1; }
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
  .main-nav { gap: 0.8rem; font-size: 0.85rem; flex-wrap: wrap; justify-content: center; }
  .brand { font-size: 1.6rem; }
  .form-grid { grid-template-columns: 1fr; }
  .site-header .container { flex-wrap: wrap; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .field input, .field select, .field textarea { font-size: 16px; }
}
