.pmw-product-config {
  margin: 1.25rem 0;
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  gap: 1rem;
}

form.cart .quantity.pmw-hidden-qty {
  display: none !important;
}

form.variations_form:has(.pmw-product-config) .single_variation .price,
form.variations_form:has(.pmw-product-config) .woocommerce-variation-price {
  display: none !important;
}

.variations .pmw-native-variation-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.variations,
.variations tbody,
.variations tr {
  display: block;
  width: 100%;
}

.variations th.label,
.variations td.value {
  display: block;
  width: 100%;
  padding: 0;
}

.variations th.label {
  margin-bottom: 0.75rem;
}

.variations .pmw-variation-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(12rem, 1fr));
  gap: 0.85rem;
  width: 100%;
  max-width: none;
}

.variations .pmw-variation-option {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: center;
  min-height: 4.4rem;
  padding: 0.8rem;
  border: 1px solid #e3e5e9;
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.variations .pmw-variation-option:has(input:checked) {
  border-width: 2px;
  border-color: #8a2be2;
  background: rgba(138, 43, 226, 0.04);
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.06);
}

.variations .pmw-variation-option input {
  margin: 0;
}

.variations .pmw-variation-option span {
  display: block;
}

.variations .pmw-variation-option strong {
  display: block;
  font-weight: 800;
  line-height: 1.2;
}

.variations .pmw-variation-option.pmw-is-unavailable {
  opacity: 0.45;
  cursor: not-allowed;
}

.pmw-front-section {
  padding: 1rem;
  border: 1px solid #e3e5e9;
  border-radius: 18px;
  background: #fff;
}

.pmw-front-section:last-child {
  border-bottom: 1px solid #e3e5e9;
}

.pmw-front-section h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 800;
}

.pmw-front-section p {
  margin: -0.25rem 0 0.9rem;
  color: #6b7280;
  font-size: 0.92rem;
}

.pmw-front-options {
  display: grid;
  gap: 0.7rem;
}

.pmw-front-option {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem;
  border: 1px solid #e3e5e9;
  border-radius: 14px;
  cursor: pointer;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.pmw-front-option:has(input:checked) {
  border-color: #8a2be2;
  background: rgba(138, 43, 226, 0.04);
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.06);
}

.pmw-front-option input {
  margin-top: 0.25rem;
  flex: 0 0 auto;
}

.pmw-front-option span {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.1rem 0.8rem;
  width: 100%;
}

.pmw-front-option strong {
  font-weight: 800;
}

.pmw-front-option small {
  color: #6b7280;
}

.pmw-front-option em {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: #111827;
  font-style: normal;
  font-weight: 800;
}

.pmw-measure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.pmw-measure-grid label,
.pmw-free-sheet-quantity label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  color: #6b7280;
  font-size: 0.82rem;
  font-weight: 700;
}

.pmw-measure-grid input,
.pmw-measure-grid select,
.pmw-free-sheet-quantity input {
  width: 100%;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #f5f6f8;
  color: #1f2937;
  font-weight: 700;
}

.pmw-mode-panel-hidden,
[data-pmw-mode-panel][hidden] {
  display: none !important;
}

.pmw-mode-options {
  grid-template-columns: 1fr;
  gap: 1rem;
}

.pmw-mode-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 5.25rem;
  padding: 1rem 1.15rem;
  border-radius: 18px;
}

.pmw-mode-option input {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  border: 3px solid #cfd7e4;
  border-radius: 999px;
  background: #fff;
}

.pmw-mode-option input::before {
  content: "";
  width: 0.75rem;
  height: 0.4rem;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}

.pmw-mode-option input:checked {
  border-color: #8a2be2;
  background: #8a2be2;
}

.pmw-mode-option input:checked::before {
  opacity: 1;
}

.pmw-mode-option span {
  display: block;
  min-width: 0;
}

.pmw-mode-option strong {
  display: block;
  color: #111827;
  font-size: clamp(1.05rem, 2.6vw, 1.45rem);
  font-weight: 500;
  line-height: 1.15;
  overflow-wrap: normal;
  word-break: normal;
}

.pmw-mode-option small {
  display: block;
  margin-top: 0.35rem;
  color: #64748b;
  font-size: clamp(0.92rem, 2.1vw, 1.16rem);
  font-weight: 500;
  line-height: 1.25;
  overflow-wrap: normal;
  word-break: normal;
}

.pmw-mode-option:has(input:checked) {
  border-width: 3px;
}

.pmw-free-sheet-quantity {
  display: grid;
  grid-template-columns: 3rem minmax(7rem, 1fr) 3rem;
  align-items: center;
  gap: 0.7rem;
  max-width: 560px;
  margin: 0 auto 1rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #e0e5ee;
  border-radius: 16px;
  background: #fff;
}

.pmw-free-sheet-quantity label {
  align-items: center;
  gap: 0.15rem;
  color: #111827;
  text-align: center;
}

.pmw-free-sheet-quantity label span {
  color: #111827;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 600;
}

.pmw-free-sheet-quantity input {
  width: min(8rem, 100%);
  min-height: 4.8rem;
  border: 6px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #8a2be2;
  font-size: clamp(2.5rem, 8vw, 4.25rem);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  box-shadow: inset 0 0 0 4px #8a2be2;
  -moz-appearance: textfield;
}

.pmw-free-sheet-quantity input::-webkit-outer-spin-button,
.pmw-free-sheet-quantity input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.pmw-sheet-stepper {
  display: inline-grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  border: 0;
  border-radius: 999px;
  background: #e5e5e5;
  color: #111827;
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.pmw-sheet-stepper:hover,
.pmw-sheet-stepper:focus {
  background: #d9d9d9;
  outline: 3px solid rgba(138, 43, 226, 0.18);
}

.pmw-free-sheet-message {
  margin: 0.85rem auto 0;
  max-width: 560px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #111827;
  font-size: 0.95rem;
  text-align: center;
}

.pmw-free-sheet-message p {
  margin: 0;
}

.pmw-free-sheet-actions {
  display: grid;
  gap: 0.75rem;
  max-width: 560px;
  margin: 1.1rem auto 0;
}

.pmw-free-sheet-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.75rem 1rem;
  border: 3px solid #8a2be2;
  border-radius: 999px;
  background: #8a2be2;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.pmw-free-sheet-button:hover,
.pmw-free-sheet-button:focus {
  color: #fff;
  filter: brightness(0.96);
}

.pmw-free-sheet-button-secondary {
  background: #fff;
  color: #8a2be2;
}

.pmw-free-sheet-button-secondary:hover,
.pmw-free-sheet-button-secondary:focus {
  color: #8a2be2;
}

.pmw-free-sheet-notice {
  margin-top: 1rem;
  color: #111827;
  text-align: center;
}

.pmw-live-summary {
  margin-top: 0.95rem;
  padding: 0.9rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.08), rgba(17, 24, 39, 0.04));
  color: #111827;
}

.pmw-size-warning {
  margin-top: 0.75rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff1f2;
  color: #b91c1c;
  font-size: 0.9rem;
  font-weight: 750;
}

.pmw-size-warning[hidden] {
  display: none;
}

.pmw-notice-focus {
  outline: 3px solid rgba(220, 38, 38, 0.22);
  outline-offset: 6px;
}

.pmw-input-error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.08);
}

.pmw-field-error {
  color: #dc2626;
  font-weight: 800;
}

.pmw-summary-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  margin-top: 0.65rem;
  color: #6b7280;
  font-size: 0.92rem;
}

.pmw-summary-grid b:last-child {
  color: #8a2be2;
  font-size: 1.15rem;
}

.pmw-addon-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.pmw-addon-option {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.8rem;
  border: 1px solid #e3e5e9;
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
}

.pmw-addon-option:has(input:checked) {
  border-width: 2px;
  border-color: #8a2be2;
}

.pmw-addon-option img {
  grid-column: 1 / -1;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #f5f6f8;
}

.pmw-addon-option:has(img) > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pmw-addon-option span {
  display: block;
}

.pmw-addon-option strong {
  font-weight: 800;
}

.pmw-addon-option small,
.pmw-addon-option em {
  display: block;
  color: #6b7280;
  font-style: normal;
}

.pmw-help-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.25rem;
  border: 0;
  border-radius: 999px;
  background: #2d9cdb;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: help;
}

.pmw-help-tip span {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 20;
  display: none;
  width: 220px;
  padding: 0.75rem;
  border: 1px solid #e3e5e9;
  border-radius: 12px;
  background: #fff;
  color: #374151;
  box-shadow: 0 12px 26px rgba(17, 24, 39, 0.12);
  transform: translateX(-50%);
}

.pmw-help-tip:hover span,
.pmw-help-tip:focus span {
  display: block;
}

.pmw-terms {
  margin-top: 0.8rem !important;
  font-size: 0.85rem !important;
}

.variations .pmw-variation-options,
.pmw-addon-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.pmw-front-options {
  gap: 0.75rem;
}

.variations .pmw-variation-option,
.pmw-front-option,
.pmw-addon-option {
  min-height: 4rem;
  padding: 0.78rem 0.9rem;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.variations .pmw-variation-option:has(input:checked),
.pmw-front-option:has(input:checked),
.pmw-addon-option:has(input:checked) {
  border-width: 2px;
  border-color: #8a2be2;
  background: rgba(138, 43, 226, 0.035);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.045);
}

.variations .pmw-variation-option input,
.pmw-front-option input,
.pmw-addon-option:not(:has(img)) > input {
  appearance: none;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  border: 2px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
}

.variations .pmw-variation-option input::before,
.pmw-front-option input::before,
.pmw-addon-option:not(:has(img)) > input::before {
  content: "";
  width: 0.48rem;
  height: 0.28rem;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}

.variations .pmw-variation-option input:checked,
.pmw-front-option input:checked,
.pmw-addon-option:not(:has(img)) > input:checked {
  border-color: #8a2be2;
  background: #8a2be2;
}

.variations .pmw-variation-option input:checked::before,
.pmw-front-option input:checked::before,
.pmw-addon-option:not(:has(img)) > input:checked::before {
  opacity: 1;
}

.variations .pmw-variation-option strong,
.pmw-front-option strong,
.pmw-addon-option strong {
  color: #111827;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.18;
}

.pmw-front-option small,
.pmw-addon-option small,
.pmw-addon-option em {
  color: #697386;
  font-size: 0.9rem;
  line-height: 1.2;
}

.pmw-front-option em {
  align-self: center;
  font-size: 0.96rem;
}

.pmw-mode-options {
  grid-template-columns: 1fr;
}

.pmw-mode-option {
  min-height: 4.35rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
}

.pmw-mode-option input {
  width: 1.6rem;
  height: 1.6rem;
  border-width: 2px;
}

.pmw-mode-option strong {
  font-size: 1.05rem;
  font-weight: 800;
}

.pmw-mode-option small {
  margin-top: 0.2rem;
  font-size: 0.92rem;
}

.pmw-mode-option:has(input:checked) {
  border-width: 2px;
}

.pmw-free-sheet-card {
  display: grid;
  grid-template-columns: minmax(15rem, 0.86fr) minmax(17rem, 1.14fr);
  gap: 1rem 1.15rem;
  align-items: stretch;
  padding: 1.1rem;
}

.pmw-free-sheet-card h3 {
  grid-column: 1 / -1;
  margin-bottom: 0;
  text-align: left;
}

.pmw-free-sheet-quantity {
  box-sizing: border-box;
  grid-row: 2 / span 2;
  grid-template-columns: 2.35rem minmax(7rem, 1fr) 2.35rem;
  gap: 0.5rem;
  align-self: stretch;
  max-width: none;
  width: 100%;
  margin: 0;
  min-height: 10.25rem;
  padding: 0.8rem;
  border-color: #e6eaf1;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.pmw-free-sheet-quantity label span {
  font-size: 1rem;
}

.pmw-free-sheet-quantity input {
  width: 5.9rem;
  min-height: 3.55rem;
  border-width: 4px;
  font-size: 2.65rem;
  box-shadow: inset 0 0 0 3px #8a2be2;
}

.pmw-sheet-stepper {
  width: 2rem;
  height: 2rem;
  font-size: 1.35rem;
}

.pmw-free-sheet-message,
.pmw-free-sheet-actions {
  max-width: none;
}

.pmw-free-sheet-message {
  box-sizing: border-box;
  grid-column: 2;
  margin: 0;
  padding: 0.85rem;
  border: 1px solid #edf0f5;
  border-radius: 12px;
  background: #f8fafc;
  color: #5f6b7c;
  font-size: 0.86rem;
  line-height: 1.35;
  text-align: left;
}

.pmw-free-sheet-actions {
  box-sizing: border-box;
  grid-column: 2;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 0.55rem;
  margin: 0;
}

.pmw-free-sheet-button {
  align-self: start;
  box-sizing: border-box;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.62rem 0.8rem;
  border-width: 2px;
  font-size: 0.9rem;
  line-height: 1.1;
  white-space: normal;
}

.pmw-free-sheet-notice {
  box-sizing: border-box;
  grid-column: 1 / -1;
  margin-top: 0.1rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  background: rgba(138, 43, 226, 0.055);
  color: #111827;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .pmw-measure-grid {
    grid-template-columns: 1fr;
  }

  .pmw-addon-options {
    grid-template-columns: 1fr;
  }

  .variations .pmw-variation-options {
    grid-template-columns: 1fr;
  }

  .pmw-front-option span {
    grid-template-columns: 1fr;
  }

  .pmw-mode-options {
    grid-template-columns: 1fr;
  }

  .pmw-front-option em {
    grid-row: auto;
    grid-column: auto;
  }

  .pmw-free-sheet-card {
    grid-template-columns: 1fr;
  }

  .pmw-free-sheet-card h3,
  .pmw-free-sheet-quantity,
  .pmw-free-sheet-message,
  .pmw-free-sheet-actions,
  .pmw-free-sheet-notice {
    grid-column: auto;
    grid-row: auto;
  }

  .pmw-free-sheet-message {
    text-align: center;
  }

  .pmw-free-sheet-actions {
    grid-template-columns: 1fr;
  }
}
