/* Zein Publisher Child v0.4.0
   Compact product sliders, true publication-date ordering UI,
   and a cleaner one-button mobile navigation. */

/* ─────────────────────────────────────────────────────────────
   Mobile navigation: a single modern “القائمة” control.
───────────────────────────────────────────────────────────── */
@media (max-width:720px){
  body .aw-subnav .container{
    padding:9px 14px 11px!important;
  }
  body .aw-subnav__mobile-head,
  body .zl-mobile-nav-head{
    display:flex!important;
    width:100%!important;
    justify-content:stretch!important;
    align-items:center!important;
    grid-template-columns:none!important;
    gap:0!important;
  }
  body .aw-mobile-home-link{
    display:none!important;
  }
  body .aw-mobile-menu-toggle{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:48px!important;
    padding:0 18px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:14px!important;
    border-radius:15px!important;
    background:#fff!important;
    color:#5B0F1A!important;
    border:1px solid #E4D5CA!important;
    box-shadow:0 8px 22px rgba(53,7,13,.07)!important;
    font-family:"Cairo",Tahoma,Arial,sans-serif!important;
    font-size:15px!important;
    font-weight:600!important;
    letter-spacing:0!important;
  }
  body .aw-mobile-menu-toggle:hover,
  body .aw-mobile-menu-toggle:focus-visible{
    background:#FBF6F1!important;
    border-color:#C8A46A!important;
    color:#35070D!important;
  }
  body .aw-mobile-menu-toggle__icon{
    width:22px!important;
    height:15px!important;
    flex:0 0 22px!important;
  }
  body .aw-mobile-menu-toggle__icon i{
    height:1.8px!important;
    background:currentColor!important;
  }
  body .zl-mobile-menu-panel__head{
    min-height:86px!important;
    background:linear-gradient(145deg,#35070D 0%,#5B0F1A 72%,#6D1721 100%)!important;
  }
  body .zl-mobile-menu-panel__head strong{
    font-size:21px!important;
    font-weight:600!important;
  }
  body .zl-mobile-menu-panel__links{
    gap:0!important;
    border-top:1px solid #EDE1D8!important;
  }
  body .zl-mobile-menu-panel__links > a,
  body .zl-mobile-menu-panel__links > li > a,
  body .zl-mobile-menu-panel__links .menu-item > a,
  body .zl-mobile-menu-panel__links .aw-subnav__link{
    min-height:56px!important;
    padding:13px 26px 13px 36px!important;
    border:0!important;
    border-bottom:1px solid #EDE1D8!important;
    border-radius:0!important;
    background:transparent!important;
    color:#35070D!important;
    font-size:15px!important;
    font-weight:500!important;
  }
  body .zl-mobile-menu-panel__links > a::before,
  body .zl-mobile-menu-panel__links > li > a::before,
  body .zl-mobile-menu-panel__links .menu-item > a::before,
  body .zl-mobile-menu-panel__links .aw-subnav__link::before{
    content:""!important;
    position:absolute!important;
    right:8px!important;
    top:50%!important;
    width:7px!important;
    height:7px!important;
    border-radius:50%!important;
    background:#C8A46A!important;
    transform:translateY(-50%)!important;
  }
  body .zl-mobile-menu-panel__links > a:hover,
  body .zl-mobile-menu-panel__links > li > a:hover,
  body .zl-mobile-menu-panel__links .menu-item > a:hover,
  body .zl-mobile-menu-panel__links .current-menu-item > a,
  body .zl-mobile-menu-panel__links .current_page_item > a{
    background:#F8F1EA!important;
    color:#5B0F1A!important;
    border-color:#E6D7CB!important;
  }
}

/* ─────────────────────────────────────────────────────────────
   Compact front-page product sliders.
───────────────────────────────────────────────────────────── */
.zl-products-section--slider{
  padding-block:68px!important;
  background:#fff!important;
}
.zl-products-section--reference{
  position:relative;
  padding-block:72px!important;
  background:linear-gradient(145deg,#35070D 0%,#5B0F1A 66%,#6E1823 100%)!important;
  overflow:hidden;
}
.zl-products-section--reference::before{
  content:"";
  position:absolute;
  width:420px;
  height:420px;
  left:-250px;
  top:-250px;
  border-radius:50%;
  border:1px solid rgba(228,204,159,.13);
  box-shadow:0 0 0 70px rgba(228,204,159,.025),0 0 0 140px rgba(228,204,159,.018);
  pointer-events:none;
}
.zl-section-head--light h2{color:#fff!important}
.zl-section-head--light p,
.zl-section-head--light>a{color:#E4CC9F!important}

.zl-product-slider{
  position:relative;
  direction:rtl;
}
.zl-product-slider__viewport{
  width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  padding:5px 3px 18px;
  scroll-behavior:smooth;
  scroll-snap-type:x mandatory;
  scroll-padding-inline:4px;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
}
.zl-product-slider__viewport::-webkit-scrollbar{display:none}
.zl-product-slider__track{
  display:flex;
  align-items:stretch;
  gap:14px;
  width:max-content;
  min-width:100%;
}
.zl-product-slider__item{
  flex:0 0 172px;
  width:172px;
  min-width:0;
  scroll-snap-align:start;
}
.zl-product-slider__nav{
  position:absolute;
  top:37%;
  z-index:12;
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  padding:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:50%!important;
  border:1px solid #E4D3C7!important;
  background:rgba(255,255,255,.97)!important;
  color:#5B0F1A!important;
  box-shadow:0 13px 30px rgba(53,7,13,.16)!important;
  font-family:Arial,sans-serif!important;
  font-size:28px!important;
  line-height:1!important;
  cursor:pointer!important;
  transition:transform .18s ease,background .18s ease,color .18s ease!important;
}
.zl-product-slider__nav:hover{
  transform:translateY(-2px)!important;
  background:#5B0F1A!important;
  color:#fff!important;
  border-color:#5B0F1A!important;
}
.zl-product-slider__nav--prev{right:-17px}
.zl-product-slider__nav--next{left:-17px}
.zl-products-section--reference .zl-product-slider__nav{
  border-color:rgba(255,255,255,.22)!important;
  background:rgba(255,255,255,.94)!important;
}

.zl-book-card{
  height:100%;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid #E8DDD5;
  border-radius:16px;
  background:#fff;
  box-shadow:0 7px 20px rgba(53,7,13,.065);
  transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease;
}
.zl-book-card:hover{
  transform:translateY(-5px);
  border-color:#D4B8A8;
  box-shadow:0 16px 34px rgba(53,7,13,.12);
}
.zl-book-card__cover{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  aspect-ratio:2/2.86;
  padding:9px;
  overflow:hidden;
  background:linear-gradient(180deg,#fff 0%,#F7F1EC 100%);
  border-bottom:1px solid #EEE3DB;
}
.zl-book-card__cover img{
  display:block;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  margin:0!important;
  filter:drop-shadow(0 8px 11px rgba(53,7,13,.14));
  transition:transform .22s ease;
}
.zl-book-card:hover .zl-book-card__cover img{transform:scale(1.025)}
.zl-book-card__year{
  position:absolute;
  top:8px;
  right:8px;
  min-width:38px;
  padding:3px 7px;
  border-radius:999px;
  background:rgba(91,15,26,.93);
  color:#fff;
  font-size:10px;
  font-weight:600;
  line-height:1.4;
  direction:ltr;
  unicode-bidi:isolate;
}
.zl-book-card__body{
  display:flex;
  flex:1;
  flex-direction:column;
  min-height:180px;
  padding:10px 11px 11px;
}
.zl-book-card__category{
  display:block;
  margin-bottom:4px;
  overflow:hidden;
  color:#8D664F;
  font-size:9.5px;
  font-weight:600;
  line-height:1.45;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.zl-book-card h3{
  min-height:59px;
  margin:0 0 5px!important;
  color:#35070D!important;
  font-size:13.2px!important;
  font-weight:600!important;
  line-height:1.5!important;
}
.zl-book-card h3 a{
  display:-webkit-box;
  overflow:hidden;
  color:inherit!important;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
}
.zl-book-card__author{
  min-height:20px;
  margin:0 0 7px!important;
  overflow:hidden;
  color:#786B68!important;
  font-size:10.5px!important;
  line-height:1.55!important;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.zl-book-card__foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  margin-top:auto;
  padding-top:7px;
  border-top:1px solid #F0E6DF;
}
.zl-book-card__price{
  color:#5B0F1A;
  font-size:12px;
  font-weight:700;
  line-height:1.4;
  direction:ltr;
  unicode-bidi:isolate;
}
.zl-book-card__price del{font-size:9px;color:#9A8D88;opacity:.75}
.zl-book-card__price ins{text-decoration:none;color:#5B0F1A}
.zl-book-card__stock{
  display:inline-flex;
  align-items:center;
  white-space:nowrap;
  font-size:8.8px;
  font-weight:600;
}
.zl-book-card__stock::before{
  content:"";
  width:5px;
  height:5px;
  margin-left:4px;
  border-radius:50%;
  background:currentColor;
}
.zl-book-card__stock.is-in{color:#347A55}
.zl-book-card__stock.is-out{color:#9B5A57}
.zl-book-card__button{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:31px!important;
  margin-top:8px!important;
  padding:5px 9px!important;
  border-radius:9px!important;
  background:#5B0F1A!important;
  color:#fff!important;
  font-size:10.5px!important;
  font-weight:600!important;
  line-height:1!important;
}
.zl-book-card__button:hover{background:#35070D!important;color:#fff!important}

.zl-products-section--reference .zl-book-card{
  border-color:rgba(255,255,255,.18);
  box-shadow:0 12px 30px rgba(0,0,0,.18);
}

@media (min-width:1180px){
  .zl-product-slider__item{flex-basis:168px;width:168px}
}
@media (max-width:900px){
  .zl-product-slider__nav{display:none!important}
  .zl-product-slider__track{gap:12px}
  .zl-product-slider__item{flex-basis:158px;width:158px}
  .zl-products-section--slider,
  .zl-products-section--reference{padding-block:50px!important}
}
@media (max-width:580px){
  .zl-products-section--slider,
  .zl-products-section--reference{padding-block:42px!important}
  .zl-product-slider__viewport{
    margin-inline:-2px;
    padding-bottom:13px;
  }
  .zl-product-slider__track{gap:10px}
  .zl-product-slider__item{flex-basis:148px;width:148px}
  .zl-book-card{border-radius:14px}
  .zl-book-card__cover{padding:7px}
  .zl-book-card__body{min-height:172px;padding:9px}
  .zl-book-card h3{min-height:57px;font-size:12.7px!important}
  .zl-book-card__author{font-size:10px!important}
  .zl-book-card__button{min-height:30px!important;font-size:10px!important}
}
@media (max-width:360px){
  .zl-product-slider__item{flex-basis:142px;width:142px}
}
@media (max-width:720px){
  /* The logo remains the home link; the drawer does not repeat “الرئيسية”. */
  body .zl-mobile-menu-panel__links .menu-item-home{
    display:none!important;
  }
}
