
/* ===== Original CSS block 099: idafa-banner-workshop-perry-v4 ===== */

/* Perry banner: layout refinements exclusively. The original image file is unchanged. */
#app .idafa-home-d:not(.idh-all-latest) .idh-group-perry.idf-perry-workshop{
 background:#D9EDF8!important;color:#000000!important;isolation:isolate;position:relative!important;
 min-height:245px;display:block;overflow:hidden;border-radius:5px;
 background-image:linear-gradient(170deg,#d5e9f8 0%,#e0f1fc 48%,#cbdfef 100%)!important;
}
#app .idafa-home-d .idh-group-perry.idf-perry-workshop::before{display:none!important;content:none!important}
/* Object-fit contain reduces the original book by about 11% relative to v1 cover cropping.
   Moving the unchanged image layer right centers the book within its own pale-blue field. */
#app .idf-perry-workshop .idf-perry-original-art{
 display:block;position:absolute;inset:0;width:100%;height:100%;
 object-fit:contain;object-position:center center;transform:translateX(44px);
 transform-origin:center center;
 mask-image:linear-gradient(to right, transparent 15%, #000 55%, #000 97%, transparent 100%),
            linear-gradient(to bottom,transparent 0%,#000 5%,#000 95%,transparent 100%);
 mask-composite:intersect;
 -webkit-mask-image:linear-gradient(to right, transparent 15%, #000 55%, #000 97%, transparent 100%),
                    linear-gradient(to bottom,transparent 0%,#000 5%,#000 95%,transparent 100%);
 -webkit-mask-composite:source-in;
 z-index:1;max-width:none;pointer-events:none;
}
#app .idf-perry-workshop .idf-perry-copy{
 position:relative;display:flex;flex-direction:column;justify-content:space-between;align-items:stretch;
 direction:rtl;text-align:right;z-index:2;width:61%;margin-right:auto;margin-left:0;
  transform:translateX(12px);
 padding:15px 7px 61px 12px;min-height:245px;
}
#app .idf-perry-workshop .idf-perry-headline{
  display:flex;align-items:center;justify-content:center;align-self:center;
  width:max-content;max-width:100%;min-height:39px;box-sizing:border-box;
  background:#073763;color:#fff;
  padding:7px 13px 9px;line-height:1.22;font-size:calc(clamp(12px,1.15vw,17px) + 2px);
  border-radius:20px;font-weight:750;white-space:nowrap;text-align:center;letter-spacing:0;
 }
#app .idf-perry-workshop .idf-perry-blurb{
  display:flex;position:relative;transform:translateX(-38px);flex-direction:column;gap:3px;
  color:#000000;font-size:clamp(14.5px,1.2vw,17px);line-height:1.43;font-weight:600;
  padding:5px 13px 5px 7px;
 }
 #app .idf-perry-workshop .idf-perry-blurb>.idf-perry-line{display:block;position:relative}
/* Arabic paired guillemets are outside letter-flow, so all four lines share one baseline edge. */
 #app .idf-perry-workshop .idf-perry-quote-open,
 #app .idf-perry-workshop .idf-perry-quote-close{
  position:absolute;display:block;direction:ltr;unicode-bidi:isolate;
  font-family:Georgia,'Times New Roman',serif;color:#073763;
  font-size:1.36em;font-weight:bold;line-height:1;
  margin:0;padding:0;pointer-events:none;
 }
 #app .idf-perry-workshop .idf-perry-quote-open{right:-.84em;top:-.02em}
 #app .idf-perry-workshop .idf-perry-final-phrase{display:inline-block;position:relative}
 #app .idf-perry-workshop .idf-perry-quote-close{left:-.84em;top:-.02em}
#app .idf-perry-workshop .idf-perry-cta{
 position:absolute;bottom:17px;left:15px;z-index:3;
 background:#D79417;color:#FFFFFF;font-size:14px;font-weight:800;
 min-width:119px;min-height:37px;border-radius:5px;display:flex;align-items:center;justify-content:center;
 padding:7px 14px;box-shadow:none;white-space:nowrap;
}
#app .idf-perry-workshop:hover .idf-perry-cta{background:#D79417}
#app .idf-perry-workshop:focus-visible{outline:3px solid #073763;outline-offset:3px}
@media(max-width:980px) and (min-width:621px){
 #app .idf-perry-workshop .idf-perry-original-art{object-fit:contain;object-position:right center;transform:translateX(30px) scale(.9);}
 #app .idf-perry-workshop .idf-perry-copy{width:61%;padding:10px 6px 60px 12px;transform:translateX(7px)}
 #app .idf-perry-workshop .idf-perry-headline{font-size:calc(clamp(11px,1.3vw,13px) + 2px);line-height:1.25;padding:4px 7px 6px;min-height:35px;max-width:100%;white-space:normal}
 #app .idf-perry-workshop .idf-perry-blurb{font-size:13px;line-height:1.34;gap:1px;padding:3px 10px 3px 6px}

}
@media(max-width:620px){
 #app .idf-perry-workshop .idf-perry-original-art{
  object-fit:contain;object-position:right center;transform:translateX(26px) scale(.9);
  mask-image:linear-gradient(to right,transparent 15%,#000 55%,#000 97%,transparent 100%),
             linear-gradient(to bottom,transparent 19%,#000 27%,#000 73%,transparent 81%);
  mask-composite:intersect;
  -webkit-mask-image:linear-gradient(to right,transparent 15%,#000 55%,#000 97%,transparent 100%),
                      linear-gradient(to bottom,transparent 19%,#000 27%,#000 73%,transparent 81%);
  -webkit-mask-composite:source-in;
 }
 #app .idafa-home-d:not(.idh-all-latest) .idh-group-perry.idf-perry-workshop{min-height:310px!important}
 #app .idf-perry-workshop .idf-perry-copy{width:61%;min-height:310px;padding:20px 5px 64px 12px;transform:translateX(4px)}
 #app .idf-perry-workshop .idf-perry-headline{font-size:calc(clamp(11px,2.95vw,16px) + 2px);white-space:normal;line-height:1.3;padding:7px 8px 9px;min-height:42px}
 #app .idf-perry-workshop .idf-perry-blurb{font-size:clamp(12px,3.3vw,15px);line-height:1.45;gap:3px;padding:5px 10px 5px 5px}



 #app .idf-perry-workshop .idf-perry-cta{left:12px;bottom:12px;font-size:13px;min-height:35px;min-width:108px}
}
@media(max-width:390px){
 #app .idf-perry-workshop .idf-perry-copy{width:61%}
 #app .idf-perry-workshop .idf-perry-blurb{font-size:13px}
}

/* Source-faithful replacement mockup supplied by the publisher, with original alpha. */
#app .idf-perry-workshop .idf-perry-replacement-art{
 position:absolute;display:block;z-index:1;pointer-events:none;
 width:215px;height:215px;right:-8px;top:50%;
 object-fit:contain;max-width:none;
 transform:translateY(-50%) translateY(-5px);
 filter:drop-shadow(-9px 10px 11px rgba(13,48,72,.26));
}
@media(max-width:980px) and (min-width:621px){
 #app .idf-perry-workshop .idf-perry-replacement-art{
  width:clamp(130px,18vw,185px);height:auto;aspect-ratio:1;right:-5px;
 }
}
@media(max-width:620px){
 #app .idf-perry-workshop .idf-perry-replacement-art{
  width:clamp(145px,28vw,190px);height:auto;aspect-ratio:1;right:-10px;
 }
}
/* On compact screens, retain a leftward body shift while keeping every letter inside the banner. */
@media(max-width:1150px){
 #app .idf-perry-workshop .idf-perry-blurb{transform:translateX(-16px)}
}
/* Standalone workshop indicator unchanged. */
#idf-preview-toast{position:fixed;bottom:18px;right:18px;z-index:200;background:#073763;color:#fff;
 padding:12px 18px;border-radius:6px;box-shadow:0 7px 23px rgba(0,0,0,.20);font-size:13px;max-width:min(460px,calc(100vw - 36px))}
#idf-preview-toast[hidden]{display:none}


/* ===== Original CSS block 100: idafa-muhammad-five-volumes-v8 ===== */

/* The single approved 1558 x 496 PNG, embedded losslessly. Only the Muhammad home tile changes.
   Preserve its complete Arabic typography and books at all widths: never crop or distort. */
#app .idafa-home-d:not(.idh-all-latest) .idh-group-muhammad {
  background:#012331!important;
}
#app .idafa-home-d:not(.idh-all-latest) .idh-group-muhammad::before {
  content:none!important;display:none!important;
}
#app .idafa-home-d:not(.idh-all-latest) .idh-group-muhammad .idh-img-file {
  object-fit:contain!important;
  object-position:center center!important;
}


/* ===== Original CSS block 101: idf-month-original-approved-image-v9 ===== */

/* Only the Book of the Month image changes; original 1200x600 artwork stays intact.
   Contain prevents image cropping/stretching at every previously approved breakpoint. */
.idafa-home-d .idh-feature-month {background:#eeece9!important;}
.idafa-home-d .idh-feature-month .idh-img-picture .idh-img-file {
  object-fit:contain!important;
  object-position:center center!important;
  background:#eeece9!important;
}


/* ===== Original CSS block 102: idf-month-original-artwork-ratio-v10 ===== */

/* The publisher-approved 1200 x 600 artwork must occupy a real 2:1 canvas,
   not be letterboxed inside the legacy extra-wide Book-of-the-Month card.
   All other banners' artwork and approved wording remain untouched. */
@media (min-width:1151px) {
  .idafa-home-d:not(.idh-all-latest) .idh-feature-row {
    grid-template-columns:minmax(0,2.54fr) minmax(0,1fr) minmax(0,1fr);
  }
  .idafa-home-d:not(.idh-all-latest) .idh-feature-row > .idh-feature-tile {
    height:auto;
  }
}
.idafa-home-d:not(.idh-all-latest) .idh-feature-month {
  aspect-ratio:2 / 1;
  height:auto!important;
}


/* ===== Original CSS block 103: idf72-approved-changes ===== */

/* Dar Idafa v72 — approved card typography, compact home categories, carousel controls,
   and mobile header. All edits are scoped to their respective breakpoints. */
@media(min-width:761px){
  /* Approved computer-only card changes. */
  .idf-unified-book-card .idh-book-author{font-weight:700!important}
  .idf-unified-book-card .idf-book-subtitle-card{font-size:calc(.80em + 2px)!important}
}
@media(max-width:760px){
  /* The four header units, from right to left: logo, compact search, menu, cart. */
  #idafa-approved-header .idf-h-header-inner{
    direction:rtl!important;display:grid!important;
    grid-template-columns:clamp(88px,27vw,108px) minmax(0,1fr) 44px 46px!important;
    grid-template-areas:"logo search menu cart"!important;
    gap:clamp(4px,1.1vw,8px)!important;
  }
  #idafa-approved-header .idf-h-logo-link{
    grid-area:logo!important;justify-self:center!important;min-width:0!important;
  }
  #idafa-approved-header .idf-h-logo{width:clamp(86px,26.5vw,106px)!important;max-width:100%!important}
  #idf71-menu-toggle{grid-area:menu!important}
  #idf71-search-toggle{display:none!important}
  #idafa-approved-header .idf-h-cart{grid-area:cart!important;justify-self:center!important}
  #idafa-approved-header .idf-h-search,
  #idafa-approved-header.idf71-search-open .idf-h-search{
    display:flex!important;grid-area:search!important;
    position:relative!important;top:auto!important;left:auto!important;right:auto!important;
    width:100%!important;max-width:100%!important;min-width:0!important;height:37px!important;
    border:1px solid #FFCF00!important;border-radius:5px!important;
    box-shadow:none!important;z-index:3!important;
  }
  #idafa-approved-header .idf-h-search input{
    min-width:0!important;width:100%!important;font-size:13px!important;
    padding:0 6px!important;text-overflow:ellipsis!important;
  }
  #idafa-approved-header .idf-h-search .idf-h-search-button{
    flex:0 0 30px!important;width:30px!important;min-width:30px!important;padding:0!important;
  }
  #idafa-approved-header .idf-h-search .idf-h-search-button svg{width:18px!important;height:18px!important}
  /* The search field expands underneath the header only while it is in use. */
  #idafa-approved-header .idf-h-search:focus-within,
  #idafa-approved-header.idf72-search-expanded .idf-h-search{
    position:fixed!important;top:64px!important;right:10px!important;left:10px!important;
    width:calc(100vw - 20px)!important;max-width:none!important;height:47px!important;
    border:2px solid #FFCF00!important;border-radius:0 0 7px 7px!important;
    box-shadow:0 10px 24px rgba(7,55,99,.22)!important;z-index:12!important;
  }
  #idafa-approved-header .idf-h-search:focus-within .idf-h-search-button,
  #idafa-approved-header.idf72-search-expanded .idf-h-search .idf-h-search-button{width:45px!important;min-width:45px!important;flex-basis:45px!important}
  /* Dropdown sits below the actual menu button, clear of the cart. */
  #idafa-approved-header .idf-h-nav{
    right:auto!important;left:46px!important;
    max-width:calc(100vw - 60px)!important;
  }
  /* Card titles, authors and prices are all bold on touch-sized screens. */
  #app .idf-unified-book-card .idh-book-title{font-weight:700!important}
  #app .idf-unified-book-card .idf-book-subtitle-card{font-weight:700!important}
  #app .idf-unified-book-card .idh-book-author,
  #app .idf-unified-book-card .idh-book-author a{font-weight:700!important}
  #app .idf-unified-book-card .idh-book-price{font-weight:800!important}
  /* Less unused white space between the nine home category circles, still 3x3. */
  #app .idafa-home-d:not(.idh-all-latest) .idh-categories-row{
    width:min(100%,290px)!important;margin-inline:auto!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    column-gap:5px!important;row-gap:2px!important;
  }
  #app .idafa-home-d:not(.idh-all-latest) .idh-cat{
    gap:3px!important;padding:1px 0!important;
  }
  #app .idafa-home-d:not(.idh-all-latest) .idh-cat-name{
    min-height:2.25em!important;
  }
  /* Carousel arrows above the cards, within the carousel footprint. No side gutters. */
  #app .idafa-home-d .idh-carousel{
    padding:50px 0 0!important;
  }
  #app .idafa-home-d .idh-arrows{
    position:absolute!important;inset:0!important;
    pointer-events:none!important;
  }
  #app .idafa-home-d .idh-arrows button{
    top:2px!important;transform:none!important;
    width:42px!important;height:42px!important;
    padding:7px!important;border:1px solid #D9EDF8!important;
    border-radius:6px!important;background:#FFFFFF!important;
    color:#073763!important;box-shadow:0 2px 6px rgba(7,55,99,.1)!important;
    pointer-events:auto!important;
  }
  #app .idafa-home-d .idh-arrows .idh-arrow-right{right:2px!important;left:auto!important}
  #app .idafa-home-d .idh-arrows .idh-arrow-left{left:2px!important;right:auto!important}
  #app .idafa-home-d .idh-arrows button svg{width:100%!important;height:100%!important}
  #app .idafa-home-d .idh-arrows button:active{background:#D9EDF8!important;transform:scale(.96)!important}
}
@media(max-width:350px){
  #idafa-approved-header .idf-h-header-inner{
    grid-template-columns:88px minmax(0,1fr) 42px 44px!important;gap:3px!important;
  }
  #idafa-approved-header .idf-h-search .idf-h-search-button{
    min-width:28px!important;width:28px!important;flex-basis:28px!important;
  }
}
@media(prefers-reduced-motion:reduce){
  #app .idafa-home-d .idh-arrows button{transition:none!important}
}


