/* ===============================
   IMPOSTAZIONI BASE
   =============================== */

body {
    background: #fff6c6 !important;
    font-family: Arial, Helvetica, sans-serif;
    color: #333;
    text-align: center;
}

/* Corpo pagina dentro iframe */
body.embed {
    overflow: hidden;
    margin: 0;
    padding-top: 100px;
}

/* ===============================
   HOME / CATEGORIE
   =============================== */

.titolo {
    font-size: 40px;
    margin: 20px 0;
    color: #222;
}

.lista-categorie {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lista-categorie li {
    margin: 10px 0;
}

.lista-categorie a {
    font-size: 34px;
    text-decoration: none;
    color: #0120cc;
}

.lista-categorie a:hover {
    text-decoration: underline;
    color: #003366;
}

/* ===============================
   RICERCA (USATA IN index / ricerca)
   =============================== */
   
  .ricerca form {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
	}
	.ricerca input[type="text"] {
    padding: 12px;
    font-size: 18px;
    width: 300px;
    max-width: 100%;
}

.ricerca button {
    padding: 12px 20px;
    font-size: 18px;
    cursor: pointer;
}
   
   
   
/*
.ricerca {
    margin: 25px 0;
}

.ricerca input[type="text"] {
    padding: 8px;
    font-size: 16px;
    width: 300px;
}

.ricerca button {
    padding: 8px 14px;
    font-size: 16px;
    cursor: pointer;
}
*/




/* ===============================
   CARD PRODOTTO (categoria.php)
   =============================== */

.prodotto-card {
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
}

/* FOTO + PULSANTI */
.prodotto-top {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

/* FOTO */
.prodotto-img {
    width: 4cm;
    height: auto;
    object-fit: contain;
    border: 1px solid #ccc;
}

/* PULSANTI A DESTRA DELLA FOTO */
.prodotto-azioni {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* === PULSANTI ANNUNCI (ISOLATI DA BOOTSTRAP) === */
.prodotto-azioni a {
    display: flex;
    justify-content: center;
    align-items: center;

    width: 110px;
    height: 30px;

    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;

    border-radius: 6px;
    border: 1px solid transparent;
}

.prodotto-azioni-prod a {
    display: flex;
    justify-content: center;
    align-items: center;

    width: 180px;
    height: 30px;

    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;

    border-radius: 6px;
    border: 1px solid transparent;
}

/* Pulsante dettaglio */
.prodotto-azioni a.btn-dettaglio {
    background-color: #2c7be5 !important;
    color: #fff !important;
}

.prodotto-azioni a.btn-dettaglio:hover {
    background-color: #1a5fc4 !important;
}

/* Pulsante back */
.prodotto-azioni a.btn-back {
    background-color: #e9ecef !important;
    color: #333 !important;
    border-color: #ccc;
}

.prodotto-azioni a.btn-back:hover {
    background-color: #d6d8db !important;
}

/* Pulsante back in Prodotto */
.prodotto-azioni-prod a.btn-back {
    background-color: #e9ecef !important;
    color: #333 !important;
    border-color: #ccc;
}

.prodotto-azioni-prod a.btn-back:hover {
    background-color: #d6d8db !important;
}

/* TESTI SOTTO FOTO */
.prodotto-testo {
    margin-top: 10px;
}

.prodotto-testo h3 {
    margin: 5px 0;
    font-size: 18px;
}

.descrizione-breve {
    font-size: 14px;
    color: #444;
}

.prezzo {
    font-size: 16px;
    font-weight: bold;
    margin-top: 6px;
}

/* GALLERIA PRODOTTO */
.galleria-prodotto {
    max-width: 800px;
}

/* FOTO PRINCIPALE */
.foto-principale img {
    width: 10cm;
    height: auto;
    object-fit: contain;
    border: 1px solid #ccc;
    background: #fff;
}

/* MINIATURE */
.miniature {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.miniature img.thumb {
    width: 50px;
    height: auto;
    object-fit: contain;
    border: 1px solid #ccc;
    cursor: pointer;
    opacity: 0.7;
}

.miniature img.thumb:hover {
    opacity: 1;
    border-color: #2c7be5;
}


/* ===============================
   MOBILE
   =============================== */

@media (max-width: 768px) {
	
	/* SOLO PAGINA CATEGORIA */
	
    body.categoria-card .prodotto-top {
        flex-direction: row;        /* ← foto + pulsanti affiancati */
        align-items: center;
    }

    body.categoria-card .prodotto-azioni-cat {
        display: flex;
        flex-direction: column;     /* pulsanti uno sotto l’altro */
        gap: 8px;
        margin-left: 10px;
        min-width: auto;
    }

    body.categoria-card .prodotto-azioni-cat a {
        width: auto;                /* mantieni dimensione compatta */
        white-space: nowrap;
    }
	
	
    body.prodotto-card .prodotto-top {
        align-items: center;
    }   
	
	.ricerca form {
        flex-direction: column;
        align-items: stretch;
    }
	
	.ricerca button {
        margin-top: 12px;
        width: 40%;
		margin: 12px auto 0 auto;   /* ← QUESTO centra */
    }

    .ricerca input[type="text"] {
        width: 100%;
    }
	
	.foto-principale img {
    width: 9cm;
    height: auto;
    object-fit: contain;
    border: 1px solid #ccc;
    background: #fff;
	}

	.prodotto-card .prodotto-top {
        flex-direction: column;
        align-items: stretch;
    }
    .galleria-prodotto {
        order: 1;
        width: 100%;
    }

	.prodotto-azioni-prod {
        order: 3;
        margin: 12px 0;
        min-width: 0;        /* <- importantissimo! permette al pulsante di crescere */
        align-items: center;  /* centra il pulsante */
    }

     .prodotto-azioni-prod a {
        width: 4cm;           /* il pulsante ora cresce */
        max-width: 300px;     /* limite estetico */
        text-align: center;
        white-space: nowrap;   /* testo su una riga */
        display: inline-block; /* sicurezza per width */
    }
	
    .miniature {
        order: 2;
    }
	
	.miniature {
        justify-content: center;
    }
}



/* ===============================
   CODICE VECCHIO / DISMESSO
   (RIATTIVABILE SE SERVE)
   =============================== */

/*
.prodotto { ... }
.thumb img { ... }
.lista-prodotti { ... }
.lista-prodotti li { ... }
.thumb-prodotto { ... }
.prodotto-info { ... }
.azioni-link { ... }
.btn { ... }
*/
