h2 {
    font-size: 1.8em;
    color: #3b82f6;
}


.input-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.conf-input.input-error {
  border: 1px solid #e74c3c !important;
}

.input-wrapper[data-error]::after {
  content: attr(data-error);
  position: absolute;
  top: 100%;
  left: 25px;
  margin-top: 4px;
  font-size: 12px;
  color: #fff;
  background: #e74c3c;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 1000;
}

.input-wrapper[data-error]::before {
  content: "";
  position: absolute;
  top: calc(100% - 2px);
  left: 50px;
  border-width: 5px;
  border-style: solid;
  border-color: #e74c3c transparent transparent transparent;
}

.input-group {
  display: flex;
  gap: 15px;
}

.input-group .input-wrapper {
  flex: 1;
}


/* Layout griglia delle opzioni */
.conf-options.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Card stile Enpal */
.conf-options .card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.conf-options .card img {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.conf-options .card span {
    font-weight: 600;
    font-size: 14px;
    color: #1e1e1e;
}

/* Hover effetto sollevamento */
.conf-options .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.conf-options .card:hover img {
    transform: scale(1.05);
}

/* Stato selezionato */
.conf-options .card.selected {
    border: 2px solid #f9b233;
    box-shadow: 0 0 12px rgba(249,178,51,0.4);
}

.configuratore-wizard { max-width: 800px; margin: auto; }
.wizard-header { text-align: center; margin-bottom: 20px; }
.conf-options.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}
.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #eee;
}
.card svg { margin-bottom: 8px; color: #0074ff; transition: transform 0.3s ease, color 0.3s ease; }
.card:hover {
    transform: translateY(-5px);
    border-color: #0074ff;
}
.card:hover svg { transform: scale(1.1); color: #0051aa; }


.step-final {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
    padding: 40px;
}

.final-message h2 {
    font-size: 2rem;
    color: #28a745;
    margin-bottom: 10px;
}

.final-message p {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 30px;
}

.final-message button {
    background: #28a745;
    color: #fff;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.final-message button:hover {
    background: #218838;
    transform: scale(1.05);
}

/* Background generale */
body {
    background: #f9f9fb;
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Container dello Swiper */
.swiper {
    max-width: 700px;
    width: 100%;
    background: white;
    padding: 50px 30px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

/* Slide contenuto centrato */
.swiper-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Input moderni */
.swiper-slide input[type="text"],
.swiper-slide input[type="tel"],
.swiper-slide input[type="email"],
.swiper-slide input[type="number"] {
    width: 250px;
    padding: 10px 15px;
    margin: 10px 5px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.swiper-slide input:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Pulsanti moderni */
.swiper-slide button {
    background: #3b82f6;
    color: white;
    padding: 10px 25px;
    margin-top: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.swiper-slide button:hover {
    background: #2563eb;
}

/* Swiper pagination centrata */
.swiper-pagination {
    bottom: 10px !important;
    text-align: center !important;
}

/* Paginazione moderna */
.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #cbd5e1;
    opacity: 1;
    margin: 0 5px !important;
    transition: 0.3s;
}

.swiper-pagination-bullet-active {
    background: #3b82f6;
    transform: scale(1.3);
}

.top-header {
    text-align: center;
}

/* Overlay semi-trasparente */
.wizard-loader {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.wizard-content {
    padding: 20px;
}

/* Contenitore fiammelle */
.flame-loader {
  text-align: center;
}

.flame-loader span {
  display: block;
  margin-top: 20px;
  font-size: 18px;
  color: #444;
  font-weight: 500;
}

/* Fiamme animate */
.flame-loader .flame {
  width: 20px;
  height: 30px;
  background: radial-gradient(circle at 50% 60%, #ff6600, #ff3300 60%);
  border-radius: 50% 50% 50% 50%;
  display: inline-block;
  margin: 0 4px;
  animation: flicker 0.5s infinite alternate;
}

.flame-loader .flame:nth-child(2) {
  animation-delay: 0.2s;
}

.flame-loader .flame:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes flicker {
  0% { transform: scaleY(1) translateY(0); opacity: 1; }
  100% { transform: scaleY(1.3) translateY(-5px); opacity: 0.8; }
}

.opt.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border: 2px solid #ddd;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.opt.card img {
  width: 80px;
  height: 80px;
  margin-bottom: 10px;
  transition: transform 0.2s ease;
}

.opt.card span {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.opt.card:hover {
  border-color: #ff6600;
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.opt.card:hover img {
  transform: scale(1.1);
}

.opt.card.selected {
  border-color: #ff6600;
  background: #fff5ef;
}
