/* Add custom CSS styles below */
/* ===== Knouz: product page focus + soft entrance (v1, 2026-11-19) =====
   This file loads in the page head, so nothing jumps: the hidden parts never appear,
   and the entrance plays on the first paint. Product pages only. */

/* 1) Less to read before the order form */
body.product-single .product-category-name,
body.product-single .p-available-badge,
body.product-single .p-share,
body.product-single .product-tags-wrapper,
body.product-single .s-block--bundle-similar-products,
body.product-single .s-before-related > section.s-block.container{display:none!important}
/* the four trust cards repeated what the pill under the title and the video section already say */
html body.product-single .prod-main-content .knz-ptrust,html body.product-single .knz-ptrust{display:none!important} /* "html" in front: the store script has its own display rule for these, added later in the page */
@media (max-width:767px){
  body.product-single .container--breadcrumbs{display:none!important}
  body.product-single .p-single-container{padding-top:14px}
}

/* 2) A stable first paint, then ONE calm reveal (instead of pieces popping in and pushing each other)
   - the photo box keeps its final size from the start (with or without the thumbnails row);
   - the details (title → price) stay invisible until the store script has placed its badges (.knz-b);
   - the order form stays invisible until Salla has drawn the options and the script arranged them (.knz-c),
     with a light placeholder in its place;
   - if the script never runs, everything shows by itself after a few seconds. */
@media (max-width:767px){
  /* a fixed box (not just a minimum): while Salla builds the slider it briefly grows, which pushed the page down and back */
  body.product-single .sidebar{height:calc(100vw - 30px);overflow:hidden}
  body.product-single .sidebar:has([slot="thumbs"], .s-slider-thumbs){height:calc((100vw - 30px) * 1.25 + 3px)}
}
/* the stars row is empty until Salla draws it: keep its line so the price under it never moves */
body.product-single .prod-main-content > salla-rating-stars:not([reviews="0"]){display:block;min-height:32px}
/* package products: the "total for …" line arrives under the price a moment later: keep its place */
body.product-single :is(#product-459981037,#product-351563583,#product-679241386,#product-109781022,#product-1239460890,#product-8617480,#product-324298256,#product-1323236931,#product-1387970835,#product-14524946,#product-1165998955) .prod-main-content:not(:has(.knz-pkg-note, .knz-pkg-total)) .p-price-outer{margin-bottom:34px}
html:not(.knz-b) body.product-single .prod-main-content > *:not(form){visibility:hidden;animation:knzHold 0s linear 4s forwards}
html:not(.knz-c) body.product-single .prod-main-content > form > *:not(.sticky-product-bar){visibility:hidden;animation:knzHold 0s linear 6.5s forwards}
html:not(.knz-c) body.product-single .prod-main-content > form{position:relative;min-height:250px}
html:not(.knz-c) body.product-single .prod-main-content > form::before{content:"";position:absolute;top:0;left:0;right:0;height:220px;border-radius:18px;
  background:linear-gradient(100deg,#f1ecfb 40%,#fbf9ff 50%,#f1ecfb 60%) 0 0/200% 100%;animation:knzSk 1.3s linear infinite,knzSkOff 0s linear 6.5s forwards}
@keyframes knzHold{to{visibility:visible}}
@keyframes knzSk{to{background-position:-200% 0}}
@keyframes knzSkOff{to{opacity:0}}
@keyframes knzPfade{from{opacity:0}}
@keyframes knzPin{from{opacity:0;transform:scale(1.035)}}
@media (prefers-reduced-motion:no-preference){
  body.product-single #main-content .sidebar{animation:knzPin .7s cubic-bezier(.22,.7,.2,1) backwards}
  /* "backwards" = nothing stays applied afterwards (a filled animation on the form would trap the fixed order bar) */
  html.knz-b-in body.product-single .prod-main-content > *:not(form):not(section){animation:knzPfade .45s ease backwards}
  html.knz-c-in body.product-single .prod-main-content > form > *:not(.sticky-product-bar){animation:knzPfade .45s ease backwards}
}

/* 3) Products sold in packages: the page arrives with the single-unit price (e.g. 20) and the real
      package price (e.g. 60) follows a moment later. The price stays hidden until the store script
      marks it ready; after 4 s it shows no matter what. */
body.product-single :is(#product-459981037,#product-351563583,#product-679241386,#product-109781022,#product-1239460890,#product-8617480,#product-324298256,#product-1323236931,#product-1387970835,#product-14524946,#product-1165998955):not(.knz-priced) .p-price-outer > *,
body.product-single :is(#product-459981037,#product-351563583,#product-679241386,#product-109781022,#product-1239460890,#product-8617480,#product-324298256,#product-1323236931,#product-1387970835,#product-14524946,#product-1165998955):not(.knz-priced) .sticky-product-bar__price{visibility:hidden;animation:knzPriceLate 0s linear 4s forwards}
@keyframes knzPriceLate{to{visibility:visible}}

/* 5) Said once is enough
   - homepage: the "video proof within 24h" badge sat on all 14 product cards; the line under "اختر هديتك" says it once;
   - product page: the ribbon on the photo repeats the badge above the title / the pill under it;
   - product page: the store-rating pill is dropped when the product shows its own stars and review count. */
html body .kz-card .kz-doc{display:none!important}
/* homepage: the four-step "من سلّتك إلى مكة" card repeated the tracking box above it and the video section below it */
html body #knz-how{display:none!important}
html body.product-single .sidebar .promotion-title{display:none!important}
html body.product-single .prod-main-content:has(> salla-rating-stars:not([reviews="0"])) > .knz-srate{display:none!important}

/* 6) Fonts: three files instead of seven (about 300 KB less on a first visit), and they start loading
      from the page head instead of after the store script. Regular covers the light/medium weights,
      Bold covers every heavier weight; the display serif is only used bold. */
@font-face{font-family:"Thmanyah Sans";src:url("https://cdn.jsdelivr.net/gh/engdawood/thmanyah-font-web@4266a9d/fonts/thmanyah-sans/woff2/thmanyah-sans-Regular.woff2") format("woff2");font-weight:100 500;font-style:normal;font-display:swap}
@font-face{font-family:"Thmanyah Sans";src:url("https://cdn.jsdelivr.net/gh/engdawood/thmanyah-font-web@4266a9d/fonts/thmanyah-sans/woff2/thmanyah-sans-Bold.woff2") format("woff2");font-weight:600 900;font-style:normal;font-display:swap}
@font-face{font-family:"Thmanyah Serif Display";src:url("https://cdn.jsdelivr.net/gh/engdawood/thmanyah-font-web@4266a9d/fonts/thmanyah-serif-display/woff2/thmanyah-serif-display-Bold.woff2") format("woff2");font-weight:100 900;font-style:normal;font-display:swap}

/* 7) Cart page: straight to the items
   - the green "after delivery you get the video" note repeated the top strip and the steps bar above it;
   - the breadcrumb row only pushed the cart down on phones. */
html body .kx-wa{display:none!important}
@media (max-width:767px){body.cart nav.breadcrumbs{display:none!important}}