.fs-box-ricerca {
  background: #F8F8F8;
  padding: 30px 20px;
  color: #313131;
  width: 100%;
  box-sizing: border-box;
}

.fs-box-ricerca .fs-contenuto {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.fs-titolo {
  font-size: 1.5rem;
  margin-bottom: 20px;
  font-weight: bold;
  color: #800500;
}

.fs-input-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.fs-input {
  padding: 8px 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  background-color: #ffffff;
  color: #313131;
  width: 120px;
  text-align: center;
  border-radius: 0;
}

.fs-input:focus {
  border-color: #800500;
  outline: none;
}

/* Container per i bottoni di acquisto - NASCOSTO di default */
#area-acquisto {
  display: none !important; /* Nascosto all'inizio */
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

/* Quando viene mostrato dal JavaScript */
#area-acquisto[style*="display: block"],
#area-acquisto[style*="display:block"] {
  display: flex !important;
}

/* Layout desktop: 4 bottoni affiancati */
@media (min-width: 769px) {
  #area-acquisto {
      flex-wrap: nowrap;
      gap: 15px;
  }
  
  #area-acquisto .fs-btn {
      flex: 1;
      min-width: 180px;
      max-width: 220px;
  }
}

/* Layout tablet: 2 colonne */
@media (min-width: 601px) and (max-width: 768px) {
  #area-acquisto {
      gap: 12px;
  }
  
  #area-acquisto .fs-btn {
      flex: 0 0 calc(50% - 6px);
      min-width: 150px;
  }
}

/* Layout mobile: 1 colonna */
@media (max-width: 600px) {
  #area-acquisto {
      flex-direction: column;
      gap: 10px;
  }
  
  #area-acquisto .fs-btn {
      flex: none;
      width: 100%;
  }
}

.fs-btn {
  background-color: #800500;
  color: #ffffff;
  padding: 12px 15px;
  font-size: 0.9rem;
  border: none;
  border-radius: 0;
  cursor: pointer;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.3;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fs-btn:hover,
.fs-btn:active {
  background-color: #a00600;
  color: #ffffff;
  cursor: pointer;
}

/* Bottone di ricerca - mantiene lo stile originale */
#btn-cerca {
  display: block;
  margin: 10px auto;
  max-width: 200px;
  width: auto;
}

.fs-risultati-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  justify-items: center;
  margin-top: 30px;
}

.foto-thumb {
  position: relative;
  text-align: center;
}

.foto-thumb input[type="checkbox"] {
  position: absolute;
  top: 5px;
  left: 5px;
  transform: scale(1.2);
}

.foto-thumb img {
  width: 200px;
  height: auto;
  border: 1px solid #ccc;
}

.foto-thumb img:hover {
  transform: none;
  box-shadow: none;
}

.fs-msg {
  grid-column: 1 / -1;
  text-align: center;
  color: #7a7a7a;
  font-style: italic;
  margin-top: 20px;
}

.fs-btn span {
  font-weight: normal;
  color: inherit;
  background: none;
  padding: 0;
  margin-left: 5px;
}

/* Responsive per input e griglia foto */
@media (max-width: 600px) {
  .fs-input-wrapper {
      flex-direction: column;
      gap: 5px;
  }
  
  .fs-input {
      width: 120px;
  }
  
  .fs-risultati-grid {
      grid-template-columns: 1fr;
  }
  
  .foto-thumb img {
      width: 100%;
      max-width: 300px;
  }
}

/* Alert persistenti */
.fs-alert {
  margin-top: 15px;
  background: #fff4e5;
  border: 1px solid #ffcc80;
  padding: 10px 15px;
  color: #6d4c41;
  font-size: 0.95rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  border-radius: 3px;
}


/* Selfie Upload Styles */

.fs-upload-btn {
  display: inline-block;
  background-color: #800500;
  color: #fff;
  padding: 10px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  margin-bottom: 10px;
  transition: background-color 0.3s ease;
}

.fs-upload-btn:hover {
  background-color: #a00500;
}

/* Wrapper centrato */
.selfie-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 30px 0;
  text-align: center;
}

/* Icona + testo tappabile */
.fs-selfie-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.fs-selfie-icon:hover {
  transform: scale(1.03);
}

/* Immagine selfie */
.fs-selfie-icon img {
  width: 120px;
  height: auto;
  object-fit: contain;
  opacity: 0.85;
  transition: opacity 0.2s ease;
  max-width: 100%;
}

.fs-selfie-icon:hover img {
  opacity: 1;
}

/* Testo sotto icona */
.fs-selfie-testo {
  margin-top: 10px;
  color: #800500;
  font-weight: bold;
  font-size: 16px;
  text-align: center;
}

/* Bottone "Cerca con selfie" centrato */
#btn-selfie {
  margin-top: 20px;
  background-color: #800500;
  color: #fff;
  padding: 10px 18px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s ease;
}

#btn-selfie:hover {
  background-color: #a00500;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .fs-selfie-icon img {
    width: 90px;
  }

  .fs-selfie-testo {
    font-size: 14px;
  }

  #btn-selfie {
    font-size: 14px;
    padding: 8px 14px;
  }
}

/* ✅ Correzione dimensione icona selfie */
.fs-selfie-icon img {
  max-height: 160px;
  width: auto;
}

/* ✅ Centra bene il bottone sotto l'immagine anche su schermi grandi */
#btn-selfie {
  display: block;
  margin: 20px auto 0 auto;
  width: auto;
}

/* ✅ Riduce leggermente spazio icona + bottone */
.selfie-wrapper {
  gap: 10px;
  margin-bottom: 30px;
}


.fs-privacy-note{
  font-size: .8rem;
  color:#666;
  margin:8px 0 0;
}