/* css/categoria_prodotti.css */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

* { padding: 0%; margin: 0%; font-family: "Heebo", sans-serif; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1e1e2f;
    margin: 0;
    padding: 0;
    color: #f0f0f0;
}

.cart-btn {
    position: fixed;
    top: 80px;
    right: 20px;
    background-color: #ffc107;
    color: #3a3a50;
    padding: 10px 15px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    text-decoration: none;
    transition: all 0.3s;
}

.cart-btn:hover {
    background: rgb(235, 157, 40);
    transform: translateY(-2px);
}
.cart-count {
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 24px; height: 24px;
    display: flex; align-items: center; 
    justify-content: center;
    font-size: 0.8em;
}
.scheda {
    max-width: 900px;
    margin: 40px auto;
    background-color: #2c2c3e;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.05);
    padding: 30px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #ffc107;
}
h3 {
    text-align: center;
    margin-top: 50px;
    margin-bottom: 20px;
    color: #00bcd4;
}
.h2_nome {
    font-size: 25px;
    text-align: center;
    margin-top: 50px;
    margin-bottom: -20px;
    color: #00bcd4;
}
.hr {
    width: 80%;
    margin: auto;
    padding: 1px;
    background-color: rgb(38, 59, 62);
    margin-top: 50px;
    margin-bottom: 40px;
}
.scheda img {
    display: block;
    margin: 0 auto 20px auto;
    max-width: 350px;
    height: auto;
    border-radius: 10px;
    background-color: rgb(223, 220, 220);
    padding: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    color: #f0f0f0;
}

td {
    padding: 10px;
    vertical-align: top;
}
.kit_composto {
    color: rgb(74, 226, 89);
}
td.label {
    font-weight: 600;
    color: #f0f0f0;
    background-color: #3a3a50;
    width: 35%;
    border-radius: 5px 0 0 5px;
    font-weight: bold;
}

td.value {
    background-color: #29293a;
    border-radius: 0 5px 5px 0;
    color: #bbbbbb;
    font-weight: bold;
}

/* La regola con PHP è stata rimossa perché gestita inline nell'HTML */

tr:nth-child(even) td.label {
    background-color: #34344a;
    font-weight: bold;
}
tr:nth-child(even) td.value {
    background-color: #252538;
}

a {
    color: #00bcd4;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.barcode {
    text-align: center;
    margin-top: 30px;
}

.barcode img {
    max-height: 80px;
}

.back-link {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 40px;
}

.back-link a {
    background-color: #00bcd4;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.3s;
}
.back-link a:hover {
    background-color: #0097a7;
}

.div_sotto_tabella {
    width: 100%;
    margin: auto;
    display: block;
    text-align: center;
}
.form_aggiungi {
    margin: auto;
    margin-top: 20px;
    margin-left: 10px; 
}
.btn_aggiungi {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    background: linear-gradient(90deg, rgb(245, 195, 15) 0%, rgb(202, 161, 12) 100%);
    box-shadow: 0 6px 14px rgb(136, 109, 11); 
    color: white; 
    padding: 10px;
    margin-top: -40px;
}
input[type="number"] {
    width: 60px;
    height: 30px;
    text-align: center;
    background: #333;
    color: #fff;
    border: 1px solid #555;
}
input[type="number"]::placeholder {
    color: #00bcd4;
}
.btn_aggiungi:hover { 
    box-shadow: 0 6px 14px rgb(57, 45, 2); 
    transform: translateY(-2px);
}
.quantita-bassa {
    color: red;
    font-weight: bold;
}
.quantita-ok {
    color: #bbbbbb;
}
.quantita-bassa {
    background-color: #ffdddd;
    color: #cc0000;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
}

.quantita-ok {
    background-color: #ddffdd;
    color: #006600;
    padding: 4px 8px;
    border-radius: 4px;
}

/* SLIDER */
.slider-container {
    position: relative;
    max-width: 60%;
    margin: 0 auto 30px auto;
    overflow: hidden;
}

.slider {
    display: flex;
    transition: transform 0.4s ease-in-out;
}

.slide {
    min-width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.slide img {
    width: 100%;
    max-width: 350px;
    height: auto;
    margin: 0 auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
}

/* Pulsanti slide */
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 5;
    font-size: 20px;
    transition: background-color 0.3s;
}

.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8);
}

.prev { left: 10px; }
.next { right: 10px; }

.h2_dettagli_prodotto {
    margin-top: 100px;   
}

.h2_offerta {
    text-align: center;
    margin-bottom: 30px;
}
.offerta {
    color: #ff6347;
    animation: affarissimo 1s infinite;
}

/*-------TESTO LAMPEGGIANTE AFFARISSIMO-----*/
@-webkit-keyframes affarissimo {
    0% { opacity: 0.5; color: rgb(0, 255, 26);}
    50% { opacity: 1.5; color: rgb(0, 255, 26);}
    100% { opacity: 0.5; color: rgb(0, 255, 26);}
}

@-webkit-keyframes fuoco_sx {
    0% { opacity: 0.5; display: inline-block; transform: scale(1);}
    50% { opacity: 1.5; display: inline-block; transform: scale(1.3); color: rgb(255, 60, 0);}
    100% { opacity: 0.5; display: inline-block; transform: scale(1);}
}
@-webkit-keyframes fuoco_dx {
    0% { opacity: 0.5; display: inline-block; transform: scale(1);}
    50% { opacity: 1.5; display: inline-block; transform: scale(1.3); color: rgb(255, 60, 0);}
    100% { opacity: 0.5; display: inline-block; transform: scale(1);}
}

.fuoco_sx {
    color: #ff6347;
    animation: fuoco_sx 1.5s infinite;
}
.fuoco_dx {
    color: #ff6347;
    animation: fuoco_dx 1s infinite;
}
.label_offerte {
    padding: 5px;
    width: 80px;
    height: 30px;
    text-align: center;
    background: #333;
    color: #00bcd4;
    border: 1px solid #555;
}
.input_carrello {
    padding: 5px;
    width: 10px;
    height: 20px;
    text-align: center;
    background: #333;
    color: #fff;
    border: 1px solid #555;
}

/* Responsive */
@media (max-width: 768px) {
    * { box-sizing: border-box; padding: 0%; top: 0; margin: 0%; }

    .container_device {
        width: 100%;
        margin: auto;
    }
    .h2_dettagli_prodotto {
        margin-top: 10px;   
        font-size: 25px;
    }
    table {
        margin-top: -10px; 
    }
    .scheda {
        width: 100%;
        margin: auto;
        margin-top: 80px;
    }

    table {
        font-size: 14px;
    }
    
    /* MODIFICA RESPONSIVE per allineare caratteristica e titolo */
    td.label, td.value {
        display: table-cell; 
        width: auto;
        border-radius: 0;
        padding: 10px 8px;
    }
    td.label {
        width: 35%; 
        background: #3a3a50;
    }
    td.value {
        background: #29293a;
    }
    /* FINE MODIFICA */

    /* SLIDER */
    .slider-container {
        max-width: 100%;
    }
    .slide img {
        max-width: 100%;
    }
    .back-link a {
        padding: 10px 18px;
        font-size: 14px;
    }
    .footer_desk {
        display: none;
    }
}