/* === HOMEPAGE E-COMMERCE ITALFRIGO === */

/* Variabili */
:root {
    --primary-color: #2c5aa0;
    --secondary-color: #f8f9fa;
    --accent-color: #ffc107;
    --text-color: #333;
    --text-light: #666;
    --border-color: #ddd;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
    background-color: #f8f9fa;
}

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

/* === HERO SECTION === */
.ecommerce-hero {
    background: linear-gradient(135deg, var(--primary-color), #1e3f73);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* === BOTTONI === */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--text-color);
}

.btn-primary:hover {
    background: #e6ac00;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

/* === STATISTICHE === */
.ecommerce-stats {
    background: white;
    padding: 3rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
}

/* === SEZIONI === */
.featured-products,
.main-categories,
.advantages {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.section-footer {
    text-align: center;
    margin-top: 3rem;
}

/* === GRIGLIA PRODOTTI IN EVIDENZA === */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.featured-product {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
}

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

.featured-product-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.featured-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.featured-product:hover .featured-product-image img {
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.featured-product-info {
    padding: 1.5rem;
}

.featured-product-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.featured-product-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.featured-product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.featured-product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* === GRIGLIA CATEGORIE === */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.category-description {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.category-count {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* === VANTAGGI === */
.advantages {
    background: white;
}

.advantages-subtitle {
    font-style: italic;
    color: var(--primary-color);
    font-weight: 500;
    margin-top: 0.5rem;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.advantage-item {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
}

.advantage-item.featured {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid var(--accent-color);
    transform: scale(1.02);
}

.advantage-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.advantage-item.featured:hover {
    transform: scale(1.02) translateY(-5px);
}

.advantage-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    color: var(--text-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.advantage-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.advantage-item h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.advantage-item p {
    color: var(--text-light);
    line-height: 1.6;
}

.advantage-item.featured p {
    color: var(--text-color);
    font-weight: 500;
}

/* === SERVIZI PREMIUM === */
.premium-services {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 4rem 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.service-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
}

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

.service-card.premium {
    border: 2px solid var(--accent-color);
    position: relative;
}

.service-card.premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), #e6ac00);
}

.service-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
    position: relative;
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-header h3 {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-bottom: 0;
}

.service-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    color: var(--text-color);
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.service-content {
    padding: 0 2rem 2rem;
}

.service-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-weight: 500;
}

.service-content ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.service-content ul li {
    padding: 0.5rem 0;
    color: var(--text-color);
    font-size: 0.95rem;
}

.service-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    color: #856404;
}

.services-cta {
    text-align: center;
}

.cta-box {
    background: white;
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    box-shadow: var(--box-shadow);
    max-width: 800px;
    margin: 0 auto;
}

.cta-box h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.cta-box p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.cta-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.stat span {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
    display: block;
    margin-top: 0.5rem;
}

/* === CTA FINALE === */
.final-cta {
    background: linear-gradient(135deg, var(--primary-color), #1e3f73);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* === FOOTER === */
.ecommerce-footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--accent-color);
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-links a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
}

.footer-bottom p {
    color: #95a5a6;
    font-size: 0.9rem;
    margin: 0;
}

/* === LOADING === */
.loading-container {
    text-align: center;
    padding: 3rem;
}

.loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-large {
        width: 100%;
        max-width: 300px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    
    .advantage-item.featured {
        transform: none;
    }
    
    .advantage-item.featured:hover {
        transform: translateY(-5px);
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-stats {
        gap: 2rem;
    }
    
    .cta-box {
        padding: 2rem 1rem;
    }
    
    .cta-box h3 {
        font-size: 1.5rem;
    }
}
