.pmh-vo-fields{display:grid;gap:16px;margin:18px 0}.pmh-vo-field{min-width:0}.pmh-vo-label{display:block;margin:0 0 6px;font-weight:600}.pmh-vo-field input[type=text],.pmh-vo-field input[type=number],.pmh-vo-field input[type=file],.pmh-vo-field select{width:100%;max-width:100%;box-sizing:border-box}.pmh-vo-choices{display:flex;flex-wrap:wrap;gap:10px}.pmh-vo-choice{display:inline-flex;align-items:center;gap:8px;cursor:pointer}.pmh-vo-choice-image,.pmh-vo-choice-color{flex-direction:column;border:1px solid #d6d8dc;border-radius:6px;padding:8px;min-width:72px}.pmh-vo-choice-image img{width:72px;height:72px;object-fit:cover}.pmh-vo-choice-color i{display:block;width:30px;height:30px;border-radius:50%;background:var(--pmh-vo-swatch,#ddd);border:1px solid #777}.pmh-vo-choice-image:has(input:checked),.pmh-vo-choice-color:has(input:checked){outline:2px solid currentColor}.pmh-vo-popup-open{background:none;border:0;padding:0;color:inherit;text-decoration:underline;cursor:pointer}.pmh-vo-dialog[hidden]{display:none}.pmh-vo-dialog{position:fixed;inset:0;z-index:99999;display:grid;place-items:center;padding:20px;background:rgba(0,0,0,.58)}.pmh-vo-dialog-panel{position:relative;max-width:620px;width:min(100%,620px);max-height:85vh;overflow:auto;background:#fff;color:#222;padding:28px;border-radius:8px}.pmh-vo-popup-close{position:absolute;right:10px;top:8px;border:0;background:none;font-size:26px;cursor:pointer}.pmh-vo-content{padding:10px 0}.pmh-vo-field[hidden],.pmh-vo-content[hidden],.pmh-vo-popup-field[hidden]{display:none!important}.pmh-vo-total-price{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0;padding:12px 14px;background:#f6f4ef;border-radius:6px}.pmh-vo-total-price strong{font-size:1.25em}.pmh-vo-total-price .woocommerce-Price-currencySymbol{font-weight:inherit}
.pmh-vo-choice-radio{position:relative;padding:9px 15px;border:1px solid #d2d9e5;border-radius:6px;background:#fff;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease}.pmh-vo-choice-radio:has(input:checked){border-color:#1769ff;background:#f1f6ff;box-shadow:0 0 0 1px #1769ff;color:#145de0}.pmh-vo-choice-radio input{accent-color:#1769ff}

/* Button choices retain native radio semantics and keyboard navigation. */
.pmh-vo-choice-button{position:relative;display:inline-flex!important;align-items:center;justify-content:center;min-height:44px;min-width:80px;padding:10px 18px!important;box-sizing:border-box;border:1px solid #cbd5e1!important;border-radius:9px!important;background:#fff;color:#334155;cursor:pointer;font-weight:600;transition:background .15s,border-color .15s;overflow-wrap:anywhere}
.pmh-vo-choice-button input[type=radio]{position:absolute!important;opacity:0!important;width:1px!important;height:1px!important;margin:0!important}
.pmh-vo-choice-button:hover{border-color:#1769ff!important;background:#f8faff}
.pmh-vo-choice-button:has(input:checked){border-color:#1769ff!important;background:#edf4ff!important;color:#124bb5;box-shadow:inset 0 0 0 1px #1769ff}
.pmh-vo-choice-button:has(input:checked)::after{content:'✓';margin-left:8px;font-weight:700}
.pmh-vo-choice-button:has(input:focus-visible){outline:3px solid #1769ff;outline-offset:3px}
.pmh-vo-choice-button:has(input:disabled){opacity:.5;cursor:not-allowed}

.pmh-vo-popup-open{cursor:pointer;color:var(--pmh-popup-color,#1769ff)!important;font:inherit}
.pmh-vo-trigger-link{border:0!important;background:transparent!important;text-decoration:underline!important;text-underline-offset:4px;padding:4px 0!important;font-weight:600}
.pmh-vo-trigger-button{display:inline-flex;padding:10px 18px!important;min-height:44px;border:1px solid var(--pmh-popup-color,#1769ff)!important;border-radius:8px;background:transparent;text-decoration:none!important;font-weight:600}
.pmh-vo-popup-open:hover{filter:brightness(.8)}.pmh-vo-popup-open:focus-visible{outline:2px solid var(--pmh-popup-color,#1769ff);outline-offset:4px}
.pmh-vo-dialog-panel img{max-width:100%;height:auto}.pmh-vo-dialog-panel table{width:100%;border-collapse:collapse}.pmh-vo-dialog-panel td,.pmh-vo-dialog-panel th{border:1px solid #dce1e9;padding:10px}.pmh-vo-dialog-panel th{background:#f1f5f9}
/* Keep native and virtual variants in one compact choice area. */
form.variations_form:has(> [data-pmh-vo-fields]){row-gap:12px}
form.variations_form:has(> [data-pmh-vo-fields]) > table.variations{margin-bottom:0!important}
form.variations_form > table.variations ~ [data-pmh-vo-fields]{margin-top:-8px!important}
[data-pmh-vo-fields]{gap:12px}
[data-pmh-vo-fields] .pmh-vo-label{font-size:13px;font-weight:600;line-height:1.5;margin-bottom:8px;overflow-wrap:anywhere}
[data-pmh-vo-fields] .pmh-vo-selected{font-weight:400;color:#777;text-transform:none;letter-spacing:normal}
[data-pmh-vo-fields] .pmh-vo-choices{gap:8px}
[data-pmh-vo-fields] .pmh-vo-choice{margin-bottom:0!important}
/* Image groups: picture buttons (radio circle hidden unless "with a radio circle"), or a dropdown with pictures for long lists. */
.pmh-vo-fields .pmh-vo-type-image .pmh-vo-choices{display:grid;grid-template-columns:repeat(var(--pmh-vo-cols,5),minmax(0,1fr));gap:8px}
@media (max-width:600px){.pmh-vo-fields .pmh-vo-type-image .pmh-vo-choices{grid-template-columns:repeat(var(--pmh-vo-cols-sm,3),minmax(0,1fr))}}
.pmh-vo-choice-image{position:relative;justify-content:flex-start;gap:6px;min-width:0;padding:8px 6px!important;border:1px solid #d6d8dc;border-radius:8px;background:#fff;text-align:center;transition:border-color .15s,box-shadow .15s,background .15s}
.pmh-vo-choice-image img{display:block;width:100%;max-width:min(100%,180px);height:auto;aspect-ratio:1/1;object-fit:contain;margin:0 auto}
.pmh-vo-choice-image span{font-size:13px;line-height:1.3;overflow-wrap:anywhere}
.pmh-vo-choice-image:hover{border-color:#1769ff}
.pmh-vo-choice-image:has(input:checked){outline:0;border-color:#1769ff;background:#f1f6ff;box-shadow:inset 0 0 0 1px #1769ff}
.pmh-vo-choice-image:has(input:focus-visible){outline:3px solid #1769ff;outline-offset:2px}
.pmh-vo-display-cards .pmh-vo-choice-image input,.pmh-vo-display-dropdown .pmh-vo-choice-image input{position:absolute!important;opacity:0!important;width:1px!important;height:1px!important;margin:0!important;pointer-events:none}
.pmh-vo-display-cards .pmh-vo-choice-image:has(input:checked)::after{content:'✓';position:absolute;top:4px;right:4px;width:20px;height:20px;border-radius:50%;background:#1769ff;color:#fff;font-size:12px;font-weight:700;line-height:20px;text-align:center}
.pmh-vo-dd{position:relative}
.pmh-vo-dd-toggle{position:relative;display:flex!important;align-items:center;width:100%;min-height:48px;margin:0!important;padding:6px 40px 6px 10px!important;border:1px solid #cbd5e1!important;border-radius:8px!important;background:#fff!important;color:#222!important;font:inherit;font-weight:400!important;text-align:left;text-transform:none!important;letter-spacing:normal!important;line-height:1.3;box-shadow:none!important;cursor:pointer}
.pmh-vo-dd-toggle::after{content:'';position:absolute;right:15px;top:50%;width:8px;height:8px;border-right:2px solid #64748b;border-bottom:2px solid #64748b;transform:translateY(-70%) rotate(45deg);transition:transform .15s}
.pmh-vo-dd-toggle:focus-visible{outline:3px solid #1769ff;outline-offset:2px}
.pmh-vo-dd.is-open .pmh-vo-dd-toggle{border-color:#1769ff!important;box-shadow:0 0 0 1px #1769ff!important}
.pmh-vo-dd.is-open .pmh-vo-dd-toggle::after{transform:translateY(-25%) rotate(-135deg)}
.pmh-vo-dd-current{display:flex;align-items:center;gap:10px;min-width:0}
.pmh-vo-dd-current img{width:36px;height:36px;object-fit:contain;flex:none;border-radius:4px}
.pmh-vo-dd-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pmh-vo-dd-current.is-empty .pmh-vo-dd-text{color:#777}
.pmh-vo-dd-panel{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:60;max-height:0;overflow:hidden;opacity:0;pointer-events:none;background:#fff;border:1px solid #cbd5e1;border-radius:8px;box-shadow:0 12px 32px rgba(15,23,42,.18)}
.pmh-vo-dd.is-open .pmh-vo-dd-panel{max-height:min(420px,60vh);overflow:auto;opacity:1;pointer-events:auto}
.pmh-vo-dd-search{position:sticky;top:0;z-index:1;display:block;width:100%!important;max-width:none!important;height:auto!important;margin:0!important;padding:10px 12px!important;border:0!important;border-bottom:1px solid #e2e8f0!important;border-radius:0!important;background:#fff!important;box-shadow:none!important;box-sizing:border-box}
.pmh-vo-fields .pmh-vo-dd .pmh-vo-choices{gap:4px;padding:6px}
.pmh-vo-dd .pmh-vo-choice-image{padding:6px 4px!important;border-color:transparent}
.pmh-vo-dd .pmh-vo-choice-image img{max-width:min(100%,110px)}
.pmh-vo-dd .pmh-vo-choice-image:hover{background:#f8fafc;border-color:#e2e8f0}
.pmh-vo-dd-rows .pmh-vo-dd .pmh-vo-choice-image{flex-direction:row;align-items:center;gap:10px;padding:5px 8px!important;text-align:left}
.pmh-vo-dd-rows .pmh-vo-dd .pmh-vo-choice-image img{width:44px;max-width:44px;flex:none;margin:0}
.pmh-vo-dd-rows .pmh-vo-dd .pmh-vo-choice-image span{font-size:14px}
@media (max-width:600px){.pmh-vo-dd-rows-sm .pmh-vo-dd .pmh-vo-choice-image{flex-direction:row;align-items:center;gap:10px;padding:5px 8px!important;text-align:left}.pmh-vo-dd-rows-sm .pmh-vo-dd .pmh-vo-choice-image img{width:44px;max-width:44px;flex:none;margin:0}.pmh-vo-dd-rows-sm .pmh-vo-dd .pmh-vo-choice-image span{font-size:14px}}
.pmh-vo-dd .pmh-vo-choice[hidden]{display:none!important}
.pmh-vo-dd-empty{margin:0!important;padding:10px 12px;color:#777}

/* The grid owns field spacing; theme control margins must not add a second gap. */
.pmh-vo-fields > .pmh-vo-field{margin:0}
.pmh-vo-fields .pmh-vo-field > input:not([type=radio]):not([type=checkbox]),
.pmh-vo-fields .pmh-vo-field > select,
.pmh-vo-fields .pmh-vo-field > textarea{margin-bottom:0}
@media(max-width:849px){
 .pmh-vo-fields{row-gap:14px}
 .pmh-vo-fields .pmh-vo-choice-button{min-width:44px;min-height:44px;padding:8px 12px!important;font-size:13px;line-height:1.3}
 .pmh-vo-fields .pmh-vo-choice-button:has(input:checked)::after{margin-left:4px}
 .pmh-vo-fields .pmh-vo-dd-toggle{min-height:44px}
 .pmh-vo-fields .pmh-vo-field > input[type=text],
 .pmh-vo-fields .pmh-vo-field > input[type=number],
 .pmh-vo-fields .pmh-vo-field > select,
 .pmh-vo-fields .pmh-vo-field > textarea{font-size:16px;min-height:44px}
}
