/* newfoundlandart.com/photo-prints (photo-prints.php). Design B's colours and fonts
   come from css/nla-b.css; this lays out the Posterjack-style product page, the
   material preview and the crop editor. */
.pp { padding-bottom: 40px; }
.pp-crumbs { font-size: 14px; color: var(--muted); margin: 16px 0 10px; }
.pp-crumbs a { color: var(--navy); }

.pp-top { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 36px; align-items: start; }
@media (max-width: 900px) { .pp-top { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- preview ---------- */
.pp-gallery { position: sticky; top: 12px; }
@media (max-width: 900px) { .pp-gallery { position: static; } }
.pp-stage { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border: 2px solid var(--navy); background: #fff; }
.pp-scene { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.pp-scene.v-wall { background: linear-gradient(#e9e4da 0 82%, #b9a58b 82% 84%, #9c8669 84%); }
.pp-scene.v-flat { background: #f5f4ef; }
.pp-obj { position: relative; transition: width .25s, height .25s, transform .3s; box-shadow: 0 10px 24px rgba(0, 0, 0, .28); }
.pp-scene.v-wall .pp-obj { margin-bottom: 8%; }
.pp-obj img { display: block; width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.pp-sheen { position: absolute; inset: 0; z-index: 2; pointer-events: none; }

/* paper: a white border round the photo, thin and flat */
.pp-scene.k-paper .pp-obj { background: #fff; padding: 3.2%; box-shadow: 0 4px 12px rgba(0, 0, 0, .22); }
.pp-scene.m-phglos .pp-sheen { background: linear-gradient(115deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .38) 45%, rgba(255, 255, 255, 0) 60%); }
.pp-scene.m-phfine .pp-obj img { filter: saturate(.94) contrast(.97); }
/* canvas: weave, and a satin glow for the artist grade */
.pp-scene.k-canvas .pp-sheen { background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .018) 0 1px, transparent 1px 2px), repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 2px); }
.pp-scene.m-phsatn .pp-sheen { background: linear-gradient(120deg, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, 0) 65%), repeating-linear-gradient(0deg, rgba(0, 0, 0, .015) 0 1px, transparent 1px 2px); }
.pp-scene.m-phsatn .pp-obj img { filter: saturate(1.08) contrast(1.04); }
/* the 3D view (js render3D, after canvas.ca's builder) */
.pp-3d { display: none; position: absolute; inset: 0; }
.pp-scene.v-3d { background: linear-gradient(#ece8df, #ddd7cb); }
.pp-scene.v-3d .pp-obj { display: none; }
.pp-scene.v-3d .pp-3d { display: block; }
.pp-3d-front { position: absolute; overflow: hidden; transform: perspective(600px) rotateY(28deg); transform-origin: left center; box-shadow: 10px 12px 26px rgba(0, 0, 0, .3); background: #fff; }
.pp-3d-front img { display: block; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.pp-scene.k-paper .pp-3d-front { padding: 3%; box-sizing: border-box; }
.pp-3d-edge { position: absolute; overflow: hidden; transform: perspective(600px) rotateY(-48deg); transform-origin: right center; filter: brightness(.75); }
.pp-3d-edge i { position: absolute; inset: 0; background-size: cover; background-position: left center; }
.pp-3d-edge i.is-mirrored { transform: scaleX(-1); }
.pp-stage-note { position: absolute; left: 10px; bottom: 8px; z-index: 3; font-size: 13px; background: rgba(255, 255, 255, .88); padding: 3px 8px; color: var(--muted); }
/* upload buttons on the picture and under the intro, so it's found straight away */
.pp-stage-up { position: absolute; right: 10px; bottom: 8px; z-index: 4; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border: 0; background: var(--orange-t); color: #fff; font: 600 15px var(--sans); cursor: pointer; box-shadow: 0 3px 10px rgba(0, 0, 0, .25); }
.pp-stage-up:hover, .pp-top-up:hover { filter: brightness(1.08); }
.pp-top-up { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin: 0 0 18px; padding: 12px 14px; min-height: 52px;
  border: 2px dashed var(--orange-t); background: #fff8f1; color: var(--ink); font: 15px/1.4 var(--sans); cursor: pointer; }
.pp-top-up svg { color: var(--orange-t); flex-shrink: 0; }
.pp-top-up[hidden] { display: none; }
@media (max-width: 520px) { .pp-stage-note { display: none; } .pp-stage-up { left: 10px; right: 10px; justify-content: center; } }
.pp-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.pp-thumbs button { flex: 1; min-height: 44px; border: 2px solid var(--line); background: #fff; font: 600 14px var(--sans); color: var(--navy); cursor: pointer; }
.pp-thumbs button.on { border-color: var(--navy); background: var(--ice); }

/* ---------- buy box ---------- */
.pp-buy h1 { font: 400 clamp(26px, 3.4vw, 36px)/1.15 var(--serif); color: var(--navy); margin: 0 0 8px; }
.pp-price { font-size: 18px; margin-bottom: 10px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pp-price .now { font: 400 30px var(--serif); color: var(--ink); }
.pp-price del { color: var(--muted); }
.pp-price .save { background: var(--mag); color: #fff; font-size: 13px; font-weight: 600; padding: 3px 8px; }
.pp-offer { margin: -4px 0 12px; font-size: 15px; color: var(--ink); }
.pp-offer b { color: var(--mag); }
.pp-lede { margin: 0 0 18px; color: var(--ink); line-height: 1.55; }
.pp-step { border-top: 1px solid var(--line); padding: 16px 0 6px; }
.pp-step h2 { font: 400 19px var(--serif); color: var(--navy); margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.pp-step h2 b { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font: 600 14px var(--sans); }
.pp-guide { margin-left: auto; font: 600 14px var(--sans); color: var(--orange-t); }
.pp-mats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pp-mat { display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 10px; text-align: left; padding: 10px; min-height: 64px;
  border: 2px solid var(--line); background: #fff; cursor: pointer; font-family: var(--sans); color: var(--ink); }
.pp-mat .sw { grid-row: 1 / 3; width: 38px; height: 38px; border: 1px solid #0002; align-self: center; }
.pp-mat b { font-size: 15px; line-height: 1.2; }
.pp-mat small { color: var(--muted); font-size: 13px; }
.pp-mat.on { border-color: var(--orange-t); box-shadow: inset 0 0 0 1px var(--orange-t); background: #fff8f1; }
.sw-phfine { background: #f4f1ea; }
.sw-phglos { background: linear-gradient(135deg, #fff 0 35%, #dfe8f2 50%, #fff 65%); }
.sw-phcanv { background: repeating-linear-gradient(0deg, #e9e3d6 0 2px, #f6f2ea 2px 4px), #f1ece2; }
.sw-phsatn { background: linear-gradient(135deg, #f6f2ea 20%, #fffdf7 45%, #e8e1d2 75%); }
.pp-blurb { color: var(--muted); font-size: 15px; margin: 10px 0 0; line-height: 1.5; }
.pp-shapes { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-shapes button, .pp-seg button { min-height: 42px; padding: 0 14px; border: 2px solid var(--line); background: #fff; cursor: pointer; font: 600 14px var(--sans); color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.pp-shapes button.on, .pp-seg button.on { border-color: var(--navy); background: var(--navy); color: #fff; }
.ic { display: inline-block; border: 2px solid currentColor; }
.ic-popular { width: 12px; height: 15px; border-radius: 1px; box-shadow: 4px -3px 0 -1px currentColor; }
.ic-small { width: 11px; height: 14px; }
.ic-large { width: 14px; height: 18px; }
.ic-square { width: 15px; height: 15px; }
.ic-pano { width: 22px; height: 10px; }
.pp-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.pp-size { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 10px; min-height: 58px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-family: var(--sans); color: var(--ink); text-align: left; }
.pp-size b { font-size: 16px; }
.pp-size span { font-size: 14px; color: var(--ink); }
.pp-size del { color: var(--muted); font-size: 12px; }
.pp-size.on { border-color: var(--orange-t); box-shadow: inset 0 0 0 1px var(--orange-t); background: #fff8f1; }
.pp-size.off { opacity: .45; cursor: not-allowed; }
.pp-size.off span { color: var(--muted); }
.pp-hint { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.pp-opt-row { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; flex-wrap: wrap; }
.pp-opt-row > label { min-width: 70px; font-weight: 600; color: var(--ink); }
.pp-seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.pp-cta { border-top: 1px solid var(--line); padding-top: 18px; }
.pp-upload { width: 100%; min-height: 58px; font-size: 18px; border: 0; cursor: pointer; }
.pp-upload:disabled { opacity: .6; cursor: progress; }
.pp-progress { margin-top: 10px; }
.pp-progress .bar { height: 10px; background: var(--line); overflow: hidden; }
.pp-progress .bar i { display: block; height: 100%; width: 0; background: var(--orange-t); transition: width .2s; }
.pp-progress span { font-size: 14px; color: var(--muted); }
.pp-err { color: #b3261e; background: #fdecea; padding: 10px 12px; margin: 10px 0 0; font-size: 15px; }
.pp-promise { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; font-size: 15px; }
.pp-promise li::before { content: "\2713"; color: var(--orange-t); font-weight: 700; margin-right: 8px; }

/* ---------- below the fold ---------- */
.pp-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 40px 0; background: var(--navy); color: #fff; padding: 24px; }
.pp-band > div { display: grid; gap: 4px; justify-items: start; }
.pp-band b { font: 400 19px var(--serif); }
.pp-band span { font-size: 15px; opacity: .92; }
.pp-band a { color: #ffd2a8; }
@media (max-width: 700px) { .pp-band { grid-template-columns: 1fr; } }
.pp-details { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .pp-details { grid-template-columns: 1fr; } }
.pp-details h2, .pp-prices h2, .pp-faq h2 { font: 400 26px var(--serif); color: var(--navy); margin: 0 0 12px; }
.pp-details h3 { font: 600 17px var(--sans); margin: 14px 0 4px; color: var(--ink); }
.pp-details p { margin: 0; line-height: 1.55; }
.pp-list { padding-left: 20px; line-height: 1.7; margin: 0; }
.pp-prices { margin-top: 40px; }
.pp-price-mats { margin-bottom: 14px; }
.pp-price-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.pp-price-grid h3 { font: 600 16px var(--sans); margin: 0 0 6px; color: var(--navy); }
.pp-price-grid table { width: 100%; border-collapse: collapse; background: #fff; }
.pp-price-grid td { padding: 6px 10px; border-bottom: 1px solid var(--line); font-size: 15px; }
.pp-price-grid td + td { text-align: right; font-variant-numeric: tabular-nums; }
.pp-faq { margin-top: 40px; max-width: 860px; }
.pp-faq details { background: #fff; border: 1px solid var(--line); margin-bottom: 8px; }
.pp-faq summary { cursor: pointer; padding: 14px 16px; font-weight: 600; min-height: 24px; }
.pp-faq details p { margin: 0; padding: 0 16px 16px; line-height: 1.55; }

/* ---------- crop editor ---------- */
html.pp-lock, html.pp-lock body { overflow: hidden; }
.pp-editor { position: fixed; inset: 0; z-index: 1000; background: rgba(15, 25, 35, .72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.pp-editor[hidden] { display: none; }
.pp-ed-box { background: #fff; width: min(1100px, 100%); max-height: 100%; display: flex; flex-direction: column; border-top: 6px solid var(--navy); }
.pp-ed-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.pp-ed-head h2 { font: 400 22px var(--serif); color: var(--navy); margin: 0; }
.pp-x { width: 44px; height: 44px; border: 0; background: none; font-size: 30px; cursor: pointer; color: var(--ink); }
.pp-ed-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; min-height: 0; overflow: auto; }
.pp-ed-crop { background: #2b2f33; height: min(70vh, 640px); }
.pp-ed-crop img { display: block; max-width: 100%; }
.pp-ed-side { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.pp-ed-sum { font-weight: 600; margin-bottom: 12px; line-height: 1.4; }
.pp-ed-side select, .pp-ed-side input[type=number] { min-height: 42px; border: 2px solid var(--line); padding: 0 8px; font: 15px var(--sans); background: #fff; }
.pp-ed-side input[type=number] { width: 80px; }
.pp-ed-side input[type=range] { flex: 1; min-width: 140px; }
.pp-qual { margin: 4px 0 14px; }
.pp-qual .m { height: 8px; background: var(--line); }
.pp-qual .m i { display: block; height: 100%; width: 0; transition: width .2s; }
.pp-qual span { font-size: 14px; display: block; margin-top: 4px; }
.pp-qual.q4 .m i { background: #2e7d32; } .pp-qual.q3 .m i { background: #7cb342; }
.pp-qual.q2 .m i { background: #f2a33a; } .pp-qual.q1 .m i { background: #c62828; }
.pp-qual.q1 span { color: #c62828; font-weight: 600; }
.pp-ed-price { font: 400 26px var(--serif); margin: 6px 0 10px; }
.pp-add { width: 100%; border: 0; cursor: pointer; font-size: 17px; }
.pp-add:disabled { opacity: .6; }
.pp-link { background: none; border: 0; color: var(--navy); text-decoration: underline; cursor: pointer; padding: 12px 0; font: 15px var(--sans); }
@media (max-width: 800px) {
  .pp-editor { padding: 0; }
  .pp-ed-box { height: 100%; }
  .pp-ed-main { grid-template-columns: 1fr; }
  .pp-ed-crop { height: 52vh; }
}
.pp-price .save:empty, .pp-price del:empty { display: none; }

/* upload status over the picture */
.pp-busy { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; background: rgba(247, 246, 241, .78); }
.pp-busy[hidden] { display: none; }
.pp-busy > div { background: #fff; border: 2px solid var(--navy); padding: 14px 18px; width: min(320px, 80%); display: grid; gap: 8px; text-align: center; }
.pp-busy .bar { height: 10px; background: var(--line); overflow: hidden; }
.pp-busy .bar i { display: block; height: 100%; width: 0; background: var(--orange-t); transition: width .2s; }
.pp-busy small { color: var(--muted); }
/* the editor's own 3D preview */
.pp-ed-3d { position: relative; height: 170px; background: linear-gradient(#ece8df, #ddd7cb); margin-bottom: 10px; overflow: hidden; }
.pp-ed-3d .pp-3d-front { position: absolute; }
.pp-ed-3d.k-paper .pp-3d-front { padding: 3%; box-sizing: border-box; }
.pp-ed-canvas[hidden] { display: none; }
.pp-ed-side select { flex: 1; min-width: 0; }
.pp-done { width: 100%; min-height: 46px; margin-top: 8px; border: 2px solid var(--navy); background: #fff; color: var(--navy); font: 600 15px var(--sans); cursor: pointer; }
.pp-after { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.pp-after[hidden] { display: none; }
.pp-after input { width: 70px; min-height: 42px; border: 2px solid var(--line); padding: 0 8px; font: 15px var(--sans); }
.pp-after .pp-link { margin-left: auto; }
@media (max-width: 800px) { .pp-ed-3d { height: 130px; } }
/* after a crop: Add to cart on the picture, Change the crop beside it */
.pp-stage-add { position: absolute; right: 10px; bottom: 8px; z-index: 4; min-height: 44px; padding: 0 18px; border: 0; background: var(--orange-t); color: #fff; font: 600 15px var(--sans); cursor: pointer; box-shadow: 0 3px 10px rgba(0, 0, 0, .25); }
.pp-stage-add[hidden] { display: none; }
.pp-stage-up.alt { right: auto; left: 10px; background: #fff; color: var(--navy); border: 2px solid var(--navy); }
.pp-stage-up.alt ~ .pp-stage-note { display: none; }
@media (max-width: 520px) { .pp-stage-up.alt, .pp-stage-add { width: calc(50% - 14px); padding: 0 6px; font-size: 14px; justify-content: center; white-space: nowrap; overflow: hidden; } .pp-stage-up.alt { left: 8px; right: auto; } .pp-stage-up.alt svg { display: none; } .pp-stage-add { right: 8px; } }
/* dragging the photo inside the print */
.pp-scene.can-drag .pp-obj img, .pp-scene.can-drag .pp-3d-front { cursor: grab; touch-action: none; }
.pp-scene.dragging, .pp-scene.dragging * { cursor: grabbing !important; }
.pp-dragtip { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 4; background: var(--navy); color: #fff; padding: 9px 12px; font-size: 14px; text-align: center; box-shadow: 0 3px 10px rgba(0, 0, 0, .25); }
.pp-dragtip[hidden] { display: none; }
.pp-dragtip button { background: none; border: 0; padding: 0; color: #ffd2a8; font: inherit; text-decoration: underline; cursor: pointer; }
.pp-turn { margin-top: 12px; }
.pp-turn[hidden] { display: none; }
