/* =========================================================================
   ياقوت | نظام التصميم — هوية "الحجر الكريم"
   الألوان الأساسية محافظ عليها من الهوية القديمة (ذهبي/أسود) + لون ياقوتي
   عميق كإشارة لاسم البراند، وحواف مقصوصة بشكل "وجه الجوهرة" كعنصر مميز
   ========================================================================= */

:root {
  --onyx:        #0b0b0d;
  --onyx-soft:   #16151a;
  --gold:        #c9a24b;
  --gold-light:  #e8d9a8;
  --gold-dim:    rgba(201, 162, 75, 0.35);
  --garnet:      #7a1330;
  --garnet-light:#a83a52;
  --ivory:       #f7f3ea;
  --ivory-dim:   #efe8d8;
  --ink:         #1c1a17;
  --ink-soft:    #55504a;

  --font-display: 'Aref Ruqaa', 'Amiri', serif;
  --font-body: 'Tajawal', sans-serif;

  --radius: 4px;
  --ease: cubic-bezier(.4,0,.2,1);
  --facet: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- عنصر التصميم المميز: زاوية "قصّة الجوهرة" ---------- */
.gem-cut {
  clip-path: var(--facet);
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--gold);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold);
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .5px;
}

/* =========================== شريط علوي =========================== */
.promo-bar {
  background: var(--onyx);
  color: var(--gold-light);
  font-size: 12.5px;
  text-align: center;
  padding: 8px 12px;
  letter-spacing: .5px;
}

/* =========================== الهيدر =========================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(11,11,13,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gold-dim);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  gap: 24px;
}
.logo {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--gold-light);
  letter-spacing: 1px;
}
.logo span { color: var(--gold); }
.main-nav { display: flex; gap: 32px; }
.main-nav a {
  color: var(--ivory);
  font-size: 14.5px;
  font-weight: 500;
  position: relative;
  padding: 6px 0;
  transition: color .3s var(--ease);
}
.main-nav a:hover { color: var(--gold); }
.header-actions { display: flex; align-items: center; gap: 20px; }
.icon-btn {
  color: var(--ivory);
  font-size: 18px;
  position: relative;
  transition: color .3s var(--ease);
}
.icon-btn:hover { color: var(--gold); }
.cart-badge {
  position: absolute;
  top: -8px; left: -10px;
  background: var(--garnet);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 17px; height: 17px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.nav-toggle { display: none; color: var(--ivory); font-size: 22px; }

@media (max-width: 900px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
}

/* =========================== الهيرو =========================== */
.hero {
  position: relative;
  background: var(--onyx);
  color: var(--ivory);
  overflow: hidden;
  padding: 90px 0 110px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10%;
  background:
    radial-gradient(circle at 82% 20%, var(--gold-dim), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(122,19,48,.35), transparent 40%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.15;
  color: var(--ivory);
  margin-bottom: 22px;
}
.hero h1 em {
  font-style: normal;
  color: var(--gold-light);
}
.hero p {
  font-size: 16.5px;
  color: rgba(247,243,234,.75);
  max-width: 480px;
  margin-bottom: 34px;
}
.hero-visual {
  position: relative;
  aspect-ratio: 4/5;
  background: linear-gradient(155deg, var(--onyx-soft), var(--onyx) 70%);
  border: 1px solid var(--gold-dim);
  clip-path: polygon(20% 0, 100% 0, 100% 80%, 80% 100%, 0 100%, 0 20%);
  display: flex; align-items: center; justify-content: center;
}
.hero-visual .gem-mark {
  width: 46%;
  opacity: .9;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 34px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .5px;
  transition: all .35s var(--ease);
  clip-path: var(--facet);
}
.btn-gold { background: var(--gold); color: var(--onyx); }
.btn-gold:hover { background: var(--gold-light); transform: translateY(-2px); }
.btn-outline { border: 1px solid var(--gold-dim); color: var(--ivory); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold-light); }
.btn-garnet { background: var(--garnet); color: #fff; }
.btn-garnet:hover { background: var(--garnet-light); }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 320px; margin: 0 auto; }
}

/* =========================== أقسام عامة =========================== */
.section { padding: 84px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 42px;
  gap: 20px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(26px, 3vw, 36px); color: var(--ink); }
.section-head .link-more {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--garnet);
  border-bottom: 1px solid var(--garnet);
  padding-bottom: 2px;
}
.section-dark { background: var(--onyx); color: var(--ivory); }
.section-dark .section-head h2 { color: var(--ivory); }

/* =========================== تصنيفات =========================== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.cat-card {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  clip-path: var(--facet);
  background: var(--onyx-soft);
}
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.cat-card:hover img { transform: scale(1.08); }
.cat-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(11,11,13,.88) 0%, rgba(11,11,13,.1) 55%);
}
.cat-card span {
  position: absolute;
  bottom: 20px; right: 20px; left: 20px;
  z-index: 2;
  color: var(--ivory);
  font-family: var(--font-display);
  font-size: 19px;
}
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }

/* =========================== المنتجات =========================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}
.product-card {
  background: #fff;
  border: 1px solid rgba(28,26,23,.08);
  transition: box-shadow .35s var(--ease), transform .35s var(--ease);
  position: relative;
}
.product-card:hover { box-shadow: 0 18px 40px rgba(11,11,13,.12); transform: translateY(-4px); }
.product-thumb { position: relative; aspect-ratio: 1/1.1; overflow: hidden; background: var(--ivory-dim); clip-path: var(--facet); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.product-card:hover .product-thumb img { transform: scale(1.05); }
.badge-discount {
  position: absolute; top: 12px; right: 12px;
  background: var(--garnet); color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 5px 10px;
  z-index: 2;
}
.product-body { padding: 18px 16px 20px; }
.product-body .p-name { font-size: 15.5px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.product-body .p-desc { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 12px; min-height: 32px; }
.p-price-row { display: flex; align-items: center; justify-content: space-between; }
.p-price { font-weight: 700; color: var(--garnet); font-size: 16px; }
.p-price .old { color: #a09b92; text-decoration: line-through; font-weight: 400; font-size: 13px; margin-left: 6px; }
.add-cart-btn {
  width: 38px; height: 38px;
  background: var(--onyx); color: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  clip-path: var(--facet);
  transition: background .3s var(--ease);
}
.add-cart-btn:hover { background: var(--garnet); color: #fff; }

@media (max-width: 900px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }

/* =========================== شريط الثقة =========================== */
.trust-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 46px 0;
  border-top: 1px solid rgba(28,26,23,.08);
  border-bottom: 1px solid rgba(28,26,23,.08);
}
.trust-item { text-align: center; }
.trust-item i { color: var(--gold); font-size: 22px; margin-bottom: 10px; }
.trust-item h4 { font-size: 14.5px; margin-bottom: 4px; }
.trust-item p { font-size: 12.5px; color: var(--ink-soft); }
@media (max-width: 900px) { .trust-bar { grid-template-columns: repeat(2, 1fr); } }

/* =========================== الفوتر =========================== */
.site-footer { background: var(--onyx); color: rgba(247,243,234,.7); padding: 70px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 50px; }
.footer-grid h5 { color: var(--gold-light); font-size: 14px; margin-bottom: 18px; letter-spacing: .5px; }
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.footer-grid ul a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(247,243,234,.1); padding-top: 22px; display: flex; justify-content: space-between; font-size: 12.5px; flex-wrap: wrap; gap: 10px; }
.social-row { display: flex; gap: 14px; }
.social-row a { width: 34px; height: 34px; border: 1px solid var(--gold-dim); display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.social-row a:hover { background: var(--gold); color: var(--onyx); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* =========================== سلة جانبية =========================== */
.side-cart-overlay {
  position: fixed; inset: 0; background: rgba(11,11,13,.6);
  z-index: 900; opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
}
.side-cart-overlay.open { opacity: 1; pointer-events: auto; }
.side-cart {
  position: fixed; top: 0; bottom: 0; left: -420px; width: 400px; max-width: 90vw;
  background: #fff; z-index: 901; transition: left .4s var(--ease);
  display: flex; flex-direction: column;
}
.side-cart.open { left: 0; }
.side-cart-head { padding: 22px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.side-cart-body { flex: 1; overflow-y: auto; padding: 18px; }
.side-cart-foot { padding: 20px; border-top: 1px solid #eee; }
.cart-line { display: flex; gap: 12px; margin-bottom: 16px; align-items: center; }
.cart-line img { width: 60px; height: 60px; object-fit: cover; }
.cart-line-info { flex: 1; }
.cart-line-info .n { font-size: 13.5px; font-weight: 700; }
.cart-line-info .s { font-size: 12px; color: var(--ink-soft); }
.qty-ctrl { display: flex; align-items: center; gap: 8px; }
.qty-ctrl button { width: 22px; height: 22px; border: 1px solid #ddd; }

/* =========================== نماذج =========================== */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 8px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 13px 16px; border: 1px solid rgba(28,26,23,.15);
  font-family: inherit; font-size: 14px; background: #fff;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--gold); }

/* =========================== توست تنبيه =========================== */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--onyx); color: var(--gold-light); padding: 14px 26px;
  font-size: 13.5px; z-index: 1000; opacity: 0; transition: all .35s var(--ease);
  clip-path: var(--facet);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .section { padding: 56px 0; }
  .cat-grid, .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
