
/* ============================================================
   v1.7.2 — Configuratore prodotto UX
   WooCommerce variations + Advanced Product Fields Pro
   ============================================================ */
body.single-product .seta-product-cart-area {
  --seta-config-gap: 22px;
}

body.single-product .seta-configurator-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 22px;
  margin: 4px 0 26px;
  padding: 18px 20px;
  border-left: 2px solid var(--seta-red);
  background: linear-gradient(90deg, var(--seta-red-pale), rgba(255, 240, 242, .22));
}
body.single-product .seta-configurator-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--seta-red);
  font-family: var(--seta-ff-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .17em;
  text-transform: uppercase;
}
body.single-product .seta-configurator-copy h2 {
  margin: 0 0 3px;
  color: var(--seta-ink);
  font-family: var(--seta-ff-display);
  font-size: 27px;
  font-weight: 500;
  line-height: 1.08;
}
body.single-product .seta-configurator-copy p {
  margin: 0;
  color: var(--seta-gray);
  font-family: var(--seta-ff-body);
  font-size: 12px;
  line-height: 1.55;
}
body.single-product .seta-configurator-progress {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: baseline;
  justify-content: end;
  gap: 3px;
  min-width: 98px;
  color: var(--seta-ink);
  font-family: var(--seta-ff-display);
  font-size: 22px;
  line-height: 1;
}
body.single-product .seta-configurator-progress small {
  grid-column: 1 / -1;
  margin-top: 6px;
  color: var(--seta-gray);
  font-family: var(--seta-ff-body);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .1em;
  text-align: right;
  text-transform: uppercase;
}
body.single-product .seta-configurator-intro.is-complete .seta-configurator-progress {
  color: var(--seta-green);
}

body.single-product .seta-option-field,
body.single-product .wapf-field-container.seta-apf-enhanced {
  min-width: 0;
  margin: 0 !important;
  padding: 0 0 var(--seta-config-gap) !important;
  border: 0 !important;
}
body.single-product .seta-option-field + .seta-option-field,
body.single-product .seta-option-field + table.variations + .wapf-wrapper,
body.single-product .wapf-field-container.seta-apf-enhanced + .wapf-field-container.seta-apf-enhanced {
  padding-top: 20px !important;
  border-top: 1px solid var(--seta-border) !important;
}
body.single-product .seta-source-label-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body.single-product .seta-var-label {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: baseline;
  column-gap: 9px;
  row-gap: 4px;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  color: var(--seta-ink);
  font-family: var(--seta-ff-body);
  line-height: 1.35;
}
body.single-product .seta-var-label-main {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
}
body.single-product .seta-field-requirement,
body.single-product .seta-apf-field-meta small {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid var(--seta-border);
  color: var(--seta-gray);
  font-family: var(--seta-ff-body);
  font-size: 8px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: .09em;
  line-height: 1;
  text-transform: uppercase;
}
body.single-product .seta-var-label em,
body.single-product .seta-apf-selection-hint {
  justify-self: end;
  color: var(--seta-gray);
  font-family: var(--seta-ff-body);
  font-size: 12px;
  font-style: normal;
  font-weight: 300;
  letter-spacing: .02em;
  text-align: right;
  text-transform: none;
}
body.single-product .seta-option-field.has-selection .seta-var-label em,
body.single-product .wapf-field-container.has-selection .seta-apf-selection-hint {
  color: var(--seta-red);
}

body.single-product .seta-choice-row {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 8px;
}
body.single-product .seta-choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--seta-border);
  border-radius: 0;
  background: #fff;
  color: var(--seta-stone);
  box-shadow: none;
  cursor: pointer;
  font-family: var(--seta-ff-body);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  transition: border-color .18s var(--seta-ease), background .18s var(--seta-ease), color .18s var(--seta-ease), transform .18s var(--seta-ease);
}
body.single-product .seta-choice:hover:not(:disabled) {
  border-color: var(--seta-red);
  color: var(--seta-red);
  transform: translateY(-1px);
}
body.single-product .seta-choice:focus-visible,
body.single-product .seta-guide-button:focus-visible,
body.single-product .wapf-checkable:focus-within,
body.single-product .wapf-image-swatch:focus-within,
body.single-product .wapf-swatch:focus-within {
  outline: 2px solid var(--seta-red);
  outline-offset: 3px;
}
body.single-product .seta-choice.is-active,
body.single-product .seta-choice[aria-checked="true"] {
  border-color: var(--seta-red);
  background: var(--seta-red);
  color: #fff;
}
body.single-product .seta-choice.is-active::before {
  content: '✓';
  margin-right: 7px;
  font-family: Arial, sans-serif;
  font-size: 10px;
}
body.single-product .seta-choice.is-disabled,
body.single-product .seta-choice:disabled {
  border-color: var(--seta-border);
  background: #fbfaf9;
  color: var(--seta-light);
  cursor: not-allowed;
  opacity: 1;
  transform: none;
}
body.single-product .seta-choice.is-disabled::after,
body.single-product .seta-choice:disabled::after {
  content: '';
  position: absolute;
  left: 7px;
  right: 7px;
  top: 50%;
  height: 1px;
  background: var(--seta-light);
  transform: rotate(-13deg);
}

body.single-product .seta-choice-row.is-color {
  align-items: flex-start;
  gap: 16px;
}
body.single-product .seta-color-choice,
body.single-product .seta-color-choice:hover:not(:disabled),
body.single-product .seta-color-choice.is-active,
body.single-product .seta-color-choice[aria-checked="true"] {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 52px;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--seta-gray);
  transform: none;
}
body.single-product .seta-color-choice.is-active::before { display: none; }
body.single-product .seta-color-dot {
  position: relative;
  width: 46px;
  height: 46px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--seta-border), 0 5px 14px rgba(0,0,0,.07);
  transition: box-shadow .18s var(--seta-ease), transform .18s var(--seta-ease);
}
body.single-product .seta-color-choice:hover .seta-color-dot {
  box-shadow: 0 0 0 1px var(--seta-red), 0 6px 16px rgba(0,0,0,.09);
  transform: translateY(-1px);
}
body.single-product .seta-color-choice.is-active .seta-color-dot,
body.single-product .seta-color-choice[aria-checked="true"] .seta-color-dot {
  box-shadow: 0 0 0 2px var(--seta-ink), 0 6px 16px rgba(0,0,0,.09);
}
body.single-product .seta-color-choice.is-active .seta-color-dot::after,
body.single-product .seta-color-choice[aria-checked="true"] .seta-color-dot::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(0,0,0,.68);
  font-family: Arial, sans-serif;
  font-size: 14px;
}
body.single-product .seta-color-name {
  max-width: 82px;
  color: var(--seta-gray);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .08em;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}

body.single-product .seta-guide-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
body.single-product .seta-guide-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--seta-border);
  background: #fff;
  color: var(--seta-stone);
  cursor: pointer;
  font-family: var(--seta-ff-body);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: border-color .18s var(--seta-ease), color .18s var(--seta-ease), background .18s var(--seta-ease);
}
body.single-product .seta-guide-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.single-product .seta-guide-button:hover {
  border-color: var(--seta-red);
  background: var(--seta-red-pale);
  color: var(--seta-red);
}

/* Advanced Product Fields Pro: radio, checkbox e swatch. */
body.single-product .wapf-field-container.seta-apf-enhanced .wapf-field-label {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin: 0 0 12px !important;
}
body.single-product .wapf-field-container.seta-apf-enhanced .wapf-field-label > label,
body.single-product .wapf-field-container.seta-apf-enhanced .wapf-field-label > span:first-child {
  margin: 0 !important;
  color: var(--seta-ink) !important;
  font-family: var(--seta-ff-body) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: .13em !important;
  line-height: 1.35 !important;
  text-transform: uppercase !important;
}
body.single-product .seta-apf-field-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}
body.single-product .seta-apf-field-meta em {
  margin: 0;
  color: var(--seta-gray);
  font-family: var(--seta-ff-body);
  font-size: 11px;
  font-style: normal;
  font-weight: 300;
}
body.single-product .wapf-field-description {
  margin: -4px 0 12px !important;
  color: var(--seta-gray) !important;
  font-family: var(--seta-ff-body) !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
}
body.single-product .wapf-field-input {
  min-width: 0;
}
body.single-product .wapf-field-container.seta-apf-enhanced .wapf-checkable,
body.single-product .wapf-field-container.seta-apf-enhanced .seta-apf-option {
  position: relative;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 42px !important;
  margin: 0 8px 8px 0 !important;
  padding: 10px 14px !important;
  border: 1px solid var(--seta-border) !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: var(--seta-stone) !important;
  box-shadow: none !important;
  cursor: pointer !important;
  font-family: var(--seta-ff-body) !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  transition: border-color .18s var(--seta-ease), color .18s var(--seta-ease), background .18s var(--seta-ease) !important;
}
body.single-product .wapf-field-container.seta-apf-enhanced .wapf-checkable:hover,
body.single-product .wapf-field-container.seta-apf-enhanced .seta-apf-option:hover {
  border-color: var(--seta-red) !important;
  color: var(--seta-red) !important;
}
body.single-product .wapf-field-container.seta-apf-enhanced .wapf-checkable input[type="radio"],
body.single-product .wapf-field-container.seta-apf-enhanced .wapf-checkable input[type="checkbox"],
body.single-product .wapf-field-container.seta-apf-enhanced .seta-apf-option input[type="radio"],
body.single-product .wapf-field-container.seta-apf-enhanced .seta-apf-option input[type="checkbox"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
body.single-product .wapf-field-container.seta-apf-enhanced .seta-apf-option.is-active,
body.single-product .wapf-field-container.seta-apf-enhanced .wapf-checkable.is-active,
body.single-product .wapf-field-container.seta-apf-enhanced .wapf-checked,
body.single-product .wapf-field-container.seta-apf-enhanced .selected {
  border-color: var(--seta-red) !important;
  background: var(--seta-red-pale) !important;
  color: var(--seta-red) !important;
  box-shadow: 0 0 0 1px var(--seta-red) inset !important;
}
body.single-product .wapf-field-container.seta-apf-enhanced .seta-apf-option.is-active::before,
body.single-product .wapf-field-container.seta-apf-enhanced .wapf-checkable.is-active::before {
  content: '✓';
  color: var(--seta-red);
  font-family: Arial, sans-serif;
  font-size: 10px;
}

body.single-product .wapf-field-container.seta-apf-enhanced .wapf-image-swatch-wrapper,
body.single-product .wapf-field-container.seta-apf-enhanced .wapf-swatch-wrapper {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
}
body.single-product .wapf-field-container.seta-apf-enhanced .wapf-image-swatch.seta-apf-option,
body.single-product .wapf-field-container.seta-apf-enhanced .seta-apf-option--image {
  display: grid !important;
  grid-template-rows: 92px auto !important;
  gap: 8px !important;
  width: 122px !important;
  min-height: 130px !important;
  margin: 0 !important;
  padding: 7px !important;
  text-align: center !important;
}
body.single-product .wapf-field-container.seta-apf-enhanced .wapf-image-swatch img,
body.single-product .wapf-field-container.seta-apf-enhanced .seta-apf-option--image img {
  width: 100% !important;
  height: 92px !important;
  object-fit: cover !important;
  object-position: center !important;
}
body.single-product .wapf-field-container.seta-apf-enhanced .wapf-image-swatch span,
body.single-product .wapf-field-container.seta-apf-enhanced .seta-apf-option--image span {
  display: block !important;
  color: inherit !important;
  font-size: 10px !important;
  letter-spacing: .04em !important;
  line-height: 1.25 !important;
}
body.single-product .wapf-field-container.seta-apf-enhanced .seta-apf-option--image.is-active::before {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--seta-red);
  color: #fff;
}

body.single-product .wapf-field-container.seta-apf-enhanced .wapf-swatch.seta-apf-option,
body.single-product .wapf-field-container.seta-apf-enhanced .seta-apf-option--swatch {
  width: auto !important;
  min-width: 48px !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 5px !important;
}
body.single-product .wapf-field-container.seta-apf-enhanced .wapf-swatch span,
body.single-product .wapf-field-container.seta-apf-enhanced .seta-apf-option--swatch span {
  border-radius: 50% !important;
}

body.single-product .wapf-field-container.seta-apf-enhanced input[type="text"],
body.single-product .wapf-field-container.seta-apf-enhanced input[type="number"],
body.single-product .wapf-field-container.seta-apf-enhanced input[type="email"],
body.single-product .wapf-field-container.seta-apf-enhanced input[type="date"],
body.single-product .wapf-field-container.seta-apf-enhanced textarea,
body.single-product .wapf-field-container.seta-apf-enhanced select:not(.seta-native-select-hidden) {
  width: 100% !important;
  min-height: 46px !important;
  padding: 10px 12px !important;
  border: 1px solid var(--seta-border) !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: var(--seta-ink) !important;
  box-shadow: none !important;
  font-family: var(--seta-ff-body) !important;
  font-size: 13px !important;
}
body.single-product .wapf-field-container.seta-apf-enhanced textarea {
  min-height: 110px !important;
  resize: vertical;
}
body.single-product .wapf-field-container.seta-apf-enhanced input:focus,
body.single-product .wapf-field-container.seta-apf-enhanced textarea:focus,
body.single-product .wapf-field-container.seta-apf-enhanced select:focus {
  border-color: var(--seta-red) !important;
  outline: 2px solid rgba(184, 0, 28, .1) !important;
  outline-offset: 1px !important;
}

body.single-product .seta-option-field.is-missing,
body.single-product .wapf-field-container.seta-apf-enhanced.is-missing {
  margin-left: -12px !important;
  margin-right: -12px !important;
  padding: 14px 12px 18px !important;
  border: 1px solid rgba(184, 0, 28, .38) !important;
  background: var(--seta-red-pale) !important;
}
body.single-product .seta-field-error {
  display: none;
  margin: 9px 0 0;
  color: var(--seta-red);
  font-family: var(--seta-ff-body);
  font-size: 11px;
  line-height: 1.45;
}
body.single-product .seta-option-field.is-missing .seta-field-error {
  display: block;
}

/* Riepilogo configurazione. */
body.single-product .seta-price-summary {
  margin: 4px 0 18px;
  padding: 15px 17px;
  border: 1px solid var(--seta-border);
  background: var(--seta-off);
}
body.single-product .seta-ps-row,
body.single-product .seta-ps-option-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 0;
  color: var(--seta-stone);
  font-family: var(--seta-ff-body);
  font-size: 12px;
  line-height: 1.45;
}
body.single-product .seta-ps-product {
  padding-bottom: 9px;
  border-bottom: 1px solid var(--seta-border);
}
body.single-product .seta-ps-options {
  display: grid;
  gap: 3px;
  padding: 8px 0;
}
body.single-product .seta-ps-option-row span {
  color: var(--seta-gray);
}
body.single-product .seta-ps-option-row strong {
  max-width: 62%;
  color: var(--seta-ink);
  font-weight: 400;
  text-align: right;
}
body.single-product .seta-ps-empty {
  padding: 9px 0;
  color: var(--seta-gray);
  font-family: var(--seta-ff-body);
  font-size: 11px;
  font-style: italic;
}
body.single-product .seta-ps-empty[hidden] { display: none !important; }
body.single-product .seta-ps-row.total {
  margin-top: 3px;
  padding-top: 11px;
  border-top: 1px solid var(--seta-border);
  color: var(--seta-ink);
  font-family: var(--seta-ff-display);
  font-size: 20px;
  font-weight: 500;
}

/* Modale guide. */
.seta-guide-dialog {
  width: min(92vw, 520px);
  max-width: 520px;
  padding: 34px 36px 30px;
  border: 0;
  background: #fff;
  color: var(--seta-ink);
  box-shadow: 0 24px 80px rgba(0,0,0,.22);
}
.seta-guide-dialog::backdrop { background: rgba(26,26,26,.72); }
.seta-guide-dialog-close {
  position: absolute;
  top: 10px;
  right: 13px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--seta-gray);
  cursor: pointer;
  font: 300 28px/1 Arial, sans-serif;
}
.seta-guide-dialog h3 {
  margin: 6px 0 15px;
  color: var(--seta-ink);
  font-family: var(--seta-ff-display);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.08;
}
.seta-guide-dialog-body {
  color: var(--seta-stone);
  font-family: var(--seta-ff-body);
  font-size: 13px;
  line-height: 1.7;
}
.seta-guide-dialog-body p { margin: 0 0 12px; }
.seta-guide-dialog-body ul,
.seta-guide-dialog-body ol { margin: 0 0 12px 20px; }
.seta-guide-dialog-body li { margin-bottom: 6px; }

@media (max-width: 767px) {
  body.single-product .seta-configurator-intro {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 15px 16px;
  }
  body.single-product .seta-configurator-copy h2 { font-size: 24px; }
  body.single-product .seta-configurator-progress {
    grid-template-columns: auto auto auto 1fr;
    justify-content: start;
    min-width: 0;
  }
  body.single-product .seta-configurator-progress small {
    grid-column: auto;
    margin: 0 0 0 4px;
    text-align: left;
  }
  body.single-product .seta-var-label {
    grid-template-columns: auto auto;
  }
  body.single-product .seta-var-label em {
    grid-column: 1 / -1;
    justify-self: start;
    text-align: left;
  }
  body.single-product .seta-choice-row:not(.is-color) {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  body.single-product .seta-choice { min-width: 0; padding: 10px 9px; }
  body.single-product .seta-choice-row.is-color { gap: 12px; }
  body.single-product .wapf-field-container.seta-apf-enhanced .wapf-field-label {
    grid-template-columns: 1fr;
  }
  body.single-product .seta-apf-field-meta {
    justify-content: flex-start;
  }
  body.single-product .wapf-field-container.seta-apf-enhanced .wapf-image-swatch.seta-apf-option,
  body.single-product .wapf-field-container.seta-apf-enhanced .seta-apf-option--image {
    width: calc(50% - 6px) !important;
    min-width: 0 !important;
  }
  body.single-product .seta-ps-option-row strong { max-width: 56%; }
  .seta-guide-dialog { padding: 30px 22px 24px; }
}

@media (max-width: 420px) {
  body.single-product .seta-choice-row:not(.is-color) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.single-product .seta-var-label-main { font-size: 11px; }
  body.single-product .seta-field-requirement { font-size: 7px; }
}

/* ============================================================
   v1.7.3 — Product configurator mockup refinement
   ============================================================ */
body.single-product .seta-var-block,
body.single-product fieldset.seta-option-field {
  min-inline-size: 0 !important;
  margin: 0 !important;
  padding: 0 0 22px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.single-product .seta-var-block legend,
body.single-product fieldset.seta-option-field legend {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  border: 0 !important;
}
body.single-product .seta-guide-buttons {
  width: auto;
  margin: 8px 0 0;
}
body.single-product .seta-guide-button {
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  min-height: 34px;
  padding: 8px 13px;
  border: 1px solid var(--seta-border);
  background: #fff;
  box-shadow: none;
}
body.single-product .seta-var-block--guide-perla .seta-choice-row {
  margin-bottom: 0;
}
/* If APF also paints a native swatch UI for a field already adapted from a
   select, hide that duplicate presentation. The real select remains in DOM. */
body.single-product .wapf-field-container.seta-apf-select-field .wapf-image-swatch-wrapper,
body.single-product .wapf-field-container.seta-apf-select-field .wapf-swatch-wrapper {
  display: none !important;
}
/* Keep genuine image choices compact and photographic, never as an oversized
   black square. */
body.single-product .wapf-field-container.seta-apf-enhanced:not(.seta-apf-select-field) .seta-apf-option--image,
body.single-product .wapf-field-container.seta-apf-enhanced:not(.seta-apf-select-field) .wapf-image-swatch.seta-apf-option {
  overflow: hidden !important;
  width: 116px !important;
  min-height: 126px !important;
  grid-template-rows: 86px auto !important;
  background: #fff !important;
}
body.single-product .wapf-field-container.seta-apf-enhanced:not(.seta-apf-select-field) .seta-apf-option--image img,
body.single-product .wapf-field-container.seta-apf-enhanced:not(.seta-apf-select-field) .wapf-image-swatch img {
  width: 100% !important;
  height: 86px !important;
  border-radius: 0 !important;
  object-fit: contain !important;
  background: var(--seta-off) !important;
}
body.single-product .seta-configurator-copy h2 {
  font-size: 25px;
  font-weight: 400;
}

@media (max-width: 767px) {
  body.single-product .seta-guide-button {
    width: auto;
    justify-content: flex-start;
  }
}

/* ============================================================
   v1.7.5 — Configuratore: ordine campi, swatch compatti, totale
   ============================================================ */
body.single-product .seta-product-cart-area form.cart,
body.single-product .seta-product-cart-area .single_variation_wrap,
body.single-product .seta-product-cart-area .woocommerce-variation-add-to-cart {
  display: block !important;
  width: 100% !important;
}

/* Il totale WAPF nativo resta disponibile al JS ma non viene duplicato a video. */
body.single-product .seta-product-cart-area .wapf-product-totals,
body.single-product .seta-product-cart-area .wapf-product-total,
body.single-product .seta-product-cart-area .wapf-options-total,
body.single-product .seta-product-cart-area .wapf-grand-total {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Il riepilogo unico viene collocato dal JS dopo tutti i campi. */
body.single-product .seta-price-summary {
  clear: both;
  width: 100%;
  margin: 8px 0 18px !important;
}

/* Prezzo principale più vicino al mockup, anche nei prodotti variabili. */
body.single-product .seta-product-price-row .price,
body.single-product .seta-product-price-row .price > span,
body.single-product .seta-product-price-row .price .woocommerce-Price-amount,
body.single-product .seta-product-price-row .price bdi {
  font-size: clamp(27px, 1.75vw, 31px) !important;
  font-weight: 400 !important;
  line-height: 1.08 !important;
}

/* APF image choices: compatte, allineate e realmente cliccabili. */
body.single-product .wapf-field-container.seta-apf-image-field .wapf-field-input,
body.single-product .wapf-field-container.seta-apf-image-field .wapf-image-swatch-wrapper,
body.single-product .wapf-field-container.seta-apf-image-field .wapf-swatch-wrapper,
body.single-product .wapf-field-container.seta-apf-image-field .wapf-field-input > div {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 10px !important;
  width: 100% !important;
}
body.single-product .wapf-field-container.seta-apf-image-field .seta-apf-option--image,
body.single-product .wapf-field-container.seta-apf-image-field .wapf-image-swatch,
body.single-product .wapf-field-container.seta-apf-image-field .wapf-swatch:has(img),
body.single-product .wapf-field-container.seta-apf-image-field label:has(img) {
  display: grid !important;
  grid-template-rows: 82px auto !important;
  gap: 7px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 118px !important;
  margin: 0 !important;
  padding: 7px !important;
  overflow: hidden !important;
  border: 1px solid var(--seta-border) !important;
  background: #fff !important;
  cursor: pointer !important;
  text-align: center !important;
}
body.single-product .wapf-field-container.seta-apf-image-field .seta-apf-option--image img,
body.single-product .wapf-field-container.seta-apf-image-field .wapf-image-swatch img,
body.single-product .wapf-field-container.seta-apf-image-field .wapf-swatch img,
body.single-product .wapf-field-container.seta-apf-image-field label img {
  display: block !important;
  width: 100% !important;
  height: 82px !important;
  margin: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
  background: var(--seta-off) !important;
}
body.single-product .wapf-field-container.seta-apf-image-field .seta-apf-option--image span,
body.single-product .wapf-field-container.seta-apf-image-field .wapf-image-swatch span,
body.single-product .wapf-field-container.seta-apf-image-field .wapf-swatch span,
body.single-product .wapf-field-container.seta-apf-image-field label span {
  display: block !important;
  margin: 0 !important;
  color: var(--seta-stone) !important;
  font-family: var(--seta-ff-body) !important;
  font-size: 10px !important;
  font-weight: 400 !important;
  line-height: 1.25 !important;
}
body.single-product .wapf-field-container.seta-apf-image-field .is-active,
body.single-product .wapf-field-container.seta-apf-image-field .wapf-checked,
body.single-product .wapf-field-container.seta-apf-image-field .selected {
  border-color: var(--seta-red) !important;
  box-shadow: 0 0 0 1px var(--seta-red) inset !important;
}

/* Il campo colore usa thumbnail più basse, evitando schede enormi. */
body.single-product .wapf-field-container.seta-apf-color-field.seta-apf-image-field .seta-apf-option--image,
body.single-product .wapf-field-container.seta-apf-color-field.seta-apf-image-field .wapf-image-swatch,
body.single-product .wapf-field-container.seta-apf-color-field.seta-apf-image-field .wapf-swatch:has(img),
body.single-product .wapf-field-container.seta-apf-color-field.seta-apf-image-field label:has(img) {
  grid-template-rows: 72px auto !important;
  min-height: 106px !important;
}
body.single-product .wapf-field-container.seta-apf-color-field.seta-apf-image-field img {
  height: 72px !important;
}

/* Riepilogo totale più leggibile e stabile. */
body.single-product .seta-ps-row.total {
  font-size: 19px !important;
}
body.single-product .seta-ps-row.total strong:last-child {
  white-space: nowrap;
}

@media (max-width: 1024px) {
  body.single-product .seta-product-cart-area {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
  }
  body.single-product .wapf-field-container.seta-apf-image-field .wapf-field-input,
  body.single-product .wapf-field-container.seta-apf-image-field .wapf-image-swatch-wrapper,
  body.single-product .wapf-field-container.seta-apf-image-field .wapf-swatch-wrapper,
  body.single-product .wapf-field-container.seta-apf-image-field .wapf-field-input > div {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  body.single-product .seta-product-price-row .price,
  body.single-product .seta-product-price-row .price > span,
  body.single-product .seta-product-price-row .price .woocommerce-Price-amount,
  body.single-product .seta-product-price-row .price bdi {
    font-size: 27px !important;
  }
  body.single-product .wapf-field-container.seta-apf-image-field .wapf-field-input,
  body.single-product .wapf-field-container.seta-apf-image-field .wapf-image-swatch-wrapper,
  body.single-product .wapf-field-container.seta-apf-image-field .wapf-swatch-wrapper,
  body.single-product .wapf-field-container.seta-apf-image-field .wapf-field-input > div {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body.single-product .seta-ps-row,
  body.single-product .seta-ps-option-row {
    gap: 10px;
    font-size: 11px;
  }
  body.single-product .seta-ps-option-row strong {
    max-width: 54%;
  }
  body.single-product .seta-ps-row.total {
    font-size: 18px !important;
  }
}

/* ============================================================
   v1.7.6 — Color image choices compact + total summary restored
   ============================================================ */
body.single-product .seta-product-cart-area .seta-price-summary {
  display: block !important;
  position: relative !important;
  clear: both !important;
  width: 100% !important;
  height: auto !important;
  margin: 14px 0 18px !important;
  padding: 15px 17px !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
  border: 1px solid var(--seta-border) !important;
  background: var(--seta-off) !important;
  opacity: 1 !important;
  visibility: visible !important;
}
body.single-product .seta-product-cart-area .seta-price-summary .seta-ps-heading {
  display: none !important;
}
body.single-product .seta-product-cart-area .seta-price-summary .woocommerce-Price-amount,
body.single-product .seta-product-cart-area .seta-price-summary bdi {
  color: inherit !important;
  font: inherit !important;
}
body.single-product .seta-product-cart-area .seta-price-summary + .quantity,
body.single-product .seta-product-cart-area .seta-price-summary + .single_add_to_cart_button {
  margin-top: 0 !important;
}

/* Gold-colour APF image fields become compact horizontal cards. */
body.single-product .wapf-field-container.seta-apf-color-image-field .seta-apf-image-options,
body.single-product .wapf-field-container.seta-apf-color-image-field .wapf-image-swatch-wrapper,
body.single-product .wapf-field-container.seta-apf-color-image-field .wapf-swatch-wrapper {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 0 !important;
}
body.single-product .wapf-field-container.seta-apf-color-image-field .seta-apf-option--image,
body.single-product .wapf-field-container.seta-apf-color-image-field .wapf-image-swatch,
body.single-product .wapf-field-container.seta-apf-color-image-field .wapf-swatch:has(img),
body.single-product .wapf-field-container.seta-apf-color-image-field label:has(img) {
  display: grid !important;
  grid-template-columns: 86px minmax(0, 1fr) !important;
  grid-template-rows: 1fr !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 96px !important;
  max-height: 110px !important;
  margin: 0 !important;
  padding: 8px !important;
  overflow: hidden !important;
  border: 1px solid var(--seta-border) !important;
  background: #fff !important;
  text-align: left !important;
}
body.single-product .wapf-field-container.seta-apf-color-image-field .seta-apf-option--image img,
body.single-product .wapf-field-container.seta-apf-color-image-field .wapf-image-swatch img,
body.single-product .wapf-field-container.seta-apf-color-image-field .wapf-swatch img,
body.single-product .wapf-field-container.seta-apf-color-image-field label img {
  display: block !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 86px !important;
  height: 78px !important;
  min-width: 86px !important;
  max-width: 86px !important;
  min-height: 78px !important;
  max-height: 78px !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #fff !important;
}
body.single-product .wapf-field-container.seta-apf-color-image-field .seta-apf-option--image span,
body.single-product .wapf-field-container.seta-apf-color-image-field .wapf-image-swatch span,
body.single-product .wapf-field-container.seta-apf-color-image-field .wapf-swatch span,
body.single-product .wapf-field-container.seta-apf-color-image-field label span {
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: center !important;
  margin: 0 !important;
  color: var(--seta-stone) !important;
  font-family: var(--seta-ff-body) !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
  text-align: left !important;
}
body.single-product .wapf-field-container.seta-apf-color-image-field .seta-apf-option--image.is-active,
body.single-product .wapf-field-container.seta-apf-color-image-field .wapf-image-swatch.is-active,
body.single-product .wapf-field-container.seta-apf-color-image-field .wapf-image-swatch.wapf-checked,
body.single-product .wapf-field-container.seta-apf-color-image-field .wapf-image-swatch.selected {
  border-color: var(--seta-red) !important;
  background: var(--seta-red-pale) !important;
  box-shadow: 0 0 0 1px var(--seta-red) inset !important;
}

@media (max-width: 520px) {
  body.single-product .wapf-field-container.seta-apf-color-image-field .seta-apf-image-options,
  body.single-product .wapf-field-container.seta-apf-color-image-field .wapf-image-swatch-wrapper,
  body.single-product .wapf-field-container.seta-apf-color-image-field .wapf-swatch-wrapper {
    grid-template-columns: 1fr !important;
  }
  body.single-product .wapf-field-container.seta-apf-color-image-field .seta-apf-option--image,
  body.single-product .wapf-field-container.seta-apf-color-image-field .wapf-image-swatch,
  body.single-product .wapf-field-container.seta-apf-color-image-field .wapf-swatch:has(img),
  body.single-product .wapf-field-container.seta-apf-color-image-field label:has(img) {
    grid-template-columns: 72px minmax(0, 1fr) !important;
    min-height: 84px !important;
  }
  body.single-product .wapf-field-container.seta-apf-color-image-field img {
    width: 72px !important;
    height: 64px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    min-height: 64px !important;
    max-height: 64px !important;
  }
}

/* ============================================================
   v1.7.7 — APF image adapter: stable cards, clear progress UX
   ============================================================ */
body.single-product .wapf-field-container.seta-apf-image-adapted .seta-apf-native-image-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
body.single-product .seta-apf-image-adapter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin: 0 0 22px;
}
body.single-product .seta-apf-image-card {
  appearance: none;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 112px;
  padding: 9px;
  border: 1px solid var(--seta-border);
  border-radius: 0;
  background: #fff;
  color: var(--seta-ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
body.single-product .seta-apf-image-card:hover,
body.single-product .seta-apf-image-card:focus-visible {
  border-color: var(--seta-ink);
  outline: 0;
}
body.single-product .seta-apf-image-card.is-active {
  border-color: var(--seta-red);
  background: var(--seta-red-pale);
  box-shadow: 0 0 0 1px var(--seta-red) inset;
}
body.single-product .seta-apf-image-card.is-disabled {
  opacity: .42;
  cursor: not-allowed;
}
body.single-product .seta-apf-image-card-picture {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  overflow: hidden;
  background: var(--seta-off);
}
body.single-product .seta-apf-image-card-picture img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
  object-position: center;
  background: var(--seta-off);
}
body.single-product .seta-apf-image-card-label {
  display: block;
  min-width: 0;
  font-family: var(--seta-ff-body);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--seta-stone);
  overflow-wrap: anywhere;
}
body.single-product .seta-apf-image-card.is-active .seta-apf-image-card-label {
  color: var(--seta-red-dark);
}
body.single-product .seta-configurator-progress strong,
body.single-product .seta-configurator-progress span {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  body.single-product .seta-apf-image-adapter-grid {
    grid-template-columns: 1fr;
  }
  body.single-product .seta-apf-image-card {
    grid-template-columns: 82px minmax(0, 1fr);
    min-height: 98px;
  }
  body.single-product .seta-apf-image-card-picture {
    width: 82px;
    height: 82px;
  }
}

/* ============================================================
   v1.8.7 — Simple product UX: no empty option summary + add-to-cart notice
   ============================================================ */
body.single-product .seta-price-summary[hidden],
body.single-product .seta-price-summary.is-hidden-for-simple {
  display: none !important;
}
body.single-product .seta-product-cart-area form.cart:not(:has(.wapf-field-container)):not(:has(.wapf-wrapper)):not(:has(table.variations)) .seta-price-summary {
  display: none !important;
}
body.single-product .woocommerce-notices-wrapper {
  max-width: var(--seta-container, 1280px) !important;
  margin: 0 auto !important;
  padding: 14px 40px 0 !important;
}
body.single-product .woocommerce-message {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 14px !important;
  align-items: center !important;
  margin: 0 0 14px !important;
  padding: 14px 18px !important;
  border: 1px solid rgba(52, 142, 86, .25) !important;
  border-top: 1px solid rgba(52, 142, 86, .25) !important;
  background: #f3fbf5 !important;
  color: var(--seta-ink) !important;
  font-family: var(--seta-ff-body) !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}
body.single-product .woocommerce-message::before {
  color: #2f8f55 !important;
}
body.single-product .woocommerce-message .button,
body.single-product .woocommerce-message a.button {
  float: none !important;
  order: 2 !important;
  min-height: 42px !important;
  padding: 12px 22px !important;
  border: 1px solid var(--seta-red) !important;
  background: var(--seta-red) !important;
  color: #fff !important;
  font-family: var(--seta-ff-body) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: .13em !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
}
body.single-product .woocommerce-message .button:hover,
body.single-product .woocommerce-message a.button:hover {
  background: var(--seta-ink) !important;
  border-color: var(--seta-ink) !important;
}
@media (max-width: 640px) {
  body.single-product .woocommerce-notices-wrapper { padding: 10px 18px 0 !important; }
  body.single-product .woocommerce-message { grid-template-columns: 1fr !important; }
  body.single-product .woocommerce-message .button { width: 100% !important; }
}


/* ============================================================
   v1.8.8 — Product simple-summary and add-to-cart notice polish
   ============================================================ */
body.single-product form.cart:not(:has(table.variations)):not(:has(.wapf-field-container input:not([type="hidden"]):not([type="submit"]):not([type="button"])):not(:has(.wapf-field-container select)):not(:has(.wapf-field-container textarea)) .seta-price-summary {
  display: none !important;
}
body.single-product .woocommerce-message,
body.single-product .woocommerce-notices-wrapper .woocommerce-message {
  max-width: var(--seta-container, 1280px) !important;
  margin: 0 auto 18px !important;
  border: 1px solid rgba(47,143,85,.28) !important;
  background: #f3fbf5 !important;
  box-shadow: none !important;
}
body.single-product .woocommerce-message .button,
body.single-product .woocommerce-message a.button,
body.single-product .woocommerce-notices-wrapper .woocommerce-message .button,
body.single-product .woocommerce-notices-wrapper .woocommerce-message a.button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 190px !important;
  min-height: 44px !important;
  padding: 12px 18px !important;
  border: 1px solid var(--seta-red) !important;
  background: var(--seta-red) !important;
  color: #fff !important;
  font-family: var(--seta-ff-body) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: .14em !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
}
body.single-product .woocommerce-message .button:hover,
body.single-product .woocommerce-message a.button:hover {
  background: var(--seta-ink) !important;
  border-color: var(--seta-ink) !important;
}
