/* Engravior Engrave Preview */
.epv{--epv-ink:#1a1a1a;--epv-line:#e2ddd5;--epv-soft:#f6f3ee;margin:0 0 22px;padding:18px;border:1px solid var(--epv-line);background:#fff;width:100%;box-sizing:border-box}
.epv *{box-sizing:border-box}
.epv-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.epv-title{font-family:var(--wd-title-font,inherit);font-size:20px;color:var(--epv-ink)}
.epv-badge{white-space:nowrap;flex:none;font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:#fff;background:var(--epv-ink);padding:4px 8px;display:inline-flex;align-items:center;gap:6px}
.epv-badge:before{content:"";width:6px;height:6px;border-radius:50%;background:#7bd389;display:inline-block}
.epv-stage{position:relative;background:var(--epv-soft);border:1px solid var(--epv-line);overflow:hidden;aspect-ratio:1600/1100}
.epv-canvas{display:block;width:100%;height:100%;object-fit:contain}
.epv-canvas.is-proof{object-fit:contain;background:#fff;padding:6%}
.epv-loading{position:absolute;inset:0;display:none;align-items:center;justify-content:center;gap:10px;font-size:13px;color:#666;background:var(--epv-soft)}
.epv-stage.is-loading .epv-loading{display:flex}
.epv-spin{width:16px;height:16px;border:2px solid #ccc;border-top-color:var(--epv-ink);border-radius:50%;animation:epvspin .8s linear infinite}
@keyframes epvspin{to{transform:rotate(360deg)}}
.epv-sample{position:absolute;left:6px;top:6px;font-size:9px;line-height:1.2;letter-spacing:.08em;text-transform:uppercase;background:rgba(255,255,255,.72);color:#666;padding:2px 6px;pointer-events:none}
.epv-stage.is-loading .epv-sample{display:none}
.epv-toggle{display:flex;margin:10px 0 16px;border:1px solid var(--epv-ink)}
.epv-toggle button{flex:1;appearance:none;border:0;background:#fff;color:var(--epv-ink);padding:9px 6px;font-size:12px;letter-spacing:.08em;text-transform:uppercase;cursor:pointer;min-height:40px}
.epv-toggle button.is-active{background:var(--epv-ink);color:#fff}
.epv-label{font-size:12px;letter-spacing:.1em;text-transform:uppercase;color:#555;margin:0 0 8px}
.epv-styles{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:16px}
.epv-style{appearance:none;border:1px solid var(--epv-line);background:#fff;padding:6px;cursor:pointer;text-align:left;display:flex;flex-direction:column;gap:6px;min-height:44px}
.epv-style[aria-checked="true"]{border-color:var(--epv-ink);box-shadow:inset 0 0 0 1px var(--epv-ink)}
.epv-style:focus-visible,.epv-toggle button:focus-visible{outline:2px solid var(--epv-ink);outline-offset:2px}
.epv-thumb{width:100%;height:auto;display:block;aspect-ratio:200/112}
.epv-style-name{font-size:12px;color:var(--epv-ink);line-height:1.3}
.epv-style-name b{display:inline-block;min-width:18px;font-weight:600}
.epv-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px 12px}
.epv-field{position:relative;grid-column:span 2}
.epv-field.is-short{grid-column:span 1}
.epv-field label{display:block;font-size:13px;margin-bottom:5px;color:var(--epv-ink)}
.epv-field abbr{text-decoration:none;color:#b3261e}
.epv-opt{color:#888;font-size:12px}
.epv-field input{width:100%;height:46px;border:1px solid #cfc9bf;padding:0 52px 0 12px;font-size:16px;background:#fff;color:var(--epv-ink)}
.epv-field input:focus{border-color:var(--epv-ink);outline:0}
.epv-field.has-error input{border-color:#b3261e}
.epv-count{position:absolute;right:10px;bottom:14px;font-size:11px;color:#999}
.epv-errors{display:none;margin-top:12px;padding:10px 12px;border-left:3px solid #b3261e;background:#fbeceb;font-size:13px;color:#7a1712}
.epv-note{margin:14px 0 0;font-size:12px;color:#666;line-height:1.5}
@media (max-width:480px){.epv{padding:12px}.epv-styles{grid-template-columns:repeat(3,1fr);gap:6px}.epv-style-name{font-size:11px}.epv-fields{grid-template-columns:1fr}.epv-field,.epv-field.is-short{grid-column:span 1}}
/* cart + order */
.epv-cart-thumb{max-width:120px;height:auto;border:1px solid #e2ddd5}
.epv-admin-preview{margin-top:8px}
.epv-admin-preview img{max-width:260px;height:auto;border:1px solid #ddd;display:block;margin-bottom:6px}
/* theme overrides (WoodMart styles all buttons) */
.epv .epv-style,.epv .epv-style:hover,.epv .epv-style:focus{background:#fff;color:#1a1a1a;box-shadow:none;text-transform:none;letter-spacing:normal;font-weight:400}
.epv .epv-style[aria-checked="true"]{border-color:#1a1a1a;box-shadow:inset 0 0 0 1px #1a1a1a}
.epv .epv-toggle button{background:#fff;color:#1a1a1a;box-shadow:none}
.epv .epv-toggle button.is-active{background:#1a1a1a;color:#fff}
.epv-positions{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 16px}
.epv .epv-pos{appearance:none;border:1px solid var(--epv-line);background:#fff;color:#1a1a1a;padding:8px 12px;font-size:13px;cursor:pointer;min-height:40px;text-transform:none;letter-spacing:normal;box-shadow:none}
.epv .epv-pos[aria-checked="true"]{border-color:#1a1a1a;box-shadow:inset 0 0 0 1px #1a1a1a;font-weight:600}
/* keep style tiles equal on all screens (theme button styles add side padding and remove borders) */
.epv .epv-styles{grid-template-columns:repeat(3,minmax(0,1fr))}
.epv .epv-styles .epv-style{width:100%;min-width:0;padding:6px!important;border:1px solid var(--epv-line)!important;align-items:stretch;justify-content:flex-start;font-size:12px;line-height:1.3;min-height:44px;border-radius:0}
.epv .epv-styles .epv-style[aria-checked="true"]{border-color:#1a1a1a!important}
.epv .epv-styles .epv-thumb{width:100%!important}
.epv-upload input[type=file]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.epv .epv-upload-btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 18px;border:1px solid #1a1a1a;background:#1a1a1a;color:#fff;font-size:13px;letter-spacing:.06em;text-transform:uppercase;cursor:pointer;margin:0 10px 0 0}
.epv .epv-upload-btn:hover{background:#333}
.epv-upload-name{font-size:13px;color:#555;word-break:break-all}
.epv-upload-help{margin:8px 0 0;font-size:12px;color:#666;line-height:1.45}
.epv-invert{display:flex!important;align-items:center;gap:8px;font-size:13px;margin:8px 0 0!important;cursor:pointer}
.epv-invert input{width:18px!important;height:18px!important;padding:0!important}
.epv-upload-msg{margin:6px 0 0;font-size:13px;color:#b3261e}
.epv-upload-msg:empty{display:none}
.epv-field.epv-upload.has-error .epv-upload-btn{outline:2px solid #b3261e;outline-offset:2px}
.epv .epv-styles{grid-template-columns:repeat(4,minmax(0,1fr));max-height:372px;overflow-y:auto;overscroll-behavior:contain;padding:2px 4px 2px 2px;scrollbar-width:thin}
.epv .epv-thumb{object-fit:contain;background:#f4ead9}
@media (max-width:480px){.epv .epv-styles{grid-template-columns:repeat(3,minmax(0,1fr));max-height:330px}}
.epv-hint{display:block;font-size:12px;line-height:1.35;color:#777;margin:-2px 0 6px}
.epv-parts{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 12px}
.epv-part{border:1px solid #d8d0c4;background:#fff;color:#1a1a1a;padding:7px 11px;font-size:13px;line-height:1.2;border-radius:4px;cursor:pointer;text-transform:none;letter-spacing:0;min-height:0}
.epv-part.is-active{border-color:#1a1a1a;background:#1a1a1a;color:#fff}
.epv-part-n{font-weight:700;margin-right:2px}
.epv-part-ok{display:none;margin-left:5px;color:#2e7d32;font-weight:700}
.epv-part.is-done .epv-part-ok{display:inline}
.epv-part.is-active .epv-part-ok{color:#8fd694}
