/* Stile moderno per dettaglio annuncio Ligurian Market */
body {
  background: linear-gradient(135deg, #f7f7fa 0%, #fafbfc 100%);
  font-family: 'Inter', Arial, sans-serif;

}

header {
  background: #fff;
  box-shadow: 0 4px 20px rgba(229,57,53,0.12);
  padding: 1.5rem 2rem 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.back-link {
  color: #e53935;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.back-link:hover {
  background: rgba(229,57,53,0.08);
  transform: translateX(-2px);
}

.annuncio-container {

  margin: 2.5rem auto;
  background: #fff;
  max-width: 520px;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(229,57,53,0.12);
  overflow: hidden;
  border: 1px solid rgba(229,57,53,0.08);
}

/* Layout a griglia per desktop */
.annuncio-unificato {
  display: grid;
  gap: 2.5rem;
  padding: 2.5rem;
  align-items: start;

}

/* Sezione galleria (sinistra) */
.annuncio-gallery-container {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  position: sticky;
  top: 2rem;
}

.annuncio-gallery-slider {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.gallery-img-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-img-main {
  width: 100%;
  max-width: 450px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  background: #f3f3f3;
  user-select: none;
  touch-action: pan-y;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-img-main:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.gallery-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.gallery-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.gallery-dot:hover {
  background: #bbb;
  transform: scale(1.1);
}

.gallery-dot.active {
  background: #e53935;
  transform: scale(1.3);
  border-color: rgba(229,57,53,0.3);
  box-shadow: 0 0 0 3px rgba(229,57,53,0.2);
}

/* Sezione info (destra) */
.annuncio-info-container {
  display: flex;
  margin-right: 22px;
  margin-left: 22px;
  flex-direction: column;
  gap: 1.8rem;
  padding: 1rem;

}

.annuncio-titolo-rosso {
  color: #e53935;
  font-size: 2.9rem;
  font-weight: 700;
  font-family: 'HikasamiBold', sans-serif;
  margin-bottom: 1.2rem;
  margin-top: 0px;
  align-self: center;
  text-align: center;
  width: 100%;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(229,57,53,0.1);
}

.annuncio-info {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.annuncio-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid rgba(229,57,53,0.06);
  transition: all 0.2s ease;
}

.annuncio-row:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

.dati-label {
  font-weight: 600;
  color: #333;
  font-family: 'HikasamiBold', sans-serif;
  min-width: 120px;
  flex-shrink: 0;
  font-size: 0.95rem;
}

.dati-val {
  color: #555;
  font-family: 'LTSuperiorMono', monospace;
  flex: 1;
  font-size: 1rem;
  font-weight: 500;
}

.dati-val-descrizione {
  color: #555;
  font-family: 'LTSuperiorMono', monospace;
  line-height: 1.7;
   word-break: break-word;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 0.95rem;
}

.annuncio-row-descrizione {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1.2rem;
}

.annuncio-row-descrizione .dati-label {
  min-width: auto;
}

/* Sezione prezzo - RIPRISTINATA normale */
.annuncio-row.prezzo-row {
  background: #fff;
  color: #333;
  padding: 1rem;
  border-radius: 12px;
  border: 2px solid #e53935;
  margin-left: 39px;
  margin-right: 39px;
  box-shadow: 0 4px 12px rgba(229,57,53,0.15);
}

.annuncio-row.prezzo-row .dati-label,
.annuncio-row.prezzo-row .dati-val {
  color: #e53935;
  font-weight: 700;
  font-size: 1.2rem;
}

/* Sezione Autore - CORRETTA con colori del sito */
.annuncio-autore-section {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
  border-radius: 16px;
  padding: 1.5rem;
  margin-top: 21px;
  margin-left: 25px;
  margin-right: 25px;

  border: 1px solid rgba(229,57,53,0.08);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.autore-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.autore-clickable {
  cursor: pointer;
  border-radius: 12px;
  padding: 1rem;
  margin: -1rem;
  transition: all 0.3s ease;
  background: transparent;
  border: 1px solid rgba(231, 76, 60, 0.2);
  position: relative;
}

.autore-clickable::after {
  content: "👁️";
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.autore-clickable:hover {
  background: rgba(231, 76, 60, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(231, 76, 60, 0.1);
  border-color: rgba(231, 76, 60, 0.4);
}

.autore-clickable:hover::after {
  opacity: 1;
}

.autore-clickable:hover .autore-avatar-img {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(229,57,53,0.3);
}

.autore-clickable:hover .autore-username {
  color: #e74c3c;
}

.autore-hint {
  color: #7f8c8d;
  font-size: 0.75rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.autore-clickable:hover .autore-hint {
  opacity: 1;
  color: #e74c3c;
}

.autore-avatar {
  flex-shrink: 0;
}

.autore-avatar-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e53935;
  box-shadow: 0 4px 12px rgba(229,57,53,0.2);
  transition: transform 0.2s ease;
  background: #f8f9fa;
  display: block;
}

.autore-avatar-img:hover {
  transform: scale(1.05);
}

.autore-details {
  flex: 1;
}

.autore-username {
  font-size: 1.4rem;
  font-weight: 700;
  color: #333;

  font-family: 'HikasamiBold', sans-serif;
}

.autore-username-link {
  font-size: 1.4rem;
  font-weight: 700;
  color: #333;

  font-family: 'HikasamiBold', sans-serif;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  border-radius: 8px;
  padding: 4px 8px;

}

.autore-username-link:hover {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.05);
  transform: translateY(-1px);
}

.autore-location {
  color: #7f8c8d;
  font-size: 0.9rem;
}

.autore-info-extra {
  display: flex;
  gap: 1rem;
}

.autore-stat {
  background: #fff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(229,57,53,0.1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.autore-stat-label {
  font-size: 0.8rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.2rem;
}

.autore-stat-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  font-family: 'LTSuperiorMono', monospace;
}

/* Sezione contatto */
.annuncio-contatta-wrap {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;

}

.annuncio-contatta-btn {
  background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
  color: white;
  font-family: 'LTSuperiorMono', monospace;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  padding: 1.2rem 2.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 16px rgba(229,57,53,0.3);

  letter-spacing: 1px;
}

.annuncio-contatta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(229,57,53,0.4);
}

.annuncio-telefono {
  font-family: 'LTSuperiorMono', monospace;
  color: #333;
  text-align: center;
  padding: 1.2rem 2rem;
  background: white;
  border-radius: 12px;
  border: 2px solid #e53935;
  font-size: 1.2rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(229,57,53,0.1);
  transition: all 0.2s ease;
}

.annuncio-telefono:hover {
  background: #f8f9fa;
  box-shadow: 0 6px 16px rgba(229,57,53,0.15);
}

/* Responsive per tablet */
@media (max-width: 1024px) {
  .annuncio-container {
    max-width: 700px;
    margin: 1.5rem auto;
  }
  
  .annuncio-unificato {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem;
  }
  
  .annuncio-gallery-container {
    position: static;
  }
  
  .annuncio-titolo-rosso {
    font-size: 2.8rem;
  }
  
  /* Sezione autore su tablet */
  .autore-info {
    gap: 1.2rem;
  }
  
  .autore-avatar-img {
    width: 70px;
    height: 70px;
  }
  
  .autore-username {
    font-size: 1.3rem;
  }
  
  .autore-info-extra {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  /* Contatti su tablet */
  .annuncio-contatta-wrap {
    gap: 1.2rem;
  }
}

/* Responsive per mobile */
@media (max-width: 768px) {
  header {
    padding: 1rem;
  }
  
  .back-link {
    font-size: 1rem;
    padding: 0.5rem 0.8rem;
  }
  
  .annuncio-container {
    margin: 1rem;
    border-radius: 16px;
  }
  
  .annuncio-unificato {
    padding: 1.5rem;
    gap: 1.5rem;
  }
  
  
  .annuncio-info-container {
    padding: 1rem;
    gap: 1.2rem;
    margin-left: 8px;
    margin-right: 8px;
  }
  
  .annuncio-titolo-rosso {
    font-size: 2.9em;
    margin-top: 0px;
    align-self: center;
    
  }
  
  .annuncio-row {
    padding: 0.8rem;
    gap: 0.8rem;
  }
  
  .dati-label {
    min-width: 100px;
    font-size: 0.9rem;
  }
  
  .dati-val {
    font-size: 0.95rem;
  }
  
  /* Sezione autore su mobile */
  .annuncio-autore-section {
    padding: 1.2rem;
  }
  
  .autore-info {
    gap: 1rem;
  }
  
  .autore-avatar-img {
    width: 50px;
    height: 50px;
  }
  
  .autore-username {
    font-size: 1.2rem;
  }
  
  .autore-info-extra {
    flex-direction: column;
    gap: 0.6rem;
  }
  
  .autore-stat {
    padding: 0.4rem 0.8rem;
  }
  
  .autore-stat-label {
    font-size: 0.7rem;
  }
  
  .autore-stat-value {
    font-size: 0.8rem;
  }
  
  /* Contatti su mobile */
  .annuncio-contatta-wrap {
    padding: 1.5rem;
    gap: 1.5rem;
  }
  
  .annuncio-contatta-btn {
    padding: 1rem 2rem;
    font-size: 1rem;
  }
  
  .annuncio-telefono {
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
  }
  .annuncio-row.prezzo-row {
    margin-left: 25px;
    margin-right: 25px;
  }
}
@media (max-width: 700px) {
  html, body {
    /* nessun -webkit-overflow-scrolling, nessun overflow forzato */
    scroll-behavior: smooth;
  }
  .annuncio-container {
    padding: 0.5rem 0.1rem 0.8rem 0.1rem;
    box-shadow: 0 1px 6px 0 rgba(229,57,53,0.08);
    border-radius: 10px;
    margin: 10px;
    max-width: 100vw;
  }
  .annuncio-gallery {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .annuncio-gallery img {
    width: 120px;
    aspect-ratio: 1 / 1; /* Mantieni rapporto quadrato anche su mobile */
  }
  .annuncio-title {
    font-size: 1.3rem;
  }
  .annuncio-prezzo {
    font-size: 1.1rem;
  }
  .gallery-img-main {
    max-width: 90vw;
    aspect-ratio: 1 / 1; /* Mantieni rapporto quadrato su mobile */
    object-fit: cover;
    object-position: center;
    box-shadow: 0 1px 6px 0 rgba(229,57,53,0.08);
    margin: 0 auto;
  }
  .annuncio-gallery-slider {
    max-width: 98vw;
    box-shadow: none;
    padding: 0;
  }
  header {
    position: static !important;
    top: unset;
  }
  .annuncio-info {
    padding: 0.1em 0.1em 0.1em 0.1em;
  }
  .annuncio-row {
    font-size: 1.02rem;
    gap: 0.2em;
    margin-bottom: 0.2rem;
  }
  
  /* Fix specifico per la descrizione su mobile */
  .dati-val-descrizione {
    font-size: 0.95rem;
    line-height: 1.4;
    max-width: calc(100vw - 3rem);
    overflow-wrap: anywhere;
    word-break: break-word;

    white-space: pre-wrap;
  }
  
  .annuncio-row-descrizione {

    max-width: 100%;
  }
  
  .gallery-dots {
    margin-bottom: 0.2rem;
  }
  footer {
    position: static !important;
    box-shadow: 0 -2px 8px 0 rgba(229,57,53,0.08);
    bottom: unset;
  }
}
