/* ===== همس الديرة — نظام تصميم دافئ ريفي (Farmhouse) ===== */
:root {
  --bg: #f8f1e2;
  --panel: #fffcf5;
  --panel-2: #efe2c4;
  --ink: #4a3520;
  --rust: #bd6a3a;
  --rust-light: #d68a56;
  --olive: #7c8a4e;
  --muted: #8a7a5e;
  --line: rgba(189, 106, 58, 0.28);
  --line-soft: rgba(74, 53, 32, 0.12);
  --danger: #b5493a;
  --ok: #6f8a4e;
  --radius: 28px;
  --radius-sm: 16px;
  --shadow: 0 14px 34px rgba(74, 53, 32, 0.14);
  --font-brand: 'Reem Kufi', sans-serif;
  --font-head: 'Markazi Text', serif;
  --font-body: 'Tajawal', 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(1200px 500px at 90% -10%, rgba(189, 106, 58, 0.08), transparent 60%),
    radial-gradient(900px 500px at -5% 100%, rgba(124, 138, 78, 0.08), transparent 55%);
}

img, svg { max-width: 100%; display: block; }
a { color: var(--rust); text-decoration: none; }
main { flex: 1; }
.container { width: min(1120px, 92%); margin-inline: auto; }
h1, h2, h3 { font-family: var(--font-head); color: var(--ink); font-weight: 700; line-height: 1.4; }
::selection { background: var(--rust-light); color: #fff; }

/* ===== الترويسة ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 241, 226, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 2px dashed var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.9rem; }
.brand { font-family: var(--font-brand); font-size: 1.5rem; color: var(--rust); white-space: nowrap; }
.brand small { display: block; font-family: var(--font-body); font-size: 0.68rem; color: var(--muted); }
.main-nav { display: flex; align-items: center; gap: 1.3rem; }
.main-nav a { color: var(--ink); font-size: 0.95rem; padding: 0.4rem 0.2rem; border-radius: 999px; transition: color 0.2s; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--rust); }
.cart-link { position: relative; display: inline-flex; align-items: center; gap: 0.4rem; }
.cart-badge { min-width: 1.35rem; height: 1.35rem; padding-inline: 0.3rem; border-radius: 999px; background: var(--olive); color: #fff; font-size: 0.75rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.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: 700; font-size: 1rem;
  padding: 0.8rem 2rem; border-radius: 999px; cursor: pointer;
  border: 0;
  background: var(--rust);
  color: #fff5eb;
  box-shadow: 0 8px 20px rgba(189, 106, 58, 0.3);
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { background: var(--rust-light); transform: translateY(-2px) rotate(-0.5deg); box-shadow: 0 12px 26px rgba(189, 106, 58, 0.38); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; color: var(--rust); box-shadow: none; border: 2px solid var(--line); }
.btn-ghost:hover { background: var(--panel-2); box-shadow: none; transform: none; }
.btn-sm { padding: 0.4rem 1.1rem; font-size: 0.85rem; }
.btn-danger { background: transparent; color: var(--danger); border: 2px solid rgba(181, 73, 58, 0.4); box-shadow: none; }
.btn-danger:hover { background: rgba(181, 73, 58, 0.1); transform: none; box-shadow: none; }

/* ===== الهيرو: بلوب عضوي حول الصورة ===== */
.hero { padding-block: 3rem 4rem; }
.hero .container { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.5rem; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); margin-bottom: 1.1rem; }
.hero h1 .brand-word { font-family: var(--font-brand); color: var(--rust); }
.hero p.lead { color: var(--muted); font-size: 1.1rem; max-width: 32rem; margin-bottom: 1.8rem; }
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }

.mabkhara-scene { position: relative; display: grid; place-items: center; min-height: 320px; }
.hero-photo {
  width: 100%; max-width: 460px; height: auto;
  border-radius: 62% 38% 55% 45% / 45% 55% 45% 55%;
  border: 6px solid var(--panel);
  box-shadow: var(--shadow);
}
.mabkhara-glow { position: absolute; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(124, 138, 78, 0.14), transparent 65%); }
.smoke-wisp, .ember { display: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ===== الأقسام ===== */
.section { padding-block: 3.5rem; }
.section-head { text-align: center; margin-bottom: 2.4rem; }
.section-head h2 { font-size: 1.9rem; }
.section-head p { color: var(--muted); }
.gold-rule { width: 70px; height: 4px; margin: 1.1rem auto 0; border-radius: 999px; background: var(--olive); position: relative; }
.gold-rule::after { content: none; }
.eyebrow { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--olive); font-size: 0.85rem; font-weight: 700; margin-bottom: 1rem; background: rgba(124, 138, 78, 0.12); padding: 0.3rem 1rem; border-radius: 999px; }
.eyebrow::before, .eyebrow::after { content: none; }

/* ===== بطاقات المنتجات: دائرية دافئة ===== */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.6rem; }
.product-card {
  background: var(--panel);
  border: 0; border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}
.product-card:hover { transform: translateY(-5px) rotate(-0.5deg); box-shadow: 0 20px 40px rgba(74, 53, 32, 0.2); }
.product-card .thumb { aspect-ratio: 4 / 3; background: var(--panel-2); display: block; overflow: hidden; border-radius: var(--radius) var(--radius) 40% 40% / var(--radius) var(--radius) 20% 20%; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .thumb img { transform: scale(1.06) rotate(1deg); }
.product-card .body { padding: 1.2rem 1.3rem 1.5rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.product-card h3 { font-size: 1.15rem; }
.product-card .cat { font-size: 0.78rem; color: var(--olive); font-weight: 700; }
.price { font-family: var(--font-head); font-weight: 700; color: var(--rust); font-size: 1.25rem; }
.price small { font-family: var(--font-body); color: var(--muted); font-weight: 400; font-size: 0.75rem; }
.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.9rem; font-weight: 600; cursor: pointer; padding: 0.5rem 1.4rem; border-radius: 999px; border: 2px solid var(--line); background: var(--panel); color: var(--ink); transition: all 0.2s; }
.filter-btn:hover { border-color: var(--rust); }
.filter-btn.active { background: var(--rust); color: #fff; border-color: var(--rust); }

/* ===== الخط الزمني: عقد مترابطة كالخرز ===== */
.timeline { list-style: none; margin-top: 2.2rem; position: relative; padding-right: 2rem; }
.timeline::before { content: ''; position: absolute; right: 9px; top: 8px; bottom: 8px; width: 3px; border-radius: 999px; background: repeating-linear-gradient(to bottom, var(--olive) 0 8px, transparent 8px 14px); }
.timeline li { position: relative; padding-bottom: 1.8rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; right: -2rem; top: 0.35rem; width: 20px; height: 20px; border-radius: 50%; background: var(--panel); border: 3px solid var(--rust); }
.timeline .year { font-family: var(--font-head); font-weight: 700; color: var(--rust); font-size: 1.2rem; display: block; }
.timeline p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ===== حكاية همس ===== */
.story { background: var(--panel); border-block: 2px dashed var(--line); }
.story .container { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; padding-block: 3.5rem; }
.story h2 { font-size: 1.9rem; 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(--bg); border: 0; border-radius: var(--radius-sm); padding: 1.3rem; text-align: center; box-shadow: var(--shadow); }
.story-mark strong { display: block; font-family: var(--font-head); color: var(--rust); font-size: 1.6rem; }
.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: 6px solid var(--panel); border-radius: 58% 42% 50% 50% / 50% 50% 45% 55%; 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.1rem; margin-bottom: 0.4rem; }
.product-detail .cat { color: var(--olive); font-weight: 700; margin-bottom: 1rem; }
.product-detail .price { font-size: 1.6rem; 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: 2px 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(--rust); font-size: 1.25rem; cursor: pointer; font-family: var(--font-body); font-weight: 700; }
.qty-control button:hover { background: var(--panel-2); }
.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: 0; border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); }
.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: 2px dashed var(--line); }
.cart-item:last-of-type { border-bottom: 0; }
.cart-item .thumb { width: 64px; height: 64px; background: var(--panel-2); border-radius: 50%; overflow: hidden; display: block; }
.cart-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item h3 { font-size: 1.05rem; }
.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.82rem; font-weight: 600; }
.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: 2px dashed 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.88rem; margin-bottom: 0.35rem; color: var(--ink); font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.7rem 1rem; border-radius: var(--radius-sm);
  border: 2px solid var(--line); background: var(--panel); 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(--rust); }
.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: var(--radius-sm); font-size: 0.9rem; margin-bottom: 1rem; display: none; }
.form-msg.error { display: block; background: rgba(181, 73, 58, 0.12); border: 2px solid rgba(181, 73, 58, 0.3); color: #8a3324; }
.form-msg.ok { display: block; background: rgba(111, 138, 78, 0.14); border: 2px solid rgba(111, 138, 78, 0.35); color: #4e6034; }

/* ===== صفحة الشكر ===== */
.thanks-wrap { max-width: 560px; margin-inline: auto; text-align: center; padding-block: 4rem; }
.thanks-icon { width: 96px; height: 96px; margin: 0 auto 1.4rem; border-radius: 50%; display: grid; place-items: center; font-size: 2.6rem; box-shadow: var(--shadow); }
.thanks-icon.ok { background: rgba(111, 138, 78, 0.16); }
.thanks-icon.fail { background: rgba(181, 73, 58, 0.16); }
.thanks-icon.wait { background: rgba(189, 106, 58, 0.14); }
.order-ref { display: inline-block; background: var(--panel); border: 2px dashed var(--rust); border-radius: 999px; padding: 0.5rem 1.6rem; margin-block: 1rem; font-weight: 700; color: var(--rust); }

/* ===== حالات ===== */
.status-badge { display: inline-block; padding: 0.2rem 0.9rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.status-paid { background: rgba(111, 138, 78, 0.16); color: var(--ok); }
.status-pending { background: rgba(189, 106, 58, 0.14); color: var(--rust); }
.status-failed { background: rgba(181, 73, 58, 0.14); color: var(--danger); }

/* ===== التذييل ===== */
.site-footer { border-top: 2px dashed var(--line); background: var(--panel); margin-top: 3rem; }
.site-footer .brand { font-size: 1.3rem; }
.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.5rem; }
.footer-col h3 { font-size: 1.05rem; margin-bottom: 0.35rem; color: var(--rust); }
.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(--rust); }
.footer-bottom { border-top: 2px dashed 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.35rem; margin: 2rem 0 0.6rem; color: var(--rust); }
.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.9rem; }
.faq-list details { background: var(--panel); border: 0; border-radius: var(--radius-sm); padding: 1.1rem 1.4rem; box-shadow: var(--shadow); }
.faq-list summary { cursor: pointer; font-weight: 700; color: var(--rust); font-size: 1.02rem; list-style: none; position: relative; padding-left: 1.8rem; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; position: absolute; left: 0; top: -0.15rem; color: var(--olive); font-size: 1.4rem; }
.faq-list details[open] summary::after { content: '−'; }
.faq-list details p { color: var(--muted); padding-top: 0.7rem; font-size: 0.93rem; }

/* ===== تواصل ===== */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.3rem; max-width: 920px; margin-inline: auto; }
.contact-card { background: var(--panel); border: 0; border-radius: var(--radius); padding: 1.9rem 1.4rem; text-align: center; box-shadow: var(--shadow); transition: transform 0.2s; }
.contact-card:hover { transform: translateY(-4px) rotate(-0.5deg); }
.contact-card .icon { font-size: 2.1rem; 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: 280px; 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.35rem; }
  .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; }
}
