/* ========================================
   IMPORTAZIONE DEFINITIVA VIVALDI PER ARUBA
   ======================================== */
@font-face {
    font-family: 'Vivaldi'; 
    src: url('/font/vivaldi.ttf') format('truetype'); /* La barra / inziale dice ad Aruba di cercare nella root */
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3 {
    font-family: 'Georgia', serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ========================================
   HEADER
   ======================================== */
.header {
    background-color: #ffffff; 
    color: #000;
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo h1 {
    font-size: 1.2rem;
    color: #000000;
    letter-spacing: 1px;
}

/* Mobile Menu Toggle (Hamburger) */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #000; 
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Navigation Menu */
.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background-color: #1a1a1a; 
    padding: 80px 30px 30px;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0,0,0,0.5);
}

.nav-menu.active {
    right: 0;
}

.nav-menu ul {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.nav-menu a {
    font-size: 1.1rem;
    color: #fff; 
    transition: color 0.3s ease;
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.nav-menu a:hover {
    color: #cccccc;
}

/* Stile speciale per l'utente loggato nel menu */
.nav-menu a.user-link {
    color: #cccccc;
    font-weight: bold;
    border-bottom: 2px solid #cccccc;
}
.nav-menu a.user-link:hover {
    color: #fff;
}

/* Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 999;
}

.menu-overlay.active {
    display: block;
}

/* ========================================
   PRODUCTS SECTION
   ======================================== */
.products-section {
    padding: 100px 0 60px;
    background-color: #ffffff;
    min-height: calc(100vh - 80px);
}

.products-section h2 {
    font-size: 1.6rem;
    color: #000000;
    text-align: center;
    margin-bottom: 50px;
    background-color: rgba(255, 255, 255, 0.95); 
    padding: 15px 40px; 
    border-radius: 8px; 
    width: fit-content; 
    margin: 0 auto 50px auto; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); 
}

/* Category Selection Buttons */
.category-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
}

.category-btn {
    padding: 18px 50px;
    background-color: #000000;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.category-btn:hover {
    background-color: #f5f5f5;
    color: #000000;
    transform: translateY(-2px);
}

.category-btn.active {
    background-color: #f5f5f5;
    color: #000000;
}

.category-icon {
    font-size: 1.5rem;
}

/* ========================================
   VIEW TOGGLE (Griglia / Lista)
   ======================================== */
.view-toggle {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}

/* Stile base: Sfondo nero, simbolo bianco */
.view-btn {
    padding: 10px 15px;
    background-color: #000000; 
    color: #ffffff; 
    border: 2px solid #000000; 
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* Forza gli SVG (i disegni di griglia e lista) a usare il colore del testo */
.view-btn svg {
    fill: currentColor;
}

/* Effetto al passaggio del mouse: grigio scuro elegante */
.view-btn:hover {
    background-color: #333333;
    border-color: #333333;
    color: #ffffff;
}

/* Modalità ATTIVA (inversione per far capire quale è selezionata) */
.view-btn.active {
    background-color: #ffffff; /* Sfondo bianco */
    color: #000000; /* Simbolo nero */
    border: 2px solid #000000; /* Bordo nero per non farlo sparire nello sfondo */
}

/* Products Container */
.products-container {
    display: grid;
    gap: 20px;
}

.products-container.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.products-container.list-view {
    display: flex; 
    flex-direction: column;
    gap: 15px;
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block; 
}

.product-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%; 
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.product-image {
    width: 100%;
    height: 200px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    background-color: #fff; 
    padding: 15px; 
    box-sizing: border-box;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 8px;
}

.product-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.4;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #000000;
}

/* Stili specifici per la Card in modalità Lista */
.products-container.list-view .product-card {
    display: flex; 
    flex-direction: row;
    height: auto;
}

.products-container.list-view .product-image {
    width: 180px; 
    height: 180px;
    flex-shrink: 0; 
}

.products-container.list-view .product-info {
    flex: 1; 
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact {
    padding: 60px 0;
    background-color: #1a1a1a;
    color: #ffffff;
}

/* ========================================
   SHOP SECTION
   ======================================== */
.shop {
    padding: 60px 0;
    background-color: #fff;
    text-align: center;
}

.shop h2 {
    font-size: 1.6rem;
    color: #000000;
    margin-bottom: 30px;
}

.shop-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.shop-btn {
    display: inline-block;
    padding: 18px 50px;
    background-color: #000000;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
    min-width: 200px;
}

.shop-btn:hover {
    background-color: #f5f5f5;
    color: #000000;
    transform: translateY(-2px);
}

.contact h2 {
    font-size: 1.6rem;
    color: #cccccc;
    text-align: center;
    margin-bottom: 40px;
}

.contact-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-item {
    text-align: center;
    padding: 20px;
    background-color: rgba(255,255,255,0.05);
    border-radius: 8px;
    flex: 1 1 300px;
    max-width: 350px;
}

.contact-item h3 {
    font-size: 1.1rem;
    color: #cccccc;
    margin-bottom: 15px;
}

.contact-item p {
    font-size: 0.95rem;
    line-height: 1.8;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background-color: #000000;
    color: #999;
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section {
    text-align: center;
}

.footer-section h3 {
    font-size: 1.1rem;
    color: #cccccc;
    margin-bottom: 15px;
}

.footer-section p {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-section ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-section a {
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #cccccc;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.3);
    color: #cccccc;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: #cccccc;
    color: #000000;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
    font-size: 0.8rem;
}

/* ========================================
   RESPONSIVE - TABLET (768px+)
   ======================================== */
@media (min-width: 768px) {


    .hero-content h2 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .menu-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .menu-category:last-child {
        grid-column: span 2;
    }

    .contact-grid {
        /* Override mantenuto flessibile per la griglia contatti */
        justify-content: space-around;
    }

    .shop-buttons {
        flex-direction: row;
        justify-content: center;
    }

    .category-buttons {
        flex-direction: row;
    }

    .category-btn {
        min-width: auto;
    }

    .contact-item {
        flex: 1;
        min-width: 200px;
        max-width: 300px;
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .footer-section {
        text-align: left;
        flex: 1;
    }

    .social-links {
        justify-content: flex-start;
    }
}

/* ========================================
   RESPONSIVE - DESKTOP (1024px+)
   ======================================== */
@media (min-width: 1024px) {
    .menu-toggle {
        display: none;
    }

    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        background: none;
        padding: 0;
        box-shadow: none;
    }

    .nav-menu ul {
        flex-direction: row;
        gap: 30px;
    }

    .nav-menu a {
        padding: 0;
        border: none;
        font-size: 0.95rem;
        color: #000; 
    }
    
    .nav-menu a:hover {
        color: #666666;
    }
    
    .nav-menu a.user-link {
        border-bottom: none;
    }

    .menu-overlay {
        display: none !important;
    }

    .hero-content h2 {
        font-size: 3rem;
    }

    .products-container.grid-view {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer-content {
        justify-content: space-around;
    }
}

/* Carrello Fluttuante */
.btn-floating-cart {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #000000; 
    color: #ffffff !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 9999; 
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-floating-cart:hover {
    transform: scale(1.1);
    background-color: #333333;
}

/* Icona */
.btn-floating-cart i {
    font-size: 24px;
}

/* Badge numerico */
.badge-cart {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #555555; 
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid #ffffff;
}

/* ========================================
   RESPONSIVE - SMARTPHONE (max 600px)
   ======================================== */
@media (max-width: 600px) {
    .products-container.list-view .product-card {
        flex-direction: column; 
    }
    
    .products-container.list-view .product-image {
        width: 100%;
        height: 200px;
    }
}