diff --git a/index.php b/index.php index c565034..dee1982 100644 --- a/index.php +++ b/index.php @@ -37,8 +37,8 @@ if ($result === false) {
Categoria:
+Descrizione:
+Prezzo: €
+Quantità disponibile:
+ +Prodotto non trovato.
+ + + close(); ?> + + diff --git a/style.css b/style.css index 9496f38..1755d0b 100644 --- a/style.css +++ b/style.css @@ -88,4 +88,56 @@ form button { form button:hover { background-color: #218838; +} + +/* Stili per la pagina prodotto */ +.product-detail { + max-width: 800px; + margin: 20px auto; + padding: 20px; + border: 1px solid #ddd; + border-radius: 8px; + background-color: #fff; + display: flex; + flex-direction: column; +} + +.product-detail img { + max-width: 100%; + height: auto; + object-fit: contain; + margin-bottom: 20px; + flex-shrink: 0; +} + +.product-detail > div { + flex: 1; +} + +@media (min-width: 768px) { + .product-detail { + flex-direction: row; + } + + .product-detail img { + max-width: 40%; + margin-bottom: 0; + margin-right: 20px; + } +} + +.img-square { + position: relative; + width: 100%; + padding-top: 100%; /* crea un quadrato perfetto */ + overflow: hidden; +} + +.img-square img { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + object-fit: contain; /* o "cover" */ } \ No newline at end of file