/* Keep the product and finished-size fields in the first screen. */
body.zp-catalog-page #fullConfig .config-layout {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 1fr) !important;
  grid-template-rows: max-content 1fr;
  gap: 0;
  padding: 0;
  align-items: start;
}
body.zp-catalog-page #fullConfig .tech-side {
  grid-column: 1;
  grid-row: 1;
  padding: clamp(24px, 3vw, 42px) !important;
  border: 0 !important;
  min-width: 0;
}
body.zp-catalog-page #fullConfig .config-side {
  grid-column: 2;
  grid-row: 1 / span 2;
  position: static;
  padding: clamp(24px, 3vw, 42px) !important;
  min-width: 0;
}
body.zp-catalog-page #fullConfig .tech-side h1 {
  font-size: clamp(32px, 3.1vw, 48px) !important;
  line-height: 1.12;
  padding-right: 26px;
}
body.zp-catalog-page #fullConfig .config-side > h2 {
  font-size: clamp(27px, 2.5vw, 36px) !important;
  margin-bottom: 18px !important;
}
body.zp-catalog-page #fullConfig .config-product-details {
  grid-column: 1;
  grid-row: 2;
  padding: 0 clamp(24px, 3vw, 42px) 34px;
  min-width: 0;
  background: #0c0c0a;
}
#fullConfig .config-product-details #tDesc {
  color: #d4d1c6;
  font: 14px/1.75 Inter, Arial, sans-serif;
  margin: 0 0 24px;
}
body.zp-catalog-page #fullConfig .gallery-container {margin-top: 20px !important; min-height: 0 !important;}
#fullConfig .zoom-result {
  left: 0; width: 100%; height: 100%; border: 0;
  z-index: 5; pointer-events: none !important;
  opacity: 0; visibility: hidden;
}
/* Zoom only over the photo, never over gallery controls. */
@media (hover: hover) and (pointer: fine) {
  #fullConfig .gallery-container:has(.main-image-wrap:hover) .zoom-result[style*="background-image"] {
    opacity: 1; visibility: visible;
  }
}
#fullConfig .zoom-lens {pointer-events: none !important;}
body.zp-catalog-page #fullConfig .gallery-nav-arrow {
  z-index: 30;
  width: 48px; height: 48px;
  pointer-events: auto;
  background: #242720 !important;
  color: #fff8e8 !important;
  border: 1px solid #eee0b9 !important;
}
body.zp-catalog-page #fullConfig .gallery-nav-arrow:hover:not(:disabled) {
  background: #deca98 !important;
  color: #20241b !important;
}
#fullConfig .gallery-nav-arrow:focus-visible {outline: 3px solid #fff; outline-offset: 3px;}
body.zp-catalog-page #fullConfig .feature-tag.highlight {
  background: #deca98 !important;
  color: #25291f !important;
  font-weight: 700;
}
#fullConfig .main-image-wrap {min-height: 280px; height: min(42vh, 390px);}
#fullConfig .main-image-wrap img {max-height: 100%; height: 100%; width: 100%; object-fit: contain;}
#fullConfig .gallery-dots {margin: 12px 0;}

body.zp-catalog-page #fullConfig #config-measurements {
  padding: 22px;
  margin: 0 0 18px;
  border: 1px solid #e7d8b0;
  border-radius: 14px;
  background: linear-gradient(130deg, #f3ead4, #deca98);
  color: #24271f;
  box-shadow: 0 12px 34px #0003;
}
#fullConfig #config-measurements .cm-eyebrow {
  color: #65532a !important;
  font: 750 10px/1.4 Inter, Arial, sans-serif;
  letter-spacing: .14em;
}
#fullConfig #config-measurements h3 {
  color: #25271f !important;
  font: 500 clamp(24px, 2.3vw, 30px)/1.2 Georgia, serif;
  margin: 8px 0 10px;
}
#fullConfig #config-measurements p {
  color: #47493e !important;
  font: 13px/1.55 Inter, Arial, sans-serif;
  margin: 0 0 18px;
}
#config-measurements .cm-fields {display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;}
body.zp-catalog-page #fullConfig #config-measurements label {
  color: #323629 !important;
  font: 700 14px/1.4 Inter, Arial, sans-serif !important;
  text-transform: none;
  letter-spacing: normal !important;
  margin: 0 0 8px;
}
body.zp-catalog-page #fullConfig #config-measurements input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 64px !important;
  padding: 12px !important;
  border: 2px solid #968457 !important;
  border-radius: 8px !important;
  background: #fffdf7 !important;
  color: #20261c !important;
  font: 650 26px/1.2 Inter, Arial, sans-serif !important;
  color-scheme: light;
}
#fullConfig #config-measurements input::placeholder {color: #666959 !important; font-size: 20px; font-weight: 400; opacity: 1;}
body.zp-catalog-page #fullConfig #config-measurements input:focus {
  outline: 3px solid #3b4c32;
  outline-offset: 2px;
  box-shadow: none !important;
  border-color: #3b4c32 !important;
}
/* Video delle misure: scheda scura sopra i campi (css/measurement-video.css, .mv-con-foto), al posto del link sotto. */
#fullConfig #config-measurements .measurement-video-trigger {margin: 4px 0 18px !important;}

@media (max-width: 900px) {
  /* The assistant remains available through its guide without covering the fields. */
  body.zp-catalog-page:has(#fullConfig[style*="display: grid"]) #simy-robot {visibility: hidden !important; pointer-events: none;}
  body.zp-catalog-page #fullConfig .config-layout {grid-template-columns: minmax(0, 1fr) !important; grid-template-rows: auto auto auto;}
  body.zp-catalog-page #fullConfig .tech-side {grid-column: 1; grid-row: 1; padding: 22px 20px 12px !important;}
  body.zp-catalog-page #fullConfig .config-side {grid-column: 1; grid-row: 2; padding: 16px 20px 24px !important; border-left: 0; border-right: 0;}
  body.zp-catalog-page #fullConfig .config-product-details {grid-column: 1; grid-row: 3; padding: 24px 20px;}
  body.zp-catalog-page #fullConfig .tech-side h1 {font-size: 29px !important; margin-bottom: 10px !important; padding-right: 45px;}
  body.zp-catalog-page #fullConfig .gallery-container {margin-top: 10px !important;}
  #fullConfig .main-image-wrap {min-height: 0; height: clamp(140px, 22svh, 190px);}
  #fullConfig .gallery-thumbs {display: none !important;}
  #fullConfig .gallery-dots {margin: 10px 0 0;}
  body.zp-catalog-page #fullConfig .config-side > h2 {font-size: 26px !important; margin-bottom: 12px !important; padding-bottom: 10px;}
  body.zp-catalog-page #fullConfig #config-measurements {padding: 18px;}
}
@media (max-width: 380px) {
  body.zp-catalog-page #fullConfig .tech-side, body.zp-catalog-page #fullConfig .config-side {padding-left: 12px !important; padding-right: 12px !important;}
  body.zp-catalog-page #fullConfig #config-measurements {padding: 14px;}
  #config-measurements .cm-fields {gap: 10px;}
  body.zp-catalog-page #fullConfig #config-measurements label {font-size: 12px !important;}
  body.zp-catalog-page #fullConfig #config-measurements input {font-size: 23px !important; padding: 10px !important;}
  #fullConfig #config-measurements input::placeholder {font-size: 17px;}
}
