/* Reset base */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: sans-serif; line-height: 1.6; background-color: #ffffff; }

/* --- Reset e Base --- */

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #ffffff;
    position: relative;
    z-index: 1000;
    font-family: sans-serif;
}

.logo img {
    height: 150px;
}

/* --- Logica del Checkbox (Nascosto) --- */
#menu-toggle {
    display: none;
}

/* CARRELLO & LOGIN */

.icon-link {
    color: #333;
    transition: color 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.icon-link:hover {
    color: #007bff; /* Colore al passaggio del mouse */
    transform: scale(1.1); /* Leggero zoom */
}

.nav-icons {
    display: flex;
    gap: 1.2rem;
    margin-left: auto;
    margin-right: 1rem;
    align-items: center;
}

/* Contenitore dell'icona per il posizionamento del badge */
.cart-wrapper {
    position: relative;
    display: inline-flex;
}

/* Stile del pallino (Badge) */
.cart-count {
    position: absolute;
    top: -5px;      /* Sposta verso l'alto */
    right: -8px;    /* Sposta verso destra */
    background-color: #ff4757; /* Un rosso vibrante */
    color: white;
    font-size: 10px;
    font-weight: bold;
    font-family: sans-serif;
    padding: 2px 6px;
    border-radius: 50%; /* Lo rende tondo */
    min-width: 12px;
    text-align: center;
    line-height: 1;
    border: 2px solid #fff; /* Crea un distacco visivo dall'icona */
}


/* LOGIN */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-box {
    background: #ffffff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h2 {
    margin-bottom: 10px;
    color: #333;
}

.login-box p {
    color: #777;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.input-group {
    text-align: left;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box; /* Importante per il padding */
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: #007bff;
    outline: none;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 25px;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background-color: gray;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-login:hover {
    background-color: black; 
}

.error-badge {
    background: #ffe3e3;
    color: #d63031;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.login-footer {
    margin-top: 25px;
    font-size: 0.9rem;
    color: #666;
}



/* --- Icona Hamburger --- */
.hamburger-label {
    cursor: pointer;
    display: block;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.hamburger-icon, 
.hamburger-icon::before, 
.hamburger-icon::after {
    content: '';
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    position: absolute;
    transition: all 0.3s ease-in-out;
    border-radius: 3px;
}

.hamburger-icon { top: 8px; }
.hamburger-icon::before { top: -8px; }
.hamburger-icon::after { top: 8px; }

/* --- Animazione Icona a "X" --- */
#menu-toggle:checked + .hamburger-label .hamburger-icon {
    background-color: transparent;
}

#menu-toggle:checked + .hamburger-label .hamburger-icon::before {
    transform: rotate(45deg);
    top: 0;
}

#menu-toggle:checked + .hamburger-label .hamburger-icon::after {
    transform: rotate(-45deg);
    top: 0;
}

/* --- Menu Laterale (Slide-in) --- */
.menu-container {
    position: fixed;
    top: 0;
    right: -100%; /* Nascosto a destra */
    width: 250px;
    height: 100vh;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    padding: 80px 20px;
    transition: right 0.4s cubic-bezier(0.77, 0.2, 0.05, 1);
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    z-index: 999;
}

#menu-toggle:checked ~ .menu-container {
    right: 0;
}

.menu-container a {
    text-decoration: none;
    color: #333;
    font-size: 1.2rem;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    transition: color 0.3s;
}

.menu-container a:hover {
    color: #007bff;
}

/* --- Overlay Sfondo --- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s;
    z-index: 998;
}

#menu-toggle:checked ~ .overlay {
    opacity: 1;
    visibility: visible;
}

/* Carousel */
.carousel-container {
    width: 100%;
    overflow: hidden;
    background: #333;
    border-top: 5px solid #c58ad5; 
    box-sizing: border-box;
}

.carousel {
    display: flex;
    overflow-x: auto; /* Permette lo scroll orizzontale */
    scroll-snap-type: x mandatory;
}

.slide {
    min-width: 100%;
    scroll-snap-align: start;
}

.slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* Body Content */
.content {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: 400px;
    text-align: justify;
}

/* Footer */
/* Container principale del footer */
.footer-minimal {
    background-color: #c58ad5;
    color: back;
    padding: 30px 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between; /* Separa i social dall'autore */
    align-items: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border-top: 1px solid #333;
}

/* Stile comune per i wrapper */
.social-wrapper, .autore-wrapper {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* --- Area Social --- */
.social-wrapper a {
    color: #ffffff;
    text-decoration: none;
    margin-left: 15px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
}

/* Effetto hover per le icone */
.social-wrapper a:hover {
    color: black;
    transform: translateY(-3px); /* Leggera elevazione */
}

/* --- Area Autore --- */
.autore-wrapper a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
    transition: border-bottom 0.3s ease;
    border-bottom: 1px solid transparent;
}

.autore-wrapper a:hover {
    border-bottom: 1px solid #007bff;
}

/* --- Responsive: per schermi piccoli (smartphone) --- */
@media (max-width: 600px) {
    .footer-minimal {
        flex-direction: column; /* Impila gli elementi verticalmente */
        text-align: center;
        gap: 20px;
    }
    
    .social-wrapper a {
        margin: 0 10px; /* Centra meglio le icone */
    }
}

/* FORM CONTACT */
.contact-form {
  max-width: 400px;
  margin: 20px auto;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  font-family: sans-serif;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box; /* Importante per il padding! */
}

.submit-btn {
  background-color: gray;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
}

.submit-btn:hover {
  background-color: #0056b3;
}

