/* Al Majd visual contrast and app/PWA readiness fixes */
:root{
  --majd-green:#0F3D2E;
  --majd-green-deep:#08261C;
  --majd-cream:#FAF8F1;
  --majd-ink:#1F1A13;
  --majd-line:#DDE7E1;
}
body{font-family:'Amiri',serif;color:var(--majd-ink);background:var(--majd-cream)}

/* تمنع مشكلة نص أخضر فوق زر أخضر */
a.button,button.button,input.button,.button,.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,.single_add_to_cart_button,.checkout-button,.added_to_cart,
.majd-buy__btn--solid,.majd-buy__btn--primary,.majd-book-card__cart-btn,.ap-book-card__cart-btn,.aw-nav__link--cart,.wp-element-button{
  background:var(--majd-green)!important;
  color:#fff!important;
  border-color:var(--majd-green)!important;
  text-decoration:none!important;
}
a.button:hover,button.button:hover,input.button:hover,.button:hover,.woocommerce a.button:hover,.woocommerce button.button:hover,.woocommerce input.button:hover,.single_add_to_cart_button:hover,.checkout-button:hover,.added_to_cart:hover,
.majd-buy__btn--solid:hover,.majd-buy__btn--primary:hover,.majd-book-card__cart-btn:hover,.ap-book-card__cart-btn:hover,.aw-nav__link--cart:hover,.wp-element-button:hover{
  background:var(--majd-green-deep)!important;
  color:#fff!important;
  border-color:var(--majd-green-deep)!important;
}
.majd-book-card__view-btn{background:var(--majd-green)!important;color:#fff!important;border-color:var(--majd-green)!important}
.majd-book-card__view-btn:hover{background:var(--majd-green-deep)!important;color:#fff!important}
.aw-nav__link:not(.aw-nav__link--cart){background:#fff!important;color:var(--majd-green)!important;border-color:var(--majd-line)!important}
.aw-nav__link:not(.aw-nav__link--cart):hover{background:#E8F0EC!important;color:var(--majd-green-deep)!important}
.aw-search__btn{color:var(--majd-green)!important;background:#fff!important;border-color:var(--majd-line)!important}
.aw-search__btn:hover{background:var(--majd-green)!important;color:#fff!important}
.woocommerce-tabs ul.tabs li.active a,.woocommerce div.product .woocommerce-tabs ul.tabs li.active a{color:#fff!important;background:var(--majd-green)!important}
.woocommerce-tabs ul.tabs li a{color:var(--majd-green)!important}
.woocommerce-tabs ul.tabs li.active a{color:#fff!important}

/* Logo layout */
.aw-logo{display:flex!important;align-items:center;gap:14px;text-decoration:none!important;color:inherit!important}
.aw-logo__media{width:70px;height:70px;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.aw-logo__img{max-width:70px;max-height:70px;width:auto;height:auto;object-fit:contain;display:block}
.aw-logo__seal{width:58px;height:58px;border-radius:50%;background:var(--majd-green);color:#fff;display:flex;align-items:center;justify-content:center;font-family:'Aref Ruqaa','Amiri',serif;font-weight:700;font-size:22px;border:1px solid rgba(15,61,46,.25);box-shadow:inset 0 0 0 5px rgba(255,255,255,.08)}
.aw-logo__text{display:flex;flex-direction:column;line-height:1.25}
.aw-footer__brand-head{display:flex;align-items:center;gap:14px;margin-bottom:14px}
.aw-footer__logo-img{max-width:82px;max-height:82px;width:auto;height:auto;object-fit:contain;display:block}
.aw-footer__logo-seal{width:62px;height:62px;border-radius:50%;background:#fff;color:var(--majd-green);display:flex;align-items:center;justify-content:center;font-family:'Aref Ruqaa','Amiri',serif;font-size:23px;font-weight:700}

/* Auto cover for catalogue/archive placeholders */
.ap-book-card__cover-placeholder,.majd-book-card__cover-placeholder{
  background:linear-gradient(155deg,#14513D,#08261C)!important;
  color:#fff!important;
  position:relative;
  border:1px solid rgba(232,240,236,.28);
}
.ap-book-card__cover-placeholder::after,.majd-book-card__cover-placeholder::after{
  content:"";position:absolute;inset:10px;border:1px solid rgba(232,240,236,.4);border-radius:8px;pointer-events:none;
}
.ap-book-card__cover-placeholder-pub,.majd-book-card__cover-placeholder-pub{color:#E8F0EC!important}
.ap-book-card__cover-placeholder-rule,.majd-book-card__cover-placeholder-rule{background:#E8F0EC!important}

/* App mode: واجهة أخف عند فتح الموقع كتطبيق */
body.majd-app-mode .aw-header__strip{display:none!important}
body.majd-app-mode .aw-header{position:sticky;top:0;z-index:999}
body.majd-app-mode .aw-subnav__inner{overflow-x:auto;white-space:nowrap;scrollbar-width:none}
body.majd-app-mode .aw-subnav__inner::-webkit-scrollbar{display:none}
body.majd-app-mode .aw-footer{padding-bottom:env(safe-area-inset-bottom)}

@media(max-width:768px){
  .aw-logo__media{width:54px;height:54px}.aw-logo__img{max-width:54px;max-height:54px}.aw-logo__seal{width:48px;height:48px;font-size:18px}
  .aw-logo__name{font-size:18px!important}.aw-logo__sub{font-size:12px!important}
}


/* Final hard contrast pass: never allow green text on green buttons */
.aw-header .aw-nav__link:not(.aw-nav__link--cart),
.aw-header .aw-nav__link:not(.aw-nav__link--cart) span{
  background:#fff!important;
  color:var(--majd-green)!important;
}
.aw-header .aw-nav__link:not(.aw-nav__link--cart) svg{
  color:var(--majd-green)!important;
  stroke:var(--majd-green)!important;
}
.aw-header .aw-nav__link--cart,
.aw-header .aw-nav__link--cart span,
.aw-header .aw-nav__link--cart svg{
  background:var(--majd-green)!important;
  color:#fff!important;
  stroke:#fff!important;
}
.aw-search__btn, .aw-search__btn svg{color:var(--majd-green)!important;stroke:var(--majd-green)!important}
.aw-search__btn:hover, .aw-search__btn:hover svg{background:var(--majd-green)!important;color:#fff!important;stroke:#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{
  color:#fff!important;
}
.woocommerce-tabs ul.tabs li.active a, .majd-sp__tab.is-active{
  background:var(--majd-green)!important;
  color:#fff!important;
}
.woocommerce-tabs ul.tabs li:not(.active) a{
  background:#fff!important;
  color:var(--majd-green)!important;
}


/* =========================================================
   V4.0.4 — Final colour and mobile catalogue pass
   - لا نسمح بنص أخضر فوق خلفية خضراء.
   - نترك إضافات YITH تتصرف طبيعيًا في الرئيسية، ونضبطها فقط في صفحة المتجر.
   - تحسين اتساق كروت المتجر على الهاتف.
   ========================================================= */

/* active/current green items must always keep readable white text */
.aw-subnav__inner > .current-menu-item > a,
.aw-subnav__inner .current-menu-item > a,
.aw-subnav__inner .current_page_item > a,
.aw-subnav__inner .current-menu-ancestor > a,
.aw-subnav__inner > a[aria-current="page"],
.aw-subnav__link[aria-current="page"],
.ap-sort-pill.is-active,
.ap-sidebar__cat-link.is-active,
.ap-pagination .page-numbers.current,
.woocommerce-pagination .page-numbers.current,
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active > a,
.woocommerce-account .woocommerce-MyAccount-navigation li > a:hover,
.woocommerce-tabs ul.tabs li.active > a,
.majd-sp__tab.is-active,
.page-numbers.current{
  background:var(--majd-green)!important;
  border-color:var(--majd-green)!important;
  color:#fff!important;
  opacity:1!important;
  text-shadow:none!important;
}
.aw-subnav__inner > .current-menu-item > a *,
.aw-subnav__inner .current-menu-item > a *,
.aw-subnav__inner .current_page_item > a *,
.aw-subnav__inner .current-menu-ancestor > a *,
.aw-subnav__inner > a[aria-current="page"] *,
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active > a *,
.woocommerce-account .woocommerce-MyAccount-navigation li > a:hover *,
.woocommerce-tabs ul.tabs li.active > a *,
.majd-sp__tab.is-active *,
.ap-sort-pill.is-active *,
.ap-sidebar__cat-link.is-active *,
.page-numbers.current *{
  color:#fff!important;
  fill:#fff!important;
  stroke:#fff!important;
}

/* stronger, clearer main menu text */
.aw-subnav__inner > a,
.aw-subnav__inner .menu-item > a,
.aw-subnav__link{
  color:rgba(255,255,255,.88)!important;
  font-weight:700!important;
  font-size:15px!important;
}
.aw-subnav__inner > a:hover,
.aw-subnav__inner .menu-item > a:hover,
.aw-subnav__link:hover{
  color:#fff!important;
}

/* WooCommerce My Account: keep active item readable even when WooCommerce injects spans/icons */
body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation li.is-active > a,
body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation li.is-active > a:visited,
body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation li.is-active > a:hover{
  color:#fff!important;
  background:var(--majd-green)!important;
  border-color:var(--majd-green)!important;
}
body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation li.is-active > a span,
body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation li.is-active > a svg,
body.woocommerce-account .woocommerce .woocommerce-MyAccount-navigation li.is-active > a i{
  color:#fff!important;
  fill:#fff!important;
  stroke:#fff!important;
}

/* Front page: no custom Wishlist/Quick View overlay. Product cards stay clean. */
.majd-front .book-card .majd-yith-actions,
.majd-front .book-card .yith-wcwl-add-to-wishlist,
.majd-front .book-card .yith-wcqv-button,
.majd-front .book-card .feedback{
  display:none!important;
}

/* Shop / catalogue mobile consistency */
@media(max-width:760px){
  .ap-page{overflow:hidden;}
  .ap-container{padding-inline:14px!important;}
  .ap-header{padding:24px 0 20px!important;}
  .ap-header__title{font-size:1.55rem!important;}
  .ap-sort-bar{position:static!important;}
  .ap-sort-bar__inner{align-items:flex-start!important;}
  .ap-sort-bar__pills{width:100%;overflow-x:auto;flex-wrap:nowrap;padding-bottom:4px;scrollbar-width:none;}
  .ap-sort-bar__pills::-webkit-scrollbar{display:none;}
  .ap-sort-pill{flex:0 0 auto;white-space:nowrap;}
  .ap-body{display:block!important;padding:18px 0 42px!important;}
  .ap-sidebar{position:static!important;margin-bottom:18px!important;}
  .ap-sidebar__block{border-radius:12px!important;}
  .ap-sidebar__cats{display:flex!important;gap:8px!important;overflow-x:auto!important;padding:10px!important;scrollbar-width:none!important;}
  .ap-sidebar__cats::-webkit-scrollbar{display:none;}
  .ap-sidebar__cat-link{flex:0 0 auto;border:1px solid var(--ap-bdr)!important;border-radius:999px!important;background:#fff!important;padding:7px 12px!important;gap:6px!important;}
  .ap-sidebar__cat-link.is-active{background:var(--majd-green)!important;color:#fff!important;border-color:var(--majd-green)!important;}
  .ap-sidebar__pub-note{font-size:13px!important;}
  .ap-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important;align-items:stretch!important;}
  .ap-book-card{border-radius:18px!important;overflow:hidden!important;min-width:0!important;box-shadow:0 10px 28px -22px rgba(8,38,28,.45)!important;}
  .ap-book-card:hover{transform:none!important;}
  .ap-book-card__cover{aspect-ratio:3/4.35!important;background:#fff!important;}
  .ap-book-card__cover img{width:100%!important;height:100%!important;object-fit:cover!important;}
  .ap-book-card__badge{top:8px!important;right:8px!important;border-radius:999px!important;font-size:10px!important;padding:4px 8px!important;}
  .ap-book-card__actions{opacity:1!important;transform:none!important;top:8px!important;left:8px!important;right:8px!important;}
  .ap-book-card .yith-wcqv-button{min-height:34px!important;padding:7px 9px!important;font-size:11px!important;}
  .ap-book-card .yith-wcwl-add-to-wishlist .add_to_wishlist,
  .ap-book-card .yith-wcwl-wishlistaddedbrowse a,
  .ap-book-card .yith-wcwl-wishlistexistsbrowse a{width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;}
  .ap-book-card__body{padding:11px 10px 12px!important;gap:4px!important;}
  .ap-book-card__cat{font-size:10px!important;letter-spacing:.04em!important;}
  .ap-book-card__title{font-size:17px!important;line-height:1.5!important;min-height:52px!important;-webkit-line-clamp:2!important;text-align:center!important;}
  .ap-book-card__author{font-size:13px!important;text-align:center!important;min-height:22px!important;}
  .ap-book-card__footer{display:block!important;text-align:center!important;padding-top:8px!important;}
  .ap-book-card__price{display:block!important;margin-bottom:9px!important;font-size:18px!important;}
  .ap-book-card__price del{font-size:13px!important;margin-inline-start:4px!important;}
  .ap-book-card__cart-btn,
  .ap-book-card__read-btn{width:100%!important;min-height:42px!important;border-radius:12px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;font-size:14px!important;font-weight:700!important;padding:10px 8px!important;}
}
@media(max-width:380px){
  .ap-container{padding-inline:10px!important;}
  .ap-grid{gap:10px!important;}
  .ap-book-card__title{font-size:15px!important;min-height:48px!important;}
  .ap-book-card__price{font-size:16px!important;}
  .ap-book-card__cart-btn{font-size:13px!important;}
}

/* =========================================================
   V4.0.5 — Footer + mobile shop stability pass
   - الفوتر لا يختفي في وضع التطبيق/الموبايل.
   - نلغي تأثير درج الفلاتر القديم من القالب الأب عبر archive-product.php.
   - نثبت عرض المتجر على الهاتف ونمنع انزياح أرقام الصفحات يمينًا.
   ========================================================= */

body.majd-app-mode .site-footer,
body.majd-app-mode .aw-footer,
body.majd-app-mode footer[role="contentinfo"]{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
}
body.majd-app-mode .aw-footer{padding-bottom:max(18px, env(safe-area-inset-bottom, 0px))!important;}

/* Active green backgrounds: child text/counters stay readable */
.ap-sort-pill.is-active,
.ap-sort-pill.is-active:visited,
.ap-sidebar__cat-link.is-active,
.ap-sidebar__cat-link.is-active:visited,
.ap-pagination .page-numbers.current,
.woocommerce nav.woocommerce-pagination .page-numbers.current,
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active > a,
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active > a:visited{
  color:#fff!important;
}
.ap-sidebar__cat-link.is-active .ap-sidebar__cat-count,
.ap-sidebar__cat-link.is-active span,
.ap-sort-pill.is-active span,
.ap-pagination .page-numbers.current span{
  color:#fff!important;
  background:rgba(255,255,255,.16)!important;
}

/* Pagination should never float outside the phone viewport */
.ap-pagination,
.woocommerce nav.woocommerce-pagination{
  width:100%!important;
  max-width:100%!important;
  clear:both!important;
  float:none!important;
  position:static!important;
  inset:auto!important;
  margin:28px auto 0!important;
  padding:0!important;
  text-align:center!important;
  overflow:visible!important;
  direction:rtl!important;
}
.ap-pagination .woocommerce-pagination ul,
.woocommerce nav.woocommerce-pagination ul,
.woocommerce-pagination ul.page-numbers{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  width:auto!important;
  max-width:100%!important;
  margin:0 auto!important;
  padding:0!important;
  border:0!important;
  float:none!important;
  position:static!important;
  right:auto!important;
  left:auto!important;
  transform:none!important;
  list-style:none!important;
}
.ap-pagination .woocommerce-pagination ul li,
.woocommerce nav.woocommerce-pagination ul li{
  float:none!important;
  display:block!important;
  border:0!important;
  margin:0!important;
  padding:0!important;
}
.ap-pagination .page-numbers,
.woocommerce nav.woocommerce-pagination .page-numbers{
  box-sizing:border-box!important;
}

@media(max-width:760px){
  html,body{overflow-x:hidden!important;}
  .ap-page,
  .woocommerce.archive,
  body.post-type-archive-product{
    overflow-x:hidden!important;
  }
  .ap-container{
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    padding-inline:14px!important;
    margin-inline:auto!important;
  }
  .ap-body{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    padding:16px 0 42px!important;
    margin:0!important;
    overflow:visible!important;
  }
  .ap-body > main{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    float:none!important;
    clear:both!important;
    overflow:visible!important;
  }

  /* Keep our own sidebar compact on mobile; no tall blank area. */
  .ap-sidebar{
    display:block!important;
    position:static!important;
    width:100%!important;
    max-width:100%!important;
    margin:0 0 16px!important;
    padding:0!important;
    float:none!important;
    transform:none!important;
    min-height:0!important;
    height:auto!important;
    overflow:visible!important;
  }
  .ap-sidebar__block:first-child{display:none!important;}
  .ap-sidebar__block{
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    border-radius:14px!important;
    box-shadow:0 10px 24px rgba(15,61,46,.06)!important;
    overflow:hidden!important;
  }
  .ap-sidebar__block-title{
    padding:10px 14px!important;
    font-size:13px!important;
    letter-spacing:0!important;
    text-transform:none!important;
  }
  .ap-sidebar__cats{
    display:flex!important;
    flex-direction:row!important;
    gap:8px!important;
    width:100%!important;
    max-width:100%!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    padding:10px!important;
    margin:0!important;
    white-space:nowrap!important;
    scrollbar-width:none!important;
    -webkit-overflow-scrolling:touch!important;
  }
  .ap-sidebar__cats::-webkit-scrollbar{display:none!important;}
  .ap-sidebar__cat-link{
    flex:0 0 auto!important;
    display:inline-flex!important;
    width:auto!important;
    max-width:none!important;
    min-height:36px!important;
    align-items:center!important;
    justify-content:center!important;
    border:1px solid var(--ap-bdr,#DDE7E1)!important;
    border-radius:999px!important;
    background:#fff!important;
    padding:7px 12px!important;
    color:var(--majd-green,#0F3D2E)!important;
  }

  .ap-grid{
    width:100%!important;
    max-width:100%!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:14px!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
  }
  .ap-grid > *,
  .ap-book-card{min-width:0!important;max-width:100%!important;}

  .ap-pagination,
  .woocommerce nav.woocommerce-pagination{
    margin-top:24px!important;
    padding-inline:0!important;
    overflow:hidden!important;
  }
  .ap-pagination .woocommerce-pagination ul,
  .woocommerce nav.woocommerce-pagination ul,
  .woocommerce-pagination ul.page-numbers{
    justify-content:center!important;
    gap:6px!important;
    width:100%!important;
  }
  .ap-pagination .page-numbers,
  .woocommerce nav.woocommerce-pagination .page-numbers{
    min-width:38px!important;
    height:38px!important;
    padding:0 10px!important;
    border-radius:10px!important;
  }
}

/* =========================================================
   V4.0.6 — Footer, social icons, wishlist heart and mobile menu
   ========================================================= */

/* Header logo: stable position and size on desktop and mobile */
.aw-header__inner{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:24px!important;
  min-height:116px!important;
}
.aw-logo{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  flex-direction:row!important;
  gap:16px!important;
  flex:0 0 260px!important;
  max-width:260px!important;
  min-width:0!important;
  padding-inline-start:18px!important;
  padding-inline-end:0!important;
  border-inline-start:3px solid var(--majd-green,#0F3D2E)!important;
  border-left:0!important;
  overflow:visible!important;
}
.aw-logo__media{
  width:76px!important;
  height:76px!important;
  flex:0 0 76px!important;
}
.aw-logo__img{
  width:auto!important;
  height:auto!important;
  max-width:74px!important;
  max-height:74px!important;
  object-fit:contain!important;
}
.aw-logo__text{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  min-width:0!important;
  line-height:1.45!important;
}
.aw-logo__name{
  font-size:21px!important;
  line-height:1.45!important;
  color:var(--majd-green,#0F3D2E)!important;
  white-space:normal!important;
}
.aw-logo__sub{
  font-size:13px!important;
  letter-spacing:0!important;
  color:rgba(15,61,46,.78)!important;
  white-space:normal!important;
  text-transform:none!important;
}
.aw-search{flex:1 1 auto!important;min-width:240px!important;max-width:720px!important;}
.aw-nav{flex:0 0 auto!important;}

/* Mobile dropdown menu button */
.aw-mobile-menu-toggle{display:none;}
@media(max-width:760px){
  .aw-header__identity .container{width:100%!important;max-width:100%!important;padding-inline:22px!important;box-sizing:border-box!important;}
  .aw-header__inner{
    min-height:170px!important;
    display:grid!important;
    grid-template-columns:minmax(145px, 39%) minmax(0, 1fr)!important;
    grid-template-areas:"logo tools"!important;
    gap:14px!important;
    align-items:center!important;
  }
  .aw-logo{
    grid-area:logo!important;
    flex:initial!important;
    max-width:100%!important;
    width:100%!important;
    gap:10px!important;
    padding-inline-start:12px!important;
    border-inline-start:3px solid var(--majd-green,#0F3D2E)!important;
  }
  .aw-logo__media{width:52px!important;height:52px!important;flex-basis:52px!important;}
  .aw-logo__img{max-width:52px!important;max-height:52px!important;}
  .aw-logo__name{font-size:16px!important;line-height:1.5!important;}
  .aw-logo__sub{font-size:11px!important;line-height:1.5!important;}
  .aw-search{grid-area:tools!important;min-width:0!important;width:100%!important;max-width:none!important;}
  .aw-nav{grid-area:tools!important;justify-self:start!important;align-self:end!important;display:flex!important;gap:8px!important;margin-top:72px!important;z-index:2!important;}
  .aw-nav__link span:not(.aw-nav__cart-count){display:none!important;}
  .aw-nav__link{width:46px!important;height:46px!important;border-radius:14px!important;padding:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;}
  .aw-nav__link svg{width:20px!important;height:20px!important;}
  .aw-search__form{height:46px!important;border-radius:999px!important;max-width:210px!important;margin-inline-start:auto!important;}
  .aw-search__input{height:46px!important;font-size:18px!important;padding-inline:18px!important;}
  .aw-search__btn{width:46px!important;height:46px!important;}

  .aw-subnav{padding:0!important;background:var(--majd-green-deep,#08261C)!important;}
  .aw-subnav .container{width:100%!important;max-width:100%!important;padding-inline:16px!important;box-sizing:border-box!important;}
  .aw-mobile-menu-toggle{
    display:flex!important;
    width:100%!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:12px!important;
    min-height:56px!important;
    padding:0 6px!important;
    background:transparent!important;
    border:0!important;
    color:#fff!important;
    font-family:'Amiri',serif!important;
    font-size:21px!important;
    font-weight:700!important;
    box-shadow:none!important;
  }
  .aw-mobile-menu-toggle__icon{display:grid!important;gap:5px!important;width:28px!important;}
  .aw-mobile-menu-toggle__icon span{display:block!important;height:2px!important;background:#fff!important;border-radius:99px!important;}
  .aw-subnav__inner{
    display:none!important;
    flex-direction:column!important;
    gap:0!important;
    width:100%!important;
    padding:0 0 10px!important;
    overflow:visible!important;
    white-space:normal!important;
  }
  .aw-subnav.is-open .aw-subnav__inner{display:flex!important;}
  .aw-subnav__inner > a,
  .aw-subnav__inner .menu-item,
  .aw-subnav__inner .menu-item > a,
  .aw-subnav__link{
    width:100%!important;
    box-sizing:border-box!important;
    display:block!important;
  }
  .aw-subnav__inner > a,
  .aw-subnav__inner .menu-item > a,
  .aw-subnav__link{
    padding:14px 16px!important;
    border:1px solid rgba(255,255,255,.08)!important;
    border-radius:12px!important;
    margin:6px 0 0!important;
    background:rgba(255,255,255,.045)!important;
    color:#fff!important;
    font-size:18px!important;
    text-align:right!important;
  }
}

/* Footer: readable, richer and compatible with WordPress dashicons */
.aw-footer,
body.woocommerce-page .aw-footer,
body.woocommerce-shop .aw-footer{
  background:#08261C!important;
  color:rgba(250,248,241,.82)!important;
}
.aw-footer *{box-sizing:border-box;}
.aw-footer__crest-name,
.aw-footer__brand-name,
.aw-footer__col-title,
.aw-footer__desc,
.aw-footer__brand-desc,
.aw-footer__address,
.aw-footer__bottom,
.aw-footer__bottom span,
.aw-footer p,
.aw-footer li,
.aw-footer span,
body.woocommerce-page .aw-footer__crest-name,
body.woocommerce-page .aw-footer__brand-name,
body.woocommerce-page .aw-footer__col-title{
  color:rgba(250,248,241,.86)!important;
}
.aw-footer__col-title{color:#fff!important;}
.aw-footer a{color:rgba(250,248,241,.86)!important;}
.aw-footer a:hover{color:#D8C68A!important;}
.aw-footer__brand-head{
  display:flex!important;
  align-items:center!important;
  gap:16px!important;
  margin-bottom:16px!important;
}
.aw-footer__logo-img{
  width:auto!important;
  height:auto!important;
  max-width:92px!important;
  max-height:92px!important;
  object-fit:contain!important;
  background:#fff!important;
  border-radius:4px!important;
  padding:4px!important;
}
.aw-footer__social,
.aw-footer__quick-actions{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  flex-wrap:wrap!important;
  margin-top:16px!important;
}
.aw-footer__social-link,
.aw-footer__wishlist-cta{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:42px!important;
  height:42px!important;
  border:1px solid rgba(216,198,138,.34)!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.06)!important;
  color:#fff!important;
  text-decoration:none!important;
  transition:background .2s ease, transform .2s ease, color .2s ease, border-color .2s ease!important;
}
.aw-footer__social-link .dashicons,
.aw-footer__wishlist-cta .dashicons{
  color:inherit!important;
  font-size:20px!important;
  width:20px!important;
  height:20px!important;
  line-height:20px!important;
}
.aw-footer__social-link:hover,
.aw-footer__wishlist-cta:hover{
  background:#fff!important;
  color:var(--majd-green,#0F3D2E)!important;
  border-color:#fff!important;
  transform:translateY(-2px)!important;
}
.aw-footer__wishlist-cta{
  gap:8px!important;
  padding:0 16px!important;
  min-width:auto!important;
  font-weight:700!important;
}
.aw-footer__wishlist-cta span:last-child{color:inherit!important;}
.aw-footer__col ul{list-style:none!important;margin:0!important;padding:0!important;}

@media(max-width:760px){
  .aw-footer{padding-top:34px!important;margin-top:38px!important;text-align:right!important;}
  .aw-footer .container{width:100%!important;max-width:100%!important;padding-inline:28px!important;}
  .aw-footer__crest{padding:22px 0 20px!important;}
  .aw-footer__crest-tagline{font-size:13px!important;letter-spacing:.12em!important;line-height:1.8!important;flex-wrap:wrap!important;}
  .aw-footer__main{grid-template-columns:1fr!important;gap:28px!important;padding:30px 0 28px!important;}
  .aw-footer__brand-head{justify-content:center!important;text-align:center!important;}
  .aw-footer__logo-img{max-width:78px!important;max-height:78px!important;}
  .aw-footer__brand-name{font-size:24px!important;line-height:1.7!important;}
  .aw-footer__brand-desc,.aw-footer__address{text-align:center!important;font-size:17px!important;line-height:2!important;}
  .aw-footer__social,.aw-footer__quick-actions{justify-content:center!important;}
  .aw-footer__col{border-top:1px solid rgba(216,198,138,.18)!important;padding-top:18px!important;}
  .aw-footer__col-title{font-size:24px!important;letter-spacing:0!important;text-transform:none!important;text-align:right!important;}
  .aw-footer__col ul{gap:12px!important;}
  .aw-footer__col ul li a{font-size:20px!important;line-height:1.9!important;color:#fff!important;}
  .aw-footer__bottom{display:block!important;text-align:center!important;font-size:14px!important;line-height:1.9!important;padding-bottom:28px!important;}
}

/* =========================================================
   V4.0.7 — Mobile header order fix
   يضع الشعار في سطر مستقل، والبحث/السلة/الحساب في سطر واحد دون تداخل.
   ========================================================= */
@media (max-width: 760px) {
  .aw-header__identity{
    background:#fff!important;
    padding:0!important;
    overflow:hidden!important;
  }

  .aw-header__identity .container{
    width:100%!important;
    max-width:100%!important;
    padding:18px 16px 16px!important;
    box-sizing:border-box!important;
  }

  .aw-header__inner{
    min-height:0!important;
    height:auto!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:
      "logo logo"
      "search actions"!important;
    row-gap:16px!important;
    column-gap:12px!important;
    align-items:center!important;
    justify-content:stretch!important;
    direction:ltr!important;
  }

  .aw-logo{
    grid-area:logo!important;
    direction:rtl!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    flex:none!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:center!important;
    gap:14px!important;
    padding:0!important;
    padding-inline-start:14px!important;
    border-inline-start:3px solid #0F3D2E!important;
    border-left:0!important;
    line-height:1.4!important;
    overflow:visible!important;
  }

  .aw-logo__media{
    width:58px!important;
    height:58px!important;
    flex:0 0 58px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }

  .aw-logo__img{
    width:auto!important;
    height:auto!important;
    max-width:58px!important;
    max-height:58px!important;
    object-fit:contain!important;
    display:block!important;
  }

  .aw-logo__text{
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:center!important;
    max-width:230px!important;
    min-width:0!important;
    line-height:1.45!important;
    text-align:right!important;
    white-space:normal!important;
  }

  .aw-logo__name{
    display:block!important;
    font-size:18px!important;
    line-height:1.45!important;
    color:#0F3D2E!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }

  .aw-logo__sub{
    display:block!important;
    font-size:12px!important;
    line-height:1.45!important;
    color:rgba(15,61,46,.78)!important;
    letter-spacing:0!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }

  .aw-search{
    grid-area:search!important;
    direction:rtl!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    align-self:center!important;
  }

  .aw-search__form{
    width:100%!important;
    max-width:100%!important;
    height:50px!important;
    margin:0!important;
    display:flex!important;
    align-items:center!important;
    border-radius:999px!important;
    overflow:hidden!important;
  }

  .aw-search__input{
    min-width:0!important;
    width:100%!important;
    height:50px!important;
    font-size:18px!important;
    padding:0 16px!important;
    line-height:50px!important;
  }

  .aw-search__btn{
    flex:0 0 50px!important;
    width:50px!important;
    height:50px!important;
    min-width:50px!important;
    margin:0!important;
    border-radius:0!important;
  }

  .aw-nav{
    grid-area:actions!important;
    direction:rtl!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:8px!important;
    margin:0!important;
    padding:0!important;
    width:auto!important;
    min-width:104px!important;
    position:static!important;
    transform:none!important;
    z-index:1!important;
    align-self:center!important;
  }

  .aw-nav__link{
    width:48px!important;
    height:48px!important;
    min-width:48px!important;
    flex:0 0 48px!important;
    margin:0!important;
    padding:0!important;
    border-radius:15px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    position:relative!important;
  }

  .aw-nav__link span:not(.aw-nav__cart-count){
    display:none!important;
  }

  .aw-nav__link svg{
    width:21px!important;
    height:21px!important;
  }

  .aw-nav__cart-count{
    position:absolute!important;
    top:-7px!important;
    inset-inline-start:-7px!important;
    min-width:20px!important;
    height:20px!important;
    border-radius:999px!important;
    font-size:12px!important;
    line-height:20px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    background:#fff!important;
    color:#0F3D2E!important;
    border:1px solid #DDE7E1!important;
  }
}

@media (max-width: 420px) {
  .aw-header__identity .container{
    padding-inline:12px!important;
  }
  .aw-header__inner{
    column-gap:8px!important;
  }
  .aw-logo{
    justify-content:flex-end!important;
    gap:10px!important;
  }
  .aw-logo__media{
    width:50px!important;
    height:50px!important;
    flex-basis:50px!important;
  }
  .aw-logo__img{
    max-width:50px!important;
    max-height:50px!important;
  }
  .aw-logo__text{
    max-width:190px!important;
  }
  .aw-logo__name{
    font-size:16px!important;
  }
  .aw-logo__sub{
    font-size:11px!important;
  }
  .aw-nav{
    gap:6px!important;
    min-width:96px!important;
  }
  .aw-nav__link{
    width:45px!important;
    height:45px!important;
    min-width:45px!important;
    flex-basis:45px!important;
  }
}


/* =========================================================
   V4.0.8 — Clean mobile header final override
   يمنع تكسير الشعار والنص، ويجعل الهيدر على الهاتف مرتباً:
   الشعار في سطر، البحث + السلة + الحساب في سطر مستقل.
   ========================================================= */
@media (max-width: 760px) {
  html body .aw-header__identity{
    background:#fff!important;
    padding:0!important;
    overflow:visible!important;
  }

  html body .aw-header__identity .container{
    width:100%!important;
    max-width:100%!important;
    padding:14px 14px 16px!important;
    box-sizing:border-box!important;
  }

  html body .aw-header__inner{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:
      "brand brand"
      "search actions"!important;
    gap:14px 10px!important;
    align-items:center!important;
    justify-content:stretch!important;
    min-height:0!important;
    height:auto!important;
    width:100%!important;
    direction:rtl!important;
  }

  html body .aw-logo,
  html body a.aw-logo{
    grid-area:brand!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    flex:none!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:center!important;
    gap:0!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    line-height:1!important;
    overflow:visible!important;
    text-decoration:none!important;
  }

  html body .aw-logo__media{
    width:70px!important;
    height:70px!important;
    flex:0 0 70px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    margin:0 auto!important;
    padding:0!important;
  }

  html body .aw-logo__img{
    display:block!important;
    width:auto!important;
    height:auto!important;
    max-width:70px!important;
    max-height:70px!important;
    object-fit:contain!important;
    margin:0!important;
    filter:none!important;
  }

  /* على الهاتف نكتفي برمز الشعار حتى لا يتحول اسم المؤسسة إلى أسطر عمودية */
  html body .aw-logo__text,
  html body .aw-logo__name,
  html body .aw-logo__sub{
    display:none!important;
  }

  html body .aw-search{
    grid-area:search!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    align-self:center!important;
  }

  html body .aw-search__form{
    width:100%!important;
    max-width:100%!important;
    height:50px!important;
    min-height:50px!important;
    margin:0!important;
    display:flex!important;
    align-items:center!important;
    border-radius:999px!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }

  html body .aw-search__input{
    width:100%!important;
    min-width:0!important;
    height:50px!important;
    line-height:50px!important;
    font-size:18px!important;
    padding:0 16px!important;
    box-sizing:border-box!important;
  }

  html body .aw-search__btn{
    flex:0 0 50px!important;
    width:50px!important;
    min-width:50px!important;
    height:50px!important;
    margin:0!important;
    border-radius:0!important;
  }

  html body .aw-nav{
    grid-area:actions!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:8px!important;
    width:auto!important;
    min-width:104px!important;
    margin:0!important;
    padding:0!important;
    position:static!important;
    transform:none!important;
    z-index:3!important;
    align-self:center!important;
  }

  html body .aw-nav__link{
    width:48px!important;
    height:48px!important;
    min-width:48px!important;
    flex:0 0 48px!important;
    margin:0!important;
    padding:0!important;
    border-radius:15px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    position:relative!important;
    box-sizing:border-box!important;
  }

  html body .aw-nav__link span:not(.aw-nav__cart-count){
    display:none!important;
  }

  html body .aw-nav__link svg{
    width:21px!important;
    height:21px!important;
  }

  html body .aw-nav__cart-count{
    position:absolute!important;
    top:-7px!important;
    inset-inline-start:-7px!important;
    min-width:21px!important;
    height:21px!important;
    padding:0 5px!important;
    border-radius:999px!important;
    font-size:12px!important;
    line-height:21px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    background:#fff!important;
    color:#0F3D2E!important;
    border:1px solid #DDE7E1!important;
    box-shadow:0 4px 12px rgba(15,61,46,.15)!important;
  }

  html body .aw-subnav{
    margin-top:0!important;
  }
}

@media (max-width: 420px) {
  html body .aw-header__identity .container{
    padding:12px 12px 14px!important;
  }
  html body .aw-header__inner{
    grid-template-columns:minmax(0,1fr) 96px!important;
    gap:12px 8px!important;
  }
  html body .aw-logo__media{
    width:62px!important;
    height:62px!important;
    flex-basis:62px!important;
  }
  html body .aw-logo__img{
    max-width:62px!important;
    max-height:62px!important;
  }
  html body .aw-nav{
    gap:6px!important;
    min-width:96px!important;
  }
  html body .aw-nav__link{
    width:45px!important;
    height:45px!important;
    min-width:45px!important;
    flex-basis:45px!important;
  }
  html body .aw-search__form,
  html body .aw-search__input,
  html body .aw-search__btn{
    height:46px!important;
    min-height:46px!important;
    line-height:46px!important;
  }
  html body .aw-search__btn{
    width:46px!important;
    min-width:46px!important;
    flex-basis:46px!important;
  }
  html body .aw-search__input{
    font-size:17px!important;
    padding-inline:14px!important;
  }
}


/* =========================================================
   V4.0.9 — Mobile header identity with logo + separator + text
   يظهر رمز الشعار وبجانبه اسم المؤسسة المختصر مع خط فاصل أنيق.
   ========================================================= */
@media (max-width: 760px) {
  html body .aw-header__identity{
    background:#fff!important;
    padding:0!important;
    overflow:visible!important;
  }

  html body .aw-header__identity .container{
    width:100%!important;
    max-width:100%!important;
    padding:14px 16px 16px!important;
    box-sizing:border-box!important;
  }

  html body .aw-header__inner{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:
      "brand brand"
      "search actions"!important;
    gap:14px 10px!important;
    align-items:center!important;
    width:100%!important;
    direction:rtl!important;
  }

  html body .aw-logo,
  html body a.aw-logo{
    grid-area:brand!important;
    width:100%!important;
    max-width:100%!important;
    display:flex!important;
    flex-direction:row!important;
    direction:rtl!important;
    align-items:center!important;
    justify-content:center!important;
    gap:13px!important;
    margin:0!important;
    padding:0!important;
    line-height:1.2!important;
    overflow:visible!important;
    text-decoration:none!important;
    color:#0F3D2E!important;
  }

  html body .aw-logo__media{
    order:1!important;
    width:58px!important;
    height:58px!important;
    flex:0 0 58px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    margin:0!important;
    padding:0!important;
  }

  html body .aw-logo__img{
    display:block!important;
    width:auto!important;
    height:auto!important;
    max-width:58px!important;
    max-height:58px!important;
    object-fit:contain!important;
    margin:0!important;
    filter:none!important;
  }

  html body .aw-logo::after{
    content:""!important;
    order:2!important;
    display:block!important;
    width:4px!important;
    height:76px!important;
    background:#0F3D2E!important;
    border-radius:99px!important;
    flex:0 0 4px!important;
    opacity:1!important;
    margin:0 2px!important;
  }

  html body .aw-logo__text{
    order:3!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:center!important;
    width:auto!important;
    max-width:210px!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    color:#0F3D2E!important;
    text-align:right!important;
    white-space:normal!important;
  }

  html body .aw-logo__name,
  html body .aw-logo__sub{
    display:none!important;
  }

  html body .aw-logo__text::before{
    content:"المؤسسة الجامعية\A للدراسات والنشر – مجد\A بيروت 1975"!important;
    display:block!important;
    white-space:pre-line!important;
    color:#0F3D2E!important;
    font-family:"Amiri", "Aref Ruqaa", serif!important;
    font-size:15px!important;
    font-weight:700!important;
    line-height:1.55!important;
    letter-spacing:0!important;
  }

  html body .aw-search{
    grid-area:search!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    align-self:center!important;
  }

  html body .aw-search__form{
    width:100%!important;
    max-width:100%!important;
    height:50px!important;
    min-height:50px!important;
    margin:0!important;
    display:flex!important;
    align-items:center!important;
    border-radius:999px!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }

  html body .aw-search__input{
    width:100%!important;
    min-width:0!important;
    height:50px!important;
    line-height:50px!important;
    font-size:17px!important;
    padding:0 15px!important;
    box-sizing:border-box!important;
  }

  html body .aw-search__btn{
    flex:0 0 50px!important;
    width:50px!important;
    min-width:50px!important;
    height:50px!important;
    margin:0!important;
    border-radius:0!important;
  }

  html body .aw-nav{
    grid-area:actions!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:8px!important;
    width:auto!important;
    min-width:104px!important;
    margin:0!important;
    padding:0!important;
    position:static!important;
    transform:none!important;
    z-index:3!important;
    align-self:center!important;
  }

  html body .aw-nav__link{
    width:48px!important;
    height:48px!important;
    min-width:48px!important;
    flex:0 0 48px!important;
    margin:0!important;
    padding:0!important;
    border-radius:15px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    position:relative!important;
    box-sizing:border-box!important;
  }

  html body .aw-nav__link span:not(.aw-nav__cart-count){
    display:none!important;
  }

  html body .aw-nav__link svg{
    width:21px!important;
    height:21px!important;
  }

  html body .aw-nav__cart-count{
    position:absolute!important;
    top:-7px!important;
    inset-inline-start:-7px!important;
    min-width:21px!important;
    height:21px!important;
    padding:0 5px!important;
    border-radius:999px!important;
    font-size:12px!important;
    line-height:21px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    background:#fff!important;
    color:#0F3D2E!important;
    border:1px solid #DDE7E1!important;
    box-shadow:0 4px 12px rgba(15,61,46,.15)!important;
  }

  html body .aw-subnav{
    margin-top:0!important;
  }
}

@media (max-width: 420px) {
  html body .aw-header__identity .container{
    padding:12px 12px 14px!important;
  }
  html body .aw-header__inner{
    grid-template-columns:minmax(0,1fr) 96px!important;
    gap:12px 8px!important;
  }
  html body .aw-logo,
  html body a.aw-logo{
    gap:10px!important;
    justify-content:center!important;
  }
  html body .aw-logo__media{
    width:50px!important;
    height:50px!important;
    flex-basis:50px!important;
  }
  html body .aw-logo__img{
    max-width:50px!important;
    max-height:50px!important;
  }
  html body .aw-logo::after{
    height:72px!important;
    width:4px!important;
    flex-basis:4px!important;
  }
  html body .aw-logo__text{
    max-width:185px!important;
  }
  html body .aw-logo__text::before{
    font-size:14px!important;
    line-height:1.55!important;
  }
  html body .aw-nav{
    gap:6px!important;
    min-width:96px!important;
  }
  html body .aw-nav__link{
    width:45px!important;
    height:45px!important;
    min-width:45px!important;
    flex-basis:45px!important;
  }
  html body .aw-search__form,
  html body .aw-search__input,
  html body .aw-search__btn{
    height:46px!important;
    min-height:46px!important;
    line-height:46px!important;
  }
  html body .aw-search__btn{
    width:46px!important;
    min-width:46px!important;
    flex-basis:46px!important;
  }
  html body .aw-search__input{
    font-size:16px!important;
    padding-inline:13px!important;
  }
}

@media (max-width: 360px) {
  html body .aw-logo__text{
    max-width:165px!important;
  }
  html body .aw-logo__text::before{
    font-size:13px!important;
  }
  html body .aw-logo__media{
    width:46px!important;
    height:46px!important;
    flex-basis:46px!important;
  }
  html body .aw-logo__img{
    max-width:46px!important;
    max-height:46px!important;
  }
}
