/*
 * PrezzoTop – Card Prodotto Stile Unificato
 * Usato da: ptop-price-ranges.php, ptop-category-pages.php, ptop-brand-pages.php
 * Versione: 1.0.0
 */

/* ─── Card contenitore ─── */
.ptop-pc {
    display: block;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #ccc;
    border-radius: 0 12px 12px 0;
    padding: 12px 14px;
    text-decoration: none;
    color: #111827;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: box-shadow .2s;
    box-sizing: border-box;
    width: 100%;
    margin-bottom: 10px;
}
.ptop-pc:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.09); }

/* ─── Riga superiore: rank + immagine + badge ─── */
.ptop-pc-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

/* ─── Numero rank ─── */
.ptop-pc-rank {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    font-family: system-ui, sans-serif;
    transition: box-shadow .2s, transform .2s;
}
.ptop-pc:hover .ptop-pc-rank {
    transform: scale(1.12);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* ─── Immagine prodotto ─── */
.ptop-pc-img {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
    background: #f9fafb;
    display: block;
    aspect-ratio: 1 / 1;
}

/* ─── Badge score ─── */
.ptop-pc-badge {
    margin-left: auto;
    flex-shrink: 0;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    font-family: system-ui, sans-serif;
}

/* ─── Titolo prodotto ─── */
.ptop-pc-title {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
    margin-bottom: 6px;
    font-family: system-ui, sans-serif;
}

/* ─── Riga inferiore: prezzo + data ─── */
.ptop-pc-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ptop-pc-price {
    font-size: 15px;
    font-weight: 800;
    color: #6C4176;
    font-family: system-ui, sans-serif;
}

.ptop-pc-date {
    font-size: 11px;
    color: #9ca3af;
    font-family: system-ui, sans-serif;
}

/* ─── Lista contenitore ─── */
.ptop-pc-list {
    display: grid;
    gap: 10px;
}

/* ─────────────────────────────────────────────
   FASCIA NAV — collassabile solo su mobile
───────────────────────────────────────────── */

/* Pill container: sempre visibile su desktop */
.ptop-fascia-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Heading desktop: visibile, toggle nascosto */
.ptop-fascia-heading { display: block; }
.ptop-fascia-toggle  { display: none; }

/* ── Mobile (≤ 640px) ── */
@media (max-width: 640px) {

    /* Nascondi heading statico, mostra pulsante toggle */
    .ptop-fascia-heading { display: none; }

    .ptop-fascia-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        background: #f9fafb;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        padding: 11px 14px;
        font-size: 13px;
        font-weight: 700;
        color: #111827;
        cursor: pointer;
        font-family: system-ui, sans-serif;
        margin-bottom: 0;
        gap: 8px;
        text-align: left;
        -webkit-tap-highlight-color: transparent;
    }
    .ptop-fascia-toggle:active {
        background: #f3eaf7;
    }

    /* Chevron: ruota a 180° quando aperto */
    .ptop-fascia-chevron {
        flex-shrink: 0;
        color: #6C4176;
        transition: transform 0.25s ease;
    }
    .ptop-fascia-toggle[aria-expanded="true"] .ptop-fascia-chevron {
        transform: rotate(180deg);
    }

    /* Pills collassate di default su mobile */
    .ptop-fascia-pills {
        display: none;
        margin-top: 10px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .ptop-fascia-pills.ptop-fascia-open {
        display: flex;
        animation: ptop-fascia-in 0.2s ease;
    }
}

@keyframes ptop-fascia-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Rispetta reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .ptop-fascia-chevron       { transition: none !important; }
    .ptop-fascia-pills.ptop-fascia-open { animation: none !important; }
}

/* ─────────────────────────────────────────────
   BLOCCO SEO — stile condiviso tra tutte le pagine
   Usato da: ptop-brand-pages.php, ptop-category-pages.php,
             ptop-price-range-pages.php
   Sostituisce gli stili inline ripetuti in ogni file.
───────────────────────────────────────────── */

.ptop-seo-block {
    background: #f3eaf7;
    border: 1.5px solid #e8d5f0;
    border-radius: 16px;
    padding: 28px 32px;
    margin-top: 32px;
    font-family: system-ui, sans-serif;
}

.ptop-seo-block h2 {
    font-size: 18px;
    font-weight: 800;
    color: #6C4176;
    margin: 0 0 12px;
    line-height: 1.3;
}

.ptop-seo-block p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.7;
    margin: 0 0 10px;
}

.ptop-seo-block p:last-child {
    margin-bottom: 0;
}

.ptop-seo-block .ptop-seo-note {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}

/* ─── Sezione link correlati ─── */
.ptop-seo-correlate {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #f3f4f6;
    font-family: system-ui, sans-serif;
}

.ptop-seo-correlate h3 {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px;
}

.ptop-seo-correlate-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ptop-seo-correlate-pills a {
    padding: 5px 14px;
    background: #fff;
    color: #6C4176;
    border: 1.5px solid #e8d5f0;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, border-color .15s;
    font-family: system-ui, sans-serif;
}

.ptop-seo-correlate-pills a:hover {
    background: #f3eaf7;
    border-color: #c4a8d8;
}

/* ─── Badge fascia (H1 area) ─── */
.ptop-fascia-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 700;
    font-family: system-ui, sans-serif;
    margin-bottom: 16px;
}

/* ─── Intestazione pagina classifica ─── */
.ptop-page-header {
    margin-bottom: 24px;
    font-family: system-ui, sans-serif;
}

.ptop-page-header h1 {
    font-size: 24px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 8px;
    line-height: 1.3;
}

.ptop-page-header .ptop-page-intro {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 8px;
}

.ptop-page-header .ptop-page-meta {
    font-size: 12px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 640px) {
    .ptop-seo-block {
        padding: 20px 18px;
    }
    .ptop-page-header h1 {
        font-size: 20px;
    }
}
