/*
Theme Name: HASD - حصد
Theme URI: https://7a9ied.example
Author: فريق حصد
Description: قالب ووردبريس مخصص لعلامة حصد التجارية (منتجات إسلامية إيمانية)، مبني بالكامل على دليل الهوية البصرية الرسمي: الألوان، الخطوط، النبرة، وتخطيط الصفحات. متوافق مع ووكومرس لاستقبال الطلبات مباشرة.
Version: 1.0
Requires PHP: 7.4
Text Domain: hasd
*/

:root{
  --olive:#7C8B4A;
  --olive-deep:#5f6c39;
  --olive-pale:#eef1e4;
  --beige:#E8DCC3;
  --ivory:#FBF8F2;
  --gold:#C9A84C;
  --brown:#B08D68;
  --ink:#2B2B27;
  --ink-soft:#6b6558;
  --card:#ffffff;
  --border:#e7dfcc;
  --shadow:0 1px 2px rgba(43,43,39,.05), 0 12px 32px -16px rgba(124,139,74,.25);
  --radius:14px;
}
@media (prefers-color-scheme: dark){
  :root{
    --ivory:#1b1c15; --beige:#28291f; --olive-pale:#20241a;
    --ink:#f1ece0; --ink-soft:#b9b19c;
    --card:#212217; --border:#38392a;
    --olive:#9db070; --olive-deep:#c3d199;
    --gold:#d9bd6d; --brown:#c7a883;
    --shadow:0 1px 2px rgba(0,0,0,.35), 0 12px 32px -16px rgba(0,0,0,.5);
  }
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--ivory);color:var(--ink);
  font-family:"Cairo","Almarai",Tahoma,Arial,sans-serif;
  direction:rtl;line-height:1.75;overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}
h1,h2,h3,h4,h5{font-family:"Almarai","Cairo",Tahoma,sans-serif;font-weight:800;text-wrap:balance;color:var(--ink)}
.accent{color:var(--gold)}

/* ---------- nav ---------- */
.site-nav{
  position:sticky;top:0;z-index:50;
  background:rgba(251,248,242,.92);
  backdrop-filter:blur(8px);
  border-bottom:1px solid var(--border);
}
@media (prefers-color-scheme: dark){ .site-nav{ background:rgba(27,28,21,.92); } }
.nav-inner{
  max-width:1120px;margin:0 auto;padding:14px 24px;
  display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;
}
.brand{display:flex;align-items:center;gap:8px;font-weight:800;font-size:1.15rem;color:var(--olive-deep)}
.brand em{font-style:normal;font-size:.7rem;letter-spacing:.12em;color:var(--gold);font-weight:800}
.brand img{max-height:44px;width:auto}
.nav-links{display:flex;gap:24px;list-style:none;margin:0;padding:0;font-size:.92rem}
.nav-links a{opacity:.85}
.nav-links a:hover{opacity:1;color:var(--olive-deep)}
.nav-cart{
  font-size:.88rem;font-weight:700;background:var(--olive);color:var(--ivory);
  padding:9px 16px;border-radius:999px;
}
@media (max-width:760px){.nav-links{display:none}}

/* ---------- hero ---------- */
.hero{
  background:linear-gradient(160deg,var(--beige) 0%, var(--ivory) 62%);
  border-bottom:1px solid var(--border);
}
.hero-inner{max-width:1120px;margin:0 auto;padding:70px 24px 60px}
.eyebrow{
  display:inline-flex;align-items:center;gap:8px;
  font-size:.78rem;font-weight:700;color:var(--olive-deep);
  background:var(--card);border:1px solid var(--border);border-radius:999px;
  padding:6px 14px;margin-bottom:20px;
}
.hero h1{font-size:clamp(2rem,4.6vw,3.1rem);margin:0 0 18px;line-height:1.25}
.hero-sub{font-size:1.08rem;color:var(--ink-soft);max-width:48ch;margin:0 0 30px;text-wrap:balance}
.hero-cta{display:flex;gap:14px;flex-wrap:wrap}
.btn{
  display:inline-flex;align-items:center;gap:8px;
  padding:14px 26px;border-radius:10px;font-weight:700;font-size:.95rem;
  border:1px solid transparent;cursor:pointer;
}
.btn-primary{background:var(--olive);color:var(--ivory)}
.btn-ghost{background:transparent;color:var(--ink);border-color:var(--border)}

/* ---------- values ---------- */
.values-wrap{border-bottom:1px solid var(--border)}
.values-inner{
  max-width:1120px;margin:0 auto;padding:34px 24px;
  display:grid;grid-template-columns:repeat(4,1fr);gap:22px;
}
@media (max-width:760px){.values-inner{grid-template-columns:repeat(2,1fr)}}
.value{text-align:center}
.value .dot{
  width:38px;height:38px;border-radius:50%;background:var(--olive-pale);
  display:flex;align-items:center;justify-content:center;margin:0 auto 10px;
  color:var(--olive-deep);font-weight:800;
}
.value h4{margin:0 0 4px;font-size:.9rem}
.value p{margin:0;font-size:.78rem;color:var(--ink-soft)}

/* ---------- generic sections ---------- */
section{max-width:1120px;margin:0 auto;padding:64px 24px}
.section-head{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:30px;gap:16px;flex-wrap:wrap}
.section-head h2{font-size:1.5rem;margin:0}
.section-head p{margin:4px 0 0;color:var(--ink-soft);font-size:.92rem}

.about{background:var(--olive-pale);border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.about-inner{max-width:900px;margin:0 auto;padding:70px 24px;text-align:center}
.about blockquote{
  font-size:clamp(1.2rem,2.6vw,1.6rem);font-weight:800;margin:0 0 16px;
  color:var(--olive-deep);text-wrap:balance;font-family:"Almarai","Cairo",sans-serif;
}
.about p{color:var(--ink-soft);max-width:56ch;margin:0 auto;font-size:.95rem}

.page-content{max-width:800px}
.page-content h1{margin-bottom:20px}

/* ---------- footer ---------- */
.site-footer{border-top:1px solid var(--border);background:var(--beige)}
.footer-inner{
  max-width:1120px;margin:0 auto;padding:44px 24px 30px;
  display:flex;justify-content:space-between;gap:30px;flex-wrap:wrap;
}
.footer-inner p{font-size:.85rem;color:var(--ink-soft);max-width:36ch;margin:8px 0 0}
.footer-inner ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:7px}
.footer-inner h5{margin:0 0 10px;font-size:.85rem;color:var(--olive-deep)}
.foot-bottom{
  max-width:1120px;margin:0 auto;padding:16px 24px 26px;
  border-top:1px solid var(--border);font-size:.75rem;color:var(--ink-soft);
}

/* ---------- WooCommerce overrides ---------- */
.woocommerce-wrap{max-width:1120px;margin:0 auto;padding:50px 24px}
.woocommerce ul.products{
  display:grid !important;grid-template-columns:repeat(4,1fr);gap:20px;list-style:none;margin:0;padding:0;
}
@media (max-width:920px){.woocommerce ul.products{grid-template-columns:repeat(2,1fr)}}
@media (max-width:520px){.woocommerce ul.products{grid-template-columns:1fr}}
.woocommerce ul.products li.product{
  background:var(--card);border:1px solid var(--border);border-radius:16px;
  box-shadow:var(--shadow);padding:16px;text-align:center;
}
.woocommerce ul.products li.product img{border-radius:10px;margin-bottom:12px}
.woocommerce ul.products li.product a.woocommerce-loop-product__link{
  position:relative;display:block;
}
.woocommerce ul.products li.product.outofstock img{opacity:.5}

/* ---------- product badges (سولد اوت / الأكثر مبيعًا / جديد) ---------- */
.hasd-badges{
  position:absolute;top:10px;inset-inline-start:10px;z-index:5;
  display:flex;flex-direction:column;gap:6px;align-items:flex-start;
}
.hasd-badge{
  font-size:.68rem;font-weight:800;padding:4px 11px;border-radius:999px;
  letter-spacing:.02em;white-space:nowrap;box-shadow:0 2px 6px rgba(0,0,0,.15);
}
.hasd-badge-soldout{background:var(--ink-soft);color:var(--ivory)}
.hasd-badge-new{background:var(--olive);color:var(--ivory)}
.hasd-badge-bestseller{background:var(--gold);color:var(--ink)}
.woocommerce ul.products li.product .woocommerce-loop-product__title{font-size:1rem;margin:0 0 6px;color:var(--ink)}
.woocommerce ul.products li.product .price{color:var(--olive-deep);font-weight:800}
.woocommerce ul.products li.product .button{
  display:inline-block;margin-top:10px;background:var(--olive-pale);color:var(--olive-deep) !important;
  border-radius:8px;padding:9px 16px;font-size:.82rem;font-weight:700;border:none;
}
.woocommerce div.product .summary .price{color:var(--olive-deep);font-size:1.4rem;font-weight:800}
.woocommerce div.product form.cart .button,
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button{
  background:var(--olive) !important;color:var(--ivory) !important;
  border-radius:10px !important;padding:12px 26px !important;font-weight:700 !important;border:none !important;
}
.woocommerce table.shop_table{border-color:var(--border)}
.woocommerce-message, .woocommerce-info{
  border-top-color:var(--olive) !important;
}
.woocommerce-message::before, .woocommerce-info::before{color:var(--olive) !important}
.woocommerce ::selection{background:var(--gold);color:var(--ink)}
