/* WearMA Studio — compact design choice on WooCommerce product pages (scoped; theme-proof sizes). */
.wms-pd { flex: 1 0 100%; max-width: 100%; min-width: 0; contain: inline-size; margin: 0 0 12px; padding: 10px 12px; border: 1px solid #e5e5e2; border-radius: 12px; background: #fafaf8; width: 100%; box-sizing: border-box; clear: both; }
.wms-pd *, .wms-pd-cardsbox *, .wms-pdm * { box-sizing: border-box; }
.wms-pd [hidden], .wms-pd-cardsbox[hidden], .wms-pdm [hidden], .wms-pd-overlay[hidden] { display: none !important; }
.wms-pd__head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.wms-pd__label { font-weight: 700; font-size: 15px; }
.wms-pd__req { font-size: 12px; color: #6b6b6b; }
.wms-pd[data-required="1"] .wms-pd__req { color: #0b6e4f; font-weight: 600; }
.wms-pd__prompt { margin: 0; font-size: 14px; color: #4a4a4a; }
.wms-pd__info { display: flex; align-items: center; gap: 10px; }
.wms-pd__thumb { width: 48px; height: 48px; object-fit: contain; background: #fff; border: 1px solid #e5e5e2; border-radius: 8px; margin: 0 !important; flex: none; }
.wms-pd__name { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
.wms-pd__name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.wms-pd__name small { color: #6b6b6b; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wms-pd__acts { display: flex; gap: 2px; flex: none; }
.wms-pd .wms-pd__link { background: none !important; border: 0 !important; padding: 4px 6px !important; color: #0d0d0d !important; text-decoration: underline; cursor: pointer; letter-spacing: 0 !important; text-transform: none !important; font-size: 13px !important; min-height: 0 !important; box-shadow: none !important; width: auto !important; line-height: 1.2 !important; }
.wms-pd .wms-pd__rm { color: #b32d2e !important; }
.wms-pd__adjust { margin-top: 6px; font-size: 13px; }
.wms-pd__adjust summary { cursor: pointer; color: #4a4a4a; }
.wms-pd__sliders { display: grid; gap: 4px; margin-top: 6px; }
.wms-pd__slider { display: grid; grid-template-columns: 82px 1fr; align-items: center; gap: 8px; margin: 0; }
.wms-pd__slider input { width: 100%; accent-color: #0b6e4f; }
.wms-pd__msg { margin: 6px 0 0; color: #b32d2e; font-size: 14px; font-weight: 600; }

/* Three cards under the product image */
.wms-pd-cardsbox { margin: 8px 0 0; clear: both; position: relative; z-index: 2; }
.wms-pd-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wms-pd-cardsbox button.wms-pd-card { position: relative; display: block; width: 100% !important; aspect-ratio: 1; padding: 4px !important; margin: 0; border: 1px solid #e5e5e2 !important; border-radius: 10px !important; background: #fff !important; cursor: zoom-in; box-shadow: none !important; min-height: 0 !important; line-height: 0 !important; }
.wms-pd-card img { width: 100%; height: 100%; object-fit: contain; border-radius: 6px; background: #f6f6f4; margin: 0 !important; }
.wms-pd-cardsbox button.wms-pd-card { overflow: hidden; }
.wms-pd-cardsbox button.wms-pd-card img { position: absolute; top: 4px; left: 4px; width: calc(100% - 8px) !important; height: calc(100% - 8px) !important; max-width: none !important; object-fit: contain !important; } /* Tall designs stay inside their square tile, whatever the theme's img rules. */
.wms-pd-cardsbox button.wms-pd-card.is-selected { border-color: #0b6e4f !important; box-shadow: 0 0 0 2px #0b6e4f !important; }
.wms-pd-card__check { position: absolute; top: 6px; inset-inline-start: 6px; width: 22px; height: 22px; border-radius: 50%; background: #0b6e4f; color: #fff; font-size: 13px; line-height: 22px; text-align: center; opacity: 0; z-index: 1; }
.wms-pd-card.is-selected .wms-pd-card__check { opacity: 1; }
.wms-pd-cardsbox button.wms-pd-cards__all { display: block; margin: 6px auto 0; background: none !important; border: 0 !important; padding: 4px !important; color: #0d0d0d !important; text-decoration: underline; font-size: 13px !important; letter-spacing: 0 !important; text-transform: none !important; min-height: 0 !important; box-shadow: none !important; width: auto !important; cursor: pointer; }

/* Design drawn on the product's main image */
.wms-pd-overlay { position: absolute; z-index: 5; display: block; max-width: none !important; margin: 0 !important; object-fit: contain; pointer-events: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.15)); }
/* Direct manipulation (0.3.5): the visible design can be dragged; corner handle / wheel / pinch resize it. */
.wms-pd-overlay.is-live { pointer-events: auto; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
.wms-pd-overlay.is-live:hover, .wms-pd-overlay.is-live:active { outline: 1.5px dashed #0b6e4f; outline-offset: 2px; }
.wms-pd-overlay.is-live:active { cursor: grabbing; }
.wms-pd-overlay--back { z-index: 6; }
.wms-pd-handle { position: absolute; z-index: 8; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid #0b6e4f; box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: nwse-resize; touch-action: none; }
.wms-pd-handle::after { content: ""; position: absolute; inset: -10px; } /* ~42px touch target */
.wms-pd-handle[hidden] { display: none !important; }
.wms-pd-zone { position: absolute; z-index: 4; border: 1px dashed rgba(13,13,13,.45); border-radius: 4px; pointer-events: none; box-shadow: 0 0 0 1px rgba(255,255,255,.5); }
.wms-pd-zone[hidden] { display: none !important; }
.wms-pd-editing .zoomImg { display: none !important; }
.wms-pd__hint { margin: 2px 0 0; font-size: 12px; color: #6b6b6b; }

/* Devant / Dos thumbnails, top-left of the main product photo */
.wms-pd-views { position: absolute; top: 8px; left: 8px; z-index: 7; display: flex; gap: 6px; }
.wms-pd-views[hidden] { display: none !important; }
.wms-pd-views button.wms-pd-view { display: grid; justify-items: center; gap: 2px; width: 58px !important; min-height: 0 !important; margin: 0; padding: 3px 3px 2px !important; border: 2px solid rgba(13,13,13,.18) !important; border-radius: 8px !important; background: #fff !important; color: #0d0d0d !important; box-shadow: 0 1px 4px rgba(0,0,0,.15) !important; cursor: pointer; font-size: 11px !important; font-weight: 600; line-height: 1.2 !important; letter-spacing: 0 !important; text-transform: none !important; }
.wms-pd-views button.wms-pd-view.is-active { border-color: #0b6e4f !important; box-shadow: 0 0 0 2px #0b6e4f !important; }
.wms-pd-view img { display: block; width: 48px !important; height: 48px !important; max-width: none !important; margin: 0 !important; object-fit: cover; border-radius: 5px; }
.wms-pd-views button.wms-pd-view:focus-visible { outline: 3px solid #0b6e4f; outline-offset: 2px; }
.wms-pd-backview { position: absolute; inset: 0; z-index: 4; width: 100% !important; height: 100% !important; max-width: none !important; margin: 0 !important; object-fit: contain; background: #fff; pointer-events: none; }
.wms-pd-backview[hidden] { display: none !important; }
.wms-pd-showback .zoomImg { display: none !important; }
@media (max-width: 700px) {
	.wms-pd-views { top: 6px; left: 6px; gap: 4px; }
	.wms-pd-views button.wms-pd-view { width: 50px !important; }
	.wms-pd-view img { width: 40px !important; height: 40px !important; }
}

/* Viewer (modal) */
html.wms-pdm-open, html.wms-pdm-open body { overflow: hidden; }
.wms-pdm { position: fixed; inset: 0; z-index: 100000; background: rgba(10,10,10,.6); display: grid; place-items: center; padding: 16px; overscroll-behavior: contain; }
.wms-pdm[hidden] { display: none; }
.wms-pdm__card { position: relative; width: min(920px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; background: #fff; color: #0d0d0d; border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.25); padding: 16px; }
.wms-pdm__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.wms-pdm__h { margin: 0 !important; font-size: 18px !important; }
.wms-pdm button.wms-pdm__x, .wms-pdm button.wms-pdm__nav { width: 44px; height: 44px; min-width: 44px; padding: 0 !important; border-radius: 50% !important; border: 1px solid #e5e5e2 !important; background: #fff !important; color: #0d0d0d !important; font-size: 26px !important; line-height: 1 !important; letter-spacing: 0 !important; text-transform: none !important; display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.wms-pdm button.wms-pdm__nav[disabled] { opacity: .35; cursor: default; }
.wms-pdm__chips { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 10px; padding-bottom: 4px; }
.wms-pdm button.wms-pdm__chip { flex: none; padding: 6px 12px !important; border-radius: 999px !important; border: 1px solid #d9d9d5 !important; background: #fff !important; color: #0d0d0d !important; font-size: 13px !important; letter-spacing: 0 !important; text-transform: none !important; min-height: 0 !important; line-height: 1.2 !important; box-shadow: none !important; white-space: nowrap; }
.wms-pdm button.wms-pdm__chip.is-on { background: #0d0d0d !important; color: #fff !important; border-color: #0d0d0d !important; }
.wms-pdm__viewer { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: center; }
.wms-pdm__art { position: relative; background: #f6f6f4; border-radius: 12px; display: grid; place-items: center; padding: 12px; touch-action: pan-y; user-select: none; }
.wms-pdm__img { width: 100%; height: auto; max-height: 64vh; object-fit: contain; }
.wms-pdm__nav { position: absolute; top: 50%; transform: translateY(-50%); }
.wms-pdm__prev { inset-inline-start: 8px; }
.wms-pdm__next { inset-inline-end: 8px; }
.wms-pdm[dir="rtl"] .wms-pdm__nav { transform: translateY(-50%) scaleX(-1); }
.wms-pdm__info { display: grid; gap: 10px; align-content: center; }
.wms-pdm__n { margin: 0; font-size: 13px; color: #6b6b6b; font-variant-numeric: tabular-nums; }
.wms-pdm__t { margin: 0 !important; font-size: 20px !important; }
.wms-pdm__ref { margin: 0; color: #6b6b6b; font-size: 14px; }
.wms-pdm button.wms-pdm__use { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 12px 20px !important; border: 1px solid #0d0d0d !important; border-radius: 999px !important; background: #0d0d0d !important; color: #fff !important; font-weight: 600; font-size: 15px !important; line-height: 1.2 !important; cursor: pointer; box-shadow: none !important; }
.wms-pdm button.wms-pdm__use.is-on { background: #0b6e4f !important; border-color: #0b6e4f !important; }
.wms-pd button:focus-visible, .wms-pd-cardsbox button:focus-visible, .wms-pdm button:focus-visible { outline: 3px solid #0b6e4f; outline-offset: 2px; }
@media (max-width: 700px) {
	.wms-pdm { padding: 10px; }
	.wms-pdm__card { padding: 12px; max-height: calc(100dvh - 20px); }
	.wms-pdm__viewer { grid-template-columns: 1fr; gap: 10px; }
	.wms-pdm__img { max-height: 48vh; }
	.wms-pd-cards { gap: 6px; }
}

/* 0.3.6 — size and color choices on WearMA product pages (this file only loads there): one labelled
   section per attribute, options aligned and equally sized on desktop, tablet and mobile. */
.woocommerce div.product form.variations_form table.variations,
.woocommerce div.product form.variations_form table.variations tbody { display: block; width: 100%; margin: 0 0 4px; border: 0; }
.woocommerce div.product form.variations_form table.variations tr { display: block; margin: 0 0 14px; border: 0; }
.woocommerce div.product form.variations_form table.variations th.label { display: block !important; padding: 0 0 6px !important; margin: 0; text-align: start; line-height: 1.3; border: 0; }
.woocommerce div.product form.variations_form table.variations th.label label { font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0; margin: 0; }
.woocommerce div.product form.variations_form table.variations td.value { display: block; padding: 0 !important; border: 0; }
.woocommerce div.product form.variations_form .cfvsw-swatches-container { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; justify-content: flex-start; }
.woocommerce div.product form.variations_form .cfvsw-swatches-option.cfvsw-label-option { box-sizing: border-box; min-width: 48px !important; min-height: 40px !important; padding: 0 12px; margin: 0 !important; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.woocommerce div.product form.variations_form .reset_variations { display: inline-block; margin-top: 6px; }
@media (max-width: 480px) {
	.woocommerce div.product form.variations_form .cfvsw-swatches-option.cfvsw-label-option { min-width: 44px !important; min-height: 40px !important; padding: 0 10px; font-size: 13px; }
}
