/* ---------------------------
   STYLE COMPLETO MARKET 3D
---------------------------- */

body {
    margin: 0;
    padding: 0;
    background: #111;
    color: white;
    font-family: Arial, sans-serif;
}

/* HEADER */
header {
    position: relative;
    text-align: center;
    padding: 40px 20px 20px 20px;
    background: #222;
    box-shadow: 0 0 10px #000;
}

h1 {
    margin-bottom: 10px;
}

/* ---------------------------
   TORNA ALLA HOME (AZZURRO)
---------------------------- */
#home-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    display: inline-block;
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: bold;
    background-color: #0099ff !important;  /* AZZURRO */
    color: white !important;
    transition: 0.3s;
}
#home-btn:hover {
    background-color: #33bbff !important;   /* AZZURRO CHIARO */
    transform: scale(1.05);
}

/* ---------------------------
   LINK (ARANCIONE / GIALLO)
---------------------------- */
a:link {
    color: #ff8800 !important;       /* NON VISITATI */
    text-decoration: none !important;
}
a:visited {
    color: #ffff33 !important;       /* VISITATI */
    text-decoration: none !important;
}
a:hover {
    color: #ffaa33 !important;       /* HOVER */
    text-decoration: underline !important;
}

/* ---------------------------
   NAV CATEGORIE
---------------------------- */
#category-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.category-btn {
    padding: 12px 18px;
    background: linear-gradient(45deg, #ff8800, #ff5500);
    border: none;
    color: white;
    font-size: 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
}
.category-btn:hover {
    transform: scale(1.08);
    filter: brightness(1.2);
}

/* INFO FILE */
#file-info {
    text-align: center;
    margin-bottom: 15px;
    font-size: 14px;
    opacity: 0.8;
}

/* ---------------------------
   GRIGLIA PRODOTTI (BOX VICINI UNIFORMI)
---------------------------- */
#product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 180px); /* larghezza fissa */
    gap: 8px;           /* distanza tra le card */
    justify-content: start;
    grid-auto-flow: dense;  /* riempie gli spazi vuoti */
    padding: 20px;
}

/* ---------------------------
   CARD PRODOTTO
---------------------------- */
.product-card {
    background: #1b1b1b;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 10px #0007;
    transition: 0.2s;
    max-width: 180px;   /* larghezza invariata */
    margin: 0;          /* rimuove il centraggio automatico */
}

.product-card:hover {
    transform: scale(1.03);
}

/* ---------------------------
   IMMAGINE PRODOTTO
---------------------------- */
.product-card img {
    width: 100%;
    height: 130px;       /* invariata */
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    display: block;
}

/* ---------------------------
   PREZZO
---------------------------- */
.product-card .price {
    font-size: 16px;
    color: #ffaa33;      /* colore giallo/arancione */
    font-weight: bold;
    margin-top: 8px;
}

/* ---------------------------
   LIGHTBOX
---------------------------- */
#lightbox {
    display: none;
    position: fixed;
    justify-content: center;
    align-items: center;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}


/* Pulsante Chiudi lightbox */
#close-lightbox {
    position: absolute;
    bottom: 20px;      /* distanza dal fondo */
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    background: #f0f0f0;
    border-radius: 5px;
    z-index: 10001;    /* sopra il lightbox */
}
