/* css/style.css: stili base per Ventole FERGAS - Ricambi */

/* Reset e box-sizing */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.5;
  color: #333;
  background-color: #f9f9f9;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* Header & nav */
.site-header {
  background-color: #004080;
  color: #fff;
  padding: 1rem 0;
}
.site-header .logo img {
  height: 40px;
}
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}
.main-nav a {
  color: #fff;
  text-decoration: none;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #fff;
}

/* Search Section */
.search-section h1 {
  margin-bottom: 1rem;
  text-align: center;
}
.search-form {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.input-group {
  display: flex;
  gap: 0.5rem;
}
.input-group input {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.btn {
  padding: 0.5rem 1rem;
  background-color: #004080;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.btn-secondary {
  background-color: #0066cc;
}

.quick-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Wizard */
.wizard-container {
  text-align: center;
}
.progress-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}
.progress-bar .step {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0.5rem;
  color: #666;
}
.progress-bar .step.active {
  background-color: #004080;
  color: #fff;
}
fieldset {
  border: none;
  padding: 1rem;
}
.hidden {
  display: none;
}

/* Results and cards */
.results-container h1 {
  text-align: center;
  margin-bottom: 2rem;
}
.ventola-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
  padding: 1rem;
}
.ventola-card.available {
  border-left: 5px solid #28a745;
}
.ventola-card.unavailable {
  border-left: 5px solid #dc3545;
}
.ventola-card img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 1rem;
}
.params {
  list-style: none;
  margin-bottom: 1rem;
}
.params li {
  margin-bottom: 0.25rem;
}
.status.available {
  color: #28a745;
  font-weight: bold;
}
.status.unavailable {
  color: #dc3545;
  font-weight: bold;
}
.contact-form {
  margin-top: 1rem;
}
.contact-form label {
  display: block;
  margin-bottom: 0.5rem;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 1rem;
}

/* Upload page */
.upload-container {
  text-align: center;
}
.upload-container .photo-form {
  display: inline-block;
  text-align: left;
}
.upload-container .note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #666;
}

/* Footer */
.site-footer {
  background-color: #f1f1f1;
  padding: 1rem 0;
  text-align: center;
  font-size: 0.9rem;
}
.footer-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}
.footer-nav a {
  color: #333;
  text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
  .main-nav ul { display: none; }
  .nav-toggle { display: block; }
  .quick-actions { flex-direction: column; }
}

@media (min-width: 769px) {
  .photo-form input[type="file"] { width: auto; }
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
.results-table th,
.results-table td {
  border: 1px solid #ccc;
  padding: 0.5rem;
  text-align: left;
}
.results-table .thumb {
  max-width: 80px;
  height: auto;
}

.dot {
  font-size: 1.2rem;
  line-height: 1;
}
.dot.available {
  color: #28a745; /* verde */
}
.dot.unavailable {
  color: #dc3545; /* rosso */
}

/* Container arrotondato per il form di quotazione */
.quote-form-container {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

/* Grid 2 colonne per i campi interni */
.quote-form-container .quote-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

/* Label come blocco col flex verticale */
.quote-form-container .quote-form label {
  display: flex;
  flex-direction: column;
}

/* Campo note e pulsante su tutta la larghezza */
.quote-form-container .quote-form label.full-width,
.quote-form-container .quote-form button {
  grid-column: 1 / -1;
}

/* Styling input/textarea */
.quote-form-container .quote-form input,
.quote-form-container .quote-form textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #aaa;
  border-radius: 4px;
  box-sizing: border-box;
}

/* Pulsante di submit */
.quote-form-container .quote-form button {
  padding: 0.5rem 1rem;
  background: #004080;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Nasconde l’hamburger su desktop */
.nav-toggle {
  display: none;
}

/* Mobile (<769px) */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 10;
  }
  .header-inner {
    padding-left: 3rem;
  }
  .main-nav ul {
    display: none;
    flex-direction: column;
    gap: 1rem;
    background: #fff;
    position: absolute;
    top: 3.5rem;
    left: 0;
    width: 100%;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  }
  /* Quando body ha .nav-open, mostro il menu */
  body.nav-open .main-nav ul {
    display: flex;
  }
}