/* ===== صفحة المنتج v2 ===== */
body { --acc: #a78bfa; }

/* المعرض */
.ap-gallery { position: sticky; top: 96px; }
.ap-gallery::before { content: ""; position: absolute; inset: 8% 6% 20%; background: radial-gradient(closest-side, color-mix(in srgb, var(--acc) 35%, transparent), transparent); filter: blur(40px); z-index: -1; }
.ap-main-media { border-radius: 30px; border: 1px solid color-mix(in srgb, var(--acc) 30%, rgba(255,255,255,.06)); background: #07061a; box-shadow: 0 40px 90px rgba(0,0,0,.55); cursor: zoom-in; touch-action: pan-y; user-select: none; }
.ap-main-media.is-video { cursor: default; }
.ap-main-media img { -webkit-user-drag: none; animation: apFade .35s ease; }
@keyframes apFade { from { opacity: 0; transform: scale(1.015); } }
.ap-nav { position: absolute; top: calc(50% - 60px); z-index: 3; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #fff; background: rgba(10,8,30,.55); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity .2s, background .2s; }
.ap-gallery:hover .ap-nav, .ap-nav:focus-visible { opacity: 1; }
.ap-nav:hover { background: var(--acc); color: #0b0920; }
.ap-nav.prev { right: 14px; } .ap-nav.next { left: 14px; }
.ap-count { position: absolute; top: 16px; left: 16px; z-index: 3; padding: 5px 12px; border-radius: 99px; font-size: .78rem; font-weight: 800; letter-spacing: .04em; direction: ltr; background: rgba(10,8,30,.6); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(8px); }
.ap-thumbs { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 8px; scrollbar-width: none; mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.ap-thumbs::-webkit-scrollbar { display: none; }
.ap-thumbs button { flex: none; width: 72px; height: 72px; scroll-snap-align: center; opacity: .55; transition: opacity .2s, transform .2s, border-color .2s; }
.ap-thumbs button:hover { opacity: .9; }
.ap-thumbs button[aria-current="true"] { opacity: 1; border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 30%, transparent); }
@media (max-width: 960px) { .ap-gallery { position: relative; top: 0; } .ap-nav { opacity: 1; width: 38px; height: 38px; } }

/* معلومات + الشراء */
.ap-buy h1 { letter-spacing: -.01em; }
.ap-tag { background: linear-gradient(90deg, var(--acc), #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ap-meta li { background: transparent; border: 1px solid color-mix(in srgb, var(--acc) 35%, rgba(255,255,255,.08)); color: #e9e5ff; }
.ap-box { position: relative; padding: 24px; border-radius: 28px; background: radial-gradient(120% 60% at 100% 0%, color-mix(in srgb, var(--acc) 16%, transparent), transparent 60%), #100e28; border: 1px solid color-mix(in srgb, var(--acc) 30%, rgba(255,255,255,.06)); box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.ap-durs button { position: relative; align-items: flex-start; text-align: start; gap: 2px; padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.08); transition: border-color .2s, background .2s, transform .15s; }
.ap-durs button:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--acc) 45%, transparent); }
.ap-durs button span { font-weight: 700; color: var(--ik-muted); font-size: .9rem; }
.ap-durs button b { font-family: var(--font-heading); font-size: 1.35rem; color: #fff; line-height: 1.2; }
.ap-durs button b i { font-style: normal; font-size: .7em; color: var(--ik-muted); }
.ap-durs button small { color: var(--ik-faint); font-size: .76rem; }
.ap-durs button em { position: absolute; top: -9px; left: 12px; font-style: normal; font-size: .7rem; font-weight: 800; padding: 2px 9px; border-radius: 99px; color: #052e16; background: #4ade80; }
.ap-durs button em.life { color: #1e1b4b; background: #fbbf24; }
.ap-durs button[aria-checked="true"] { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 14%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 20%, transparent), 0 12px 30px rgba(0,0,0,.3); }
.ap-durs button[aria-checked="true"] span { color: #fff; }
.ap-durs button[aria-checked="true"] small { color: var(--acc); }
.ap-price b { font-size: 3rem; letter-spacing: -.02em; }
.ap-price .off { background: #4ade80; color: #052e16; font-weight: 800; }
.ap-cta { min-height: 60px; border-radius: 18px; font-size: 1.15rem; box-shadow: 0 16px 40px color-mix(in srgb, var(--acc) 40%, transparent); }
.ap-trust { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.07); }
.ap-trust li { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; line-height: 1.4; color: var(--ik-faint); }
.ap-trust li::before { content: none; }
.ap-trust svg { color: var(--acc); }
.ap-trust b { display: block; color: #fff; font-size: .88rem; }

/* عناوين الأقسام */
.ap-sec h2 { display: flex; align-items: center; gap: 14px; }
.ap-sec h2::after { content: ""; flex: 1; height: 1px; background: linear-gradient(270deg, color-mix(in srgb, var(--acc) 50%, transparent), transparent); }

/* المميزات: قائمة مرقّمة */
.ap-feats { grid-template-columns: repeat(2, 1fr); gap: 0 48px; }
.ap-feats li { display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: start; padding: 22px 0; border-radius: 0; background: none; border: 0; border-bottom: 1px solid rgba(255,255,255,.07); transform: none !important; }
.ap-feats .n { font-family: var(--font-heading); font-weight: 800; font-size: 2.3rem; line-height: 1; color: transparent; -webkit-text-stroke: 1.2px color-mix(in srgb, var(--acc) 70%, #fff); transition: color .25s; }
.ap-feats li:hover .n { color: var(--acc); }
.ap-feats b { font-size: 1.15rem; margin-bottom: 4px; }
.ap-feats p { margin: 0; color: var(--ik-muted); line-height: 1.75; }
@media (max-width: 760px) { .ap-feats { grid-template-columns: 1fr; } }

/* الخطوات: خط زمني */
.ap-steps { position: relative; gap: 22px; }
.ap-steps::before { content: ""; position: absolute; top: 20px; right: 5%; left: 5%; height: 2px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--acc) 60%, transparent), transparent); }
.ap-steps li { padding: 64px 4px 0; background: none; border: 0; text-align: center; color: var(--ik-muted); line-height: 1.7; }
.ap-steps li::before { top: 0; inset-inline-start: 50%; transform: translateX(50%); width: 42px; height: 42px; border-radius: 50%; font-size: 1rem; background: #0e0c24; color: #fff; border: 2px solid var(--acc); box-shadow: 0 0 0 6px rgba(14,12,36,.9), 0 0 24px color-mix(in srgb, var(--acc) 50%, transparent); }
.ap-steps b { margin-bottom: 4px; }
@media (max-width: 960px) { .ap-steps::before { display: none; } }

/* منتجات ثانية */
.ap-others { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.ap-other { padding: 0; align-items: stretch; gap: 0; overflow: hidden; border-radius: 22px; background: #100e28; }
.ap-o-art { aspect-ratio: 1; overflow: hidden; background: #07061a; display: grid; place-items: center; }
.ap-o-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.ap-o-art img.ic { width: 40%; height: auto; }
.ap-other:hover .ap-o-art img { transform: scale(1.06); }
.ap-o-txt { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 14px 16px; }
.ap-o-txt span { font-size: .8rem; }

/* عارض الصور */
.ap-light { position: fixed; inset: 0; margin: auto !important; padding: 0; border: 0; background: transparent; max-width: min(92vw, 1100px); max-height: 92vh; overflow: visible; }
.ap-light::backdrop { background: rgba(4,3,14,.88); backdrop-filter: blur(8px); }
.ap-light img { display: block; max-width: min(92vw, 1100px); max-height: 92vh; border-radius: 20px; box-shadow: 0 40px 120px rgba(0,0,0,.7); }
.ap-light-x { position: absolute; top: -16px; left: -16px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: #15122f; color: #fff; cursor: pointer; font-size: 1rem; }

/* شريط الشراء الثابت */
.ap-bar { position: fixed; z-index: 60; left: 50%; bottom: 18px; width: min(720px, calc(100vw - 24px)); transform: translate(-50%, 140%); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.ap-bar.on { transform: translate(-50%, 0); }
.ap-bar-in { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 22px; background: rgba(16,14,40,.82); border: 1px solid color-mix(in srgb, var(--acc) 35%, rgba(255,255,255,.1)); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 20px 60px rgba(0,0,0,.55); }
.ap-bar-in img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.ap-bar-txt { flex: 1; min-width: 0; display: grid; }
.ap-bar-txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-bar-txt span { color: var(--ik-muted); font-size: .85rem; }
.ap-bar-txt span b { color: var(--acc); }
.ap-bar-buy { flex: none; padding: 0 22px; min-height: 46px; display: grid; place-items: center; border-radius: 14px; font-weight: 800; color: #fff; text-decoration: none; background: linear-gradient(100deg, #22d3ee, #8b5cf6); }
@media (prefers-reduced-motion: reduce) { .ap-main-media img { animation: none; } }

/* ===== تعديلات: صندوق شراء أعرض + مميزات أوضح ===== */
.ap-top { grid-template-columns: minmax(0, 1fr) minmax(420px, 520px); gap: clamp(28px, 4vw, 56px); }
.ap-buy h1 { font-size: clamp(2rem, 3vw, 2.8rem); }
.ap-box { padding: 28px; }
.ap-durs { gap: 12px; }
.ap-durs button { padding: 18px 18px 16px; }
.ap-durs button b { font-size: 1.6rem; white-space: nowrap; }
.ap-durs button span { font-size: 1rem; }
.ap-durs button small { font-size: .82rem; }
.ap-trust li { font-size: .85rem; }
@media (max-width: 960px) { .ap-top { grid-template-columns: 1fr; } }

.ap-feats { gap: 14px; }
.ap-feats li { grid-template-columns: 58px 1fr; gap: 16px; padding: 20px 22px; border-radius: 20px; background: linear-gradient(135deg, color-mix(in srgb, var(--acc) 9%, transparent), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.08); transition: border-color .2s, background .2s; }
.ap-feats li:hover { border-color: color-mix(in srgb, var(--acc) 50%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--acc) 16%, transparent), rgba(255,255,255,.03)); }
.ap-feats .n { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; font-size: 1.25rem; color: #0b0920; -webkit-text-stroke: 0; background: var(--acc); box-shadow: 0 8px 22px color-mix(in srgb, var(--acc) 40%, transparent); }
.ap-feats li:hover .n { color: #0b0920; }
.ap-feats b { font-size: 1.2rem; color: #fff; }
.ap-feats p { color: #d6d2ef; font-size: 1rem; }

/* ===== توازن: العنوان فوق بعرض الصفحة، والمعرض + الشراء جنب بعض بنفس الارتفاع ===== */
.ap-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 520px); gap: 12px clamp(28px, 4vw, 56px); align-items: end; margin-bottom: 26px; }
.ap-head h1 { font-family: var(--font-heading); font-weight: 800; font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.15; margin: 0; letter-spacing: -.01em; }
.ap-head .ap-tag { margin: 8px 0 0; font-family: var(--font-heading); font-weight: 700; font-size: 1.35rem; background: linear-gradient(90deg, var(--acc), #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ap-head .ap-lead { margin: 0; color: var(--ik-muted); line-height: 1.8; font-size: 1.02rem; }
.ap-head .ap-meta { margin-top: 12px; }
.ap-top { align-items: stretch; }
.ap-buy { display: flex; }
.ap-buy .ap-box { margin: 0; flex: 1; display: flex; flex-direction: column; }
.ap-buy .ap-box .ap-price-row { margin-top: auto; padding-top: 18px; }
.ap-gallery { align-self: start; }
@media (max-width: 960px) { .ap-head { grid-template-columns: 1fr; } }

/* حركة السعر */
#apPriceNum { display: inline-block; font-variant-numeric: tabular-nums; }
#apPriceNum.bump { animation: apBump .55s cubic-bezier(.2,.8,.2,1); }
@keyframes apBump { 0% { transform: translateY(6px) scale(.96); filter: blur(2px); opacity: .6; } 40% { color: var(--acc); text-shadow: 0 0 24px color-mix(in srgb, var(--acc) 60%, transparent); } 100% { transform: none; filter: none; opacity: 1; } }
