/* =========================================================
   LemmaPress – style-product.css  (versione finale)
   Layout pagina prodotto
   ========================================================= */

/* ===== CONTENITORE PRINCIPALE =====
   Titolo in alto, poi blocco immagine + testo
--------------------------------------------------------- */
.libro {
  display: block;                 /* garantisce titolo sopra */
  width: 90%;
  max-width: 60rem;
  margin: 2rem auto;
  font-family: "Spectral", serif;
  line-height: 1.6;
}

/* ===== BLOCCO FLESSIBILE (copertina + info) ===== */
.book-flex {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

/* ===== COPERTINA ===== */
.book-flex .copertina {
  flex: 0 0 auto;
  text-align: center;
  max-width: 240px;
  width: 100%;
}

.book-flex .copertina picture,
.book-flex .copertina img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  object-fit: contain;
}

/* ===== BLOCCO TESTUALE ===== */
.book-flex .info {
  flex: 1;
  min-width: 240px;
  max-width: 30rem;
  text-align: left;
}

.book-flex .info p {
  margin: 0.4rem 0;
}

.book-flex .info .authors {
  color: #444;
  font-weight: 500;
}

.book-flex .info .price {
  font-weight: bold;
  margin-bottom: 0.3rem;
}

.book-flex .info .description {
  line-height: 1.7;
  margin-top: 1rem;
}

/* ===== PULSANTE "ACQUISTA" ===== */
.buy-button {
  background: var(--color-accent, #b52828);
  color: #fff !important;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: 5px;
  display: inline-block;
  margin-top: 0.8rem;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}
.buy-button:hover {
  background: #911f1f;
  transform: translateY(-2px);
}

/* ===== VERSIONE MOBILE =====
   Impila immagine sopra il testo
--------------------------------------------------------- */
@media (max-width: 800px) {
  .book-flex {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .book-flex .copertina {
    max-width: 70vw;
    margin: 0 auto 1.5rem auto;
  }

  .book-flex .info {
    text-align: left;
  }

  .book-flex .copertina img {
    width: 100%;
  }
}
