/*
Theme Name: Kunooz Publisher Child
Theme URI: https://konozelmarifa.com
Description: Child theme for Kunooz Al Marifa Publishing & Distribution. Uses the official navy/turquoise logo identity, author/translator/critical-editor taxonomies, and publishing-house pages.
Author: Kunooz Al Marifa
Author URI: https://konozelmarifa.com
Template: kunooz-publisher
Version: 1.0.8
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kunooz-child
Tags: woocommerce, rtl-language-support, books, publishing
*/

/* ════════════════════════════════════════════════════════════
   KUNOOZ PUBLISHER – CHILD THEME OVERRIDES
   هذا الملف لا يحتوي إلا على تعديلات بسيطة. الأنماط الكبيرة
   موضوعة في /assets/css/ ويتم تحميلها عبر functions.php
═══════════════════════════════════════════════════════════════ */

:root {
  --kunooz-primary:    #2A2563;
  --kunooz-accent:     #0687B9;
  --kunooz-bg:         #F7F8FA;
  --kunooz-radius:     14px;
  --kunooz-shadow:     0 6px 18px rgba(17,39,74,.08);
}

/* تكامل مع متغيرات القالب الأم */
body { -webkit-tap-highlight-color: transparent; }

/* تحسينات بسيطة للنسخة الجوّالة */
@media (max-width: 600px) {
  .aw-product__layout-3col { gap: 16px; }
}

/* وضع التطبيق لا يخفي الفوتر في نسخة الويب أو الهاتف.
   نخفي فقط الشريط العلوي الصغير عند فتح الموقع داخل التطبيق الحقيقي. */
body.kunooz-app-mode .aw-header__strip { display: none !important; }
body.kunooz-app-mode .aw-header { position: sticky; top: 0; z-index: 100; }
body.kunooz-app-mode .site-footer,
body.kunooz-app-mode .aw-footer { display: block !important; }


/* هوية كنوز الجديدة: كحلي + بني ذهبي مستوحاة من قالب دار كنوز المعرفة */
:root{
  --navy:#2A2563;--navy-deep:#18123F;--navy-mid:#0D9BCB;
  --gold:#0687B9;--gold-lt:#8DE2F6;--gold-pale:#E7F7FC;
  --cream:#F7F8FA;--cream-mid:#E2F1F6;--cream-lt:#FFFCF7;
}


/* ════════════════════════════════════════════════════════════
   2.3.4 — إصلاح فلتر المتجر على الهاتف
   يمنع ظهور السيدبار كعمود يزحزح الصفحة أو يخلق فراغًا كبيرًا.
═══════════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  body.woocommerce-shop .aw-shop,
  body.tax-product_cat .aw-shop,
  body.post-type-archive-product .aw-shop {
    overflow-x: hidden !important;
  }

  body.woocommerce-shop .aw-shop__layout,
  body.tax-product_cat .aw-shop__layout,
  body.post-type-archive-product .aw-shop__layout {
    display: block !important;
    grid-template-columns: none !important;
    grid-template-areas: none !important;
  }

  body.woocommerce-shop .aw-products,
  body.tax-product_cat .aw-products,
  body.post-type-archive-product .aw-products {
    width: 100% !important;
    min-width: 0 !important;
  }

  body.woocommerce-shop .aw-sidebar,
  body.tax-product_cat .aw-sidebar,
  body.post-type-archive-product .aw-sidebar {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: min(86vw, 360px) !important;
    max-width: 360px !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    padding: 18px 14px 28px !important;
    margin: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: #F7F8FA !important;
    border-left: 1px solid rgba(6,135,185,.32) !important;
    box-shadow: -18px 0 44px rgba(24,21,63,.18) !important;
    z-index: 99999 !important;
    transform: translateX(110%) !important;
    transition: transform .26s ease !important;
    grid-area: auto !important;
    overscroll-behavior: contain !important;
  }

  body.woocommerce-shop .aw-sidebar.is-open,
  body.tax-product_cat .aw-sidebar.is-open,
  body.post-type-archive-product .aw-sidebar.is-open {
    transform: translateX(0) !important;
  }

  body.admin-bar.woocommerce-shop .aw-sidebar,
  body.admin-bar.tax-product_cat .aw-sidebar,
  body.admin-bar.post-type-archive-product .aw-sidebar {
    top: 46px !important;
    height: calc(100dvh - 46px) !important;
    max-height: calc(100dvh - 46px) !important;
  }

  body.aw-filter-open {
    overflow: hidden !important;
    touch-action: none !important;
  }

  body.aw-filter-open::before {
    content: "" !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(35, 18, 18, .38) !important;
    z-index: 99990 !important;
  }

  body.woocommerce-shop .aw-filter-panel,
  body.tax-product_cat .aw-filter-panel,
  body.post-type-archive-product .aw-filter-panel {
    margin-bottom: 14px !important;
    border-radius: 18px !important;
  }

  body.woocommerce-shop .aw-filter-panel__body ul li a,
  body.tax-product_cat .aw-filter-panel__body ul li a,
  body.post-type-archive-product .aw-filter-panel__body ul li a {
    min-height: 42px !important;
    font-size: 14px !important;
  }

  body.woocommerce-shop .aw-shop__toolbar,
  body.tax-product_cat .aw-shop__toolbar,
  body.post-type-archive-product .aw-shop__toolbar {
    align-items: stretch !important;
    gap: 10px !important;
  }

  body.woocommerce-shop .aw-shop__tools,
  body.tax-product_cat .aw-shop__tools,
  body.post-type-archive-product .aw-shop__tools {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: auto 1fr !important;
    gap: 10px !important;
  }

  body.woocommerce-shop .woocommerce-ordering,
  body.tax-product_cat .woocommerce-ordering,
  body.post-type-archive-product .woocommerce-ordering {
    width: 100% !important;
    margin: 0 !important;
  }

  body.woocommerce-shop .woocommerce-ordering select,
  body.tax-product_cat .woocommerce-ordering select,
  body.post-type-archive-product .woocommerce-ordering select {
    width: 100% !important;
  }
}

/* ════════════════════════════════════════════════════════════
   2.4.3 — تنظيف حالة القائمة الرئيسية على الكمبيوتر والهاتف
   يمنع النقاط الافتراضية وخط الاختيار الرقيق، ويجعل العنصر الحالي كبطاقة ناعمة.
═══════════════════════════════════════════════════════════════ */
body .aw-subnav,
body .aw-subnav *{
  -webkit-tap-highlight-color: transparent;
}

body .aw-subnav__inner{
  display:flex !important;
  align-items:center !important;
  gap:4px !important;
  padding:6px 0 !important;
  margin:0 !important;
  list-style:none !important;
}

body .aw-subnav__inner ul,
body .aw-subnav__menu,
body .aw-subnav__inner .menu{
  display:flex !important;
  align-items:center !important;
  gap:4px !important;
  margin:0 !important;
  padding:0 !important;
  list-style:none !important;
  flex-wrap:nowrap !important;
}

body .aw-subnav__inner li,
body .aw-subnav__inner .menu-item{
  display:inline-flex !important;
  align-items:center !important;
  margin:0 !important;
  padding:0 !important;
  list-style:none !important;
  flex:0 0 auto !important;
}

body .aw-subnav__inner li::marker,
body .aw-subnav__inner .menu-item::marker{
  content:"" !important;
  font-size:0 !important;
}

body .aw-subnav__inner > a,
body .aw-subnav__inner .menu-item > a,
body .aw-subnav__link{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:36px !important;
  padding:7px 14px !important;
  border:0 !important;
  border-bottom:0 !important;
  border-radius:999px !important;
  text-decoration:none !important;
  outline:none !important;
  box-shadow:none !important;
  background:transparent !important;
  line-height:1.4 !important;
}

body .aw-subnav__inner > a:hover,
body .aw-subnav__inner > a:active,
body .aw-subnav__inner .menu-item > a:hover,
body .aw-subnav__inner .menu-item > a:active,
body .aw-subnav__inner .current-menu-item > a,
body .aw-subnav__inner .current_page_item > a,
body .aw-subnav__inner .current-menu-ancestor > a,
body .aw-subnav__inner .current_page_ancestor > a,
body .aw-subnav__link:hover,
body .aw-subnav__link:active{
  border:0 !important;
  border-bottom:0 !important;
  box-shadow:none !important;
  background:#E7F7FC !important;
  color:var(--kunooz-hf-burgundy, #2A2563) !important;
}

body .aw-subnav__inner a:focus,
body .aw-subnav__inner a:active{
  outline:none !important;
  border:0 !important;
  border-bottom:0 !important;
  box-shadow:none !important;
}

body .aw-subnav__inner a:focus-visible{
  outline:2px solid rgba(6,135,185,.55) !important;
  outline-offset:2px !important;
  box-shadow:none !important;
}

@media (max-width: 860px){
  body .aw-subnav{
    overflow:hidden !important;
  }
  body .aw-subnav__inner{
    overflow-x:auto !important;
    scrollbar-width:none !important;
    -webkit-overflow-scrolling:touch !important;
    padding:7px 0 !important;
  }
  body .aw-subnav__inner::-webkit-scrollbar{
    display:none !important;
  }
  body .aw-subnav__inner > a,
  body .aw-subnav__inner .menu-item > a,
  body .aw-subnav__link{
    min-height:38px !important;
    padding:8px 13px !important;
    font-size:13px !important;
    white-space:nowrap !important;
  }
}



/* v2.4.4 — Authors listing cleanup */
.aw-authors-stats{display:none!important;}
.aw-authors-page .aw-author-card{min-width:0;}
.aw-authors-page .aw-author-card__name{line-height:1.55;}
.aw-authors-page .aw-author-card__bio{overflow-wrap:anywhere;}
.aw-authors-page .aw-author-card__books-count{white-space:nowrap;}
@media (max-width:580px){
  .aw-authors-page{padding-top:18px;}
  .aw-author-card__meta{flex-wrap:wrap;justify-content:flex-start;}
}

/* =========================================================
   KUNOOZ FINAL BRAND OVERRIDE — logo colors only
   Applied after inherited Kunooz CSS to remove old colour remnants.
   ========================================================= */
:root{
  --navy:#2A2563;--navy-deep:#18153F;--navy-mid:#211D55;
  --gold:#0687B9;--gold-lt:#8DE2F6;--gold-pale:#E7F7FC;
  --cream:#F7F8FA;--cream-mid:#E8F6FB;--cream-lt:#FFFFFF;
  --aw-primary:#2A2563;--aw-secondary:#0687B9;--aw-accent:#0687B9;
  --kunooz-navy:#2A2563;--kunooz-blue:#0687B9;--kunooz-light:#F7F8FA;
  --wpb-burgundy:#2A2563;--wpb-burgundy-2:#211D55;--wpb-burgundy-dark:#18153F;
  --wpb-gold:#0687B9;--wpb-gold-dark:#056E98;--wpb-gold-soft:#8DE2F6;
  --wpb-paper:#F7F8FA;--wpb-paper-2:#E8F6FB;--wpb-card:#FFFFFF;
  --wpb-ink:#20233A;--wpb-muted:#5E6B7A;
  --kunooz-hf-burgundy:#2A2563;--kunooz-hf-burgundy-deep:#18153F;
  --kunooz-hf-gold:#0687B9;--kunooz-hf-gold-soft:#8DE2F6;
  --kunooz-hf-paper:#FFFFFF;--kunooz-hf-cream:#F7F8FA;
}
body{background:#F7F8FA;color:#20233A;}
.aw-header{background:#FFFFFF!important;border-bottom:1px solid rgba(6,135,185,.22)!important;box-shadow:0 8px 24px rgba(42,37,99,.06)!important;}
.aw-header__strip{background:#18153F!important;color:rgba(255,255,255,.88)!important;}
.aw-header__strip a{color:#8DE2F6!important;}
.aw-search__form{background:#F7F8FA!important;border-color:rgba(6,135,185,.28)!important;}
.aw-search__btn,.kunooz-pub-search button,.kunooz-pub-btn--gold,.aw-nav__link--cart{background:#0687B9!important;border-color:#0687B9!important;color:#FFFFFF!important;}
.aw-search__btn:hover,.kunooz-pub-btn--gold:hover,.aw-nav__link--cart:hover{background:#056E98!important;border-color:#056E98!important;color:#FFFFFF!important;}
.aw-logo__name,.aw-logo__sub,.aw-nav__link,.aw-subnav__link,.aw-subnav__inner>a,.aw-subnav__inner .menu-item>a{color:#18153F!important;}
.aw-subnav{background:#F7F8FA!important;border-color:rgba(6,135,185,.18)!important;}
.aw-subnav__link:hover,.aw-subnav__inner>a:hover,.aw-subnav__inner .menu-item>a:hover,.aw-subnav__inner .current-menu-item>a{background:#E8F6FB!important;color:#2A2563!important;border-color:#0687B9!important;}
.kunooz-pub-hero{
  background:
    radial-gradient(circle at 12% 22%, rgba(6,135,185,.33), transparent 26%),
    radial-gradient(circle at 90% 8%, rgba(141,226,246,.18), transparent 28%),
    linear-gradient(135deg,#18153F 0%, #2A2563 58%, #211D55 100%)!important;
}
.kunooz-pub-hero::before{border-color:rgba(141,226,246,.22)!important;}
.kunooz-pub-pattern{
  opacity:.16!important;
  background-image:none!important;
}
.kunooz-pub-pattern::before{
  content:"ع  ل  س  ن  ض  ق  ك  م  ة  ن  و  ز";
  position:absolute; inset:-40px;
  color:rgba(255,255,255,.20);
  font-size:clamp(68px,9vw,150px);
  font-weight:900; letter-spacing:.18em; line-height:1.65;
  transform:rotate(-10deg); white-space:pre-wrap;
  font-family:"Cairo","Tajawal",sans-serif;
}
.kunooz-pub-eyebrow,.kunooz-pub-label,.kunooz-section__label,.kunooz-pub-book__cat,.awap-quote__source{color:#0687B9!important;}
.kunooz-pub-eyebrow::before,.kunooz-pub-label::before,.kunooz-section__label:before{background:#0687B9!important;}
.kunooz-pub-book__cover,.kunooz-pub-search,.kunooz-pub-hero-book__info{border-color:rgba(6,135,185,.30)!important;}
.aw-footer,footer.aw-footer,.site-footer{background:linear-gradient(135deg,#18153F,#2A2563)!important;color:rgba(255,255,255,.90)!important;}
.aw-footer::before,footer.aw-footer::before{background:linear-gradient(135deg,#18153F,#2A2563)!important;}
.aw-footer__col-title,.aw-footer__logo-text,.aw-footer a:hover,.aw-footer__menu li a::before,.aw-footer__contact-item svg{color:#8DE2F6!important;}
.aw-footer__logo{background:#FFFFFF!important;border-color:rgba(141,226,246,.42)!important;}
.kunooz-pwa-install{background:#2A2563!important;color:#fff!important;border-color:rgba(141,226,246,.35)!important;}
.kunooz-pwa-install svg{color:#8DE2F6!important;}
/* bundled icon/logo helpers */
.aw-logo img.aw-logo__img{filter:none!important;background:#fff;border-radius:6px;}
.aw-footer__logo img{filter:none!important;}
