/* Photoworld Stampe — stile coerente con il prototipo (arancio #D85A30, inchiostro #1E1B18). */
.pw-widget,
.pw-upload-page {
	--pw-ink: #1E1B18;
	--pw-muted: #4A433D;
	--pw-line: #E7E2DC;
	--pw-soft: #F3EFEA;
	--pw-accent: #B8461F;
	--pw-accent-soft: #FBEDE6;
	--pw-accent-ink: #8F3416;
	--pw-ok: #1F6B35;
	--pw-ok-soft: #E3F1E6;
	color: var(--pw-ink);
	font-size: 17px;
	line-height: 1.5;
}
.pw-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* Varianti come pulsanti */
.pw-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.pw-swatch {
	min-height: 48px; min-width: 64px; padding: 8px 16px;
	border: 2px solid #E7E2DC; border-radius: 14px; background: #fff;
	color: #1E1B18; font: inherit; font-weight: 600; font-size: 16px; cursor: pointer;
}
.pw-swatch[aria-pressed="true"] { border-color: #B8461F; background: #FBEDE6; }
.pw-swatch:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.pw-swatch:focus-visible, .pw-choice:focus-visible, .pw-btn:focus-within, .pw-stepper button:focus-visible { outline: 3px solid #1E1B18; outline-offset: 2px; }

/* Widget pagina prodotto */
.pw-widget { margin: 20px 0 24px; clear: both; }
.pw-step-title { font-size: 19px; margin: 0 0 12px; }
.pw-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.pw-choice {
	display: block; width: 100%; text-align: left; cursor: pointer;
	min-height: 96px; padding: 14px 16px; border-radius: 16px;
	border: 2px solid var(--pw-line); background: #fff; color: var(--pw-ink); font: inherit;
}
.pw-choice[aria-checked="true"] { border-color: var(--pw-accent); background: var(--pw-accent-soft); }
.pw-choice-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 17px; }
.pw-choice-desc { display: block; font-size: 15px; color: var(--pw-muted); margin-top: 6px; }
.pw-dot { flex: none; width: 22px; height: 22px; border-radius: 999px; border: 2px solid #A39A91; box-sizing: border-box; background: #fff; }
.pw-choice[aria-checked="true"] .pw-dot { border: 7px solid var(--pw-accent); }
.pw-panel { margin-top: 12px; }
.pw-panel[hidden] { display: none !important; }
.pw-info { background: var(--pw-accent-soft); border-radius: 18px; padding: 16px 18px; margin: 0; font-size: 16px; }
.pw-qty-label { font-weight: 700; margin: 8px 0 6px; }
.pw-qty-fixed { font-weight: 700; }

.pw-drop {
	border: 2px dashed #CFC6BC; border-radius: 20px; background: #FBFAF8;
	padding: 22px 16px; text-align: center; color: var(--pw-accent-ink);
	transition: background .15s, border-color .15s;
}
.pw-drop.pw-over { background: var(--pw-accent-soft); border-color: var(--pw-accent); }
.pw-drop p { color: var(--pw-muted); margin: 6px 0 12px; }
.pw-drop .pw-drop-title { color: var(--pw-ink); font-weight: 700; font-size: 19px; margin: 8px 0 2px; }
.pw-hint { font-size: 14px; color: #6B635B; margin: 12px 0 0 !important; }

.pw-btn {
	position: relative; display: inline-flex; align-items: center; justify-content: center;
	min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0;
	font: inherit; font-weight: 700; font-size: 17px; cursor: pointer; overflow: hidden;
}
.pw-btn-dark { background: var(--pw-ink); color: #fff; }
.pw-btn-accent { background: var(--pw-accent); color: #fff; }
.pw-btn:disabled { background: var(--pw-line); color: #6B635B; cursor: not-allowed; }
.pw-btn input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }

.pw-status { min-height: 1.5em; margin: 10px 0 0; font-weight: 600; }
.pw-status.pw-error { color: #A12A1A; }

.pw-thumbs { list-style: none; margin: 12px 0 0 !important; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.pw-thumb { position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: #EDE7E0; margin: 0 !important; }
.pw-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pw-thumb-del {
	position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 999px;
	border: 0; background: rgba(30, 27, 24, .8); color: #fff; font-size: 18px; line-height: 28px; padding: 0; cursor: pointer;
}
.pw-thumb.pw-loading { display: flex; flex-direction: column; justify-content: flex-end; padding: 6px; box-sizing: border-box; }
.pw-thumb-name { font-size: 11px; color: var(--pw-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-thumb-bar { display: block; height: 5px; border-radius: 999px; background: #fff; margin-top: 4px; overflow: hidden; }
.pw-thumb-bar span { display: block; height: 100%; width: 0; background: var(--pw-ok); transition: width .2s; }

.pw-copies { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; font-weight: 600; }
.pw-stepper { display: inline-flex; align-items: center; border: 2px solid var(--pw-line); border-radius: 999px; overflow: hidden; }
.pw-stepper button { width: 48px; height: 48px; border: 0; background: #fff; font-size: 22px; cursor: pointer; color: var(--pw-ink); padding: 0; }
.pw-stepper output { min-width: 44px; text-align: center; font-weight: 700; font-size: 18px; }

.single_add_to_cart_button.pw-wait { opacity: .55; }

/* Pagina «Carica le foto» */
.pw-upload-page { max-width: 900px; margin: 0 auto; }
.pw-up-title { margin: 0 0 6px; font-size: clamp(30px, 4vw, 42px); line-height: 1.1; letter-spacing: -.02em; }
.pw-up-sub { margin: 0 0 24px; color: var(--pw-muted); font-size: 18px; }
.pw-up-item { border: 1px solid var(--pw-line); border-radius: 24px; padding: clamp(16px, 3vw, 24px); margin-bottom: 18px; }
.pw-up-item-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.pw-up-item-head h2 { margin: 0; font-size: 21px; }
.pw-upload-page .pw-drop { padding: clamp(24px, 5vw, 44px) 16px; }
.pw-pill { font-weight: 700; font-size: 14px; border-radius: 999px; padding: 5px 12px; }
.pw-pill-wait { background: var(--pw-accent-soft); color: var(--pw-accent-ink); }
.pw-pill-ok { background: var(--pw-ok-soft); color: var(--pw-ok); }
.pw-progress { margin-top: 18px; }
.pw-progress-row { font-weight: 600; margin-bottom: 8px; }
.pw-bar { height: 12px; border-radius: 999px; background: #EDE7E0; overflow: hidden; }
.pw-bar-fill { height: 100%; background: var(--pw-ok); border-radius: 999px; transition: width .2s; }
.pw-up-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
.pw-up-actions .pw-hint { margin: 0 !important; }
.pw-message { background: var(--pw-soft); border-radius: 20px; padding: 24px; margin-bottom: 18px; }
.pw-message h2 { margin-top: 0; }

/* Inquadratura delle stampe (1.4) */
.pw-fit { margin: 14px 0 0; padding: 14px; border-radius: 18px; background: var(--pw-soft); }
.pw-fit[hidden] { display: none !important; }
.pw-fit-title { margin: 0 0 10px; font-weight: 700; font-size: 16px; }
.pw-fit-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.pw-fit-choice {
	display: flex; gap: 12px; align-items: center; text-align: left; cursor: pointer;
	padding: 12px; border-radius: 14px; border: 2px solid var(--pw-line); background: #fff; color: var(--pw-ink); font: inherit;
}
.pw-fit-choice[aria-checked="true"] { border-color: var(--pw-accent); background: var(--pw-accent-soft); }
.pw-fit-choice strong { display: block; font-size: 16px; }
.pw-fit-choice small { display: block; font-size: 14px; color: var(--pw-muted); line-height: 1.35; margin-top: 2px; }
.pw-fit-ico { flex: none; position: relative; width: 34px; height: 46px; border: 2px solid var(--pw-ink); border-radius: 3px; background: #fff; overflow: hidden; }
.pw-fit-ico::after { content: ""; position: absolute; background: #C9A38F; }
.pw-fit-ico-riempi::after { inset: 0 -9px; border-radius: 0; }
.pw-fit-ico-intera::after { left: 0; right: 0; top: 13px; height: 20px; }
.pw-fit-legend { margin: 10px 0 0; font-size: 14px; color: var(--pw-muted); }
.pw-fit-cut { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; background: var(--pw-ink); color: #fff; font-size: 12px; }
.pw-fit-choice:focus-visible, .pw-thumb.pw-framable:focus-visible, .pw-crop-modal button:focus-visible, .pw-crop-wrap:focus-visible { outline: 3px solid #1E1B18; outline-offset: 2px; }

.pw-thumb:has(.pw-paper) { display: flex; align-items: center; justify-content: center; background: #EDE7E0; }
.pw-paper { display: block; position: relative; height: 90%; max-width: 90%; background: #fff; box-shadow: 0 1px 3px rgba(30, 27, 24, .25); overflow: hidden; }
.pw-paper.pw-land { height: auto; width: 90%; max-height: 90%; }
.pw-paper img { width: 100%; height: 100%; display: block; }
.pw-thumb.pw-framable { cursor: pointer; }
.pw-thumb.pw-framable:hover .pw-paper { box-shadow: 0 0 0 2px var(--pw-accent); }
.pw-thumb-cut { position: absolute; left: 4px; bottom: 4px; width: 24px; height: 24px; border-radius: 999px; background: rgba(30, 27, 24, .85); color: #fff; font-size: 13px; line-height: 24px; text-align: center; font-weight: 700; display: none; }
.pw-thumb.pw-is-cut .pw-thumb-cut { display: block; }
.pw-thumb.pw-is-low .pw-thumb-cut { display: block; background: #A12A1A; }

html.pw-noscroll, html.pw-noscroll body { overflow: hidden; }
.pw-crop-modal { position: fixed; inset: 0; z-index: 100000; background: rgba(30, 27, 24, .6); display: flex; align-items: center; justify-content: center; padding: 12px; }
.pw-crop-modal[hidden] { display: none; }
.pw-crop-dialog {
	width: min(640px, 100%); max-height: calc(100vh - 24px); overflow: auto; box-sizing: border-box;
	background: #fff; color: #1E1B18; border-radius: 24px; padding: clamp(16px, 3vw, 24px);
	font-size: 17px; line-height: 1.5; box-shadow: 0 12px 32px rgba(30, 27, 24, .25);
}
.pw-crop-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pw-crop-head h2 { margin: 0; font-size: 22px; line-height: 1.2; }
.pw-crop-x { width: 44px; height: 44px; border-radius: 999px; border: 0; background: #F3EFEA; font-size: 24px; cursor: pointer; color: #1E1B18; flex: none; }
.pw-crop-sub { margin: 2px 0 12px; color: #4A433D; font-size: 15px; }
.pw-crop-modes { display: inline-flex; padding: 4px; border-radius: 999px; background: #F3EFEA; margin-bottom: 12px; }
.pw-crop-modes button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; color: #4A433D; }
.pw-crop-modes button[aria-checked="true"] { background: #1E1B18; color: #fff; }
.pw-crop-stage { display: flex; justify-content: center; align-items: center; min-height: 220px; background: #2A2622; border-radius: 16px; padding: 16px; overflow: hidden; }
.pw-crop-wrap { position: relative; touch-action: none; user-select: none; -webkit-user-select: none; overflow: hidden; background: #fff; }
.pw-crop-wrap img { position: absolute; max-width: none; pointer-events: none; }
.pw-crop-frame { position: absolute; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .9); pointer-events: none; }
.pw-crop-wrap.pw-movable { cursor: grab; }
.pw-crop-wrap.pw-movable:active { cursor: grabbing; }
.pw-crop-wrap.pw-intera { background: #fff; }
.pw-crop-wrap.pw-intera .pw-crop-frame { box-shadow: inset 0 0 0 1px #CFC6BC; }
.pw-crop-hint { margin: 12px 0 0; font-size: 15px; color: #4A433D; }
.pw-crop-warn { margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; background: #FBEDE6; color: #8F3416; font-size: 15px; font-weight: 600; }
.pw-crop-warn[hidden] { display: none; }
.pw-crop-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.pw-crop-actions button { min-height: 48px; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; }
.pw-crop-prev, .pw-crop-next { width: 48px; border: 2px solid #E7E2DC; background: #fff; color: #1E1B18; font-size: 24px !important; line-height: 1; }
.pw-crop-count { font-size: 15px; color: #4A433D; min-width: 92px; text-align: center; }
.pw-crop-center { padding: 0 18px; border: 2px solid #E7E2DC; background: #fff; color: #1E1B18; }
.pw-crop-flip,
.pw-crop-reset,
.pw-crop-in,
.pw-crop-out,
.pw-crop-rot { width: 48px; padding: 0; font-size: 20px; line-height: 1; border: 2px solid #E7E2DC; background: #fff; color: #1E1B18; }
.pw-crop-rot[disabled],
.pw-crop-flip[disabled],
.pw-crop-reset[disabled],
.pw-crop-in[disabled],
.pw-crop-out[disabled] { opacity: .4; cursor: default; }
.pw-crop-done { margin-left: auto; padding: 0 28px; border: 0; background: #B8461F; color: #fff; }
.pw-crop-actions [hidden] { display: none; }
