/* ============================================================
   SMILE — the product page like Namshi (js/app.js renderPV) and the full-screen photo viewer (js/pdp.js).
   Every rule starts with #pv so the old circle page (story.css) cannot leak in.
   ============================================================ */
#pv.np { background: #FFFFFF; color: #141413; max-width: none; margin: 0; display: flex; flex-direction: column; animation: none; font-family: var(--font-body); }
#pv.np.open { visibility: visible; }

/* top bar: round white buttons over the photo; solid with the name once the photos scroll away */
#pv .np__bar { position: absolute; top: 0; inset-inline: 0; z-index: 4; display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px; transition: background-color .2s, box-shadow .2s; }
#pv .np__ib { position: relative; width: 40px; height: 40px; flex-shrink: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.94); color: #141413; display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 5px rgba(0,0,0,.14); transition: background-color .2s, box-shadow .2s; }
#pv .np__ib svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#pv .np__bartitle { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .2s; }
#pv.np--solid .np__bar { background: #FFFFFF; box-shadow: 0 1px 0 #E3E3DF; }
#pv.np--solid .np__bartitle { opacity: 1; }
#pv.np--solid .np__ib { background: transparent; box-shadow: none; }
#pv .np__bagbtn i { position: absolute; top: 1px; left: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #FFE45C; color: #141413; font: 700 10px/17px var(--font-body); font-style: normal; text-align: center; }
#pv .np__bagbtn i[hidden] { display: none; }

/* photos: full width, swipe, dots; tap = full screen */
#pv .np__scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
#pv .np__gal { position: relative; background: #F3F3F1; }
#pv .np__track { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 3 / 4; max-height: 76vh; }
#pv .np__track::-webkit-scrollbar { display: none; }
#pv .np__slide { flex: 0 0 100%; height: 100%; padding: 0; display: block; scroll-snap-align: start; position: relative; cursor: zoom-in; }
#pv .np__slide img, #pv .np__slide video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; border: 0; border-radius: 0; background: none; display: block; }
#pv .np__slide--video { cursor: pointer; background: #000; }
#pv .np__vtag { position: absolute; top: calc(64px + env(safe-area-inset-top, 0px)); inset-inline-start: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.92); font-size: 12px; font-weight: 700; }
#pv .np__vtag svg { width: 12px; height: 12px; fill: currentColor; stroke: none; }
#pv .np__dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
#pv .np__dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(20,20,19,.25); transition: transform .2s, background-color .2s; }
#pv .np__dots i.on { background: #141413; transform: scale(1.25); }
#pv .np__3d { position: absolute; bottom: 10px; inset-inline-start: 12px; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: 999px; background: rgba(255,255,255,.94); color: #141413; font: 600 12.5px/1 var(--font-body); cursor: pointer; box-shadow: 0 1px 5px rgba(0,0,0,.12); }
#pv .np__3d[hidden] { display: none; }
#pv .np__3d svg, #pv .np__zoom svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#pv .np__zoom { position: absolute; bottom: 10px; inset-inline-end: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.94); color: #141413; display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 5px rgba(0,0,0,.12); }

/* the words: brand, name, price, instalments, stars */
#pv .np__body { padding: 16px 16px 8px; }
#pv .np__head { display: grid; gap: 3px; padding-bottom: 14px; border-bottom: 1px solid #E3E3DF; }
#pv .np__brand { justify-self: start; border: 0; background: none; padding: 0; color: #141413; font: 800 15px/1.4 var(--font-body); letter-spacing: .02em; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; cursor: pointer; }
#pv .np__name { margin: 0; font: 400 15px/1.55 var(--font-body); color: #45443F; }
#pv .np__price { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
#pv .np__price b { font-size: 20px; font-weight: 800; }
#pv .np__price s { color: #77766F; font-size: 14px; }
#pv .np__price em { font-style: normal; color: #C8322B; font-weight: 700; font-size: 14px; }
#pv .np__vat { margin: 0; font-size: 12px; color: #77766F; }
#pv .np__tabby { margin: 8px 0 0; font-size: 13px; color: #45443F; }
#pv .np__tabbylogo { display: inline-block; padding: 3px 6px; border-radius: 4px; background: #3BFFC1; color: #141413; font: 800 12px/1 system-ui, sans-serif; letter-spacing: -.01em; direction: ltr; }
#pv .np__rate { justify-self: start; display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 0; border: 0; background: none; color: #141413; font: 400 13px/1 var(--font-body); cursor: pointer; }
#pv .np__rate b { font-weight: 700; }
#pv .np__rate span { color: #77766F; text-decoration: underline; text-underline-offset: 3px; }
#pv .np__stars, .np__stars { --r: 90%; display: inline-block; width: 76px; height: 14px; flex-shrink: 0; background: linear-gradient(to left, #141413 var(--r), #D9D9D5 var(--r));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.9 6.2 6.8.8-5 4.6 1.3 6.7L12 17l-6 3.3 1.3-6.7-5-4.6 6.8-.8z'/%3E%3C/svg%3E") repeat-x right / 15.2px 14px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.9 6.2 6.8.8-5 4.6 1.3 6.7L12 17l-6 3.3 1.3-6.7-5-4.6 6.8-.8z'/%3E%3C/svg%3E") repeat-x right / 15.2px 14px; }

/* colour and size */
#pv .np__sec { padding: 14px 0; border-bottom: 1px solid #E3E3DF; }
#pv .np__row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
#pv .np__row h4 { margin: 0; font: 700 14px/1.4 var(--font-body); }
#pv .np__row h4 b { font-weight: 500; color: #45443F; }
#pv .np__row a { font-size: 13px; color: #141413; text-decoration: underline; text-underline-offset: 3px; }
#pv .np__sw { display: flex; flex-wrap: wrap; gap: 10px; }
#pv .np__sw .swatch { width: 40px; height: 40px; padding: 3px; border-radius: 50%; border: 1.5px solid transparent; background: none; cursor: pointer; }
#pv .np__sw .swatch i { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); }
#pv .np__sw .swatch.on { border-color: #141413; }
#pv .np__sizes { display: flex; flex-wrap: wrap; gap: 8px; }
#pv .np__sizes .size { position: relative; min-width: 56px; height: 44px; padding: 0 12px; border: 1px solid #D9D9D5; border-radius: 8px; background: #FFFFFF; color: #141413; font: 600 14px/1 var(--font-body); display: grid; place-items: center; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
#pv .np__sizes .size.on { border-color: #141413; box-shadow: inset 0 0 0 1px #141413; background: #FFFFFF; color: #141413; }
#pv .np__sizes .size.low::after { content: none; }
#pv .np__sizes .size small { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); padding: 1px 6px; border-radius: 4px; background: #FFF1A8; color: #6E5200; font-size: 9.5px; font-weight: 700; white-space: nowrap; }
#pv .np__fit { margin-top: 16px; padding: 0; border: 0; background: none; color: #45443F; font: 400 13px/1.4 var(--font-body); cursor: pointer; }
#pv .np__fit b { color: #141413; text-decoration: underline; text-underline-offset: 3px; }

/* delivery, returns, payment */
#pv .np__ship { display: grid; gap: 12px; }
#pv .np__shiprow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 0; border: 0; background: none; color: #141413; font: 400 13.5px/1.5 var(--font-body); text-align: start; }
#pv button.np__shiprow { cursor: pointer; }
#pv .np__shiprow svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#pv .np__shiprow span { flex: 1; }
#pv .np__shiprow em { font-style: normal; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

/* the folding details */
#pv .np__acc { border-bottom: 1px solid #E3E3DF; }
#pv .np__acc summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 16px 0; font: 700 14px/1.4 var(--font-body); cursor: pointer; }
#pv .np__acc summary::-webkit-details-marker { display: none; }
#pv .np__acc summary::after { content: ""; width: 8px; height: 8px; margin-inline-end: 4px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
#pv .np__acc[open] summary::after { transform: rotate(-135deg); }
#pv .np__acc ul, #pv .np__acc p { margin: 0 0 16px; color: #45443F; font-size: 13.5px; line-height: 1.8; }
#pv .np__acc ul { padding-inline-start: 18px; }

/* goes with it / similar */
#pv .np__rail { padding: 20px 0 6px; }
#pv .np__rail h3, #pv .np__rev h3 { margin: 0 0 12px; font: 700 17px/1.4 var(--font-body); }
#pv .np__cards { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; scroll-snap-type: x proximity; }
#pv .np__cards::-webkit-scrollbar { display: none; }
#pv .np__card { flex: 0 0 40%; max-width: 180px; display: grid; gap: 3px; align-content: start; padding: 0; border: 0; background: none; color: #141413; font: inherit; text-align: start; cursor: pointer; scroll-snap-align: start; }
#pv .np__cimg { display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 4px; background: #F3F3F1; margin-bottom: 4px; }
#pv .np__cimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
#pv .np__cb { font-size: 12px; font-weight: 800; }
#pv .np__cn { font-size: 12.5px; color: #45443F; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#pv .np__cp { display: flex; gap: 6px; align-items: baseline; font-size: 13px; }
#pv .np__cp s { color: #77766F; font-size: 11.5px; }

/* reviews */
#pv .np__rev { border-bottom: 0; }
#pv .np__revtop { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
#pv .np__revtop > b { font-size: 34px; font-weight: 800; line-height: 1; }
#pv .np__revtop div { display: grid; gap: 4px; }
#pv .np__revtop small { color: #77766F; font-size: 12px; }
#pv .np__review { padding: 12px 0; border-top: 1px solid #E3E3DF; }
#pv .np__rh { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
#pv .np__rh small { color: #77766F; }
#pv .np__review p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.7; color: #45443F; }

/* the bar at the bottom: wishlist + «أضف للحقيبة» */
#pv .np__cta { position: absolute; bottom: 0; inset-inline: 0; z-index: 4; display: flex; gap: 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: #FFFFFF; border-top: 1px solid #E3E3DF; }
#pv .np__wish { width: 52px; height: 52px; flex-shrink: 0; border: 1px solid #D9D9D5; border-radius: 8px; background: #FFFFFF; display: grid; place-items: center; cursor: pointer; }
#pv .np__wish svg { width: 24px; height: 24px; fill: none; stroke: #141413; stroke-width: 1.7; }
#pv .np__wish.on svg { fill: #C8322B; stroke: #C8322B; }
#pv .np__add { flex: 1; height: 52px; border: 0; border-radius: 8px; background: #141413; color: #FFFFFF; font: 700 16px/1 var(--font-body); display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: transform .12s; }
#pv .np__add:active { transform: scale(.98); }
#pv .np__addp { font-weight: 500; font-size: 14px; opacity: .75; }

/* computer: photos in two columns on one side, the words stay beside them (Namshi's desktop page) */
html:not(.phone) #pv .np__bar { background: #FFFFFF; box-shadow: 0 1px 0 #E3E3DF; padding: 10px 28px; }
html:not(.phone) #pv .np__bartitle { opacity: 1; }
html:not(.phone) #pv .np__ib { background: transparent; box-shadow: none; }
html:not(.phone) #pv .np__scroll { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: 36px; align-items: start; width: 100%; max-width: 1280px; margin: 0 auto; padding: 84px 40px 60px; }
html:not(.phone) #pv .np__gal { background: none; }
html:not(.phone) #pv .np__track { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; overflow: visible; aspect-ratio: auto; max-height: none; }
html:not(.phone) #pv .np__slide { aspect-ratio: 3 / 4; height: auto; background: #F3F3F1; }
html:not(.phone) #pv .np__dots, html:not(.phone) #pv .np__zoom { display: none; }
html:not(.phone) #pv .np__3d { top: 12px; bottom: auto; }
html:not(.phone) #pv .np__vtag { top: 12px; }
html:not(.phone) #pv .np__body { position: sticky; top: 84px; padding: 0 0 120px; }
html:not(.phone) #pv .np__cta { inset-inline-start: auto; inset-inline-end: calc((100vw - min(1280px, 100vw)) / 2 + 40px); width: calc((min(1280px, 100vw) - 116px) * .425); padding: 14px 0 18px; border-top: 1px solid #E3E3DF; }

/* ---------- the full-screen photo viewer (js/pdp.js) ---------- */
.vw { position: fixed; inset: 0; z-index: 120; touch-action: none; user-select: none; -webkit-user-select: none; }
.vw__bg { position: absolute; inset: 0; background: #0E0E0D; }
.vw__track { position: absolute; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; touch-action: pan-x; }
.vw__track::-webkit-scrollbar { display: none; }
.vw__fig { flex: 0 0 100%; height: 100%; margin: 0; display: grid; place-items: center; scroll-snap-align: start; overflow: hidden; }
.vw__fig img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .25s cubic-bezier(.2,.8,.2,1); -webkit-user-drag: none; }
.vw__fig img.is-zoom { transition: none; cursor: grab; }
.vw--in .vw__track { visibility: hidden; }
.vw__top { position: absolute; top: 0; inset-inline: 0; display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px; color: #FFFFFF; pointer-events: none; }
.vw__n { font: 600 14px/1 var(--font-body); direction: ltr; opacity: .9; }
.vw__x { pointer-events: auto; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #FFFFFF; display: grid; place-items: center; cursor: pointer; }
.vw__x svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.vw__dots { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: 0; right: 0; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.vw__dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.35); transition: transform .2s, background-color .2s; }
.vw__dots i.on { background: #FFFFFF; transform: scale(1.25); }
.vw__ghost { position: fixed; z-index: 121; object-fit: cover; pointer-events: none; transform-origin: 50% 50%; will-change: transform; }
html.vw-open body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  #pv .np__dots i, .vw__dots i, .vw__fig img { transition: none; }
}
