* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: #f6f0fb;
  color: #6f4a8e;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 18px 18px;
}

/* BOTTONE HOME */
.home-btn {
  position: fixed;
  top: 24px;
  left: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  height: 36px;
  padding: 0 16px;
  border-radius: 12px;
  background: #f3ecfb;
  border: 1.5px solid #b68fd8;
  color: #6f4a8e;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(111, 74, 142, 0.08);
  z-index: 9999;
  transition: 0.2s ease;
}

.home-btn:hover {
  background: #eadcf8;
  border-color: #9d73c4;
  transform: translateY(-1px);
}

.home-btn:active {
  transform: scale(0.98);
}

/* TITOLO ALLINEATO ALLA RAGAZZA */
.title-row {
  width: 100%;
  max-width: 1450px;
  display: grid;
  grid-template-columns: 210px 560px 380px;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
}

.title-spacer-left,
.title-spacer-right {
  height: 1px;
}

.main-title {
  text-align: center;
  font-size: 42px;
  font-weight: 600;
  color: #8e63c7;
  letter-spacing: 2px;
  line-height: 1;
}

/* AREA CHE VIENE SALVATA */
.capture-wrapper {
  width: 100%;
  max-width: 1450px;
}

.container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
}

.left-column {
  width: 210px;
  height: 560px;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.details-box {
  width: 190px;
  background: #f3ecfb;
  border: 2px solid #b68fd8;
  border-radius: 22px;
  padding: 10px;
  box-shadow: 0 8px 24px rgba(111, 74, 142, 0.08);
}

.details-box-title {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #6f4a8e;
}

.details-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #fbf8ff;
  border: 1.5px solid #c7a7e4;
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px;
}

.details-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.preview-section {
  width: 560px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview {
  position: relative;
  width: 560px;
  height: 560px;
}

.preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preview img.hidden-layer {
  display: none;
}

.right-column {
  width: 380px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.sidebar {
  width: 380px;
  background: #f3ecfb;
  border: 2px solid #b68fd8;
  border-radius: 24px;
  padding: 10px;
  box-shadow: 0 8px 24px rgba(111, 74, 142, 0.10);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-title {
  margin: 0 0 2px 0;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: #6f4a8e;
  line-height: 1.05;
}

.section-card {
  background: #fbf8ff;
  border: 1.5px solid #c7a7e4;
  border-radius: 16px;
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-card h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  color: #6f4a8e;
  line-height: 1.1;
}

.selector {
  display: grid;
  grid-template-columns: 30px 1fr 30px;
  align-items: center;
  gap: 7px;
}

.selector-value {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 8px;
  border-radius: 11px;
  background: #f3ecfb;
  border: 1px solid #d3b8ea;
  color: #6f4a8e;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.05;
}

.arrow-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #b68fd8;
  border-radius: 11px;
  background: #ffffff;
  color: #6f4a8e;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: 0.2s ease;
  padding: 0;
}

.arrow-btn:hover {
  background: #eadcf8;
  border-color: #9d73c4;
}

.arrow-btn:active {
  transform: scale(0.97);
}

.save-btn {
  margin-top: 10px;
  width: 380px;
  padding: 11px;
  border-radius: 14px;
  border: none;
  background: #8e63c7;
  color: white;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: 0.2s;
}

.save-btn:hover {
  background: #7a4fb2;
}

.is-hidden {
  display: none;
}

@media (max-width: 1280px) {
  .title-row {
    grid-template-columns: 180px 500px 380px;
  }

  .container {
    gap: 18px;
  }

  .left-column {
    width: 180px;
  }

  .details-box {
    width: 170px;
  }

  .preview-section,
  .preview {
    width: 500px;
    height: 500px;
  }

  .main-title {
    font-size: 38px;
  }
}

@media (max-width: 1100px) {
  .title-row {
    display: block;
    max-width: 100%;
  }

  .main-title {
    font-size: 34px;
    margin-bottom: 10px;
  }

  .container {
    flex-direction: column;
  }

  .left-column {
    width: auto;
    height: auto;
    justify-content: center;
  }

  .preview-section,
  .preview {
    width: 420px;
    height: 420px;
  }

  .right-column,
  .sidebar,
  .save-btn {
    width: 380px;
  }
}

@media (max-width: 600px) {
  .main-title {
    font-size: 28px;
  }

  .page {
    padding: 10px 12px 16px;
  }

  .preview-section,
  .preview {
    width: 320px;
    height: 320px;
  }

  .right-column,
  .sidebar,
  .save-btn {
    width: 100%;
    max-width: 380px;
  }

  .home-btn {
    top: 14px;
    left: 14px;
    min-width: 82px;
    height: 34px;
    font-size: 13px;
    padding: 0 14px;
  }
}