/* Cre8tive Photo Proof Designer — storefront */
.c8pd{box-sizing:border-box;margin:0 0 1.25em;padding:16px;border:1px solid #e5e7eb;border-radius:12px;background:#fff;clear:both}
.c8pd-title{display:block;font-size:1.05em;margin-bottom:4px}
.c8pd-instructions{margin:0 0 10px;font-size:.92em;color:#4b5563}
.c8pd-preview-wrap{position:relative;border-radius:10px;overflow:hidden;background:#f9fafb;margin:8px 0 12px}
.c8pd-preview{display:block;width:100%;height:auto}
.c8pd-badge{position:absolute;top:8px;left:8px;background:rgba(17,24,39,.72);color:#fff;font-size:11px;letter-spacing:.03em;padding:3px 8px;border-radius:999px}
.c8pd-upload{box-sizing:border-box;position:relative;display:inline-flex!important;align-items:center;justify-content:center;width:100%;cursor:pointer;margin:0 0 12px!important;float:none!important;text-align:center}
.c8pd-upload input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}
.c8pd-editor-label{font-size:.85em;color:#374151;margin-bottom:6px}
.c8pd-edit-wrap{width:100%;display:flex;justify-content:center;background:repeating-conic-gradient(#f3f4f6 0 25%,#fff 0 50%) 0 0/16px 16px;border-radius:8px;padding:6px 0;overflow:hidden}
.c8pd-edit{display:block;touch-action:none;cursor:grab;max-width:100%;outline-offset:2px}
.c8pd-edit:active{cursor:grabbing}
.c8pd-legend{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:.78em;color:#4b5563;margin:6px 0 8px}
.c8pd-key{display:inline-block;width:16px;height:0;vertical-align:middle;margin-right:5px;border-top:2px dashed}
.c8pd-key-trim{border-color:#e11d48}.c8pd-key-safe{border-color:#2563eb}
.c8pd-key-bleed{height:10px;border:1px solid #d1d5db;background:rgba(255,255,255,.6)}
.c8pd-tools{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center;margin-bottom:8px}
.c8pd-zoom-label{display:flex;align-items:center;gap:8px;font-size:.85em;flex:1 1 180px;margin:0}
.c8pd-zoom{flex:1}
.c8pd-rot{flex:1}
.c8pd-rot-val{min-width:3.2em;text-align:right;font-variant-numeric:tabular-nums}
.c8pd-btns{display:flex;flex-wrap:wrap;gap:6px}
.c8pd-btn{font-size:.8em!important;padding:6px 10px!important;line-height:1.2!important;border:1px solid #d1d5db!important;background:#fff!important;color:#111827!important;border-radius:6px!important;cursor:pointer}
.c8pd-btn:hover{background:#f3f4f6!important}
.c8pd-warn{margin:6px 0 10px;padding:8px 10px;border-radius:8px;background:#fffbeb;border:1px solid #fcd34d;color:#78350f;font-size:.85em}
.c8pd-warn div+div{margin-top:4px}
.c8pd-approve{display:flex;gap:8px;align-items:flex-start;font-size:.9em;margin:6px 0 0;cursor:pointer}
.c8pd-approve input{margin-top:3px;flex:none}
.c8pd-approve-terms{display:block;margin-top:4px;font-size:.88em;line-height:1.45;color:#4b5563}
.c8pd-status{margin:8px 0 0;font-size:.88em;min-height:1em}
.c8pd-status:empty{display:none}
.c8pd-status.is-error{color:#b91c1c}.c8pd-status.is-ok{color:#047857}.c8pd-status.is-info{color:#1f2937}
.c8pd-cart-thumb{max-width:100%;height:auto;border-radius:4px}
.c8pd-views{display:flex;flex-wrap:wrap;gap:6px;margin:-4px 0 12px}
.c8pd-view{font-size:.8em!important;padding:5px 10px!important;line-height:1.2!important;border:1px solid #d1d5db!important;background:#fff!important;color:#111827!important;border-radius:999px!important;cursor:pointer}
.c8pd-view:hover{background:#f3f4f6!important}
.c8pd-view.is-on{background:#111827!important;color:#fff!important;border-color:#111827!important}
.c8pd-tray{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-start;margin:0 0 12px}
.c8pd-tray-item{display:flex;flex-direction:column;align-items:center;gap:3px}
.c8pd-tray-thumb{position:relative;width:64px;height:64px;padding:0!important;border:2px solid #e5e7eb!important;border-radius:8px!important;overflow:hidden;background:#f9fafb!important;cursor:pointer}
.c8pd-tray-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.c8pd-tray-thumb span{position:absolute;left:3px;top:3px;background:rgba(17,24,39,.75);color:#fff;font-size:10px;line-height:1;padding:3px 5px;border-radius:999px}
.c8pd-tray-item.is-sel .c8pd-tray-thumb{border-color:#7c3aed!important;box-shadow:0 0 0 2px rgba(124,58,237,.25)}
.c8pd-tray-ctl{display:flex;gap:2px}
.c8pd-tray-ctl button{min-width:22px;padding:1px 5px!important;font-size:13px!important;line-height:1.3!important;border:1px solid #d1d5db!important;background:#fff!important;color:#374151!important;border-radius:5px!important;cursor:pointer}
.c8pd-tray-count{flex-basis:100%;font-size:.78em;color:#6b7280}
.c8pd-upload.is-disabled{opacity:.55;cursor:not-allowed}

/* Live preview on the main product image */
.woocommerce-product-gallery .c8pd-live-slide { position: relative; }
.c8pd-gallery-canvas {
	position: absolute; inset: 0; z-index: 5;
	width: 100%; height: 100%;
	object-fit: contain; background: #fff;
	display: block;
}
.c8pd-gallery-canvas[hidden], .c8pd-gallery-badge[hidden] { display: none; }
.c8pd-gallery-badge {
	position: absolute; left: 10px; top: 10px; z-index: 6;
	background: rgba(17, 17, 17, .72); color: #fff;
	font-size: 12px; line-height: 1; padding: 6px 9px; border-radius: 999px;
	pointer-events: none;
}
.c8pd-live .c8pd-live-slide .zoomImg,
.c8pd-live .woocommerce-product-gallery__trigger { display: none !important; }
/* While customizing, the customized image is the only product image shown. */
.c8pd-live .woocommerce-product-gallery__image:not(.c8pd-live-slide),
.c8pd-live .flex-control-nav,
.c8pd-live .flex-control-thumbs,
.c8pd-live .flex-direction-nav,
.c8pd-live .zoomImg { display: none !important; }
.c8pd-live .flex-viewport { height: auto !important; }
.c8pd-live.c8pd-sticky { position: sticky; top: 24px; align-self: flex-start; }
/* Gallery beside the designer shows the live preview, so skip the duplicate inside the form. */
.c8pd.c8pd--gallery-side .c8pd-preview-wrap,
.c8pd.c8pd--gallery-preview .c8pd-preview-wrap { display: none; }
.c8pd [hidden] { display: none !important; }

/* Turn off other options: hide the Custom Photo Upload app while the designer is on. */
body.c8pd-exclusive .c3-photo-field,
body.c8pd-exclusive #c3-quality,
body.c8pd-exclusive:not(.c8pd-keep-notes) .c3-notes-field { display: none !important; }
.c8pd{clear:both;width:100%;box-sizing:border-box}
.c8pd::after{content:"";display:table;clear:both}
.c8pd .c8pd-editor-label{clear:both}
.c8pd-admin-diag{border:2px solid #d63638;background:#fcf0f1;padding:12px 14px;margin:0 0 1em;border-radius:6px;font-size:.92em}
.c8pd-admin-diag ul{margin:.4em 0 0 1.2em}

.c8pd .c8pd-size { margin: 2px 0 6px; font-size: 0.92em; color: #444; font-weight: 600; }

/* Double sided: Front / Back picker and back-photo choice */
.c8pd-double { margin: 10px 0 12px; }
.c8pd-double[hidden], .c8pd-same-note[hidden], .c8pd-upload[hidden] { display: none !important; }
.c8pd-sides { display: inline-flex; border: 1px solid #d1d5db; border-radius: 999px; padding: 3px; background: #f9fafb; gap: 2px; }
.c8pd .c8pd-side { appearance: none; border: 0; background: transparent; color: #374151; font: inherit; font-weight: 600; padding: 7px 20px; border-radius: 999px; cursor: pointer; line-height: 1.2; min-height: 36px; }
.c8pd .c8pd-side.is-active { background: #111827; color: #fff; }
.c8pd-back-mode { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 10px; font-size: 0.95em; }
.c8pd-back-mode-title { font-weight: 600; }
.c8pd-back-mode label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; margin: 0; }
.c8pd-same-note { margin: 8px 0 0; font-size: 0.9em; color: #4b5563; }
.c8pd--mirror .c8pd-editor-label, .c8pd--mirror .c8pd-edit-wrap, .c8pd--mirror .c8pd-legend, .c8pd--mirror .c8pd-tools, .c8pd--mirror .c8pd-warn { display: none !important; }

/* Second print area (e.g. stocking body + cuff) */
.c8pd-areas { margin: 10px 0 12px; }
.c8pd-areas[hidden], .c8pd-a2-note[hidden], .c8pd .c8pd-use-main[hidden] { display: none !important; }
.c8pd .c8pd-area { appearance: none; border: 0; background: transparent; color: #374151; font: inherit; font-weight: 600; padding: 7px 18px; border-radius: 999px; cursor: pointer; line-height: 1.2; min-height: 36px; }
.c8pd .c8pd-area.is-active { background: #111827; color: #fff; }
.c8pd .c8pd-area.is-done::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 7px; border-radius: 50%; background: #16a34a; vertical-align: middle; }
.c8pd-a2-note { margin: 8px 0 0; font-size: 0.9em; color: #4b5563; }
.c8pd .c8pd-areas::after { content: ""; display: table; clear: both; }
.c8pd .c8pd-use-main { display: block; float: none; clear: both; margin: 8px 0 0; }
.c8pd .c8pd-areas .c8pd-sides { display: flex; width: max-content; max-width: 100%; }

/* ---------- 1.6.16 Handmade design template ---------- */
.c8pd-modes{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}
.c8pd-mode{display:flex;gap:8px;align-items:flex-start;border:1px solid #ddd;border-radius:8px;padding:10px;cursor:pointer;background:#fff}
.c8pd-mode input{margin-top:3px}
.c8pd-mode span{display:flex;flex-direction:column;gap:2px}
.c8pd-mode small{color:#666;font-size:.85em}
.c8pd-mode:has(input:checked){border-color:#d6336c;box-shadow:0 0 0 1px #d6336c}
.c8pd-hm{border:1px dashed #d6336c;border-radius:8px;padding:12px 14px;margin:10px 0;background:#fff7fa}
.c8pd-hm[hidden]{display:none}
.c8pd-hm-lead{margin:0 0 10px}
.c8pd-hm .c8pd-hm-dl{display:table!important;float:none!important;margin:0 0 10px!important}
.c8pd-hm-steps{clear:both;display:block;margin:6px 0 6px 1.4em!important;padding:0!important;list-style:decimal outside}
.c8pd-hm-steps li{margin:2px 0}
.c8pd-hm-note{margin:6px 0 0;font-size:.9em;color:#555;white-space:pre-line}
.c8pd--handmade .c8pd-preview-wrap,.c8pd--handmade .c8pd-upload,.c8pd--handmade .c8pd-tray,.c8pd--handmade .c8pd-editor,.c8pd--handmade .c8pd-double,.c8pd--handmade .c8pd-areas,.c8pd--handmade .c8pd-size,.c8pd--handmade .c8pd-instructions{display:none!important}
.c8pd-attach-for{margin:2px 0;font-weight:600}
.c8pd-attach-help{margin:4px 0 8px;font-size:.92em}
.c8pd-attach-btn{margin-top:10px;width:100%}
.c8pd-attach-page form.cart .quantity,.c8pd-attach-page form.cart .single_add_to_cart_button,.c8pd-attach-page table.variations,.c8pd-attach-page .woocommerce-variation-price,.c8pd-attach-page .woocommerce-variation-add-to-cart .quantity,.c8pd-attach-page .reset_variations{display:none!important}
.c8pd-hm-banner{border-left:4px solid #d6336c;background:#fff7fa;padding:10px 14px;margin:0 0 16px}
@media(max-width:520px){.c8pd-modes{grid-template-columns:1fr}}

/* Parent setup off: no designer until an option with its own setup is chosen. */
.c8pd--gated > :not(.c8pd-head):not(.c8pd-gate),
.c8pd--gated .c8pd-head > :not(.c8pd-title) { display: none !important; }
.c8pd-gate { margin: .5em 0 0; padding: .85em 1em; border: 1px dashed #c9c2b8; border-radius: 8px; background: #faf8f5; color: #3d3a36; font-weight: 600; text-align: center; }
.c8pd-gate[hidden] { display: none; }

/* Store-wide background replace: product photos stay hidden until their backdrop is swapped (max 3 s). */
.c8pd-bgkey .woocommerce-product-gallery img:not(.c8pd-keyed) { opacity: 0; animation: c8pd-show 0s 3s forwards; }
@keyframes c8pd-show { to { opacity: 1; } }

/* Zoom: button on the live preview + full-screen zoom view */
.c8pd-zv-btn {
	position: absolute; right: 10px; top: 10px; z-index: 7;
	display: inline-flex; align-items: center; gap: 5px;
	margin: 0 !important; padding: 6px 10px !important;
	border: 0 !important; border-radius: 999px !important;
	background: rgba(17, 17, 17, .72) !important; color: #fff !important;
	font-size: 12px !important; font-weight: 600; line-height: 1 !important;
	cursor: zoom-in; box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}
.c8pd-zv-btn:hover, .c8pd-zv-btn:focus-visible { background: rgba(17, 17, 17, .9) !important; }
.c8pd-zv-btn[hidden] { display: none !important; }
.c8pd-zv-btn svg { display: block; }
.c8pd-gallery-canvas { cursor: zoom-in; }
html.c8pd-zv-open, html.c8pd-zv-open body { overflow: hidden !important; }
.c8pd-zv {
	position: fixed; inset: 0; z-index: 999999;
	background: rgba(17, 17, 17, .94); color: #fff;
	display: flex; flex-direction: column;
}
.c8pd-zv-stage {
	position: relative; flex: 1; overflow: hidden;
	touch-action: none; cursor: zoom-in; user-select: none; -webkit-user-select: none;
}
.c8pd-zv.is-zoomed .c8pd-zv-stage { cursor: grab; }
.c8pd-zv-stage canvas {
	position: absolute; left: 0; top: 0; transform-origin: 0 0;
	background: #fff; max-width: none !important; display: block;
}
.c8pd-zv-close {
	position: absolute; right: 12px; top: 12px; z-index: 2;
	width: 44px; height: 44px; padding: 0 !important; margin: 0 !important;
	border: 0 !important; border-radius: 50% !important;
	background: rgba(255, 255, 255, .16) !important; color: #fff !important;
	font-size: 30px !important; line-height: 44px !important; cursor: pointer;
}
.c8pd-zv-bar {
	position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); z-index: 2;
	display: flex; align-items: center; gap: 6px;
	background: rgba(0, 0, 0, .55); padding: 6px; border-radius: 999px;
}
.c8pd-zv-bar button {
	min-width: 40px; height: 36px; margin: 0 !important; padding: 0 12px !important;
	border: 0 !important; border-radius: 999px !important;
	background: rgba(255, 255, 255, .16) !important; color: #fff !important;
	font-size: 18px !important; font-weight: 600; line-height: 36px !important; cursor: pointer;
}
.c8pd-zv-bar button[data-z="fit"] { font-size: 14px !important; }
.c8pd-zv-pct { min-width: 52px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.c8pd-zv-hint {
	position: absolute; left: 0; right: 0; bottom: 12px; margin: 0 !important;
	text-align: center; font-size: 12px; color: rgba(255, 255, 255, .75); pointer-events: none;
}
