/* ==========================================================================
   FERMENTO — Firm Builder Styles
   Multi-step configurator: 5 steps with transitions
   ========================================================================== */

/* --- Builder Layout --- */
.builder {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg-warm);
  overflow: hidden;
}

.builder__header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(242, 235, 221, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(107, 33, 63, 0.10);
  padding: var(--space-3) 0;
  transition: all var(--transition-base);
}

.builder__header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.builder__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.builder__logo:hover {
  transform: scale(1.03);
}

.builder__logo-img {
  height: 30px;
  width: auto;
  display: block;
}

.builder__title {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  color: var(--color-ink);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 6px 14px;
  background: rgba(107, 33, 63, 0.08);
  border: 1px solid rgba(107, 33, 63, 0.15);
  border-radius: 100px;
}

.builder__close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(45, 32, 24, 0.05);
  border: 1px solid transparent;
  cursor: pointer;
  color: var(--color-ink);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.builder__close:hover {
  background: var(--color-primary);
  color: var(--color-cream);
  transform: rotate(90deg);
}

/* --- Progress Bar (numbered, cinematic) --- */
.progress {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: var(--space-6) 0 var(--space-5);
  counter-reset: step;
  position: relative;
}

.progress__step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  position: relative;
  counter-increment: step;
}

/* Step number circle */
.progress__step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid rgba(107, 33, 63, 0.18);
  color: var(--color-text-light);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  z-index: 2;
  position: relative;
  transition: all var(--transition-spring);
  box-shadow: 0 1px 3px rgba(45, 32, 24, 0.06);
}

/* Connecting line between steps (rendered as ::after on bar) */
.progress__bar {
  position: absolute;
  top: 18px;      /* center of circle (36/2) */
  left: 50%;
  right: -50%;
  width: 100%;
  height: 2px;
  background: rgba(107, 33, 63, 0.12);
  z-index: 1;
  transition: background var(--transition-base);
}

.progress__step:last-child .progress__bar {
  display: none;
}

/* Active state */
.progress__step.is-active::before {
  background: linear-gradient(135deg, var(--color-primary) 0%, #8B2D52 100%);
  border-color: var(--color-primary);
  color: var(--color-cream);
  transform: scale(1.12);
  box-shadow: 0 6px 16px rgba(107, 33, 63, 0.35), 0 0 0 6px rgba(107, 33, 63, 0.10);
}

/* Completed state: filled gold checkmark feel */
.progress__step.is-completed::before {
  content: '\2713';   /* checkmark */
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-cream);
  font-size: 1.05rem;
}

.progress__step.is-completed .progress__bar {
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary));
}

.progress__label {
  font-size: 0.72rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  white-space: nowrap;
  display: none;
  transition: color var(--transition-base);
}

.progress__step.is-active .progress__label {
  color: var(--color-primary);
}

.progress__step.is-completed .progress__label {
  color: var(--color-ink);
}

@media (min-width: 768px) {
  .progress__label {
    display: block;
  }
}

/* --- Steps Container --- */
.builder__body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.builder__steps {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
}

.builder__step {
  min-width: 100%;
  padding: var(--space-8) 0;
  overflow-y: auto;
}

.builder__step-inner {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

@media (min-width: 768px) {
  .builder__step-inner {
    padding: 0 var(--space-6);
  }
}

.builder__step-header {
  text-align: center;
  margin-bottom: var(--space-10);
  position: relative;
}

/* Step eyebrow chip — auto-generated via data-step attr if exists, or use .builder__step-eyebrow */
.builder__step-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin-bottom: var(--space-3);
  padding: 5px 14px;
  background: rgba(107, 33, 63, 0.08);
  border-radius: 100px;
}

.builder__step-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.08;
  color: var(--color-ink);
  margin-bottom: var(--space-3);
  letter-spacing: 0.005em;
}

.builder__step-title-accent {
  color: var(--color-primary);
  position: relative;
  display: inline-block;
}

.builder__step-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-light);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.5;
}

/* --- Footer / Navigation (cinematic warm-cream sticky bar) --- */
.builder__footer {
  flex-shrink: 0;
  background: rgba(242, 235, 221, 0.96);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid rgba(107, 33, 63, 0.10);
  padding: var(--space-4) 0;
  box-shadow: 0 -4px 20px rgba(45, 32, 24, 0.04);
}

.builder__footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.builder__footer-inner > .btn {
  flex-shrink: 0;
}

.builder__budget {
  font-size: 0.72rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: var(--fw-semibold);
  display: none;
  min-width: 0;
  text-align: center;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(107, 33, 63, 0.10);
  border-radius: 100px;
}

.builder__budget.is-visible {
  display: flex;
  align-items: center;
  gap: 8px;
}

.builder__budget-amount {
  font-family: var(--font-heading);
  text-transform: none;
  letter-spacing: -0.005em;
  font-size: 1.15rem;
  font-weight: var(--fw-bold);
  color: var(--color-primary);
}

/* Footer buttons: premium next CTA + ghost back */
.builder__footer-inner .btn--primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, #8B2D52 100%);
  color: var(--color-cream);
  border: none;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 3px;
  box-shadow: 0 8px 24px rgba(107, 33, 63, 0.32),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.builder__footer-inner .btn--primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(107, 33, 63, 0.42),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.builder__footer-inner .btn--primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.builder__footer-inner .btn--outline {
  background: transparent;
  color: var(--color-ink);
  border: 1.5px solid rgba(107, 33, 63, 0.25);
  padding: 13px 24px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: var(--fw-semibold);
  border-radius: 100px;
  transition: all var(--transition-base);
}

.builder__footer-inner .btn--outline:hover {
  background: var(--color-primary);
  color: var(--color-cream);
  border-color: var(--color-primary);
  transform: translateX(-2px);
}

@media (max-width: 480px) {
  .builder__footer-inner {
    flex-wrap: nowrap;
  }

  .builder__footer-inner > .btn {
    font-size: var(--text-sm);
    padding: var(--space-3) var(--space-4);
    white-space: nowrap;
  }

  .builder__budget-amount {
    font-size: var(--text-base);
  }
}

/* ==========================================================================
   STEP 1 — Scegli la Tua Firm
   ========================================================================== */

.firm-select {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  max-width: 1080px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .firm-select {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }
}

.firm-select__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: var(--space-7) var(--space-6) var(--space-6);
  background: linear-gradient(165deg, #FFFFFF 0%, #FAF5EC 100%);
  border: 1px solid rgba(107, 33, 63, 0.10);
  border-radius: 20px;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s ease,
              border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 320px;
}

/* Decorative bordeaux gradient stripe in corner */
.firm-select__card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -30%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(107, 33, 63, 0.10) 0%, transparent 70%);
  border-radius: 50%;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
  pointer-events: none;
}

/* Arrow appearing on hover */
.firm-select__card::after {
  content: '\2192';
  position: absolute;
  bottom: var(--space-5);
  right: var(--space-6);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  opacity: 0;
  transform: translateX(-12px) scale(0.7);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 6px 20px rgba(107, 33, 63, 0.35);
}

.firm-select__card:hover {
  border-color: rgba(107, 33, 63, 0.25);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(45, 32, 24, 0.12),
              0 0 0 1px rgba(107, 33, 63, 0.05);
}

.firm-select__card:hover::before {
  transform: scale(1.4) translate(-10px, 10px);
  opacity: 1.4;
}

.firm-select__card:hover::after {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.firm-select__card.is-selected {
  border-color: var(--color-primary);
  background: linear-gradient(165deg, #FFFFFF 0%, #F5E8EE 100%);
  box-shadow: 0 0 0 3px rgba(107, 33, 63, 0.18),
              0 16px 40px rgba(107, 33, 63, 0.15);
  transform: translateY(-4px);
}

.firm-select__card.is-selected::after {
  opacity: 1;
  transform: translateX(0) scale(1);
  content: '\2713';
  font-size: 1.2rem;
  background: var(--color-primary);
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(107, 33, 63, 0.45);
}

.firm-select__check {
  display: none; /* replaced by ::after arrow/check */
}

.firm-select__icon {
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  margin-bottom: var(--space-6);
  background: linear-gradient(135deg, rgba(107, 33, 63, 0.08), rgba(196, 162, 101, 0.12));
  border-radius: 18px;
  color: var(--color-primary);
  transition: all var(--transition-base);
  position: relative;
  z-index: 1;
}

.firm-select__card:hover .firm-select__icon {
  transform: scale(1.06) rotate(-3deg);
  background: linear-gradient(135deg, var(--color-primary), #8B2D52);
  color: var(--color-cream);
  box-shadow: 0 10px 24px rgba(107, 33, 63, 0.28);
}

.firm-select__card.is-selected .firm-select__icon {
  background: linear-gradient(135deg, var(--color-primary), #8B2D52);
  color: var(--color-cream);
  box-shadow: 0 10px 24px rgba(107, 33, 63, 0.28);
}

.firm-select__name {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-weight: 600;
  margin-bottom: var(--space-2);
  letter-spacing: 0.005em;
  color: var(--color-ink);
  position: relative;
  z-index: 1;
  line-height: 1.05;
}

.firm-select__desc {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.55;
  position: relative;
  z-index: 1;
  margin-bottom: var(--space-2);
}

/* Eyebrow chip dentro la card (categoria meta) */
.firm-select__meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-3);
  padding: 4px 10px;
  background: rgba(107, 33, 63, 0.07);
  border-radius: 100px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   STEP 2 — Scegli il Prodotto
   ========================================================================== */

.product-select {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-4);
  max-width: 900px;
  margin: 0 auto;
}

.product-select__card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
}

.product-select__card:hover {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-md);
}

.product-select__card.is-selected {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(107, 33, 63, 0.15);
}

.product-select__check {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background-color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.5);
  transition: all var(--transition-spring);
  z-index: 1;
}

.product-select__card.is-selected .product-select__check {
  opacity: 1;
  transform: scale(1);
}

.product-select__image {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--color-bg-warm), var(--color-border-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.product-select__body {
  padding: var(--space-4);
  flex: 1;
}

.product-select__name {
  font-family: var(--font-heading); letter-spacing: 0.005em;
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-1);
}

.product-select__desc {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  margin-bottom: var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-select__abv {
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
}

/* Format Toggle */
.format-toggle {
  display: flex;
  justify-content: center;
  margin-top: var(--space-6);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.format-toggle__inner {
  display: flex;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-1);
}

.format-toggle__btn {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  border-radius: var(--radius-full);
  border: none;
  background: none;
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--color-text-light);
  white-space: nowrap;
}

.format-toggle__btn.is-active {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
}

/* ==========================================================================
   STEP 3 — Personalizza l'Etichetta (cinematic split layout)
   ========================================================================== */

.label-editor {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

@media (min-width: 768px) {
  .label-editor {
    grid-template-columns: minmax(340px, 1fr) minmax(320px, 0.9fr);
    gap: var(--space-10);
  }
}

@media (min-width: 1100px) {
  .label-editor {
    grid-template-columns: minmax(420px, 1.1fr) minmax(400px, 1fr);
    gap: var(--space-12);
  }
}

/* Controls — premium card panel */
.label-editor__controls {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--space-7) var(--space-6);
  background: linear-gradient(180deg, #FFFFFF 0%, #FAF5EC 100%);
  border: 1px solid rgba(107, 33, 63, 0.08);
  border-radius: 24px;
  box-shadow: 0 4px 24px rgba(45, 32, 24, 0.04),
              0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

/* Form group label refresh — uppercase eyebrow style */
.label-editor__controls .form-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: var(--fw-semibold);
  color: var(--color-ink);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: var(--space-3);
}

.label-editor__controls .form-label span {
  font-family: var(--font-body) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 0.7rem !important;
  color: var(--color-text-light) !important;
  font-weight: var(--fw-regular) !important;
  margin-left: 6px;
}

/* Form inputs premium */
.label-editor__controls .form-input,
.label-editor__controls .form-textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-ink);
  background: #FFFFFF;
  border: 1.5px solid rgba(107, 33, 63, 0.12);
  border-radius: 12px;
  transition: all var(--transition-fast);
  outline: none;
}

.label-editor__controls .form-input::placeholder {
  color: var(--color-text-light);
  opacity: 0.65;
}

.label-editor__controls .form-input:focus,
.label-editor__controls .form-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(107, 33, 63, 0.08);
}

/* Upload area premium */
.upload-area {
  border: 2px dashed rgba(107, 33, 63, 0.20);
  border-radius: 16px;
  padding: var(--space-6) var(--space-5);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  background: rgba(255, 255, 255, 0.6);
  position: relative;
}

.upload-area:hover {
  border-color: var(--color-primary);
  background: rgba(107, 33, 63, 0.04);
  transform: translateY(-1px);
}

.upload-area__icon {
  font-size: 36px;
  margin-bottom: var(--space-2);
  color: var(--color-primary);
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}

.upload-area:hover .upload-area__icon {
  opacity: 1;
}

.upload-area__text {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin: 0;
}

.upload-area__text strong {
  color: var(--color-primary);
  font-weight: var(--fw-semibold);
}

/* Color Selector */
/* Color selector premium grid */
.color-selector {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--space-2);
}

.color-swatch {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.25s ease;
  position: relative;
  box-shadow: 0 2px 6px rgba(45, 32, 24, 0.12),
              0 0 0 1px rgba(107, 33, 63, 0.06);
}

.color-swatch:hover {
  transform: scale(1.12) translateY(-2px);
  box-shadow: 0 8px 18px rgba(45, 32, 24, 0.18),
              0 0 0 1px rgba(107, 33, 63, 0.10);
}

.color-swatch.is-selected {
  border-color: #FFFFFF;
  box-shadow: 0 0 0 2px #FFFFFF,
              0 0 0 4px var(--color-primary),
              0 6px 16px rgba(107, 33, 63, 0.25);
  transform: scale(1.06);
}

.color-swatch--custom {
  background: conic-gradient(from 0deg, #6B213F, #C4A265, #1a3a2a, #1a2a4a, #6B213F);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: white;
}

/* Template Selector — preview-style thumbnails */
.template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.template-thumb {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1.5px solid rgba(107, 33, 63, 0.12);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: var(--fw-semibold);
  text-align: center;
  padding: 10px;
  background: linear-gradient(160deg, #FFFFFF 0%, #FAF5EC 100%);
  color: var(--color-ink);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-body);
  position: relative;
  overflow: hidden;
}

/* Bordeaux faux-label preview block on top */
.template-thumb::before {
  content: '';
  display: block;
  flex: 1;
  background: var(--color-primary);
  border-radius: 6px;
  opacity: 0.14;
  transition: opacity 0.3s ease;
}

.template-thumb span {
  display: block;
  width: 100%;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
  padding: 2px 0 4px;
}

.template-thumb:hover {
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(45, 32, 24, 0.10);
}

.template-thumb:hover::before {
  opacity: 0.20;
}

.template-thumb.is-selected {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(107, 33, 63, 0.15),
              0 8px 22px rgba(107, 33, 63, 0.18);
  background: linear-gradient(160deg, #FFFFFF 0%, #F5E8EE 100%);
}

.template-thumb.is-selected::before {
  opacity: 1;
}

.template-thumb.is-selected span {
  color: var(--color-ink);
}

/* Preview — sticky cinematic stage */
.label-editor__preview {
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 120px;
  padding: var(--space-2);
}

/* --- Bottle Mockup System --- */
.bottle-mockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.bottle-mockup__scene {
  position: relative;
  width: 100%;
  /* Match render aspect 640:960 = 2:3 */
  aspect-ratio: 2 / 3;
}

.bottle-mockup__bottle {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.bottle-mockup__bottle svg {
  width: 100%;
  height: 100%;
}

/* Photoreal bottle render (Blender Cycles, tilted editorial pose) */
.bottle-mockup__photo {
  position: absolute;
  left: 50%;
  top: 50%;
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.22));
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.bottle-mockup__label {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-4) var(--space-3);
  transition: background-color var(--transition-base);
  overflow: hidden;
  border-radius: 2px;
}

/* Label position per bottle type — defaults to wine */
.bottle-mockup[data-type="wine"] .bottle-mockup__label,
.bottle-mockup:not([data-type]) .bottle-mockup__label {
  left: 22%;
  right: 22%;
  top: 48%;
  bottom: 18%;
}

.bottle-mockup[data-type="beer"] .bottle-mockup__label {
  left: 24%;
  right: 24%;
  top: 42%;
  bottom: 22%;
}

.bottle-mockup[data-type="spirits"] .bottle-mockup__label {
  left: 20%;
  right: 20%;
  top: 40%;
  bottom: 20%;
}

/* === Photoreal wine bottle: label slot positioned in JS ===
   The 3D render shows the bottle upright, front-facing.
   Slot detected from Blender label_mask, scaled 1.08x for edge coverage.
   Actual positioning is done by positionPhotoLabel() in builder.js. */
.bottle-mockup--photoreal[data-type="wine"] .bottle-mockup__label {
  /* Proportional padding for the label slot */
  padding: 10px 7px;
  /* Let tagline words stay intact; break only at spaces */
  word-break: normal;
  overflow-wrap: normal;
  /* Subtle shadow to feel like printed paper, not a sticker on top */
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.35),
    inset 0 -1px 2px rgba(0, 0, 0, 0.12),
    0 2px 6px rgba(0, 0, 0, 0.18);
  /* Shading along the curved label surface (subtle gradient left→right) */
  background-image: linear-gradient(
    100deg,
    rgba(0, 0, 0, 0.14) 0%,
    rgba(255, 255, 255, 0.08) 30%,
    rgba(255, 255, 255, 0.08) 70%,
    rgba(0, 0, 0, 0.20) 100%
  ), var(--label-bg, white);
}

/* Photoreal label: structural rules only (paddings/breaks). Typography lives in the template styles below. */
.bottle-mockup--photoreal[data-type="wine"] .bottle-mockup__tagline,
.bottle-mockup--photoreal[data-type="wine"] .bottle-mockup__brand {
  word-break: keep-all;
  overflow-wrap: normal;
}
.bottle-mockup--photoreal[data-type="wine"] .bottle-mockup__logo {
  max-height: 26px;
  margin-bottom: 3px;
}

.bottle-mockup__logo {
  max-width: 80%;
  max-height: 60px;
  margin-bottom: var(--space-2);
  object-fit: contain;
}

.bottle-mockup__brand {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  color: #fff;
  line-height: var(--lh-tight);
  overflow-wrap: normal;
  word-wrap: normal;
  word-break: keep-all;
  hyphens: none;
  max-width: 100%;
}

.bottle-mockup__divider {
  width: 40px;
  height: 1px;
  background: rgba(255,255,255,0.4);
  margin: var(--space-2) 0;
}

.bottle-mockup__tagline {
  font-size: 0.625rem;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  max-width: 100%;
  overflow-wrap: break-word;
}

.bottle-mockup__product {
  position: absolute;
  bottom: var(--space-2);
  font-size: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.5);
}

.bottle-mockup__shadow {
  width: 72%;
  height: 22px;
  background: radial-gradient(ellipse at center,
    rgba(45, 32, 24, 0.32) 0%,
    rgba(45, 32, 24, 0.16) 35%,
    transparent 75%);
  margin-top: -10px;
  filter: blur(4px);
}

/* Mini bottle for summary */
.bottle-mockup--mini {
  max-width: 140px;
}

.bottle-mockup--mini .bottle-mockup__brand {
  font-size: var(--text-base);
}

.bottle-mockup--mini .bottle-mockup__divider,
.bottle-mockup--mini .bottle-mockup__tagline,
.bottle-mockup--mini .bottle-mockup__product {
  display: none;
}

.bottle-mockup--mini .bottle-mockup__shadow {
  height: 6px;
}

/* ==========================================================================
   LABEL TEMPLATE STYLES — Modern contemporary design system
   ========================================================================== */

/* --- Color tokens for labels --- */
:root {
  --label-gold: #D4B36A;
  --label-gold-soft: rgba(212, 179, 106, 0.55);
  --label-white: rgba(255, 255, 255, 0.95);
  --label-white-soft: rgba(255, 255, 255, 0.65);
  --label-white-faint: rgba(255, 255, 255, 0.35);
  --label-overlay-dark: rgba(0, 0, 0, 0.20);
}

/* ==========================================================================
   MINIMAL — Geometric clean, gold accent dot, generous whitespace
   ========================================================================== */
.bottle-mockup--minimal .bottle-mockup__label {
  padding: 18% 10% !important;
}
.bottle-mockup--minimal .bottle-mockup__brand {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 0.95rem;
  color: var(--label-white);
  text-transform: none;
  letter-spacing: -0.01em;
  line-height: 1;
  word-break: keep-all;
  overflow-wrap: normal;
}
.bottle-mockup--minimal .bottle-mockup__divider {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--label-gold);
  margin: 8px auto;
  box-shadow: 0 0 12px rgba(212, 179, 106, 0.6);
}
.bottle-mockup--minimal .bottle-mockup__tagline {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.55rem;
  color: var(--label-white-soft);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  line-height: 1.4;
}
.bottle-mockup--minimal .bottle-mockup__product {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: var(--label-gold);
  font-size: 0.45rem;
}

/* ==========================================================================
   CLASSIC — Decorative serif crest with ornament dividers
   ========================================================================== */
.bottle-mockup--classic .bottle-mockup__label {
  padding: 14% 8% !important;
  border: 1px solid var(--label-gold-soft);
  background-image:
    linear-gradient(135deg, rgba(255,255,255,0.06), transparent 40%),
    var(--label-bg);
}
.bottle-mockup--classic .bottle-mockup__brand {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-weight: 700;
  font-size: 1.0rem;
  color: var(--label-white);
  letter-spacing: 0.01em;
  line-height: 0.95;
  text-transform: none;
  word-break: keep-all;
  overflow-wrap: normal;
}
.bottle-mockup--classic .bottle-mockup__divider {
  position: relative;
  width: 70%;
  height: 8px;
  background: none;
  border: none;
  margin: 6px auto;
}
.bottle-mockup--classic .bottle-mockup__divider::before,
.bottle-mockup--classic .bottle-mockup__divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: var(--label-gold-soft);
}
.bottle-mockup--classic .bottle-mockup__divider::before { left: 0; }
.bottle-mockup--classic .bottle-mockup__divider::after  { right: 0; }
.bottle-mockup--classic .bottle-mockup__divider > * {
  display: none; /* hide any inner content; rely on ornament */
}
.bottle-mockup--classic .bottle-mockup__tagline {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 0.68rem;
  color: var(--label-gold);
  letter-spacing: 0.04em;
  line-height: 1.3;
}
.bottle-mockup--classic .bottle-mockup__product {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-style: italic;
  font-size: 0.5rem;
  color: var(--label-white-soft);
  text-transform: none;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   BOLD — Maxi typography, brand riempie tutta la label, color blocking
   ========================================================================== */
.bottle-mockup--bold .bottle-mockup__label {
  padding: 8% 6% !important;
  background-image:
    linear-gradient(180deg, transparent 70%, rgba(0,0,0,0.30) 100%),
    var(--label-bg);
}
.bottle-mockup--bold .bottle-mockup__brand {
  font-family: 'Oswald', 'Impact', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--label-white);
  text-transform: uppercase;
  letter-spacing: -0.015em;
  line-height: 0.85;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
  word-break: keep-all;
  overflow-wrap: normal;
}
.bottle-mockup--bold .bottle-mockup__divider {
  width: 100%;
  height: 3px;
  border: none;
  border-radius: 0;
  background: var(--label-gold);
  margin: 6px 0;
}
.bottle-mockup--bold .bottle-mockup__tagline {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.5rem;
  color: var(--label-white);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  line-height: 1.3;
}
.bottle-mockup--bold .bottle-mockup__product {
  font-family: 'Oswald', 'Impact', sans-serif;
  font-weight: 700;
  font-size: 0.5rem;
  color: var(--label-gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ==========================================================================
   ELEGANT — Italic script flourish, monogram diamond divider
   ========================================================================== */
.bottle-mockup--elegant .bottle-mockup__label {
  padding: 16% 10% !important;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.10), transparent 65%),
    var(--label-bg);
}
.bottle-mockup--elegant .bottle-mockup__brand {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--label-white);
  letter-spacing: 0.02em;
  line-height: 1;
  word-break: keep-all;
  overflow-wrap: normal;
}
.bottle-mockup--elegant .bottle-mockup__divider {
  width: 12px;
  height: 12px;
  border: 1px solid var(--label-gold);
  border-radius: 0;
  background: transparent;
  transform: rotate(45deg);
  margin: 14px auto;
  position: relative;
}
.bottle-mockup--elegant .bottle-mockup__divider::before {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--label-gold);
}
.bottle-mockup--elegant .bottle-mockup__tagline {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-style: normal;
  font-weight: 400;
  font-size: 0.62rem;
  color: var(--label-white-soft);
  letter-spacing: 0.08em;
  line-height: 1.4;
}
.bottle-mockup--elegant .bottle-mockup__product {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-style: italic;
  font-size: 0.48rem;
  color: var(--label-gold);
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

/* ==========================================================================
   MODERN — Geometric grid, brand stacked uppercase, gold underline accent
   ========================================================================== */
.bottle-mockup--modern .bottle-mockup__label {
  padding: 12% 8% !important;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 50%),
    var(--label-bg);
}
.bottle-mockup--modern .bottle-mockup__brand {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--label-white);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 0.9;
  word-break: keep-all;
  overflow-wrap: normal;
}
.bottle-mockup--modern .bottle-mockup__divider {
  width: 32px;
  height: 3px;
  background: var(--label-gold);
  border: none;
  border-radius: 0;
  margin: 10px auto;
}
.bottle-mockup--modern .bottle-mockup__tagline {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.52rem;
  color: var(--label-white-soft);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  line-height: 1.4;
}
.bottle-mockup--modern .bottle-mockup__product {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.48rem;
  letter-spacing: 0.30em;
  color: var(--label-gold);
}

/* ==========================================================================
   RUSTIC — Condensed handcraft, dashed gold divider, vintage feel
   ========================================================================== */
.bottle-mockup--rustic .bottle-mockup__label {
  padding: 14% 8% !important;
  background-image:
    radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.18) 100%),
    var(--label-bg);
  /* subtle paper grain via noise */
  background-blend-mode: multiply, normal;
}
.bottle-mockup--rustic .bottle-mockup__brand {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 1.0rem;
  color: var(--label-white);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 0.95;
  text-shadow: 0 1px 0 rgba(0,0,0,0.25);
  word-break: keep-all;
  overflow-wrap: normal;
}
.bottle-mockup--rustic .bottle-mockup__divider {
  width: 60%;
  height: 0;
  border: none;
  border-top: 1.5px dashed var(--label-gold-soft);
  background: transparent;
  border-radius: 0;
  margin: 10px auto;
}
.bottle-mockup--rustic .bottle-mockup__tagline {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 0.64rem;
  color: var(--label-white);
  letter-spacing: 0.02em;
  line-height: 1.3;
}
.bottle-mockup--rustic .bottle-mockup__product {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.5rem;
  letter-spacing: 0.20em;
  color: var(--label-gold);
}

@media (max-width: 768px) {
  .bottle-mockup {
    max-width: 260px;
  }
  .bottle-mockup__brand {
    font-size: var(--text-xl);
  }
  /* Scale down template fonts on mobile */
  .bottle-mockup--bold .bottle-mockup__brand,
  .bottle-mockup--classic .bottle-mockup__brand,
  .bottle-mockup--elegant .bottle-mockup__brand {
    font-size: var(--text-lg);
  }
}

/* ==========================================================================
   STEP 4 — Servizi Aggiuntivi
   ========================================================================== */

.services-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 800px;
  margin: 0 auto;
}

.service-toggle {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background-color: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
}

.service-toggle:hover {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-sm);
}

.service-toggle.is-active {
  border-color: var(--color-primary);
  background-color: rgba(107, 33, 63, 0.03);
}

.service-toggle__switch {
  width: 48px;
  height: 28px;
  border-radius: 14px;
  background-color: var(--color-border);
  position: relative;
  flex-shrink: 0;
  transition: background-color var(--transition-base);
  margin-top: var(--space-1);
}

.service-toggle__switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background-color: var(--color-bg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base);
}

.service-toggle.is-active .service-toggle__switch {
  background-color: var(--color-primary);
}

.service-toggle.is-active .service-toggle__switch::after {
  transform: translateX(20px);
}

.service-toggle__info {
  flex: 1;
}

.service-toggle__name {
  font-family: var(--font-heading); letter-spacing: 0.005em;
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-1);
}

.service-toggle__price {
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.service-toggle__desc {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  line-height: var(--lh-relaxed);
}

/* Budget Display */
.budget-display {
  text-align: center;
  padding: var(--space-6);
  background-color: var(--color-bg);
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-border-light);
  margin-top: var(--space-6);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.budget-display__label {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  margin-bottom: var(--space-2);
}

.budget-display__amount {
  font-family: var(--font-heading); letter-spacing: 0.005em;
  font-size: var(--text-5xl);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
}

/* ==========================================================================
   STEP 5 — Riepilogo e Contatto
   ========================================================================== */

.summary-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  max-width: 1000px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .summary-layout {
    grid-template-columns: 1fr 1fr;
  }
}

/* Summary panel */
.summary-panel {
  background-color: var(--color-bg);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-card);
}

.summary-panel__preview {
  width: 100%;
  max-width: 200px;
  aspect-ratio: 3/5;
  border-radius: var(--radius-lg);
  margin: 0 auto var(--space-6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  text-align: center;
}

.summary-panel__preview-brand {
  font-family: var(--font-heading); letter-spacing: 0.005em;
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  color: var(--color-text-inverse);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border-light);
  gap: var(--space-4);
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-item__label {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  flex-shrink: 0;
}

.summary-item__value {
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  text-align: right;
}

.summary-budget {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 2px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-budget__label {
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
}

.summary-budget__amount {
  font-family: var(--font-heading); letter-spacing: 0.005em;
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
}

/* Contact form */
.contact-form-panel {
  background-color: var(--color-bg);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-card);
}

.contact-form-panel__title {
  font-family: var(--font-heading); letter-spacing: 0.005em;
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-6);
}

/* Badges row */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-light);
  font-weight: var(--fw-medium);
}

.trust-badge__icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-success);
}

/* ==========================================================================
   PREMIUM MOCKUP — Fase 1
   Realismo vetro/etichetta/ombre/luce
   ========================================================================== */

/* Scene: ambient light cursor-following + breathing idle */
.bottle-mockup__scene {
  --mx: 50%;
  --my: 35%;
  --glow-intensity: 0.14;
  --glow-size: 55%;
  transform-origin: center bottom;
  animation: bottleBreathe 7s ease-in-out infinite;
  will-change: transform;
}

@keyframes bottleBreathe {
  0%, 100% { transform: scale(1) translateY(0); }
  50%      { transform: scale(1.006) translateY(-2px); }
}

/* Ambient glow layer (behind bottle, clipped to scene) */
.bottle-mockup__scene::before {
  content: '';
  position: absolute;
  inset: -8%;
  background: radial-gradient(
    circle at var(--mx) var(--my),
    rgba(255, 255, 255, var(--glow-intensity)) 0%,
    transparent var(--glow-size)
  );
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: overlay;
  transition: background 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 40%;
}

/* Highlight specular stripe that slides across bottle body on hover */
.bottle-mockup__scene::after {
  content: '';
  position: absolute;
  top: 20%;
  bottom: 5%;
  left: 30%;
  width: 8%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.0) 20%,
    rgba(255, 255, 255, 0.22) 50%,
    rgba(255, 255, 255, 0.0) 80%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  filter: blur(3px);
  transform: skewX(-8deg);
  transition: opacity 0.5s ease, left 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.bottle-mockup:hover .bottle-mockup__scene::after {
  opacity: 1;
  left: 55%;
}

/* Label: cylindrical curvature illusion + paper texture */
.bottle-mockup__label {
  box-shadow:
    inset 2px 0 4px rgba(0, 0, 0, 0.25),
    inset -2px 0 4px rgba(0, 0, 0, 0.25),
    0 2px 6px rgba(0, 0, 0, 0.15);
  isolation: isolate;
}

/* Cylindrical curvature overlay (left/right shadow, center highlight) */
.bottle-mockup__label::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.42) 0%,
    rgba(0, 0, 0, 0.22) 6%,
    rgba(0, 0, 0, 0.06) 15%,
    rgba(0, 0, 0, 0) 28%,
    rgba(255, 255, 255, 0.08) 45%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.08) 55%,
    rgba(0, 0, 0, 0) 72%,
    rgba(0, 0, 0, 0.06) 85%,
    rgba(0, 0, 0, 0.22) 94%,
    rgba(0, 0, 0, 0.42) 100%
  );
  pointer-events: none;
  z-index: 2;
  border-radius: inherit;
}

/* Paper grain texture (SVG feTurbulence inlined) */
.bottle-mockup__label::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
  background-size: 120px 120px;
  mix-blend-mode: multiply;
  opacity: 0.22;
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
}

/* Label content must float above the texture overlays */
.bottle-mockup__label > * {
  position: relative;
  z-index: 3;
}

/* Premium realistic shadow under bottle */
.bottle-mockup__shadow {
  width: 72%;
  height: 24px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.38) 0%,
    rgba(0, 0, 0, 0.22) 28%,
    rgba(0, 0, 0, 0.08) 55%,
    transparent 75%
  );
  margin-top: -10px;
  filter: blur(3px);
  transform: scaleY(0.55);
}

/* Additional soft contact shadow (tighter, darker) */
.bottle-mockup__shadow::after {
  content: '';
  position: absolute;
  left: 25%;
  right: 25%;
  top: 30%;
  height: 6px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.45) 0%,
    transparent 70%
  );
  filter: blur(2px);
}

.bottle-mockup__shadow {
  position: relative;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .bottle-mockup__scene {
    animation: none;
  }
  .bottle-mockup__scene::before,
  .bottle-mockup__scene::after {
    transition: none;
  }
}

/* Mobile: lighter textures for performance */
@media (max-width: 767px) {
  .bottle-mockup__label::after {
    opacity: 0.14;
  }
  .bottle-mockup__scene {
    animation-duration: 9s;
  }
}

/* Mini bottle: disable expensive effects (summary step) */
.bottle-mockup--mini .bottle-mockup__label::after {
  display: none;
}
.bottle-mockup--mini .bottle-mockup__scene::after {
  display: none;
}
.bottle-mockup--mini .bottle-mockup__scene {
  animation: none;
}

/* ==========================================================================
   PREMIUM TEMPLATES — Fase 2
   Ogni template = layout strutturalmente distinto + ornamenti + typography
   ========================================================================== */

/* Base: pulisce eredità vecchie, nuova architettura layout */
.bottle-mockup__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10% 8%;
  box-sizing: border-box;
}

.bottle-mockup__brand {
  line-height: 1.05;
  margin: 0;
  word-break: break-word;
}

.bottle-mockup__divider {
  flex-shrink: 0;
  margin: 5% 0;
}

.bottle-mockup__tagline {
  line-height: 1.3;
  margin: 0;
  word-break: break-word;
}

.bottle-mockup__product {
  font-size: 0.55em;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6%;
  text-align: center;
}

/* ============ 1. MINIMAL — spazio, puro, sans light ============ */
.bottle-mockup--minimal .bottle-mockup__label {
  justify-content: center;
  gap: 8%;
}
.bottle-mockup--minimal .bottle-mockup__brand {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.4em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: #fff;
}
.bottle-mockup--minimal .bottle-mockup__divider {
  width: 18%;
  height: 1px;
  background: rgba(255,255,255,0.5);
  border: none;
  border-radius: 0;
  margin: 6% 0;
}
.bottle-mockup--minimal .bottle-mockup__tagline {
  font-family: var(--font-body);
  font-size: 0.6em;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  text-align: center;
}
.bottle-mockup--minimal .bottle-mockup__product {
  font-weight: 300;
  letter-spacing: 0.3em;
}

/* ============ 2. CLASSIC — cornice ornamentale serif ============ */
.bottle-mockup--classic .bottle-mockup__label {
  justify-content: center;
  padding: 14% 10%;
}
/* Cornice doppia line top+bottom */
.bottle-mockup--classic .bottle-mockup__label > .bottle-mockup__brand::before,
.bottle-mockup--classic .bottle-mockup__label > .bottle-mockup__brand::after {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.55), transparent);
  margin: 4% auto;
  width: 70%;
}
/* Corner ornaments */
.bottle-mockup--classic .bottle-mockup__label {
  background-image:
    /* top-left corner */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M0 6 Q0 0 6 0 M0 2 Q0 2 4 0' stroke='rgba(255,255,255,0.5)' stroke-width='0.6' fill='none'/></svg>"),
    /* top-right */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M20 6 Q20 0 14 0 M20 2 Q20 2 16 0' stroke='rgba(255,255,255,0.5)' stroke-width='0.6' fill='none'/></svg>"),
    /* bottom-left */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M0 14 Q0 20 6 20 M0 18 Q0 18 4 20' stroke='rgba(255,255,255,0.5)' stroke-width='0.6' fill='none'/></svg>"),
    /* bottom-right */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M20 14 Q20 20 14 20 M20 18 Q20 18 16 20' stroke='rgba(255,255,255,0.5)' stroke-width='0.6' fill='none'/></svg>");
  background-position: top left, top right, bottom left, bottom right;
  background-size: 16px 16px;
  background-repeat: no-repeat;
}
.bottle-mockup--classic .bottle-mockup__brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.55em;
  letter-spacing: 0.01em;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.bottle-mockup--classic .bottle-mockup__divider {
  display: none;
}
.bottle-mockup--classic .bottle-mockup__tagline {
  font-family: var(--font-heading);
  font-size: 0.7em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.85);
  text-align: center;
  margin-top: 3%;
}
.bottle-mockup--classic .bottle-mockup__product {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 0.5em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ============ 3. BOLD — blocco colore superiore + monolitico ============ */
.bottle-mockup--bold .bottle-mockup__label {
  padding: 0;
  justify-content: flex-start;
  background-image: linear-gradient(
    to bottom,
    rgba(255,255,255,0.15) 0%,
    rgba(255,255,255,0.15) 35%,
    transparent 35%
  );
}
.bottle-mockup--bold .bottle-mockup__brand {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 1.5em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
  width: 100%;
  padding: 8% 5% 2%;
  box-sizing: border-box;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}
.bottle-mockup--bold .bottle-mockup__divider {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.9);
  margin: 2% 0 4%;
  border: none;
  border-radius: 0;
  flex-shrink: 0;
}
.bottle-mockup--bold .bottle-mockup__tagline {
  font-family: var(--font-body);
  font-size: 0.65em;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
  padding: 0 5%;
}
.bottle-mockup--bold .bottle-mockup__product {
  font-weight: 800;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.7);
}

/* ============ 4. ELEGANT — monogramma circolare + italic ============ */
.bottle-mockup--elegant .bottle-mockup__label {
  justify-content: center;
  padding: 12% 10%;
  gap: 3%;
}
/* Monogramma: usa divider come cerchio vuoto, brand con ::first-letter ingrandita via font */
.bottle-mockup--elegant .bottle-mockup__divider {
  width: 22%;
  aspect-ratio: 1;
  height: auto;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.55);
  background: transparent;
  position: relative;
  margin: 2% 0 4%;
  flex-shrink: 0;
}
.bottle-mockup--elegant .bottle-mockup__divider::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 0.5px solid rgba(255,255,255,0.3);
}
.bottle-mockup--elegant .bottle-mockup__brand {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.5em;
  font-style: italic;
  letter-spacing: 0.03em;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.bottle-mockup--elegant .bottle-mockup__tagline {
  font-family: var(--font-heading);
  font-size: 0.65em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.8);
  text-align: center;
  margin-top: 3%;
}
/* Filigrana laterale sinistra + destra */
.bottle-mockup--elegant .bottle-mockup__label {
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 60'><path d='M3 0 Q0 15 3 30 Q6 45 3 60' stroke='rgba(255,255,255,0.3)' stroke-width='0.5' fill='none'/><circle cx='3' cy='15' r='0.8' fill='rgba(255,255,255,0.4)'/><circle cx='3' cy='45' r='0.8' fill='rgba(255,255,255,0.4)'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 60'><path d='M3 0 Q6 15 3 30 Q0 45 3 60' stroke='rgba(255,255,255,0.3)' stroke-width='0.5' fill='none'/><circle cx='3' cy='15' r='0.8' fill='rgba(255,255,255,0.4)'/><circle cx='3' cy='45' r='0.8' fill='rgba(255,255,255,0.4)'/></svg>");
  background-position: 8% center, 92% center;
  background-size: 4px 40%, 4px 40%;
  background-repeat: no-repeat;
}
.bottle-mockup--elegant .bottle-mockup__product {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 0.5em;
  letter-spacing: 0.15em;
}

/* ============ 5. MODERN — asimmetrico + numero accent ============ */
.bottle-mockup--modern .bottle-mockup__label {
  padding: 8% 8%;
  justify-content: space-between;
  align-items: flex-start;
}
.bottle-mockup--modern .bottle-mockup__label::before {
  content: 'N°01';
  position: absolute;
  top: 6%;
  left: 6%;
  font-family: var(--font-body);
  font-size: 0.55em;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.85);
  z-index: 4;
}
.bottle-mockup--modern .bottle-mockup__label {
  background-image:
    linear-gradient(to bottom, rgba(255,255,255,0.5), rgba(255,255,255,0.5)),
    linear-gradient(to bottom, rgba(255,255,255,0.5), rgba(255,255,255,0.5));
  background-size: 1px 30%, 1px 30%;
  background-position: 6% 12%, 94% 12%;
  background-repeat: no-repeat;
}
.bottle-mockup--modern .bottle-mockup__brand {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.25em;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  text-align: left;
  margin-top: auto;
  width: 100%;
  padding-left: 2%;
}
.bottle-mockup--modern .bottle-mockup__divider {
  width: 40%;
  height: 2px;
  background: #fff;
  margin: 6% 0 3% 2%;
  align-self: flex-start;
}
.bottle-mockup--modern .bottle-mockup__tagline {
  font-family: var(--font-body);
  font-size: 0.55em;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: rgba(255,255,255,0.8);
  text-align: left;
  padding-left: 2%;
  width: 100%;
}
.bottle-mockup--modern .bottle-mockup__product {
  text-align: right;
  padding-right: 8%;
  font-weight: 700;
}

/* ============ 6. RUSTIC — timbro circolare + oswald + texture ============ */
.bottle-mockup--rustic .bottle-mockup__label {
  justify-content: center;
  padding: 14% 8%;
  /* Borders irregolari top/bottom via SVG mask-image effect */
  position: relative;
}
.bottle-mockup--rustic .bottle-mockup__label {
  background-image:
    /* Stamp circolare HANDCRAFTED in alto */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'><defs><path id='p' d='M20 20 m-14 0 a14 14 0 1 1 28 0 a14 14 0 1 1 -28 0' fill='none'/></defs><circle cx='20' cy='20' r='15' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='0.7'/><circle cx='20' cy='20' r='12' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='0.3'/><text fill='rgba(255,255,255,0.8)' font-family='Oswald,Arial,sans-serif' font-size='3.2' font-weight='600' letter-spacing='0.5'><textPath href='%23p' startOffset='2%25'>HANDCRAFTED · EST · FERMENTO ·</textPath></text><text x='20' y='22' text-anchor='middle' fill='rgba(255,255,255,0.9)' font-family='Oswald,Arial,sans-serif' font-size='4.5' font-weight='700'>EST</text></svg>"),
    /* Texture irregolare top border */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 4'><path d='M0 2 Q10 0 20 2 T40 2 T60 2 T80 2 T100 2' stroke='rgba(255,255,255,0.4)' stroke-width='0.5' fill='none'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 4'><path d='M0 2 Q10 4 20 2 T40 2 T60 2 T80 2 T100 2' stroke='rgba(255,255,255,0.4)' stroke-width='0.5' fill='none'/></svg>");
  background-position: center 8%, center 18%, center 82%;
  background-size: 30% auto, 80% 3px, 80% 3px;
  background-repeat: no-repeat;
}
.bottle-mockup--rustic .bottle-mockup__brand {
  font-family: var(--font-logo);
  font-weight: 500;
  font-size: 1.5em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
  margin-top: 28%;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.bottle-mockup--rustic .bottle-mockup__divider {
  width: 40%;
  height: 0;
  border: none;
  border-top: 1px dashed rgba(255,255,255,0.55);
  background: transparent;
  margin: 4% 0;
}
.bottle-mockup--rustic .bottle-mockup__tagline {
  font-family: var(--font-heading);
  font-size: 0.68em;
  font-style: italic;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.85);
  text-align: center;
}
.bottle-mockup--rustic .bottle-mockup__product {
  font-family: var(--font-logo);
  letter-spacing: 0.25em;
  font-weight: 500;
}

/* Scale mini-mockup decorations down */
.bottle-mockup--mini.bottle-mockup--classic .bottle-mockup__label,
.bottle-mockup--mini.bottle-mockup--elegant .bottle-mockup__label,
.bottle-mockup--mini.bottle-mockup--rustic .bottle-mockup__label,
.bottle-mockup--mini.bottle-mockup--modern .bottle-mockup__label {
  background-image: none !important;
}
.bottle-mockup--mini.bottle-mockup--modern .bottle-mockup__label::before {
  display: none;
}
.bottle-mockup--mini .bottle-mockup__brand {
  font-size: 0.9em !important;
}

/* ==========================================================================
   PREMIUM FEATURES — Fase 3
   Preset Look & Feel + Download PNG + Share link
   ========================================================================== */

/* -------- Preset Grid (Look & Feel) — cinematic moodboard cards -------- */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

@media (min-width: 600px) {
  .preset-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.preset-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  background: #FFFFFF;
  border: 1.5px solid rgba(107, 33, 63, 0.10);
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease,
              border-color 0.25s ease;
  text-align: center;
  font: inherit;
  color: inherit;
  position: relative;
  overflow: hidden;
}

/* Colored swatch HEAD block — riempie tutta la larghezza */
.preset-card::before {
  content: '';
  display: block;
  width: 100%;
  height: 64px;
  background: var(--_swatch-color, var(--color-primary));
  position: relative;
  transition: height 0.3s ease;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12),
              inset 0 0 30px rgba(0, 0, 0, 0.20);
}

.preset-card:hover {
  border-color: rgba(107, 33, 63, 0.30);
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(45, 32, 24, 0.14);
}

.preset-card:hover::before {
  height: 72px;
}

.preset-card.is-active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(107, 33, 63, 0.15),
              0 12px 28px rgba(107, 33, 63, 0.18);
  transform: translateY(-3px);
}

.preset-card.is-active::before {
  height: 80px;
}

/* Hide old swatch dot, replaced by ::before head */
.preset-card__swatch {
  display: none;
}

.preset-card__label {
  font-family: var(--font-body);
  font-size: clamp(0.68rem, 1.2vw, 0.78rem);
  font-weight: var(--fw-semibold);
  color: var(--color-ink-medium);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: var(--space-4) 8px var(--space-2);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.preset-card__meta {
  font-size: 0.62rem;
  color: var(--color-text-light);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 8px var(--space-4);
  text-align: center;
  line-height: 1.3;
}

/* -------- Mockup Stage cinematic + Toolbar -------- */
.mockup-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  width: 100%;
  /* Cinematic warm studio stage */
  padding: var(--space-7) var(--space-5) var(--space-5);
  background:
    radial-gradient(ellipse 80% 70% at 50% 25%, rgba(255, 255, 255, 0.7) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 50% 95%, rgba(45, 32, 24, 0.18) 0%, transparent 70%),
    linear-gradient(180deg, #F2EBDD 0%, #E8DEC5 100%);
  border-radius: 24px;
  border: 1px solid rgba(107, 33, 63, 0.08);
  box-shadow:
    0 8px 32px rgba(45, 32, 24, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  position: relative;
  overflow: hidden;
}

/* Subtle stage spotlights — vignette top + soft floor light */
.mockup-stage::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 70%;
  background: radial-gradient(ellipse 70% 100% at 50% 0%, rgba(196, 162, 101, 0.10) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.mockup-stage > * {
  position: relative;
  z-index: 1;
}

.mockup-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(107, 33, 63, 0.10);
  border-radius: 100px;
  box-shadow: 0 6px 20px rgba(45, 32, 24, 0.12),
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
  position: relative;
}

.mockup-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: var(--fw-semibold);
  color: var(--color-ink);
  background: transparent;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.mockup-action:hover {
  background: var(--color-primary);
  color: var(--color-cream);
}

.mockup-action:active {
  transform: scale(0.97);
}

.mockup-action[disabled] {
  opacity: 0.5;
  cursor: wait;
}

.mockup-action svg {
  flex-shrink: 0;
}

.mockup-action__feedback {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 50%;
  transform: translate(-50%, -6px);
  background: var(--color-text);
  color: var(--color-text-inverse);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: var(--shadow-md);
  z-index: 10;
}

.mockup-action__feedback::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: var(--color-text);
}

.mockup-action__feedback.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ==========================================================================
   PREMIUM ROTATION — Multi-angle drag
   ========================================================================== */

/* Make scene draggable — crosshair cursor on the main mockup only.
   Disabled for photoreal: a 2D photo can't be physically rotated. */
.bottle-mockup:not(.bottle-mockup--mini):not(.bottle-mockup--photoreal) .bottle-mockup__scene {
  cursor: grab;
  touch-action: pan-y pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
}

.bottle-mockup:not(.bottle-mockup--mini):not(.bottle-mockup--photoreal) .bottle-mockup__scene.is-dragging {
  cursor: grabbing;
}

/* Hide rotation indicator for photoreal mockups (can't rotate a static photo) */
.mockup-stage:has(.bottle-mockup--photoreal) .rotation-indicator,
.mockup-stage:has(.bottle-mockup--photoreal) .rotation-hint {
  display: none;
}

/* Snap transition — only applied during snap-to-angle after drag release */
.bottle-mockup__scene.is-snapping .bottle-mockup__label {
  transition:
    transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1),
    filter 0.3s ease,
    opacity 0.2s ease;
}

/* Kill expensive label effects during drag for 60fps */
.bottle-mockup__scene.is-dragging .bottle-mockup__label {
  transition: none !important;
}
.bottle-mockup__scene.is-dragging .bottle-mockup__label::after {
  display: none; /* disable paper-grain feTurbulence mid-drag */
}

/* --- Rotation Indicator (8 dots + angle pill + reset) --- */
.rotation-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  z-index: 5;
  pointer-events: auto;
  margin: 0 auto;
}

.rotation-indicator__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.rotation-indicator__dot:hover {
  background: rgba(0, 0, 0, 0.35);
  transform: scale(1.3);
}

.rotation-indicator__dot.is-active {
  background: var(--color-primary, #6B213F);
  transform: scale(1.5);
}

.rotation-indicator__divider {
  width: 1px;
  height: 14px;
  background: rgba(0, 0, 0, 0.1);
  margin: 0 4px;
}

.rotation-pill {
  font-family: var(--font-mono, "SF Mono", Menlo, monospace);
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text, #1a1a1a);
  min-width: 26px;
  text-align: center;
  letter-spacing: 0.02em;
}

.rotation-reset {
  background: transparent;
  border: none;
  padding: 0;
  margin-left: 2px;
  color: rgba(0, 0, 0, 0.4);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transition: color 0.18s ease, background 0.18s ease;
}

.rotation-reset:hover {
  color: var(--color-primary, #6B213F);
  background: rgba(107, 33, 63, 0.08);
}

/* --- Rotation hint (shown briefly on first hover) --- */
.rotation-hint {
  position: absolute;
  left: 50%;
  top: 8%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 6;
}

.bottle-mockup:not(.bottle-mockup--mini):hover .rotation-hint {
  opacity: 1;
  transform: translate(-50%, 0);
}

.bottle-mockup__scene.is-dragging ~ .rotation-hint,
.bottle-mockup--rotated .rotation-hint {
  opacity: 0 !important;
}

/* ==========================================================================
   QUANTITY PICKER — selettore unità che alimenta il budget stimato
   ========================================================================== */

.quantity-picker {
  margin: 32px 0 24px;
  padding: 24px;
  background: var(--color-bg-warm, #FAF7F2);
  border-radius: 16px;
  border: 1px solid var(--color-border, #E5E0D8);
}

.quantity-picker__title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
}

.quantity-picker__hint {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: 16px;
}

.quantity-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.quantity-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  text-align: center;
  min-height: 64px;
}

.quantity-pill:hover {
  border-color: var(--color-primary-light);
  transform: translateY(-2px);
}

.quantity-pill.is-selected {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  border-color: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: 0 4px 12px rgba(107, 33, 63, 0.25);
}

.quantity-pill__range {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.quantity-pill__unit {
  font-size: 0.75rem;
  opacity: 0.7;
  letter-spacing: 0.04em;
  margin-top: 4px;
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .quantity-picker__grid {
    grid-template-columns: 1fr 1fr;
  }
}
