/* =========================================================
   متجر الغانم للعطور — نظام التصميم
   لوحة الألوان: مسك فاتح · عود باذنجاني · نحاس · ورد طائفي
   ========================================================= */
:root{
  --musk:      #F4F0EB;   /* خلفية المسك */
  --musk-deep: #E8E0D6;   /* سطح ثانوي */
  --oud:       #2B1D24;   /* عود باذنجاني */
  --oud-soft:  #4A3742;
  --brass:     #B08D3F;   /* نحاس */
  --brass-lt:  #D9BC77;
  --taif:      #8C3A50;   /* ورد طائفي */
  --line:      #D6CCC0;
  --white:     #FFFDFA;
  --ok:        #2F6B4F;
  --err:       #A33232;

  --r:   4px;
  --r-lg: 10px;
  --shadow: 0 1px 2px rgba(43,29,36,.06), 0 8px 24px rgba(43,29,36,.06);
  --wrap: 1180px;
}

*,*::before,*::after{ box-sizing:border-box; }

html{ scroll-behavior:smooth; }

body{
  margin:0;
  background:var(--musk);
  color:var(--oud);
  font-family:'IBM Plex Sans Arabic', system-ui, 'Segoe UI', sans-serif;
  font-size:16px;
  line-height:1.75;
  direction:rtl;
  -webkit-font-smoothing:antialiased;
}

h1,h2,h3,h4,.display{
  font-family:'Amiri', 'Times New Roman', serif;
  font-weight:700;
  line-height:1.3;
  margin:0 0 .5em;
  letter-spacing:0;
}

a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }

.wrap{ max-width:var(--wrap); margin-inline:auto; padding-inline:20px; }

:focus-visible{ outline:2px solid var(--brass); outline-offset:3px; }

/* ---------------- الشريط العلوي ---------------- */
.topbar{
  background:var(--oud);
  color:var(--musk-deep);
  font-size:13.5px;
  padding:8px 0;
}
.topbar .wrap{ display:flex; gap:20px; justify-content:space-between; flex-wrap:wrap; }
.topbar a:hover{ color:var(--brass-lt); }

/* ---------------- الهيدر ---------------- */
.site-header{
  background:var(--white);
  border-bottom:1px solid var(--line);
  position:sticky; top:0; z-index:50;
}
.header-inner{
  display:flex; align-items:center; gap:24px;
  padding-block:14px;
}
.logo{ display:flex; align-items:center; gap:12px; flex-shrink:0; }
.logo__mark{
  width:44px; height:44px; flex-shrink:0;
  border:1.5px solid var(--brass);
  border-radius:50% 50% 45% 45%;
  display:grid; place-items:center;
  font-family:'Amiri',serif; font-size:22px; color:var(--brass);
  background:linear-gradient(160deg,#fff,var(--musk-deep));
}
.logo__txt strong{
  font-family:'Amiri',serif; font-size:21px; display:block; line-height:1.2;
}
.logo__txt span{ font-size:11.5px; color:var(--oud-soft); letter-spacing:.14em; }

.nav{ display:flex; gap:6px; margin-inline-start:auto; flex-wrap:wrap; }
.nav a{
  padding:8px 14px; border-radius:var(--r); font-size:15px;
  transition:background .18s, color .18s;
}
.nav a:hover{ background:var(--musk-deep); }
.nav a.is-active{ color:var(--brass); font-weight:600; }

.header-actions{ display:flex; align-items:center; gap:10px; }

.cart-btn{
  display:inline-flex; align-items:center; gap:8px;
  background:var(--oud); color:var(--white);
  padding:10px 16px; border-radius:var(--r);
  font-size:14.5px; transition:background .18s;
}
.cart-btn:hover{ background:var(--taif); }
.cart-btn b{
  background:var(--brass); color:var(--oud);
  min-width:21px; height:21px; border-radius:11px;
  display:grid; place-items:center; font-size:12.5px; padding-inline:5px;
}

.burger{
  display:none; background:none; border:1px solid var(--line);
  border-radius:var(--r); padding:9px 12px; cursor:pointer; font-size:17px;
}

/* ---------------- الأزرار ---------------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  border:1px solid transparent; border-radius:var(--r);
  padding:12px 24px; font-size:15px; font-weight:500;
  font-family:inherit; cursor:pointer; transition:.18s;
  background:var(--oud); color:var(--white);
}
.btn:hover{ background:var(--taif); }
.btn--brass{ background:var(--brass); color:#231A10; }
.btn--brass:hover{ background:var(--brass-lt); }
.btn--ghost{ background:transparent; color:var(--oud); border-color:var(--oud); }
.btn--ghost:hover{ background:var(--oud); color:var(--white); }
.btn--sm{ padding:8px 14px; font-size:13.5px; }
.btn--block{ width:100%; }
.btn[disabled]{ opacity:.5; pointer-events:none; }

/* ---------------- الواجهة الرئيسية ---------------- */
.hero{
  background:var(--oud);
  color:var(--musk);
  position:relative;
  overflow:hidden;
}
/* شبكة مشربية خفيفة — التوقيع البصري */
.hero::before{
  content:''; position:absolute; inset:0; opacity:.10;
  background-image:
    repeating-linear-gradient(45deg, var(--brass-lt) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(-45deg, var(--brass-lt) 0 1px, transparent 1px 26px);
}
.hero__inner{
  position:relative;
  display:grid; grid-template-columns:1.15fr .85fr; gap:40px; align-items:center;
  padding-block:88px;
}
.hero .eyebrow{
  font-size:12.5px; letter-spacing:.28em; color:var(--brass-lt);
  margin-bottom:18px;
}
.hero h1{ font-size:clamp(34px,5.2vw,60px); color:var(--white); margin-bottom:18px; }
.hero p{ font-size:17.5px; color:#CFC3B7; max-width:46ch; margin-bottom:30px; }
.hero__cta{ display:flex; gap:12px; flex-wrap:wrap; }

/* قارورة العطر المرسومة بـ CSS */
.flacon{ justify-self:center; width:190px; }
.flacon__cap{
  width:58px; height:44px; margin-inline:auto;
  background:linear-gradient(180deg,var(--brass-lt),var(--brass));
  border-radius:3px 3px 0 0;
}
.flacon__neck{ width:34px; height:20px; margin-inline:auto; background:#F0E4D2; opacity:.85; }
.flacon__body{
  height:200px; border-radius:14px 14px 26px 26px;
  background:linear-gradient(160deg, rgba(240,228,210,.30), rgba(176,141,63,.55));
  border:1px solid rgba(217,188,119,.55);
  display:grid; place-items:center;
  backdrop-filter:blur(2px);
}
.flacon__body span{
  font-family:'Amiri',serif; font-size:30px; color:var(--white);
  writing-mode:vertical-rl; letter-spacing:.2em;
}

/* ---------------- الأقسام ---------------- */
.section{ padding-block:72px; }
.section--alt{ background:var(--white); }

.section-head{ margin-bottom:36px; }
.section-head .eyebrow{
  font-size:12px; letter-spacing:.26em; color:var(--brass);
  display:block; margin-bottom:8px;
}
.section-head h2{ font-size:clamp(26px,3.4vw,38px); margin:0; }
.section-head p{ color:var(--oud-soft); margin:8px 0 0; max-width:60ch; }

/* شريط الأقسام */
.cats{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:34px; }
.cats a{
  border:1px solid var(--line); background:var(--white);
  padding:9px 18px; border-radius:100px; font-size:14.5px;
  transition:.18s;
}
.cats a:hover{ border-color:var(--brass); color:var(--brass); }
.cats a.is-active{ background:var(--oud); color:var(--white); border-color:var(--oud); }

/* ---------------- شبكة المنتجات ---------------- */
.grid{
  display:grid; gap:26px;
  grid-template-columns:repeat(auto-fill, minmax(238px,1fr));
}

.card{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  overflow:hidden;
  display:flex; flex-direction:column;
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s;
}
.card:hover{ transform:translateY(-4px); box-shadow:var(--shadow); border-color:var(--brass); }

.card__media{
  position:relative; aspect-ratio:1/1;
  background:var(--musk-deep); overflow:hidden;
}
.card__media img{ width:100%; height:100%; object-fit:cover; transition:transform .5s ease; }
.card:hover .card__media img{ transform:scale(1.05); }

.tag{
  position:absolute; top:12px; inset-inline-start:12px;
  background:var(--taif); color:#fff;
  font-size:11.5px; padding:4px 10px; border-radius:100px;
  letter-spacing:.05em;
}
.tag--out{ background:var(--oud-soft); }

.card__body{ padding:16px 16px 18px; display:flex; flex-direction:column; flex:1; }
.card__brand{ font-size:11.5px; color:var(--brass); letter-spacing:.14em; margin-bottom:5px; }
.card__title{ font-family:'Amiri',serif; font-size:19px; margin:0 0 4px; }
.card__meta{ font-size:13px; color:var(--oud-soft); margin-bottom:12px; }
.card__foot{ margin-top:auto; display:flex; align-items:center; justify-content:space-between; gap:10px; }
.price{ font-weight:600; font-size:16.5px; }
.price s{ color:var(--oud-soft); font-weight:400; font-size:13.5px; margin-inline-start:7px; }

/* ---------------- صفحة المنتج ---------------- */
.product{ display:grid; grid-template-columns:1fr 1fr; gap:48px; padding-block:52px; }
.product__img{
  border:1px solid var(--line); border-radius:var(--r-lg);
  overflow:hidden; background:var(--white);
}
.product__img img{ width:100%; aspect-ratio:1/1; object-fit:cover; }
.thumbs{ display:flex; gap:10px; margin-top:12px; flex-wrap:wrap; }
.thumbs img{
  width:72px; height:72px; object-fit:cover; cursor:pointer;
  border:1px solid var(--line); border-radius:var(--r);
}
.thumbs img:hover{ border-color:var(--brass); }

.product h1{ font-size:clamp(26px,3.6vw,38px); margin-bottom:6px; }
.product__price{ font-size:26px; font-weight:600; color:var(--taif); margin:14px 0 20px; }
.product__desc{ color:var(--oud-soft); }

/* التوقيع: هرم النوتات العطرية */
.pyramid{ margin:30px 0; border-top:1px solid var(--line); padding-top:22px; }
.pyramid h3{ font-size:19px; margin-bottom:16px; }
.pyramid__row{
  display:grid; grid-template-columns:96px 1fr; gap:16px;
  align-items:baseline; padding:11px 0;
  border-bottom:1px dashed var(--line);
}
.pyramid__row:last-child{ border-bottom:0; }
.pyramid__label{
  font-size:12.5px; letter-spacing:.14em; color:var(--brass);
  display:flex; align-items:center; gap:8px;
}
.pyramid__label::before{
  content:''; width:8px; height:8px; border-radius:50%;
  background:var(--brass); flex-shrink:0; opacity:.55;
}
.pyramid__row:nth-child(2) .pyramid__label::before{ opacity:.75; width:11px; height:11px; }
.pyramid__row:nth-child(3) .pyramid__label::before{ opacity:1; width:14px; height:14px; }

.spec{ display:flex; gap:22px; flex-wrap:wrap; font-size:14px; color:var(--oud-soft); margin-bottom:20px; }
.spec b{ color:var(--oud); font-weight:600; }

.qty{ display:inline-flex; border:1px solid var(--line); border-radius:var(--r); overflow:hidden; background:var(--white); }
.qty button{ width:42px; border:0; background:none; font-size:19px; cursor:pointer; color:var(--oud); }
.qty button:hover{ background:var(--musk-deep); }
.qty input{ width:56px; border:0; text-align:center; font-family:inherit; font-size:16px; background:none; }
.qty input::-webkit-outer-spin-button,.qty input::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }

/* ---------------- الجداول والنماذج ---------------- */
.table{ width:100%; border-collapse:collapse; background:var(--white); border:1px solid var(--line); border-radius:var(--r-lg); overflow:hidden; }
.table th,.table td{ padding:14px 16px; text-align:start; border-bottom:1px solid var(--line); font-size:14.5px; }
.table th{ background:var(--musk-deep); font-weight:600; font-size:13.5px; }
.table tr:last-child td{ border-bottom:0; }

.field{ margin-bottom:18px; }
.field label{ display:block; font-size:14px; margin-bottom:7px; font-weight:500; }
.field .hint{ font-size:12.5px; color:var(--oud-soft); font-weight:400; }
.input, .field input[type=text], .field input[type=tel], .field input[type=number],
.field input[type=email], .field input[type=password], .field textarea, .field select{
  width:100%; padding:12px 14px;
  border:1px solid var(--line); border-radius:var(--r);
  background:var(--white); font-family:inherit; font-size:15px; color:var(--oud);
  transition:border-color .18s;
}
.field input:focus, .field textarea:focus, .field select:focus{ border-color:var(--brass); outline:none; }
.field textarea{ min-height:110px; resize:vertical; }

.pay-opt{
  display:flex; gap:14px; align-items:flex-start;
  border:1px solid var(--line); border-radius:var(--r-lg);
  padding:16px; margin-bottom:12px; cursor:pointer; background:var(--white);
  transition:border-color .18s, background .18s;
}
.pay-opt:hover{ border-color:var(--brass); }
.pay-opt input{ margin-top:5px; accent-color:var(--brass); }
.pay-opt strong{ display:block; font-size:15.5px; }
.pay-opt span{ font-size:13.5px; color:var(--oud-soft); }
.pay-opt.is-off{ opacity:.5; pointer-events:none; }

/* ---------------- ملخص الطلب ---------------- */
.summary{
  background:var(--white); border:1px solid var(--line);
  border-radius:var(--r-lg); padding:24px; position:sticky; top:100px;
}
.summary__row{ display:flex; justify-content:space-between; padding:9px 0; font-size:15px; }
.summary__row--total{
  border-top:1px solid var(--line); margin-top:10px; padding-top:16px;
  font-size:19px; font-weight:600; color:var(--taif);
}

.two-col{ display:grid; grid-template-columns:1.6fr 1fr; gap:34px; align-items:start; }

/* ---------------- رسائل ---------------- */
.flash{ padding:13px 18px; border-radius:var(--r); margin-bottom:22px; font-size:14.5px; }
.flash--ok{ background:#E6F0EA; color:var(--ok); border:1px solid #BDD8C9; }
.flash--err{ background:#F7E7E7; color:var(--err); border:1px solid #E3C3C3; }

.empty{ text-align:center; padding:70px 20px; color:var(--oud-soft); }
.empty h3{ font-size:23px; color:var(--oud); }

/* ---------------- مزايا ---------------- */
.perks{ display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:1px; background:var(--line); border:1px solid var(--line); border-radius:var(--r-lg); overflow:hidden; }
.perk{ background:var(--white); padding:26px 22px; }
.perk b{ display:block; font-family:'Amiri',serif; font-size:18px; margin-bottom:5px; }
.perk span{ font-size:14px; color:var(--oud-soft); }

/* ---------------- الفوتر ---------------- */
.site-footer{ background:var(--oud); color:#C7BAAF; padding-block:52px 26px; margin-top:70px; }
.footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr; gap:40px; }
.site-footer h4{ color:var(--brass-lt); font-size:17px; margin-bottom:14px; }
.site-footer a:hover{ color:var(--brass-lt); }
.site-footer ul{ list-style:none; padding:0; margin:0; }
.site-footer li{ padding:5px 0; font-size:14.5px; }
.footer-bottom{
  border-top:1px solid rgba(217,188,119,.2); margin-top:34px; padding-top:18px;
  font-size:13px; text-align:center; color:#8E8078;
}

/* ---------------- استجابة الشاشات ---------------- */
@media (max-width:900px){
  .hero__inner{ grid-template-columns:1fr; padding-block:56px; gap:34px; }
  .flacon{ display:none; }
  .product{ grid-template-columns:1fr; gap:28px; padding-block:30px; }
  .two-col{ grid-template-columns:1fr; }
  .summary{ position:static; }
  .footer-grid{ grid-template-columns:1fr; gap:26px; }
  .burger{ display:block; margin-inline-start:auto; }
  .nav{
    display:none; width:100%; order:5; flex-direction:column;
    border-top:1px solid var(--line); padding-top:10px; margin-top:6px;
  }
  .nav.is-open{ display:flex; }
  .header-inner{ flex-wrap:wrap; }
}
@media (max-width:520px){
  .grid{ grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:14px; }
  .section{ padding-block:44px; }
  .logo__txt span{ display:none; }
}

@media (prefers-reduced-motion:reduce){
  *{ animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}

@media print{
  .site-header,.site-footer,.topbar,.btn{ display:none; }
}
