/* --- IMPOSTAZIONI BASE PER APP MOBILE --- */
body {
    margin: 0;
    padding: 0;
    background-color: #f0f2f5; /* Grigio chiaro per far spiccare le schede bianche */
    overflow: hidden; /* Impedisce lo scroll dell'intera pagina web */
    font-family: system-ui, -apple-system, sans-serif;
}

/* --- IL MOTORE DELLO SWIPE --- */
#app-viewport {
    position: relative;
    width: 100vw;
    height: calc(100vh - 70px); /* Tutta l'altezza meno la barra in basso */
    overflow: hidden;
}

#swipe-track {
    display: flex;
    width: 300%; /* 3 pagine = 300% della larghezza schermo */
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* Animazione fluida */
    /* Di default sta su transform: translateX(0); */
}

.app-page {
    width: 100vw; /* Ogni pagina è larga esattamente uno schermo */
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Scroll interno per ogni pagina se ci sono molti prodotti */
.page-content {
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}

.page-header {
    background-color: white;
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 10;
}

/* --- LA BARRA IN BASSO (Stile Clash) --- */
#bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 70px;
    background-color: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 15px rgba(0,0,0,0.1);
    padding-bottom: env(safe-area-inset-bottom); /* Per i nuovi iPhone */
}

.nav-btn {
    flex: 1;
    height: 100%;
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #6c757d;
    transition: all 0.2s ease;
}

.nav-btn i { font-size: 1.5rem; margin-bottom: 2px; }
.nav-btn span { font-size: 0.75rem; font-weight: bold; }

/* Pulsante attivo */
.nav-btn.active { color: #0d6efd; }
.nav-btn.active i { transform: scale(1.15); }

/* --- STILE DELLE SCHEDE PRODOTTO (I QUADRATI) --- */
.square-card {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    word-break: break-word; 
    hyphens: auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-qty {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

#install-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    z-index: 10000;
    display: none; /* DI DEFAULT È NASCOSTO, JS LO MOSTRA SE SERVE */
    justify-content: center; align-items: center; padding: 20px;
}

.install-card {
    background: white; padding: 30px; border-radius: 25px;
    text-align: center; max-width: 400px;
}


