/* ===================================================
   Landing Prodotti Ads – CSS Ottimizzato Google Ads
   PC: griglia 3 colonne | Mobile: griglia 2 colonne
   =================================================== */

:root {
    --lpa-accent: #0ea5e9;
    --lpa-accent-dark: color-mix(in srgb, var(--lpa-accent) 80%, black);
    --lpa-dark: #111827;
    --lpa-text: #374151;
    --lpa-muted: #6b7280;
    --lpa-light: #f9fafb;
    --lpa-border: #e5e7eb;
    --lpa-white: #ffffff;
    --lpa-success: #16a34a;
    --lpa-sale: #dc2626;
    --lpa-radius: 4px;
}

/* ── Reset dentro il container ── */
.lpa-landing *, .lpa-landing *::before, .lpa-landing *::after {
    box-sizing: border-box;
}
.lpa-landing {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--lpa-text);
    line-height: 1.5;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ── Trust Banner ── */
.lpa-trust-banner {
    background: var(--lpa-dark);
    color: var(--lpa-white);
    text-align: center;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 32px;
}
.lpa-trust-banner p {
    margin: 0;
}

/* ── Hero ── */
.lpa-hero {
    text-align: center;
    padding: 40px 0 32px;
}
.lpa-hero-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--lpa-dark);
    margin: 0 0 8px;
    line-height: 1.2;
}
.lpa-hero-sub {
    font-size: 16px;
    color: var(--lpa-muted);
    margin: 0 0 24px;
}

/* ── Filter Toggle (solo mobile) ── */
.lpa-filter-toggle {
    display: none;
}

/* ── Category Nav Pills ── */
.lpa-cat-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}
.lpa-cat-pill {
    display: inline-block;
    padding: 10px 20px;
    background: var(--lpa-white);
    border: 2px solid var(--lpa-border);
    color: var(--lpa-dark);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}
.lpa-cat-pill:hover,
.lpa-cat-pill:focus {
    background: var(--lpa-accent);
    border-color: var(--lpa-accent);
    color: var(--lpa-white);
}

/* ── Section ── */
.lpa-section {
    padding: 40px 0 24px;
    border-top: 2px solid var(--lpa-border);
}
.lpa-section:first-of-type {
    border-top: none;
}
.lpa-section-header {
    margin-bottom: 24px;
}
.lpa-section-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--lpa-dark);
    margin: 0 0 4px;
    position: relative;
    display: inline-block;
}
.lpa-section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--lpa-accent);
    margin-top: 8px;
}
.lpa-section-desc {
    font-size: 14px;
    color: var(--lpa-muted);
    margin: 8px 0 0;
}

/* ── Grid: 3 colonne PC / 2 colonne Mobile ── */
.lpa-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ── Card Prodotto ── */
.lpa-card {
    background: var(--lpa-white);
    border: 1px solid var(--lpa-border);
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.lpa-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}

/* Badge Sale */
.lpa-badge-sale {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--lpa-sale);
    color: var(--lpa-white);
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Immagine */
.lpa-card-img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--lpa-light);
}
.lpa-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.lpa-card:hover .lpa-card-img img {
    transform: scale(1.05);
}

/* Body */
.lpa-card-body {
    padding: 16px;
}
.lpa-card-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.lpa-card-title a {
    color: var(--lpa-dark);
    text-decoration: none;
}
.lpa-card-title a:hover {
    color: var(--lpa-accent);
}

/* Stars */
.lpa-stars {
    font-size: 14px;
    color: #f59e0b;
    margin-bottom: 6px;
}
.lpa-rating-count {
    font-size: 12px;
    color: var(--lpa-muted);
    margin-left: 4px;
}

/* Prezzo */
.lpa-card-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--lpa-dark);
    margin-bottom: 12px;
}
.lpa-card-price del {
    font-size: 14px;
    color: var(--lpa-muted);
    font-weight: 400;
    margin-right: 6px;
}
.lpa-card-price ins {
    text-decoration: none;
    color: var(--lpa-sale);
}

/* CTA Button */
.lpa-btn-cart {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    color: var(--lpa-white);
    background: var(--lpa-accent);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.lpa-btn-cart:hover {
    background: var(--lpa-accent-dark, #0284c7);
    color: var(--lpa-white);
}
.lpa-btn-cart:active {
    transform: scale(0.98);
}
.lpa-btn-cart.loading {
    opacity: 0.6;
    pointer-events: none;
}
.lpa-btn-cart.added {
    background: var(--lpa-success);
}

/* Vedi Tutti */
.lpa-see-all {
    text-align: center;
    margin-top: 24px;
}
.lpa-see-all-btn {
    display: inline-block;
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 700;
    color: var(--lpa-accent);
    border: 2px solid var(--lpa-accent);
    background: transparent;
    text-decoration: none;
    transition: all 0.2s ease;
}
.lpa-see-all-btn:hover {
    background: var(--lpa-accent);
    color: var(--lpa-white);
}

/* ── Trust Footer ── */
.lpa-trust-footer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 40px 0;
    margin-top: 32px;
    border-top: 2px solid var(--lpa-border);
}
.lpa-trust-item {
    text-align: center;
    padding: 20px 8px;
    background: var(--lpa-light);
}
.lpa-trust-icon {
    display: block;
    font-size: 28px;
    margin-bottom: 8px;
}
.lpa-trust-item strong {
    display: block;
    font-size: 14px;
    color: var(--lpa-dark);
    margin-bottom: 2px;
}
.lpa-trust-item span:last-child {
    font-size: 12px;
    color: var(--lpa-muted);
}

/* ── Toast ── */
.lpa-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--lpa-success);
    color: var(--lpa-white);
    padding: 16px 24px;
    font-size: 14px;
    font-weight: 700;
    z-index: 99999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.lpa-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Empty state */
.lpa-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--lpa-muted);
    font-size: 16px;
}

/* ── RESPONSIVE ── */

/* Tablet (griglia 3 col) */
@media (max-width: 1024px) {
    .lpa-grid {
        gap: 16px;
    }
    .lpa-card-body {
        padding: 12px;
    }
}

/* Mobile: griglia 2 colonne */
@media (max-width: 767px) {
    .lpa-landing {
        padding: 0 12px;
    }
    .lpa-hero {
        padding: 24px 0 20px;
    }
    .lpa-hero-title {
        font-size: 24px;
    }
    .lpa-hero-sub {
        font-size: 14px;
    }
    /* Toggle filtri mobile */
    .lpa-filter-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        padding: 12px 20px;
        margin-bottom: 12px;
        font-size: 14px;
        font-weight: 700;
        color: var(--lpa-accent);
        background: var(--lpa-white);
        border: 2px solid var(--lpa-accent);
        cursor: pointer;
        transition: all 0.2s ease;
    }
    .lpa-filter-toggle:hover {
        background: var(--lpa-accent);
        color: var(--lpa-white);
    }
    .lpa-filter-toggle[aria-expanded="true"] {
        background: var(--lpa-accent);
        color: var(--lpa-white);
    }
    .lpa-toggle-arrow {
        font-size: 12px;
        transition: transform 0.3s ease;
    }
    .lpa-filter-toggle[aria-expanded="true"] .lpa-toggle-arrow {
        transform: rotate(180deg);
    }

    /* Nav nascosta di default su mobile */
    .lpa-cat-nav {
        display: none;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        margin-bottom: 8px;
    }
    .lpa-cat-nav.open {
        display: flex;
    }

    .lpa-cat-pill {
        padding: 8px 14px;
        font-size: 13px;
    }
    .lpa-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .lpa-card-body {
        padding: 10px;
    }
    .lpa-card-title {
        font-size: 13px;
    }
    .lpa-card-price {
        font-size: 16px;
        margin-bottom: 8px;
    }
    .lpa-card-price del {
        font-size: 12px;
    }
    .lpa-btn-cart {
        padding: 10px;
        font-size: 12px;
    }
    .lpa-stars {
        font-size: 12px;
    }
    .lpa-section-title {
        font-size: 20px;
    }
    .lpa-trust-footer {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .lpa-trust-item {
        padding: 16px 8px;
    }
    .lpa-toast {
        left: 12px;
        right: 12px;
        bottom: 12px;
        text-align: center;
    }
}

/* Mobile piccolo */
@media (max-width: 380px) {
    .lpa-grid {
        gap: 8px;
    }
    .lpa-card-title {
        font-size: 12px;
        -webkit-line-clamp: 1;
    }
    .lpa-card-price {
        font-size: 15px;
    }
}

/* ── Animazione ingresso card ── */
.lpa-card {
    animation: lpaFadeUp 0.4s ease backwards;
}
.lpa-card:nth-child(1) { animation-delay: 0s; }
.lpa-card:nth-child(2) { animation-delay: 0.05s; }
.lpa-card:nth-child(3) { animation-delay: 0.1s; }
.lpa-card:nth-child(4) { animation-delay: 0.15s; }
.lpa-card:nth-child(5) { animation-delay: 0.2s; }
.lpa-card:nth-child(6) { animation-delay: 0.25s; }

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