/* RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #fdfdfd;
  color: #333;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

header {
  background-image: url('../ima/sfondo.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  padding: 0% 0%;
  position: relative;
}

header::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 0;
}

header > * {
  position: relative;
  z-index: 1;
}

header h1 {
  font-size: 2.8rem;
  margin-bottom: 0.3em;
}

header p {
  font-size: 1.2rem;
  max-width: 600px;
  margin-bottom: 1em;
}

.btn-primary {
  background-color: #f57c00;
  padding: 12px 30px;
  color: white;
  border-radius: 30px;
  font-size: 1.1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: inline-block;
}

.btn-primary:hover {
  background-color: #ef6c00;
}

main {
  max-width: 1100px;
  margin: 40px auto 80px;
  padding: 0 20px;
}

.categorie {
  text-align: center;
  margin-bottom: 30px;
}

.categorie button {
  background: #455a64;
  color: white;
  border: none;
  font-size: 1rem;
  border-radius: 25px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  padding: 8px 16px;
  margin-right: 10px;
  border: none;
}

.categorie button.active,
.categorie button:hover {
  background: #f57c00;
}

.catalogo {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  gap: 25px;
}

.attrezzo {
  background: white;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgb(0 0 0 / 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: center;
  padding-bottom: 15px;
}

.attrezzo img {
  max-height: 160px;
  object-fit: cover;
  max-width: 100%;    /* non supera la larghezza del contenitore */ 
  display: block;     /* evita spazi bianchi sotto l'immagine */
  object-fit: contain; 
  margin: 0 auto; 
}

.attrezzo h3 {
  margin: 15px 0 10px;
  color: #455a64;
}

.attrezzo p {
  padding: 0 15px;
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 10px;
}

.prezzo {
  color: #f57c00;
  font-weight: 700;
  margin-bottom: 10px;
}

.btn-dettagli {
  background-color: #455a64;
  color: white;
  border: none;
  padding: 10px 25px;
  font-size: 1rem;
  border-radius: 25px;
  cursor: pointer;
  margin: 0 auto;
  transition: background-color 0.3s ease;
}

.btn-dettagli:hover {
  background-color: #37474f;
}







/* === BASE === */
#contatti {
  background-color: #1a252f;
  color: #ecf0f1;
  padding: 2rem 1rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.9rem;
  line-height: 1.5;
  border-top: 3px solid #ff4d4d;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
}

.footer-brand {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

.footer-logo {
  max-width: 130px;
  height: auto;
}

.footer-brand p {
  margin: 0;
  font-weight: 500;
}

/* ===== CONTATTI ===== */
.footer-contacts {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  font-size: 1rem;
}

.footer-contacts p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #f0f0f0;
}

.footer-contacts a {
  color: #ff4d4d;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  background-color: #2c3e50;
  border-radius: 0.4rem;
}

.footer-contacts a:hover,
.footer-contacts a:focus {
  color: #ff1a1a;
  background-color: #3d5267;
  outline: none;
  text-decoration: underline;
}

.footer-contacts svg {
  fill: #ff4d4d;
  width: 18px;
  height: 18px;
}

/* Icona telefono */
.phone-icon {
  fill: #ff4d4d;
  width: 18px;
  height: 18px;
}

/* Icona email */
.email-icon {
  fill: #ff4d4d;
  width: 18px;
  height: 18px;
}

/* ===== SOCIAL ICONS ===== */
.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: #2c3e50;
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.social-icons a:hover,
.social-icons a:focus {
  background-color: #ff4d4d;
  transform: scale(1.15);
  outline: none;
}

.social-icons svg {
  fill: #ecf0f1;
  width: 22px;
  height: 22px;
}

/* === MOBILE OPTIMIZATION === */
@media (max-width: 600px) {
  #contatti {
    padding: 1.5rem 1rem;
    font-size: 1rem;
  }

  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-brand,
  .footer-contacts,
  .social-icons {
    flex: unset;
    width: 100%;
  }

  .footer-logo {
    max-width: 110px;
    margin-bottom: 0.5rem;
  }

  .footer-contacts p {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .footer-contacts a {
    padding: 0.25rem 0.5rem;
    font-size: 0.95rem;
  }

  .social-icons {
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1rem;
  }

  .social-icons a {
    width: 34px;
    height: 34px;
  }

  .social-icons svg {
    width: 18px;
    height: 18px;
  }
}












/* Responsive */
@media (max-width: 600px) {
  header h1 {
    font-size: 2rem;
  }

  header p {
    font-size: 1rem;
  }

  .categorie button {
    padding: 8px 14px;
    font-size: 0.9rem;
    margin: 0 5px 10px;
  }

  .attrezzo img {
    height: 140px;
  }
}

.barra-ricerca {
  display: flex;
  justify-content: center;
  margin: 30px 0;
}

.barra-ricerca {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.search-container {
  position: relative;
  width: 90%;
  max-width: 400px;
}

.search-container input {
  width: 100%;
  padding: 12px 20px;
  padding-left: 40px;
  font-size: 1rem;
  border-radius: 30px;
  border: 2px solid #007bff;
  background: linear-gradient(135deg, #f0f4ff, #ffffff);
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.1);
  transition: all 0.3s ease;
}

.search-container input::placeholder {
  color: #888;
}

.search-container input:focus {
  outline: none;
  border-color: #0056b3;
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
}

/* Reset base */
*, *::before, *::after {
  box-sizing: border-box;
}





/* Navbar container */
nav.navbar {
  background-color: #1a252f;
  color: #ecf0f1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.825rem 1.45rem;
  position: sticky;
  top: 0;
  z-index: 999;
  flex-wrap: wrap;
}

/* Logo */
nav.navbar .logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ff4d4d;
  position: relative;
  transition: color 0.2s ease, transform 0.2s ease;
}

nav.navbar .logo::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 0;
  height: 2px;
  background-color: #ff4d4d;
  transition: width 0.3s ease;
  transform: translateX(-50%);
}

nav.navbar .logo:hover {
  color: #e04343;
  transform: scale(1.05);
}

nav.navbar .logo:hover::after {
  width: 60%;
}

/* Lista link */
.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: center;
}

/* Voci menu */
.nav-links li {
  position: relative;
  padding: 0 1.45rem;
  white-space: nowrap;
}

/* Link */
.nav-links li a {
  display: inline-block;
  padding: 0.825rem 0;
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  color: #d70505;
}

/* Separatori desktop */
.nav-links li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 10%;
  height: 80%;
  width: 2px;
  background-color: #333;
  opacity: 0.8;
}

/* Menu toggle nascosto di default */
.menu-toggle {
  display: none;
}

/* ===== MOBILE STYLES ===== */
/* --- Mobile Styles --- */
@media (max-width: 768px) {
  /* Nav container */
  nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0.5rem 1rem;
    background-color: #1f2d3d;
    border: none;
    box-shadow: none;
    margin: 0;
  }

  /* Logo */
  .logo {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #fff;
  }

  /* Hamburger menu button */
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    margin-left: auto;
    transition: transform 0.2s ease;
  }

  .menu-toggle:active {
    transform: scale(0.95);
  }

  .menu-toggle .bar {
    width: 20px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 1px;
    transition: all 0.3s ease;
    margin: 3px 0;
  }

  /* Hamburger animation when active */
  .menu-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
  }

  .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
  }

  /* Navigation links container */
  .nav-links {
    flex-direction: column;
    width: 100%;
    display: none;
    background-color: #1f2d3d;
    margin-top: 8px;
    padding: 0.25rem 0;
    border-radius: 0.4rem;
    box-shadow: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    border: none;
    margin-left: 0;
  }

  /* Show menu */
  .nav-links.show {
    display: flex;
    max-height: 350px;
    overflow-y: auto;
  }

  /* Remove scrollbar for cleaner look */
  .nav-links {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
  }
  .nav-links::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }

  /* Navigation links items with horizontal lines */
  .nav-links li {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }

  /* No line below the last link */
  .nav-links li:last-child {
    border-bottom: none;
  }

  /* Remove pseudo elements if any */
  .nav-links li::before,
  .nav-links li::after {
    content: none !important;
  }

  /* Link styles */
  .nav-links li a {
    color: #f0f0f0;
    text-decoration: none;
    display: block;
    width: 100%;
    transition: color 0.2s ease;
  }

  .nav-links li:hover {
    background-color: #2a3a49;
  }

  .nav-links li a:hover {
    color: #00bcd4;
  }
}


.info-prezzo {
  background-color: #ffeb3b; /* giallo vivace */
  color: #000; /* testo nero per contrasto */
  padding: 15px 20px;
  margin: 25px 0;
  border: 2px solid #fbc02d; /* bordo più evidente */
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 6px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* effetto ombra per evidenziare */
}
.info-prezzo p {
  margin: 0;
}


.disponibilita {
  margin: 8px 0;
  font-size: 0.95rem;
  font-weight: bold;
}

.status {
  padding: 3px 8px;
  border-radius: 4px;
  color: #fff;
}

.disponibile {
  background-color: #4caf50; /* verde per disponibile */
}

.non-disponibile {
  background-color: #f44336; /* rosso per non disponibile */
}
