/* Importa solo i CSS necessari per la home */
@import url('categories.css');

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
video,
svg {
    max-width: 100%;
}

/* Contenuto principale */
.main-content {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem 2rem;
    position: relative;
    min-width: 0;
}

/* Resto del main.css rimane uguale... */

/* Contenuto principale */
.main-content {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    min-width: 0;
}

/* Hero Section */
.hero-section {
    margin-bottom: 4rem;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.62) 0%, rgba(15, 23, 42, 0.36) 50%, rgba(15, 23, 42, 0.08) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, 0.34) 0%, rgba(15, 23, 42, 0.02) 58%),
        url('https://images.unsplash.com/photo-1556742049-0cfed4f6a45d?w=1400&h=820&fit=crop') center / cover no-repeat,
        #0f172a;
    border-radius: 20px;
    overflow: hidden;
    padding: clamp(2.5rem, 6vw, 5.5rem) clamp(1.25rem, 5vw, 4rem);
    max-width: 100%;
    min-height: min(620px, calc(100vh - 190px));
    position: relative;
    display: grid;
    align-items: end;
    isolation: isolate;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
    animation: heroImageSettle 1s ease-out both;
}

.hero-container {
    display: grid;
    align-items: end;
    grid-template-columns: minmax(0, 760px);
    gap: 1.4rem;
    min-width: 0;
    position: relative;
    z-index: 3;
}

.hero-content {
    min-width: 0;
    max-width: 760px;
    animation: heroTextReveal 0.8s ease-out both;
}

.hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.1;
    color: #ffffff;
    margin-bottom: 1.5rem;
    text-shadow: 0 8px 32px rgba(15, 23, 42, 0.42);
}

.highlight {
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 2px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #e2e8f0;
    margin-bottom: 0;
    max-width: 600px;
    text-shadow: 0 4px 20px rgba(15, 23, 42, 0.46);
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 2.5rem;
}

.stat {
    text-align: center;
}

.stat-number {
    font-family: 'Poppins', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.hero-image {
    display: none;
}

.hero-image-container {
    display: none;
}

.hero-img {
    display: none;
}

.hero-image-container::after {
    content: none;
}

.hero-badge {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    z-index: 2;
    width: fit-content;
    min-width: 0;
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    padding: 0.8rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(12px);
    animation: heroTextReveal 0.8s ease-out 0.15s both;
}

.badge-content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.badge-content i {
    font-size: 1rem;
    color: #fbbf24;
    filter: drop-shadow(0 2px 8px rgba(251, 191, 36, 0.35));
}

.badge-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.badge-subtitle {
    font-size: 0.75rem;
    opacity: 0.9;
}

@keyframes heroTextReveal {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroImageSettle {
    from {
        opacity: 0.88;
        background-position: center 42%;
    }
    to {
        opacity: 1;
        background-position: center center;
    }
}

/* Fiducia utenti */
.trust-section {
    margin-bottom: 4rem;
    max-width: 100%;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1.2rem;
    min-width: 0;
}

.trust-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    min-width: 0;
}

.trust-item > div {
    min-width: 0;
}

.trust-item i {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 1.15rem;
}

.trust-item h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    color: #1e293b;
    margin: 0 0 0.45rem;
    overflow-wrap: anywhere;
}

.trust-item p {
    color: #64748b;
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

/* Prodotti in evidenza */
.featured-products {
    margin-bottom: 4rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
}

.section-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.section-link:hover {
    gap: 0.8rem;
    color: #1d4ed8;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 2rem;
    min-width: 0;
}

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border-color: #cbd5e1;
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(90deg, #ef4444, #f87171);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.stars {
    color: #fbbf24;
    display: flex;
    gap: 0.1rem;
}

.rating-value {
    font-weight: 600;
    color: #1e293b;
}

.sellers-count {
    font-size: 0.85rem;
    color: #64748b;
}

.product-prices {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 10px;
}

.price-min, .price-max {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.price-label {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.3rem;
}

.price-value {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
}

.price-min .price-value {
    color: #10b981;
}

.price-max .price-value {
    color: #ef4444;
}

.product-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: auto;
}

.btn-compare, .btn-details {
    flex: 1;
    padding: 0.8rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.9rem;
}

.btn-compare {
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    color: white;
}

.btn-compare:hover {
    background: linear-gradient(90deg, #1d4ed8, #2563eb);
    transform: translateY(-2px);
}

.btn-details {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.btn-details:hover {
    background-color: #e2e8f0;
    color: #334155;
}

.no-products {
    text-align: center;
    grid-column: 1 / -1;
    padding: 3rem;
    color: #64748b;
    font-size: 1.1rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 4rem;
    color: white;
    max-width: 100%;
    overflow: hidden;
}

.cta-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    min-width: 0;
}

.cta-content {
    flex: 1;
    min-width: 0;
}

.cta-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-text {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 2rem;
    max-width: 500px;
}

.newsletter-form {
    max-width: 500px;
    min-width: 0;
}

.newsletter-input-group {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.newsletter-input {
    flex: 1;
    min-width: 0;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    color: white;
    font-size: 1rem;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-input:focus {
    outline: none;
}

.newsletter-button {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 0 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.newsletter-button:hover {
    background: linear-gradient(90deg, #2563eb, #1d4ed8);
}

.newsletter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #cbd5e1;
}

.newsletter-checkbox a {
    color: #60a5fa;
    text-decoration: none;
}

.newsletter-checkbox a:hover {
    text-decoration: underline;
}

.cta-image {
    flex: 0 0 300px;
    min-width: 0;
}

.cta-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* Aggiungi alla fine del file */
.products-loader {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: #f8fafc;
    border-radius: 16px;
    color: #64748b;
}

.products-loader i {
    font-size: 2.5rem;
    color: #2563eb;
    margin-bottom: 1rem;
}

.products-loader span {
    font-size: 1.1rem;
}

@media (max-width: 1200px) {
    .cta-container {
        flex-direction: column;
        text-align: center;
    }

    .cta-content {
        width: 100%;
    }

    .cta-image {
        flex: none;
        width: min(100%, 520px);
    }

    .cta-text,
    .newsletter-form {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }

    .hero-section {
        min-height: 360px;
        align-items: end;
        padding: 1.5rem 1rem;
        border-radius: 16px;
        margin-bottom: 2.5rem;
    }

    .cta-section {
        border-radius: 16px;
        padding: 2rem 1rem;
        margin-bottom: 2.5rem;
    }

    .hero-title {
        font-size: 1.65rem;
        line-height: 1.15;
        margin-bottom: 0.85rem;
    }

    .hero-subtitle,
    .cta-text {
        font-size: 0.95rem;
    }

    .hero-badge {
        width: fit-content;
        max-width: 100%;
        margin-top: 1rem;
    }

    .hero-image-container::after {
        content: none;
    }

    .hero-section {
        background:
            linear-gradient(0deg, rgba(15, 23, 42, 0.7) 0%, rgba(15, 23, 42, 0.38) 54%, rgba(15, 23, 42, 0.08) 100%),
            linear-gradient(90deg, rgba(15, 23, 42, 0.42) 0%, rgba(15, 23, 42, 0.08) 100%),
            url('https://images.unsplash.com/photo-1556742049-0cfed4f6a45d?w=900&h=560&fit=crop') center 42% / cover no-repeat,
            #0f172a;
    }

    .trust-section,
    .featured-products {
        margin-bottom: 2.5rem;
    }

    .trust-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .trust-item {
        padding: 1rem;
        border-radius: 12px;
    }

    .section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.7rem;
    }

    .section-title,
    .cta-title {
        font-size: 1.7rem;
    }

    .newsletter-input-group {
        flex-direction: column;
    }

    .newsletter-button {
        justify-content: center;
        padding: 0.9rem 1rem;
    }
}

@media (max-width: 420px) {
    .hero-section {
        min-height: 320px;
        padding: 1.25rem 0.9rem;
    }

    .hero-title {
        font-size: 1.42rem;
    }

    .hero-subtitle {
        font-size: 0.88rem;
        line-height: 1.45;
    }

    .trust-item {
        flex-direction: column;
    }

    .trust-item i {
        width: 38px;
        height: 38px;
    }
}
