/* assets/css/main.css - Stili completi del sito */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    padding-top: 180px; /* Spazio per header e nav fissi */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
}

.header-top {
    background: #f8f8f8;
    padding: 10px 0;
    font-size: 14px;
    text-align: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #000000;
    text-decoration: none;
}

.logo img {
    max-height: 50px;
    width: auto;
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 40px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #000000;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: #f0f0f0;
}

.cart-icon {
    position: relative;
    background: #000000;
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff0000;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation Menu */
.main-nav {
    background: #f8f8f8;
    padding: 15px 0;
    position: fixed;
    top: 118px;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-menu {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.nav-item {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav-item:hover {
    background: #000000;
    color: white;
}

/* Menu Hamburger - Solo Mobile */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 40px;
    right: 20px;
    z-index: 10000;
    background: #000000;
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

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

.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0,0,0,0.3);
}

.mobile-menu-panel.active {
    right: 0;
}

.mobile-menu-header {
    padding: 20px;
    background: #000000;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
}

.mobile-menu-items {
    padding: 20px 0;
}

.mobile-menu-item {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s;
}

.mobile-menu-item:hover {
    background: #f8f8f8;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #000000, #9b9895);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 300;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    background: white;
    color: #000000;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Categories Section */
.categories {
    padding: 60px 0;
    background: #f8f8f8;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    font-weight: 300;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-image {
    height: 200px;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #999;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-info {
    padding: 20px;
    text-align: center;
}

.category-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.category-description {
    color: #666;
    font-size: 14px;
}

/* Products Section */
.products {
    padding: 60px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

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

.product-image {
    height: 300px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.product-brand {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.product-price {
    font-size: 20px;
    font-weight: bold;
    color: #000000;
    margin-bottom: 15px;
}

.product-sale-price {
    text-decoration: line-through;
    color: #999;
    font-size: 16px;
    margin-right: 10px;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 20px;
    flex: 1;
    text-align: center;
}

.btn-outline {
    background: transparent;
    border: 2px solid #000000;
    color: #000000;
}

.btn-outline:hover {
    background: #000000;
    color: white;
}

.btn-primary {
    background: #000000;
    color: white;
}

.btn-primary:hover {
    background: #333;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: #FFFFFF;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
    color: #ccc;
}

/* Messages */
.message {
    background: #4CAF50;
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    text-align: center;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 9999;
    text-decoration: none;
    border: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
    background: #20ba5a;
}

.whatsapp-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.whatsapp-float::before {
    content: "Hai bisogno di aiuto?";
    position: absolute;
    right: 70px;
    background: #333;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-family: Arial, sans-serif;
}

.whatsapp-float:hover::before {
    opacity: 1;
    visibility: visible;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.8);
    }
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
}

.whatsapp-float {
    animation: pulse 2s infinite;
}

/* RESPONSIVE - TUTTO UNIFICATO QUI */
@media (max-width: 768px) {
    body {
        padding-top: 140px; /* Ridotto perché il menu non è più fisso */
    }
    
    /* Mostra il pulsante hamburger */
    .mobile-menu-toggle {
        display: block;
    }
    
    /* NASCONDI il menu orizzontale su mobile */
    .main-nav {
        display: none;
    }
    
    /* Header mobile */
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-bar {
        margin: 0;
        max-width: 100%;
    }
    
    /* Hero */
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    /* Grids */
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    /* WhatsApp */
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-logo {
        width: 32px;
        height: 32px;
    }
    
    .whatsapp-float::before {
        display: none;
    }
}
/* Stock Locations Styles */
.stock-locations-detail {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.stock-number {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
}

.stock-good {
    background-color: #d4edda;
    color: #155724;
}

.stock-medium {
    background-color: #fff3cd;
    color: #856404;
}

.stock-low {
    background-color: #f8d7da;
    color: #721c24;
}

/* Modal Enhancements */
#stockModal .modal-content {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { 
        opacity: 0; 
        transform: translateY(-50px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}