.wacs-studio {
  clear: both;
  margin: 1.75rem 0;
  padding: clamp(1rem, 3vw, 1.6rem);
  border: 1px solid #ddd8d1;
  background: #faf9f7;
  color: #171513;
}
.wacs-step { display: flex; gap: .8rem; align-items: flex-start; margin: 1.2rem 0 .8rem; }
.wacs-step:first-child { margin-top: 0; }
.wacs-step > span { display: grid; place-items: center; flex: 0 0 2rem; width: 2rem; height: 2rem; border-radius: 50%; background: #17100c; color: #fff; font-weight: 700; }
.wacs-step h3 { margin: 0; font-size: 1.18rem; line-height: 1.3; }
.wacs-step p { margin: .2rem 0 0; color: #68615a; font-size: .92rem; }
.wacs-field { position: relative; min-width: 0; margin: 0 0 1rem; }
.wacs-field label { display: block; margin-bottom: .38rem; font-weight: 650; }
.wacs-field textarea,
.wacs-field select,
.wacs-field input[type="text"],
.wacs-field input[type="email"],
.wacs-field input[type="number"] { width: 100%; min-width: 0; box-sizing: border-box; border: 1px solid #aaa39b; border-radius: 2px; background: #fff; font: inherit; color: #211e1b; }
.wacs-field textarea { min-height: 132px; padding: 12px; line-height: 1.5; resize: vertical; }
.wacs-field select { min-height: 48px; height: auto; padding: 11px 40px 11px 12px; line-height: 1.35; text-overflow: ellipsis; }
.wacs-field input[type="text"],
.wacs-field input[type="email"],
.wacs-field input[type="number"] { min-height: 48px; padding: 11px 12px; line-height: 1.35; }
.wacs-native-file { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; }
.wacs-upload-zone { display: grid; gap: .3rem; place-items: center; min-height: 132px; padding: 1rem; border: 2px dashed #b8a98f; border-radius: 6px; background: #fff; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.wacs-upload-zone strong { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 0 1.2rem; border-radius: 3px; background: #17100c; color: #fff; }
.wacs-upload-zone span { color: #524b44; }
.wacs-upload-zone small { color: #716a62; }
.wacs-upload-zone:hover,
.wacs-upload-zone:focus,
.wacs-upload-zone.is-dragging { outline: none; border-color: #b17a22; background: #fff8ea; }
.wacs-help { margin: .4rem 0 0; color: #68615a; font-size: .82rem; line-height: 1.45; overflow-wrap: anywhere; }
.wacs-error { margin: .45rem 0 0; color: #a32020; font-weight: 600; }
.wacs-text-limit-row { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.wacs-text-limit-row .wacs-help { flex: 1 1 auto; }
.wacs-text-count { flex: 0 0 auto; margin-top: .4rem; color: #68615a; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.wacs-text-count.is-near-limit { color: #9a6300; }
.wacs-text-count.is-over-limit { color: #a32020; }
.wacs-previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; margin-top: .8rem; }
.wacs-preview { min-width: 0; border: 1px solid #d7d1ca; border-radius: 4px; background: #fff; padding: .5rem; box-shadow: 0 2px 9px rgba(32, 24, 18, .06); }
.wacs-preview-media { display: grid; place-items: center; width: 100%; min-height: 120px; overflow: visible; background: #f1efeb; color: #655e56; font-weight: 700; }
.wacs-preview img { display: block !important; width: 100% !important; height: auto !important; max-width: 100% !important; max-height: min(70vh, 720px) !important; aspect-ratio: auto !important; object-fit: contain !important; object-position: center !important; }
.wacs-preview-name { display: block; overflow: hidden; margin-top: .45rem; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.wacs-preview-badge { display: block; margin: .18rem 0 .45rem; color: #6c655d; }
.wacs-preview-actions { display: flex; flex-wrap: wrap; gap: .3rem; }
.wacs-preview-action,
.wacs-toolbar button { min-height: 40px; padding: .4rem .65rem; border: 1px solid #bdb4a9; border-radius: 3px; background: #fff; color: #211e1b; font: inherit; font-size: .78rem; cursor: pointer; }
.wacs-preview-action:hover,
.wacs-preview-action:focus,
.wacs-toolbar button:hover,
.wacs-toolbar button:focus { border-color: #17100c; outline: 2px solid transparent; background: #f3eee7; }
.wacs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.wacs-count { text-align: right; color: #817970; font-size: .75rem; }
.wacs-product-note { margin: .2rem 0 1.1rem; padding: .8rem; border-left: 3px solid #3e3027; background: #f0ede9; font-size: .88rem; line-height: 1.5; }
.wacs-rights { margin-top: .6rem; padding-top: 1rem; border-top: 1px solid #ddd8d1; }
.wacs-rights label { display: flex; align-items: flex-start; gap: .55rem; line-height: 1.45; }
.wacs-rights input { flex: 0 0 auto; margin-top: .25rem; }
.wacs-studio .required { color: #a32020; }
.wacs-markup-launch { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin: -.2rem 0 1rem; }
.wacs-markup-launch .button { min-height: 44px; }
.wacs-markup-launch .button:disabled,
.wacs-markup-launch .button[aria-disabled="true"] { border-color: #c7c7c7 !important; background: #d9d9d9 !important; color: #707070 !important; box-shadow: none !important; cursor: not-allowed; opacity: 1; }
#wacs-text-customization[hidden] { display: none !important; }
.wacs-text-placement-field { margin-top: 1rem; }
.wacs-text-placement-launch { margin-top: -.35rem; }
.wacs-modal[hidden] { display: none !important; }
.wacs-modal { position: fixed; z-index: 999999; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(18, 15, 12, .78); }
.wacs-modal-card { width: min(780px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-sizing: border-box; padding: clamp(14px, 3vw, 24px); border-radius: 7px; background: #fff; box-shadow: 0 24px 80px rgba(0, 0, 0, .35); }
.wacs-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wacs-modal-head h3 { margin: 0; }
.wacs-icon-button { width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: #211e1b; font-size: 30px; line-height: 1; cursor: pointer; }
.wacs-canvas-wrap { width: min(100%, 620px); margin: 1rem auto; overflow: hidden; border: 1px solid #cfc8c0; background: #f4f2ef; touch-action: none; }
.wacs-canvas-wrap canvas { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; }
#wacs-text-placement-canvas { cursor: move; }
.wacs-toolbar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem; margin: .75rem 0; }
.wacs-color-toolbar select { min-height: 44px; max-width: 220px; }
.wacs-color-toolbar input[type=range] { min-height: 44px; }
.wacs-modal-actions { display: flex; justify-content: flex-end; gap: .65rem; margin-top: 1rem; }
.wacs-modal-actions .button { min-height: 44px; }
body.wacs-modal-open { overflow: hidden; }

/* Preserve complete square gallery artwork on custom product pages. */
.single-product .woocommerce-product-gallery,
.single-product .woocommerce-product-gallery__wrapper,
.single-product .woocommerce-product-gallery__image { min-width: 0; max-width: 100%; }
.single-product .woocommerce-product-gallery .ct-media-container,
.single-product .woocommerce-product-gallery [data-flexy="no"] .ct-media-container,
.single-product .woocommerce-product-gallery .flexy-item .ct-media-container { width: 100% !important; height: auto !important; aspect-ratio: 1 / 1 !important; overflow: hidden !important; background: #faf9f7; }
.single-product .woocommerce-product-gallery__image > a { display: flex; align-items: center; justify-content: center; width: 100%; overflow: hidden; background: #faf9f7; }
.single-product .woocommerce-product-gallery__image img,
.single-product .woocommerce-product-gallery .ct-media-container img { display: block !important; width: 100% !important; height: 100% !important; max-width: 100% !important; max-height: 100% !important; aspect-ratio: 1 / 1 !important; object-fit: contain !important; object-position: center !important; }

@media (max-width: 767px) {
  .wacs-grid { grid-template-columns: 1fr; gap: 0; }
  .wacs-studio { margin: 1.25rem 0; padding: 1rem; }
  .wacs-field select { min-height: 50px; font-size: 16px; }
  .wacs-field textarea { min-height: 150px; font-size: 16px; }
  .wacs-previews { grid-template-columns: 1fr; }
  .wacs-preview { display: grid; grid-template-columns: 92px minmax(0, 1fr); column-gap: .65rem; align-items: start; }
  .wacs-preview-media { grid-row: span 3; min-height: 92px; align-self: start; }
  .wacs-preview img { max-height: 260px !important; }
  .wacs-preview-name { white-space: normal; overflow-wrap: anywhere; }
  .wacs-preview-actions { grid-column: 2; }
  .wacs-preview-action { min-height: 44px; }
	.wacs-text-limit-row { display: block; }
	.wacs-text-count { display: block; margin-top: .3rem; text-align: right; }
  .wacs-modal { padding: 8px; }
  .wacs-modal-card { max-height: calc(100vh - 16px); padding: 12px; }
  .wacs-toolbar button { min-height: 44px; }
  .wacs-modal-actions { position: sticky; bottom: -12px; padding: 10px 0 12px; background: #fff; }
}
