/* v139: صفحة الصنف «السريعة» — نص شاشة: الصورة والسعر والخيارات بنظرة وحدة، وزر واحد فيه العدد */
.it-sheet.qk { padding: 26px 18px calc(16px + env(safe-area-inset-bottom)); border-radius: 32px 32px 0 0; }
.it-sheet.qk::before { display: block; position: absolute; top: 9px; left: 50%; width: 42px; height: 5px; margin: 0 0 0 -21px; border-radius: 5px; background: var(--line); }
@media (min-width: 640px) { .it-sheet.qk { border-radius: 28px; } .it-sheet.qk::before { display: none; } }
.it-sheet.qk .sx { top: 14px; left: 14px; width: 34px; height: 34px; font-size: 19px; background: var(--soft); color: var(--tx); }

.qk-top { display: flex; align-items: center; gap: 14px; padding-top: 8px; }
.qk-pic { position: relative; width: 132px; height: 132px; flex: none; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.9) 0, rgba(var(--cr), .14) 72%); display: grid; place-items: center; overflow: visible; isolation: isolate; }
.qk-pic img.bl { display: none !important; }
.qk-pic img:not(.bl) { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; animation: qkDrop .7s .05s cubic-bezier(.2,.9,.3,1.2) both; box-shadow: 0 14px 26px -14px rgba(0,0,0,.5); }
.qk-pic.is-cut img:not(.bl) { width: 92%; height: 92%; object-fit: contain; border-radius: 0; box-shadow: none; filter: drop-shadow(0 12px 14px rgba(0,0,0,.3)); }
.qk-pic img.fade { animation: qkFade .3s ease; }
.qk-pic.noimg i { font-style: normal; font-family: var(--tf); font-size: 46px; font-weight: 800; color: var(--c); opacity: .6; }
.qk-bd { position: absolute; bottom: 2px; right: -4px; font-style: normal; font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 12px; background: var(--c); color: var(--on); box-shadow: 0 6px 12px -6px rgba(0,0,0,.4); }
.qk-inf { flex: 1; min-width: 0; animation: qkUp .5s .1s cubic-bezier(.2,.8,.3,1) both; }
.qk-inf h3 { margin: 0; font-family: var(--tf); font-size: 1.55em; font-weight: 800; line-height: 1.2; color: var(--tx); }
.qk-inf .bdg { display: inline-block; margin-top: 4px; }
.qk-d { margin: 5px 0 0; font-size: .86em; color: var(--mu); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.qk-pr { display: inline-block; margin-top: 8px; font-family: var(--tf); font-size: 1.6em; font-weight: 800; color: var(--c); line-height: 1; }
.qk-pr i { font-family: var(--ff); font-style: normal; font-size: .55em; }
.qk-pr small { font-family: var(--ff); font-size: .45em; color: var(--mu); }
.qk-acts { display: flex; gap: 6px; margin-top: 10px; }
.qk-acts .lk { height: 32px; padding: 0 10px; border-radius: 11px; font-size: .78em; }
.qk-acts .qk-sh { background: var(--soft); color: var(--tx); border-color: var(--line); }

.it-sheet.qk .is-pre { margin-top: 14px; }
.qk-sec { margin-top: 18px; animation: qkUp .5s .18s cubic-bezier(.2,.8,.3,1) both; }
.qk-sec + .qk-sec { animation-delay: .24s; }
.qk-sec > b { display: block; font-size: .95em; font-weight: 800; margin-bottom: 9px; color: var(--tx); }
.qk-pills { display: flex !important; flex-direction: row !important; flex-wrap: wrap; gap: 7px !important; }
.qk-pills .opt, .qk-pills .tag { width: auto; flex: 0 0 auto; text-align: center; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px; border-radius: 14px; background: var(--bg); border: 1.5px solid var(--line); color: var(--tx); font-size: .9em; font-weight: 800; cursor: pointer; transition: background .2s, border-color .2s, color .2s, transform .15s; -webkit-tap-highlight-color: transparent; }
.qk-pills .opt:active, .qk-pills .tag:active { transform: scale(.95); }
.qk-pills .opt small, .qk-pills .tag small { font-weight: 600; font-size: .85em; color: var(--mu); }
.qk-pills .opt .oi { width: 26px; height: 26px; border-radius: 8px; object-fit: cover; }
.qk-pills .opt.on, .qk-pills .tag.on { background: var(--tx); border-color: var(--tx); color: var(--bg); }
.qk-pills .opt.on small, .qk-pills .tag.on small { color: var(--bg); opacity: .75; }
.qk-pills .opt.out { opacity: .45; }
.qk-pills .tag .tk, .qk-pills .opt .rd { display: none; }

.qk-note { margin-top: 16px; text-align: center; }
.qk-nt { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--mu); font: inherit; font-size: .86em; font-weight: 700; cursor: pointer; padding: 6px 10px; border-radius: 10px; }
.qk-nt.on { color: var(--c); }
.qk-note textarea { width: 100%; margin-top: 6px; border-radius: 14px; font-size: .9em; resize: none; text-align: start; }

.it-sheet.qk .is-foot.qk-bar { position: sticky; bottom: calc(-16px - env(safe-area-inset-bottom)); margin: 18px -18px calc(-16px - env(safe-area-inset-bottom)); padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); background: var(--card); border-top: 0; display: block; }
.it-sheet.qk .is-foot.qk-bar::before { display: none; }
.qk-add { display: flex; align-items: center; gap: 8px; height: 58px; padding: 0 8px; border-radius: 20px; background: var(--c); color: var(--on); box-shadow: 0 16px 30px -14px rgba(var(--cr), .9); animation: qkUp .45s .2s cubic-bezier(.2,.9,.3,1.2) both; }
.qk-go { flex: 1; height: 100%; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 0; background: none; color: inherit; font: inherit; font-size: 1em; font-weight: 800; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.qk-go b { font-weight: 800; white-space: nowrap; }
.qk-go b::before { content: "·"; margin: 0 6px 0 2px; opacity: .7; }
.qk-go:active { transform: scale(.97); }
.qk-q { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.16); flex: none; }
.qk-q button { width: 34px; height: 34px; border: 0; border-radius: 11px; background: rgba(255,255,255,.2); color: inherit; font: inherit; font-size: 19px; font-weight: 800; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.qk-q #isQty { min-width: 22px; text-align: center; font-weight: 800; }
body.light .qk-q, body.light .qk-q button { background: rgba(255,255,255,.22); }

.qk-fly { position: fixed; z-index: 400; border-radius: 50%; object-fit: cover; pointer-events: none; transition: left .8s cubic-bezier(.5,-.3,.6,1), top .8s cubic-bezier(.5,-.3,.6,1), transform .8s ease, opacity .8s ease; }
@keyframes qkDrop { from { opacity: 0; transform: translateY(-30px) scale(.7) rotate(-40deg); } }
@keyframes qkUp { from { opacity: 0; transform: translateY(12px); } }
@keyframes qkFade { from { opacity: 0; transform: scale(.9); } }
@media (max-width: 360px) { .qk-pic { width: 108px; height: 108px; } .qk-inf h3 { font-size: 1.35em; } }
@media (prefers-reduced-motion: reduce) { .qk-pic img, .qk-inf, .qk-sec, .qk-add { animation: none !important; } }

/* v153b: زر «أضف للسلة» بنافذة الصنف: الزر لحاله واضح، والعداد جنبه بكرت فاتح */
.qk-add { height: 56px; padding: 0; gap: 10px; background: none; box-shadow: none; color: var(--tx); }
.qk-go { height: 56px; justify-content: center; padding: 0 16px; border-radius: 18px; background: var(--c); color: var(--on); box-shadow: 0 14px 26px -14px rgba(var(--cr), .9); }
.qk-go svg { flex: none; }
.qk-q, body.light .qk-q { height: 56px; padding: 5px; gap: 2px; border-radius: 18px; background: var(--soft); border: 1px solid var(--line); color: var(--tx); }
.qk-q button, body.light .qk-q button { width: 44px; height: 44px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--tx); }
.qk-q button:active { transform: scale(.9); }

/* =========================================================
   v164: نافذة الصنف بثلاث طرق — ورقة من تحت (الأصلي، الصورة بتلف) · صفحة كاملة · كرت بالنص
   ========================================================= */
.sheet.on #isImg img:not(.bl) { animation: ivwSpin .7s cubic-bezier(.2,.9,.3,1.2); }
/* صفحة كاملة */
.ivw-full #itemSheet { align-items: stretch; padding: 0; }
.ivw-full #itemSheet .sbox { height: 100%; max-height: none; border-radius: 0; display: flex; flex-direction: column; transform: translateY(100%); }
.ivw-full #itemSheet.on .sbox { transform: none; }
.ivw-full #itemSheet .sbox::before { display: none; }
.ivw-full #itemSheet .sx { z-index: 5; background: color-mix(in srgb, var(--card) 85%, transparent); }
.ivw-full #itemSheet #itemBody { flex: 1; display: flex; flex-direction: column; }
.ivw-full #itemSheet .qk-top { flex-direction: column; align-items: stretch; gap: 14px; }
.ivw-full #itemSheet .qk-pic { width: auto !important; height: 46vh !important; max-height: 380px; margin: -26px -18px 0; border-radius: 0 0 30px 30px; overflow: hidden; background: color-mix(in srgb, var(--c) 10%, var(--card)); }
.ivw-full #itemSheet .qk-pic img:not(.bl) { width: 100%; height: 100%; object-fit: cover; border-radius: 0; animation: ivwZoom 6s ease-out both; }
.ivw-full #itemSheet .qk-pic.is-cut img:not(.bl) { object-fit: contain; padding: 18px; }
.ivw-full #itemSheet .qk-inf { text-align: start; }
.ivw-full #itemSheet .qk-inf h3 { font-size: 1.6em; }
.ivw-full #itemSheet .is-foot { margin-top: auto; }
/* كرت بالنص */
.ivw-card #itemSheet { align-items: center; padding: 16px; }
.ivw-card #itemSheet .sbox { max-height: 86vh; border-radius: 28px; padding-bottom: 16px; transform: scale(.88); opacity: 0; transition: transform .35s cubic-bezier(.34,1.56,.64,1), opacity .25s; }
.ivw-card #itemSheet.on .sbox { transform: none; opacity: 1; }
.ivw-card #itemSheet .sbox::before { display: none; }
.ivw-card #itemSheet .is-foot.qk-bar { bottom: -16px; margin-bottom: -16px; padding-bottom: 16px; border-radius: 0 0 28px 28px; }
@keyframes ivwSpin { from { transform: rotate(-120deg) scale(.6); opacity: 0; } }
@keyframes ivwZoom { from { transform: scale(1.15); } }
/* طيران الصنف للسلة + نطّة العدّاد */
.cfx-fly { position: fixed; z-index: 9999; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; pointer-events: none; box-shadow: 0 8px 18px rgba(0,0,0,.25); transition: transform .7s cubic-bezier(.5,-.3,.6,1), opacity .7s; }
.cfx-pop { animation: cfxPop .45s cubic-bezier(.34,1.56,.64,1); }
@keyframes cfxPop { 40% { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .cfx-fly { display: none; } .sheet.on #isImg img, .ivw-full #itemSheet .qk-pic img { animation: none !important; } }

/* ===== v204: تبديل الحجم بحركة + معاينة الصورة بكبير ===== */
#isImg { cursor: zoom-in; -webkit-tap-highlight-color: transparent; }
#isImg.noimg { cursor: default; }
#isImg img:not(.bl) { scale: var(--szs, 1); transition: scale .6s cubic-bezier(.3,1.7,.5,1); }
#isImg img.sw-out { position: absolute; inset: 0; margin: auto; z-index: 1; animation: swOut .45s cubic-bezier(.5,0,.9,.5) forwards !important; pointer-events: none; }
#isImg img.sw-in { position: relative; z-index: 2; animation: swIn .62s cubic-bezier(.2,.9,.3,1.25) both !important; }
.qk-pic.is-cut img.sw-out { width: 92%; height: 92%; }
.is-img img.sw-out { width: 100%; height: 100%; }
@keyframes swOut { to { opacity: 0; transform: translateX(-70%) rotate(-150deg) scale(.45); filter: blur(2px); } }
@keyframes swIn { 0% { opacity: 0; transform: translateX(70%) rotate(160deg) scale(.45); } 70% { opacity: 1; } 100% { transform: none; } }
/* حلقة بتنبض لما يتبدل الحجم */
#isImg::after { content: ""; position: absolute; inset: -6px; border-radius: inherit; border: 2.5px solid var(--c); opacity: 0; pointer-events: none; z-index: 3; }
.qk-pic#isImg::after { border-radius: 50%; }
#isImg.sw-ring::after { animation: swRing .7s ease-out; }
@keyframes swRing { 0% { opacity: .9; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.18); } }
/* زر صغير على الصورة: «كبّر» */
.qk-zm { position: absolute; top: 4px; left: 4px; z-index: 4; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--card) 85%, transparent); color: var(--tx); box-shadow: 0 6px 14px -6px rgba(0,0,0,.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); pointer-events: none; animation: qkUp .4s .5s both; }
.ivw-full #itemSheet .qk-zm { top: auto; bottom: 14px; left: 14px; }
/* الأحجام: خلفية بتزحلق للحجم المختار */
.qk-sz { position: relative; isolation: isolate; }
.qk-sz .qk-th { position: absolute; top: 0; left: 0; z-index: -1; border-radius: 14px; background: var(--tx); box-shadow: 0 10px 20px -10px rgba(0,0,0,.5); transition: transform .45s cubic-bezier(.3,1.4,.5,1), width .45s cubic-bezier(.3,1.4,.5,1), height .3s, opacity .2s; pointer-events: none; font-style: normal; }
.qk-sz .opt { position: relative; transition: color .3s, border-color .3s, background .3s; }
.qk-sz .opt.on { background: transparent !important; border-color: transparent !important; color: var(--bg) !important; }
.qk-sz .opt.on .oi { animation: qkPopI .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes qkPopI { 50% { transform: scale(1.35) rotate(-8deg); } }
/* السعر بينط لما يتغيّر */
.num-pop { display: inline-block; animation: numPop .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes numPop { 0% { transform: scale(1); } 35% { transform: scale(1.22) translateY(-3px); } 100% { transform: scale(1); } }

/* معاينة الصورة */
.ipv { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); font-family: var(--ff); }
.ipv-bg { position: absolute; inset: 0; background: rgba(8,8,10,.9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); opacity: 0; transition: opacity .35s; }
.ipv.on .ipv-bg { opacity: 1; }
.ipv-st { position: relative; width: min(calc(100vw - 32px), 60vh, 560px); aspect-ratio: 1; margin-top: -6vh; transition: transform .5s cubic-bezier(.2,.9,.25,1.05); touch-action: pan-y; cursor: zoom-in; }
.ipv-st.zm { transform: scale(1.8) !important; cursor: zoom-out; touch-action: auto; }
.ipv-st img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 28px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.8); }
.ipv-st img.ct { object-fit: contain; border-radius: 0; box-shadow: none; filter: drop-shadow(0 24px 30px rgba(0,0,0,.6)); }
.ipv-st img.sw-out { animation: swOut .45s cubic-bezier(.5,0,.9,.5) forwards; }
.ipv-st img.sw-in { animation: swIn .62s cubic-bezier(.2,.9,.3,1.25) both; }
.ipv-cap { position: relative; margin-top: 22px; text-align: center; color: #fff; opacity: 0; transform: translateY(14px); transition: .4s .15s; max-width: 100%; }
.ipv.on .ipv-cap { opacity: 1; transform: none; }
.ipv-cap b { display: block; font-family: var(--tf); font-size: 1.35em; font-weight: 800; line-height: 1.3; }
.ipv-cap > span { display: block; margin-top: 3px; font-size: .92em; opacity: .75; min-height: 1.4em; }
.ipv-cap small { display: block; margin-top: 10px; font-size: .75em; opacity: .5; }
.ipv-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
.ipv-dots button { min-height: 38px; padding: 0 14px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); color: #fff; font: inherit; font-size: .85em; font-weight: 800; cursor: pointer; transition: .25s; }
.ipv-dots button.on { background: #fff; color: #111; border-color: #fff; transform: translateY(-2px); }
.ipv-x { position: absolute; top: calc(14px + env(safe-area-inset-top)); left: 14px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .3s .2s; }
.ipv.on .ipv-x { opacity: 1; }
.ipv.off .ipv-bg, .ipv.off .ipv-cap, .ipv.off .ipv-x { opacity: 0; transition-delay: 0s; }
.ipv.off .ipv-st { transform: scale(.6) !important; opacity: 0; transition: transform .3s, opacity .3s; }
@media (prefers-reduced-motion: reduce) { #isImg img.sw-in, #isImg img.sw-out, .ipv-st img.sw-in, .ipv-st img.sw-out { animation: none !important; } #isImg img.sw-out, .ipv-st img.sw-out { display: none; } .ipv-st { transition: none; } }
