/*
Theme Name: Racha Books Child Clean
Theme URI: https://rachabooks.dz
Author: Racha Books
Author URI: https://rachabooks.dz
Description: قالب طفل نظيف لمكتبة رشا الكتب في تلمسان؛ ألوان مضبوطة، نصوص مكتبة، بانر مستوحى من غزال الرشا، وتخصيص كامل للخطوط والألوان.
Template: racha-books-parent-clean
Version: 2.0.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: racha-books-child-clean
Tags: woocommerce, rtl-language-support, arabic, books, bookstore, pwa
*/

:root {
  --majd-primary:       #5B2A86;
  --majd-primary-light: #F5EFFA;
  --majd-dark:       #5B2A86;
  --majd-dark-2:     #2D1547;
  --majd-paper:      #FFF8E8;
  --majd-paper-2:    #FFF8E8;
  --majd-cream:      #FFF8E8;
  --majd-white:      #ffffff;
  --majd-text:       #221629;
  --majd-text-mid:   #6E6174;
  --majd-text-light: #6E6174;
  --majd-border:     #E8D8B8;
  --majd-radius:     10px;
  --majd-radius-sm:  6px;
  --majd-shadow:     0 12px 34px rgba(15,61,46,.10);

  /* توافق مع ملفات CSS الموجودة */
  --majd-primary:    var(--majd-dark);
  --majd-accent:     var(--majd-primary);
  --majd-bg:         var(--majd-paper);
  --majd-radius-lg:  var(--majd-radius);
  --majd-shadow-lg:  var(--majd-shadow);
}

html { direction: rtl; scroll-behavior: smooth; }
body {
  background: var(--majd-paper);
  color: var(--majd-text);
  font-family: "Amiri", serif;
  -webkit-tap-highlight-color: transparent;
}
a { text-decoration: none; }

@media (max-width: 600px) {
  .aw-product__layout-3col,
  .majd-sp__hero { gap: 16px; }
}

body.majd-app-mode .aw-header__strip { display: none !important; }
body.majd-app-mode .site-footer,
body.majd-app-mode .aw-footer { display: block !important; }
body.majd-app-mode .aw-header { position: sticky; top: 0; z-index: 100; }


/* Racha Books clean identity override: library, purple + sand gold */
:root{
  --majd-primary:#5B2A86;
  --majd-dark:#5B2A86;
  --majd-dark-2:#2D1547;
  --majd-accent:#5B2A86;
  --majd-primary:#5B2A86;
  --majd-bg:#FFF8E8;
  --majd-paper:#FFF8E8;
  --majd-text:#221629;
}
html, body, button, input, select, textarea, .site, .site *{
  font-family: "Amiri", serif;
}
body{background:#FFF8E8;color:#221629;}
a{color:#5B2A86;}
a:hover{color:#5B2A86;}
button, .button, .btn, input[type="submit"], .add_to_cart_button, .single_add_to_cart_button, .wp-element-button{
  background:#5B2A86 !important;
  border-color:#5B2A86 !important;
  color:#fff !important;
}
button:hover, .button:hover, .btn:hover, input[type="submit"]:hover, .add_to_cart_button:hover, .single_add_to_cart_button:hover, .wp-element-button:hover{
  background:#5B2A86 !important;
  border-color:#5B2A86 !important;
  color:#221629 !important;
}
.site-header, .aw-header, .main-header, header[role="banner"]{
  border-bottom:1px solid rgba(184,150,69,.28);
}
.site-footer, .aw-footer, footer[role="contentinfo"]{
  background:#5B2A86 !important;
  color:#FFF8E8 !important;
}
.site-footer a, .aw-footer a, footer[role="contentinfo"] a{color:#FFF8E8 !important;}
.site-footer a:hover, .aw-footer a:hover, footer[role="contentinfo"] a:hover{color:#5B2A86 !important;}

/* Al Majd single-colour identity override — dark purple only */
:root{
  --majd-primary:#5B2A86;
  --majd-primary-dark:#2D1547;
  --majd-primary-soft:#F5EFFA;
  --majd-bg:#FFF8E8;
  --majd-text:#221629;
  --majd-muted:#6E6174;
  --majd-border:#E8D8B8;
  --majd-primary:#5B2A86;
  --majd-primary:#5B2A86;
  --majd-primary:#5B2A86;
  --fp-ox:#5B2A86;
  --fp-primary:#5B2A86;
  --primary:#5B2A86;
  --primary:#5B2A86;
}
body{background:#FFF8E8;color:#221629;}
a{color:#5B2A86;}
a:hover{color:#2D1547;}
button,
input[type="submit"],
.button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.majd-btn,
.majd-btn--primary,
.fp-btn,
.fp-btn--primary{
  background:#5B2A86!important;
  color:#FFFFFF!important;
  border-color:#5B2A86!important;
}
button:hover,
input[type="submit"]:hover,
.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.majd-btn:hover,
.fp-btn:hover{
  background:#2D1547!important;
  color:#FFFFFF!important;
  border-color:#2D1547!important;
}
.majd-btn--line,
.fp-btn--outline{
  background:transparent!important;
  color:#5B2A86!important;
  border-color:#5B2A86!important;
}
.majd-btn--line:hover,
.fp-btn--outline:hover{
  background:#5B2A86!important;
  color:#FFFFFF!important;
}
.site-header,
.main-navigation,
.fp-section--purple,
.fp-section--primary,
.majd-hero,
.majd-academic-hero,
.majd-footer,
.site-footer{
  background:#5B2A86!important;
}
.majd-section__title,
.fp-section-title,
.product_title,
.woocommerce-loop-product__title,
h1,h2,h3,h4,h5,h6{
  color:#5B2A86;
}
.majd-hero h1,
.majd-hero h2,
.majd-hero h3,
.majd-hero p,
.fp-section--primary h1,
.fp-section--primary h2,
.fp-section--primary h3,
.fp-section--purple h1,
.fp-section--purple h2,
.fp-section--purple h3,
.site-footer,
.site-footer a,
.majd-footer,
.majd-footer a{
  color:#FFFFFF!important;
}
.card,
.majd-card,
.majd-book-card,
.fp-bk,
.woocommerce ul.products li.product,
.product_meta,
.summary,
.majd-service,
.majd-cat{
  background:#FFFFFF;
  border-color:#E8D8B8!important;
}

/* Final one-colour purple identity pass */
:root{
  --primary:#5B2A86;
  --primary-line:#5B2A86;
  --rule-primary:#5B2A86;
  --rule-primary-lt:#F5EFFA;
  --dark:#5B2A86;
  --dark2:#2D1547;
  --paper:#FFF8E8;
  --ink:#221629;
}
[class*="primary"], [class*="purple"]{border-color:#5B2A86;}



/* =========================================================
   Majd WooCommerce My Account restore
   Fix hidden white account navigation/items after plugin styling.
   ========================================================= */
.woocommerce-account .aw-wc-wrap{
  background:#FFF8E8!important;
  color:#221629!important;
  padding:54px 0 72px!important;
}
.woocommerce-account .aw-wc-wrap .container{
  max-width:1180px!important;
  margin:0 auto!important;
  padding:0 18px!important;
}
.woocommerce-account .aw-wc-wrap .woocommerce{
  background:#fff!important;
  border:1px solid #E8D8B8!important;
  border-radius:14px!important;
  box-shadow:0 18px 46px rgba(15,61,46,.08)!important;
  padding:28px!important;
  color:#221629!important;
  direction:rtl!important;
  overflow:hidden!important;
}
.woocommerce-account .woocommerce::after{
  content:"";
  display:table;
  clear:both;
}
.woocommerce-account .woocommerce,
.woocommerce-account .woocommerce p,
.woocommerce-account .woocommerce div,
.woocommerce-account .woocommerce span,
.woocommerce-account .woocommerce strong,
.woocommerce-account .woocommerce em,
.woocommerce-account .woocommerce mark,
.woocommerce-account .woocommerce small,
.woocommerce-account .woocommerce label,
.woocommerce-account .woocommerce legend,
.woocommerce-account .woocommerce address,
.woocommerce-account .woocommerce td,
.woocommerce-account .woocommerce th{
  color:#221629!important;
}
.woocommerce-account .woocommerce h1,
.woocommerce-account .woocommerce h2,
.woocommerce-account .woocommerce h3,
.woocommerce-account .woocommerce h4{
  color:#5B2A86!important;
}
.woocommerce-account .woocommerce a:not(.button):not(.wp-element-button){
  color:#5B2A86!important;
  text-decoration:none!important;
}
.woocommerce-account .woocommerce a:not(.button):not(.wp-element-button):hover{
  color:#2D1547!important;
  text-decoration:underline!important;
}
.woocommerce-account .woocommerce-MyAccount-navigation{
  width:28%!important;
  float:right!important;
  margin:0 0 0 28px!important;
  background:#FFF8E8!important;
  border:1px solid #E8D8B8!important;
  border-radius:14px!important;
  padding:10px!important;
  box-shadow:none!important;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul{
  list-style:none!important;
  margin:0!important;
  padding:0!important;
  display:block!important;
}
.woocommerce-account .woocommerce-MyAccount-navigation li{
  list-style:none!important;
  margin:0 0 8px!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  display:block!important;
}
.woocommerce-account .woocommerce-MyAccount-navigation li:last-child{margin-bottom:0!important;}
.woocommerce-account .woocommerce-MyAccount-navigation li a{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  min-height:44px!important;
  padding:11px 14px!important;
  border-radius:10px!important;
  background:#fff!important;
  border:1px solid #E8D8B8!important;
  color:#5B2A86!important;
  font-weight:700!important;
  font-size:16px!important;
  line-height:1.5!important;
  opacity:1!important;
  visibility:visible!important;
  text-indent:0!important;
  transform:none!important;
  box-shadow:none!important;
}
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation li a:hover{
  background:#5B2A86!important;
  border-color:#5B2A86!important;
  color:#fff!important;
  text-decoration:none!important;
}
.woocommerce-account .woocommerce-MyAccount-content{
  width:calc(72% - 28px)!important;
  float:left!important;
  color:#221629!important;
  min-height:220px!important;
  background:#fff!important;
  border:0!important;
  padding:4px 0 0!important;
  opacity:1!important;
  visibility:visible!important;
}
.woocommerce-account .woocommerce-MyAccount-content p{
  color:#221629!important;
  font-size:17px!important;
  line-height:1.9!important;
}
.woocommerce-account .woocommerce-MyAccount-content table,
.woocommerce-account .woocommerce table.shop_table{
  background:#fff!important;
  border:1px solid #E8D8B8!important;
  border-radius:12px!important;
  overflow:hidden!important;
  color:#221629!important;
}
.woocommerce-account .woocommerce table.shop_table th{
  background:#FFF8E8!important;
  color:#5B2A86!important;
  font-weight:800!important;
}
.woocommerce-account .woocommerce table.shop_table td{
  color:#221629!important;
}
.woocommerce-account .woocommerce .woocommerce-Button,
.woocommerce-account .woocommerce .button,
.woocommerce-account .woocommerce button.button,
.woocommerce-account .woocommerce input.button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:#5B2A86!important;
  color:#fff!important;
  border:1px solid #5B2A86!important;
  border-radius:10px!important;
  padding:10px 18px!important;
  font-weight:800!important;
  opacity:1!important;
  visibility:visible!important;
}
.woocommerce-account .woocommerce .woocommerce-Button:hover,
.woocommerce-account .woocommerce .button:hover,
.woocommerce-account .woocommerce button.button:hover,
.woocommerce-account .woocommerce input.button:hover{
  background:#2D1547!important;
  border-color:#2D1547!important;
  color:#fff!important;
}
.woocommerce-account .woocommerce form .form-row input.input-text,
.woocommerce-account .woocommerce form .form-row textarea,
.woocommerce-account .woocommerce form .form-row select{
  background:#fff!important;
  color:#221629!important;
  border:1px solid #E8D8B8!important;
  border-radius:10px!important;
}
.woocommerce-account .woocommerce .woocommerce-message,
.woocommerce-account .woocommerce .woocommerce-info,
.woocommerce-account .woocommerce .woocommerce-error{
  background:#FFF8E8!important;
  border-color:#E8D8B8!important;
  color:#221629!important;
}
@media (max-width: 850px){
  .woocommerce-account .aw-wc-wrap .woocommerce{padding:18px!important;}
  .woocommerce-account .woocommerce-MyAccount-navigation,
  .woocommerce-account .woocommerce-MyAccount-content{
    width:100%!important;
    float:none!important;
    margin:0!important;
  }
  .woocommerce-account .woocommerce-MyAccount-navigation{margin-bottom:20px!important;}
  .woocommerce-account .woocommerce-MyAccount-navigation ul{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  .woocommerce-account .woocommerce-MyAccount-navigation li{margin:0!important;}
}
@media (max-width: 520px){
  .woocommerce-account .woocommerce-MyAccount-navigation ul{grid-template-columns:1fr!important;}
}

/* =========================================================
   Majd single product: real shipping/payment panel inside tabs
   ========================================================= */
.majd-sp__shipping-panel{
  direction:rtl;
  background:#fffdf8;
  border:1px solid rgba(15,61,46,.14);
  border-radius:22px;
  padding:24px;
  box-shadow:0 18px 46px rgba(15,61,46,.08);
}
.majd-sp__shipping-hero{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:22px;
  margin-bottom:20px;
  padding-bottom:18px;
  border-bottom:1px solid rgba(15,61,46,.12);
}
.majd-sp__shipping-hero h3{
  margin:6px 0 8px;
  color:#5B2A86!important;
  font-size:24px;
  font-weight:900;
}
.majd-sp__shipping-hero p{
  margin:0;
  color:#6E6174!important;
  font-size:15px;
  line-height:1.9;
  max-width:740px;
}
.majd-sp__eyebrow{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:4px 12px;
  border-radius:999px;
  background:#F5EFFA;
  color:#5B2A86!important;
  font-weight:800;
  font-size:13px;
}
.majd-sp__shipping-origin{
  min-width:210px;
  background:#5B2A86;
  color:#fff;
  border-radius:18px;
  padding:16px 18px;
  box-shadow:0 14px 30px rgba(15,61,46,.18);
}
.majd-sp__shipping-origin span{
  display:block;
  color:rgba(255,255,255,.74)!important;
  font-size:12px;
  margin-bottom:6px;
}
.majd-sp__shipping-origin strong{
  display:block;
  color:#fff!important;
  font-size:16px;
  line-height:1.6;
}
.majd-sp__shipping-grid--real{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
.majd-sp__shipping-card{
  position:relative;
  background:#fff;
  border:1px solid #E8D8B8;
  border-radius:18px;
  padding:20px 20px 18px;
  min-height:150px;
  box-shadow:0 14px 34px rgba(15,61,46,.06);
  overflow:hidden;
}
.majd-sp__shipping-card::before{
  content:"";
  position:absolute;
  inset-inline-start:0;
  top:0;
  width:5px;
  height:100%;
  background:#5B2A86;
  opacity:.9;
}
.majd-sp__shipping-icon{
  width:38px;
  height:38px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#F5EFFA;
  color:#5B2A86;
  font-size:18px;
  margin-bottom:12px;
}
.majd-sp__shipping-card strong{
  display:block;
  color:#5B2A86!important;
  font-size:17px;
  font-weight:900;
  margin-bottom:8px;
}
.majd-sp__shipping-card p{
  margin:0;
  color:#6E6174!important;
  font-size:14px;
  line-height:1.9;
}
.majd-sp__shipping-card small{
  display:block;
  margin-top:9px;
  color:#7A6F60!important;
  font-size:12px;
  line-height:1.7;
}
.majd-sp__shipping-card--rates,
.majd-sp__shipping-card--payment{
  grid-column:auto;
}
.majd-sp__rate-list{
  list-style:none!important;
  padding:0!important;
  margin:10px 0 0!important;
  display:grid;
  gap:9px;
}
.majd-sp__rate-list li{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:10px 12px;
  border:1px solid rgba(15,61,46,.12);
  border-radius:12px;
  background:#FFF8E8;
}
.majd-sp__rate-list li span{
  color:#221629!important;
  font-weight:800;
  font-size:14px;
}
.majd-sp__rate-list li b{
  color:#5B2A86!important;
  font-size:13px;
  font-weight:900;
  text-align:left;
}
.majd-sp__shipping-card--payment .majd-sp__payicons{
  margin-top:12px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.majd-sp__shipping-card--payment .majd-sp__paychip{
  background:#FFF8E8!important;
  color:#5B2A86!important;
  border:1px solid rgba(15,61,46,.18)!important;
  border-radius:999px;
  padding:8px 13px;
  font-weight:900;
  font-size:13px;
  line-height:1;
}
@media (max-width: 900px){
  .majd-sp__shipping-hero{display:block;}
  .majd-sp__shipping-origin{margin-top:16px;min-width:0;}
  .majd-sp__shipping-grid--real{grid-template-columns:1fr;}
}
@media (max-width: 560px){
  .majd-sp__shipping-panel{padding:16px;border-radius:18px;}
  .majd-sp__shipping-hero h3{font-size:21px;}
  .majd-sp__shipping-card{padding:17px;}
  .majd-sp__rate-list li{display:block;}
  .majd-sp__rate-list li b{display:block;margin-top:5px;text-align:right;}
}


/* ═══════════════════════════════════════════════════════
   Racha Books — final identity and WooCommerce layout
   مبني على أكواد قالب مجد، مع ألوان وأيقونات رشا الكتب.
═══════════════════════════════════════════════════════ */
:root{
  --racha-primary:#5B2A86;
  --racha-primary-dark:#2D1547;
  --racha-gold:#D8B36A;
  --racha-paper:#FFF8E8;
  --racha-soft:#F5EFFA;
  --racha-ink:#221629;
  --racha-muted:#6E6174;
  --racha-border:#E8D8B8;
  --majd-primary:#5B2A86;
  --majd-dark:#5B2A86;
  --majd-dark-2:#2D1547;
  --majd-accent:#D8B36A;
  --majd-primary-light:#F5EFFA;
  --majd-bg:#FFF8E8;
  --majd-paper:#FFF8E8;
  --majd-cream:#FFF8E8;
  --majd-border:#E8D8B8;
  --fp-primary:#5B2A86;
  --fp-ox:#5B2A86;
  --primary:#5B2A86;
}
html, body{background:var(--racha-paper); color:var(--racha-ink);}
a{color:var(--racha-primary);} a:hover{color:var(--racha-gold);}
.aw-header__strip{background:var(--racha-primary-dark)!important;color:var(--racha-paper)!important;}
.aw-header__identity,.aw-subnav{background:rgba(250,247,239,.96)!important;border-color:rgba(200,164,93,.25)!important;}
.aw-logo__img{max-height:72px;width:auto;object-fit:contain;}
.aw-logo__sub{color:var(--racha-muted)!important;}
.aw-search__btn, .btn-gold, .button, button, input[type="submit"], .add_to_cart_button, .single_add_to_cart_button{
  background:var(--racha-primary)!important;border-color:var(--racha-primary)!important;color:#fff!important;
}
.aw-search__btn:hover, .btn-gold:hover, .button:hover, button:hover, input[type="submit"]:hover, .add_to_cart_button:hover, .single_add_to_cart_button:hover{
  background:var(--racha-gold)!important;border-color:var(--racha-gold)!important;color:var(--racha-primary-dark)!important;
}
.hero,.spotlight,.news{background:linear-gradient(135deg,var(--racha-primary-dark),var(--racha-primary))!important;}
.hero .hero-eyebrow,.lbl,.price,.woocommerce-Price-amount{color:var(--racha-gold)!important;}
.site-footer,.aw-footer{background:var(--racha-primary-dark)!important;color:var(--racha-paper)!important;}
.aw-footer__logo-img{max-height:74px;width:auto;object-fit:contain;}
.aw-footer__crest{border-color:rgba(200,164,93,.4)!important;}
.aw-footer__col-title{color:var(--racha-gold)!important;}

/* متجر الكتب: حجم عملي مثل مكتبة لا بطاقات ضخمة */
.woocommerce ul.products,
.woocommerce-page ul.products{
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:18px!important;
  margin:0!important;
}
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product{
  width:auto!important;float:none!important;margin:0!important;padding:12px!important;
  background:#fff;border:1px solid var(--racha-border);border-radius:14px;
  box-shadow:0 8px 22px rgba(91,42,134,.06);
}
.woocommerce ul.products li.product a img{
  height:220px!important;width:100%!important;object-fit:contain!important;margin:0 auto 10px!important;background:#fff;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title{
  font-size:14px!important;line-height:1.55!important;min-height:44px;margin:6px 0!important;color:var(--racha-ink)!important;
}
.woocommerce ul.products li.product .price{font-size:14px!important;font-weight:700!important;margin:6px 0!important;}
.woocommerce ul.products li.product .button{font-size:12.5px!important;padding:7px 10px!important;border-radius:9px!important;}

/* صفحة المنتج المفرد */
.woocommerce div.product div.images{max-width:360px!important;}
.woocommerce div.product div.images img{max-height:520px!important;object-fit:contain!important;background:#fff;}
.woocommerce div.product .product_title{font-size:28px!important;line-height:1.35!important;color:var(--racha-primary-dark)!important;}
.woocommerce div.product p.price,
.woocommerce div.product span.price{font-size:20px!important;color:var(--racha-gold)!important;}
.woocommerce div.product .summary{font-size:15px!important;line-height:1.8!important;}

/* وضع التطبيق: واجهة أنظف داخل WebView */
body.majd-app-mode .aw-header__strip{display:none!important;}
body.majd-app-mode .aw-header{position:sticky;top:0;z-index:1000;}
body.majd-app-mode .aw-logo__img{max-height:54px;}

@media (max-width:1180px){.woocommerce ul.products,.woocommerce-page ul.products{grid-template-columns:repeat(5,minmax(0,1fr))!important;}}
@media (max-width:980px){.woocommerce ul.products,.woocommerce-page ul.products{grid-template-columns:repeat(4,minmax(0,1fr))!important;}.woocommerce ul.products li.product a img{height:200px!important;}}
@media (max-width:720px){
  .woocommerce ul.products,.woocommerce-page ul.products{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;}
  .woocommerce ul.products li.product{padding:9px!important;border-radius:12px!important;}
  .woocommerce ul.products li.product a img{height:185px!important;}
  .woocommerce div.product .product_title{font-size:22px!important;}
  .aw-logo__img{max-height:56px;}
}

body.racha-app-mode .aw-header__strip{display:none!important;}
body.racha-app-mode .aw-header{position:sticky;top:0;z-index:1000;}
body.racha-app-mode .aw-logo__img{max-height:54px;}


/* ═══════════════════════════════════════════════════════
   Racha Books — PURPLE + SAND identity override
   لا توجد خلفيات بنفسجية في المتجر أو الهيدر أو الفوتر.
═══════════════════════════════════════════════════════ */
:root{
  --racha-primary:#5B2A86;
  --racha-primary-dark:#2D1547;
  --racha-gold:#D8B36A;
  --racha-paper:#FFF8E8;
  --racha-soft:#F5EFFA;
  --racha-sand:#F8EFD8;
  --racha-ink:#221629;
  --racha-muted:#6E6174;
  --racha-border:#E8D8B8;
  --majd-primary:#5B2A86;
  --majd-dark:#2D1547;
  --majd-dark-2:#2D1547;
  --majd-accent:#D8B36A;
  --majd-primary-light:#F5EFFA;
  --majd-bg:#FFF8E8;
  --majd-paper:#FFF8E8;
  --majd-cream:#FFF8E8;
  --majd-border:#E8D8B8;
  --fp-primary:#5B2A86;
  --fp-ox:#5B2A86;
  --fp-parch:#FFF8E8;
  --fp-parch-d:#F8EFD8;
  --primary:#5B2A86;
  --primary-line:#D8B36A;
}
html,body{background:#FFF8E8!important;color:#221629!important;}
body,.site,.site-main,.content-area,.woocommerce,.woocommerce-page,.aw-page,.page-content{background:#FFF8E8!important;}
a{color:#5B2A86;}a:hover{color:#D8B36A;}
.aw-header__strip,.site-footer,.aw-footer,.hero,.spotlight,.news,.fp-section--green,.fp-section--purple,.fp-pub-banner{
  background:linear-gradient(135deg,#2D1547 0%, #5B2A86 68%, #7A45A0 100%)!important;
  color:#fff!important;
}
.aw-header__identity,.aw-subnav,.main-navigation,.woocommerce-breadcrumb{
  background:rgba(255,248,232,.97)!important;
  border-color:rgba(216,179,106,.32)!important;
}
.aw-logo__img{max-height:72px;width:auto;object-fit:contain;}
.aw-logo__sub,.woocommerce-result-count,.woocommerce .woocommerce-ordering select{color:#6E6174!important;}
.aw-search__btn,.btn-gold,.button,button,input[type="submit"],.add_to_cart_button,.single_add_to_cart_button,.checkout-button{
  background:#5B2A86!important;border-color:#5B2A86!important;color:#fff!important;
}
.aw-search__btn:hover,.btn-gold:hover,.button:hover,button:hover,input[type="submit"]:hover,.add_to_cart_button:hover,.single_add_to_cart_button:hover,.checkout-button:hover{
  background:#D8B36A!important;border-color:#D8B36A!important;color:#2D1547!important;
}
.hero .hero-eyebrow,.lbl,.price,.woocommerce-Price-amount,.aw-footer__col-title,.fp-section-subtitle,.fp-section-eyebrow{color:#D8B36A!important;}
.aw-footer__logo-img{max-height:74px;width:auto;object-fit:contain;}
.aw-footer__crest{border-color:rgba(216,179,106,.45)!important;}

/* Store cards: sand page, white cards, purple buttons */
.woocommerce ul.products,.woocommerce-page ul.products{
  display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:18px!important;margin:0!important;
}
.woocommerce ul.products li.product,.woocommerce-page ul.products li.product{
  width:auto!important;float:none!important;margin:0!important;padding:12px!important;
  background:#fff!important;border:1px solid #E8D8B8!important;border-radius:14px!important;
  box-shadow:0 8px 22px rgba(91,42,134,.07)!important;
}
.woocommerce ul.products li.product a img{
  height:220px!important;width:100%!important;object-fit:contain!important;margin:0 auto 10px!important;background:#fff!important;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title{
  font-size:14px!important;line-height:1.55!important;min-height:44px;margin:6px 0!important;color:#221629!important;
}
.woocommerce ul.products li.product .price{font-size:14px!important;font-weight:700!important;margin:6px 0!important;color:#D8B36A!important;}
.woocommerce ul.products li.product .button{font-size:12.5px!important;padding:7px 10px!important;border-radius:9px!important;}

/* Single product compact */
.woocommerce div.product{background:#FFF8E8!important;}
.woocommerce div.product div.images{max-width:360px!important;}
.woocommerce div.product div.images img{max-height:520px!important;object-fit:contain!important;background:#fff!important;}
.woocommerce div.product .product_title{font-size:28px!important;line-height:1.35!important;color:#2D1547!important;}
.woocommerce div.product p.price,.woocommerce div.product span.price{font-size:20px!important;color:#D8B36A!important;}
.woocommerce div.product .summary{font-size:15px!important;line-height:1.8!important;}
.woocommerce div.product .woocommerce-tabs,.woocommerce div.product .related.products,.woocommerce div.product .upsells.products{background:#fff!important;border-radius:16px;border:1px solid #E8D8B8;padding:18px;}

/* App/WebView foundation */
body.majd-app-mode .aw-header__strip{display:none!important;}
body.majd-app-mode .aw-header{position:sticky;top:0;z-index:1000;}
body.majd-app-mode .aw-logo__img{max-height:54px;}

@media (max-width:1180px){.woocommerce ul.products,.woocommerce-page ul.products{grid-template-columns:repeat(5,minmax(0,1fr))!important;}}
@media (max-width:980px){.woocommerce ul.products,.woocommerce-page ul.products{grid-template-columns:repeat(4,minmax(0,1fr))!important;}.woocommerce ul.products li.product a img{height:200px!important;}}
@media (max-width:720px){
  .woocommerce ul.products,.woocommerce-page ul.products{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;}
  .woocommerce ul.products li.product{padding:9px!important;border-radius:12px!important;}
  .woocommerce ul.products li.product a img{height:185px!important;}
  .woocommerce div.product .product_title{font-size:22px!important;}
  .aw-logo__img{max-height:56px;}
}

/* =========================================================
   Racha Books v1.4.2 — White WooCommerce Shop Background
   الهدف: إزالة الخلفية البنفسجية من صفحة المتجر فقط، مع الحفاظ على
   الهوية البنفسجية في الأزرار والعناوين والروابط.
   ضع هذا الملف كاملًا بدل style.css في القالب الطفل.
   ========================================================= */

/* 1) خلفية صفحة المتجر وأرشيفات المنتجات بيضاء */
body.woocommerce-shop,
body.post-type-archive-product,
body.tax-product_cat,
body.tax-product_tag,
body.tax-pa_book-authors,
body.tax-pa_book_authors,
body.tax-pa_book_author,
body.tax-pa_author,
body.tax-pa_authors,
body.tax-pa_publisher,
body.tax-pa_book-publisher,
body.tax-pa_book_publisher,
body.tax-pa_translator,
body.tax-pa_translators,
body.tax-pa_book-translators,
body.tax-pa_book_translators {
  background: #ffffff !important;
}

/* 2) كل حاويات المتجر الرئيسية بيضاء */
body.woocommerce-shop .site,
body.woocommerce-shop #page,
body.woocommerce-shop #content,
body.woocommerce-shop .site-content,
body.woocommerce-shop .content-area,
body.woocommerce-shop .site-main,
body.woocommerce-shop main,
body.woocommerce-shop .aw-wc-wrap,
body.woocommerce-shop .woocommerce,
body.post-type-archive-product .site,
body.post-type-archive-product #page,
body.post-type-archive-product #content,
body.post-type-archive-product .site-content,
body.post-type-archive-product .content-area,
body.post-type-archive-product .site-main,
body.post-type-archive-product main,
body.post-type-archive-product .aw-wc-wrap,
body.post-type-archive-product .woocommerce,
body.tax-product_cat .site,
body.tax-product_cat #page,
body.tax-product_cat #content,
body.tax-product_cat .site-content,
body.tax-product_cat .content-area,
body.tax-product_cat .site-main,
body.tax-product_cat main,
body.tax-product_cat .aw-wc-wrap,
body.tax-product_cat .woocommerce,
body.tax-product_tag .site,
body.tax-product_tag #page,
body.tax-product_tag #content,
body.tax-product_tag .site-content,
body.tax-product_tag .content-area,
body.tax-product_tag .site-main,
body.tax-product_tag main,
body.tax-product_tag .aw-wc-wrap,
body.tax-product_tag .woocommerce {
  background: #ffffff !important;
}

/* 3) إزالة البنفسجي من عنوان/بانر صفحة المتجر فقط */
body.woocommerce-shop .page-header,
body.woocommerce-shop .archive-header,
body.woocommerce-shop .woocommerce-products-header,
body.woocommerce-shop .shop-hero,
body.woocommerce-shop .racha-hero,
body.woocommerce-shop .racha-shop-hero,
body.woocommerce-shop .majd-hero,
body.woocommerce-shop .majd-academic-hero,
body.woocommerce-shop .fp-section--primary,
body.woocommerce-shop .fp-section--purple,
body.post-type-archive-product .page-header,
body.post-type-archive-product .archive-header,
body.post-type-archive-product .woocommerce-products-header,
body.post-type-archive-product .shop-hero,
body.post-type-archive-product .racha-hero,
body.post-type-archive-product .racha-shop-hero,
body.post-type-archive-product .majd-hero,
body.post-type-archive-product .majd-academic-hero,
body.post-type-archive-product .fp-section--primary,
body.post-type-archive-product .fp-section--purple,
body.tax-product_cat .page-header,
body.tax-product_cat .archive-header,
body.tax-product_cat .woocommerce-products-header,
body.tax-product_cat .shop-hero,
body.tax-product_cat .racha-hero,
body.tax-product_cat .racha-shop-hero,
body.tax-product_cat .majd-hero,
body.tax-product_cat .majd-academic-hero,
body.tax-product_cat .fp-section--primary,
body.tax-product_cat .fp-section--purple {
  background: #ffffff !important;
  background-image: none !important;
  color: #221629 !important;
  border-bottom: 1px solid #f0e5d3 !important;
  box-shadow: none !important;
}

/* 4) ألوان نصوص البانر بعد تحويله للأبيض */
body.woocommerce-shop .page-header *,
body.woocommerce-shop .archive-header *,
body.woocommerce-shop .woocommerce-products-header *,
body.woocommerce-shop .shop-hero *,
body.woocommerce-shop .racha-hero *,
body.woocommerce-shop .racha-shop-hero *,
body.woocommerce-shop .majd-hero *,
body.woocommerce-shop .majd-academic-hero *,
body.post-type-archive-product .page-header *,
body.post-type-archive-product .archive-header *,
body.post-type-archive-product .woocommerce-products-header *,
body.post-type-archive-product .shop-hero *,
body.post-type-archive-product .racha-hero *,
body.post-type-archive-product .racha-shop-hero *,
body.post-type-archive-product .majd-hero *,
body.post-type-archive-product .majd-academic-hero * {
  color: #221629 !important;
}

/* 5) عنوان المتجر بالبنفسجي فقط بدون خلفية */
body.woocommerce-shop .woocommerce-products-header__title,
body.post-type-archive-product .woocommerce-products-header__title,
body.tax-product_cat .woocommerce-products-header__title,
body.tax-product_tag .woocommerce-products-header__title,
body.woocommerce-shop h1,
body.post-type-archive-product h1,
body.tax-product_cat h1,
body.tax-product_tag h1 {
  color: #5B2A86 !important;
  background: transparent !important;
}

/* 6) ترتيب شريط عدد النتائج والفرز */
body.woocommerce-shop .woocommerce-result-count,
body.post-type-archive-product .woocommerce-result-count,
body.tax-product_cat .woocommerce-result-count,
body.tax-product_tag .woocommerce-result-count {
  color: #6E6174 !important;
  font-size: 14px !important;
}

body.woocommerce-shop .woocommerce-ordering select,
body.post-type-archive-product .woocommerce-ordering select,
body.tax-product_cat .woocommerce-ordering select,
body.tax-product_tag .woocommerce-ordering select {
  background: #ffffff !important;
  color: #221629 !important;
  border: 1px solid #E8D8B8 !important;
  border-radius: 10px !important;
  padding: 8px 12px !important;
}

/* 7) بطاقات الكتب بيضاء ونظيفة */
body.woocommerce-shop ul.products li.product,
body.post-type-archive-product ul.products li.product,
body.tax-product_cat ul.products li.product,
body.tax-product_tag ul.products li.product {
  background: #ffffff !important;
  border: 1px solid #eee4d2 !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 22px rgba(45, 21, 71, 0.06) !important;
  padding: 12px !important;
  overflow: hidden !important;
}

body.woocommerce-shop ul.products li.product:hover,
body.post-type-archive-product ul.products li.product:hover,
body.tax-product_cat ul.products li.product:hover,
body.tax-product_tag ul.products li.product:hover {
  box-shadow: 0 12px 28px rgba(45, 21, 71, 0.10) !important;
  transform: translateY(-2px);
}

/* 8) صور الكتب بحجم مناسب للمتجر */
body.woocommerce-shop ul.products li.product a img,
body.post-type-archive-product ul.products li.product a img,
body.tax-product_cat ul.products li.product a img,
body.tax-product_tag ul.products li.product a img {
  background: #ffffff !important;
  width: 100% !important;
  max-height: 260px !important;
  object-fit: contain !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  margin: 0 auto 10px !important;
}

/* 9) الكتابة داخل بطاقة الكتاب */
body.woocommerce-shop ul.products li.product .woocommerce-loop-product__title,
body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
body.tax-product_tag ul.products li.product .woocommerce-loop-product__title {
  color: #221629 !important;
  font-size: 15px !important;
  line-height: 1.45 !important;
  font-weight: 700 !important;
  min-height: 42px !important;
  margin: 8px 0 6px !important;
}

body.woocommerce-shop ul.products li.product .price,
body.post-type-archive-product ul.products li.product .price,
body.tax-product_cat ul.products li.product .price,
body.tax-product_tag ul.products li.product .price {
  color: #5B2A86 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  margin: 6px 0 8px !important;
}

/* 10) زر الشراء يبقى بنفسجيًا لكن بحجم مرتب */
body.woocommerce-shop ul.products li.product .button,
body.post-type-archive-product ul.products li.product .button,
body.tax-product_cat ul.products li.product .button,
body.tax-product_tag ul.products li.product .button {
  background: #5B2A86 !important;
  color: #ffffff !important;
  border: 1px solid #5B2A86 !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  padding: 8px 12px !important;
  min-height: auto !important;
}

body.woocommerce-shop ul.products li.product .button:hover,
body.post-type-archive-product ul.products li.product .button:hover,
body.tax-product_cat ul.products li.product .button:hover,
body.tax-product_tag ul.products li.product .button:hover {
  background: #2D1547 !important;
  color: #ffffff !important;
  border-color: #2D1547 !important;
}

/* 11) شبكة المتجر: كتب أكثر في السطر مثل مواقع المكتبات */
@media (min-width: 1200px) {
  body.woocommerce-shop.woocommerce ul.products,
  body.post-type-archive-product.woocommerce ul.products,
  body.tax-product_cat.woocommerce ul.products,
  body.tax-product_tag.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 18px !important;
  }
}

@media (min-width: 900px) and (max-width: 1199px) {
  body.woocommerce-shop.woocommerce ul.products,
  body.post-type-archive-product.woocommerce ul.products,
  body.tax-product_cat.woocommerce ul.products,
  body.tax-product_tag.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
}

@media (min-width: 640px) and (max-width: 899px) {
  body.woocommerce-shop.woocommerce ul.products,
  body.post-type-archive-product.woocommerce ul.products,
  body.tax-product_cat.woocommerce ul.products,
  body.tax-product_tag.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }
}

@media (max-width: 639px) {
  body.woocommerce-shop.woocommerce ul.products,
  body.post-type-archive-product.woocommerce ul.products,
  body.tax-product_cat.woocommerce ul.products,
  body.tax-product_tag.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  body.woocommerce-shop ul.products li.product,
  body.post-type-archive-product ul.products li.product,
  body.tax-product_cat ul.products li.product,
  body.tax-product_tag ul.products li.product {
    padding: 9px !important;
    border-radius: 12px !important;
  }

  body.woocommerce-shop ul.products li.product a img,
  body.post-type-archive-product ul.products li.product a img,
  body.tax-product_cat ul.products li.product a img,
  body.tax-product_tag ul.products li.product a img {
    max-height: 210px !important;
  }

  body.woocommerce-shop ul.products li.product .woocommerce-loop-product__title,
  body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
  body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
  body.tax-product_tag ul.products li.product .woocommerce-loop-product__title {
    font-size: 13px !important;
    min-height: 38px !important;
  }
}

/* 12) منع WooCommerce من فرض float قديم على المنتجات عند استخدام grid */
body.woocommerce-shop.woocommerce ul.products li.product,
body.post-type-archive-product.woocommerce ul.products li.product,
body.tax-product_cat.woocommerce ul.products li.product,
body.tax-product_tag.woocommerce ul.products li.product {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  clear: none !important;
}

/* 13) الترقيم أسفل المتجر */
body.woocommerce-shop .woocommerce-pagination,
body.post-type-archive-product .woocommerce-pagination,
body.tax-product_cat .woocommerce-pagination,
body.tax-product_tag .woocommerce-pagination {
  background: #ffffff !important;
  margin-top: 34px !important;
}

body.woocommerce-shop .woocommerce-pagination ul,
body.post-type-archive-product .woocommerce-pagination ul,
body.tax-product_cat .woocommerce-pagination ul,
body.tax-product_tag .woocommerce-pagination ul {
  border: none !important;
}

body.woocommerce-shop .woocommerce-pagination ul li,
body.post-type-archive-product .woocommerce-pagination ul li,
body.tax-product_cat .woocommerce-pagination ul li,
body.tax-product_tag .woocommerce-pagination ul li {
  border: none !important;
  margin: 0 3px !important;
}

body.woocommerce-shop .woocommerce-pagination ul li a,
body.woocommerce-shop .woocommerce-pagination ul li span,
body.post-type-archive-product .woocommerce-pagination ul li a,
body.post-type-archive-product .woocommerce-pagination ul li span,
body.tax-product_cat .woocommerce-pagination ul li a,
body.tax-product_cat .woocommerce-pagination ul li span,
body.tax-product_tag .woocommerce-pagination ul li a,
body.tax-product_tag .woocommerce-pagination ul li span {
  background: #ffffff !important;
  color: #5B2A86 !important;
  border: 1px solid #E8D8B8 !important;
  border-radius: 8px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  line-height: 34px !important;
  padding: 0 10px !important;
}

body.woocommerce-shop .woocommerce-pagination ul li span.current,
body.post-type-archive-product .woocommerce-pagination ul li span.current,
body.tax-product_cat .woocommerce-pagination ul li span.current,
body.tax-product_tag .woocommerce-pagination ul li span.current {
  background: #5B2A86 !important;
  color: #ffffff !important;
  border-color: #5B2A86 !important;
}

/* 14) الرسائل والتنبيهات داخل المتجر */
body.woocommerce-shop .woocommerce-message,
body.woocommerce-shop .woocommerce-info,
body.woocommerce-shop .woocommerce-error,
body.post-type-archive-product .woocommerce-message,
body.post-type-archive-product .woocommerce-info,
body.post-type-archive-product .woocommerce-error {
  background: #ffffff !important;
  color: #221629 !important;
  border-top-color: #5B2A86 !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 22px rgba(45, 21, 71, 0.06) !important;
}


/* =========================================================
   Racha Books v1.5.2 — Shop product title control fix
   السبب: صفحة المتجر تستخدم كلاس خاص ap-book-card__title وليس فقط WooCommerce loop title.
   الآن خيار "حجم عنوان الكتاب في المتجر" يتحكم في العنوان داخل صفحة المتجر.
========================================================= */
html body.woocommerce-shop .ap-grid .ap-book-card .ap-book-card__title,
html body.post-type-archive-product .ap-grid .ap-book-card .ap-book-card__title,
html body.tax-product_cat .ap-grid .ap-book-card .ap-book-card__title,
html body.tax-product_tag .ap-grid .ap-book-card .ap-book-card__title,
html body .ap-grid .ap-book-card .ap-book-card__title,
html body.woocommerce-shop .ap-grid .ap-book-card .ap-book-card__title a,
html body.post-type-archive-product .ap-grid .ap-book-card .ap-book-card__title a,
html body.tax-product_cat .ap-grid .ap-book-card .ap-book-card__title a,
html body.tax-product_tag .ap-grid .ap-book-card .ap-book-card__title a,
html body .ap-grid .ap-book-card .ap-book-card__title a {
  font-family: var(--racha-font-product-title, "Amiri", serif) !important;
  font-size: var(--racha-size-product-title, 13px) !important;
  font-weight: var(--racha-weight-product-title, 600) !important;
  line-height: var(--racha-line-products, 1.42) !important;
  color: var(--racha-product-title, #221629) !important;
  letter-spacing: 0 !important;
}

html body .ap-book-card__title {
  margin: 4px 0 6px !important;
  min-height: auto !important;
  max-height: none !important;
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
}

html body .ap-book-card__author {
  font-family: var(--racha-font-body, "Amiri", serif) !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
}

/* ضمان أن عناوين WooCommerce العادية أيضًا تتبع نفس الخيار */
html body.woocommerce-shop ul.products li.product .woocommerce-loop-product__title,
html body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
html body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
html body.tax-product_tag ul.products li.product .woocommerce-loop-product__title,
html body.woocommerce ul.products li.product .woocommerce-loop-product__title,
html body.woocommerce ul.products li.product h2.woocommerce-loop-product__title,
html body.woocommerce ul.products li.product h3.woocommerce-loop-product__title,
html body .products .product .woocommerce-loop-product__title {
  font-size: var(--racha-size-product-title, 14px) !important;
  font-family: var(--racha-font-product-title, "Amiri", serif) !important;
  font-weight: var(--racha-weight-product-title, 600) !important;
  line-height: var(--racha-line-products, 1.42) !important;
}

/* ═══════════════════════════════════════════════════════
   حماية نهائية — حجم عناوين المنتجات (شبكة المتجر + المنتج المفرد)
   تمنع تضخم العنوان حتى لو لم تُحقن متغيرات المخصِّص
   ═══════════════════════════════════════════════════════ */
html body .ap-book-card__title,
html body .ap-book-card__title a,
html body ul.products li.product .woocommerce-loop-product__title,
html body ul.products li.product h2,
html body ul.products li.product h3 {
  font-size: var(--racha-size-product-title, 14px) !important;
  font-weight: var(--racha-weight-product-title, 600) !important;
  line-height: var(--racha-line-products, 1.45) !important;
  font-family: "Amiri", serif !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}
html body.single-product .majd-sp__title,
html body.single-product .product_title,
html body.woocommerce div.product .product_title {
  font-size: var(--racha-size-single-title, 28px) !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  font-family: "Amiri", serif !important;
}
@media (max-width: 720px) {
  html body.single-product .majd-sp__title,
  html body.single-product .product_title,
  html body.woocommerce div.product .product_title {
    font-size: 20px !important;
  }
}
