/* ===== GRILLE ===== */
.psv3-wrapper.grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem;
    padding: 1rem 0;
}

@media (max-width: 900px) {
    .psv3-wrapper.grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 580px) {
   /* .psv3-wrapper.grid { grid-template-columns: 1fr !important; }*/
        .psv3-container .psv3-wrapper.grid { grid-template-columns: repeat(2, 1fr) !important; }

}

.psv3-cta-block {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 1.5rem;
    border-top: 1px solid #e8e8e8;
}

.psv3-cta-block p {
    font-size: 1rem;
    color: #0d2738;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.psv3-cta-btn {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    background: #8e1c2a;
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.psv3-cta-btn:hover {
    background: #6b1520;
    color:#fff;
}

/* Valeurs scrollables dans chaque bloc filtre */
.psv3-filter-values {
    max-height: 100px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.psv3-filter-values::-webkit-scrollbar {
    width: 4px;
}

.psv3-filter-values::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.psv3-filter-values::-webkit-scrollbar-thumb {
    background: #8e1c2a;
    border-radius: 2px;
}
.psv3-cat-parent-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #0d2738;
    margin: 0.6rem 0 0.2rem 0;
    letter-spacing: 0.03em;
}

.psv3-cat-child {
    padding-left: 1rem;
    font-size: 0.82rem;
    color: #444;
}

.psv3-cat-child:before {
    content: '└ ';
    color: #aaa;
}

.psv3-cat-l1 { padding-left: 1rem; font-size: 0.85rem; }
.psv3-cat-l2 { padding-left: 2rem; font-size: 0.80rem; }
.psv3-cat-l3 { padding-left: 3rem; font-size: 0.80rem; }

.psv3-cat-l1::before,
.psv3-cat-l2::before,
.psv3-cat-l3::before {
    content: '— ';
    color: #aaa;
    font-size: 0.70rem;
}
.psv3-count-badge {
    font-size: 0.8em;
    color: #999;
    font-weight: 400;
    margin-left: 0.1rem;
}
/* Catégories enfants — indentation */
.psv3-cat-child {
    padding-left: 1rem;
    font-size: 0.82rem;
    color: #555;
}

/* ===== CARTE ===== */
.psv3-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 1rem;
    transition: box-shadow 0.2s ease;
    box-sizing: border-box;
}

.psv3-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

/* ===== IMAGE ===== */
.psv3-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 0.75rem;
}

/* ===== NOM — plus grand ===== */
.psv3-card h3 {
  font-size: 1.25rem;
    font-weight: 700;
    color: #0d2738;
    margin: 0 0 0.5rem 0;
    flex-grow: 1;
    line-height: 1.3;
}

/* ===== PRIX ===== */
.psv3-card .price {
 display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0d2738;
    margin-bottom: 0.75rem;
    text-align: right;
}

/* ===== ACTIONS ===== */
.psv3-actions {
 display: flex;
    flex-direction: column-reverse; /* ← En savoir + en haut, Acheter en bas */
    gap: 0.5rem;
    margin-top: auto;
}

/* Lien boutique — visible comme un vrai bouton secondaire */
.psv3-actions a {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: #8e1c2a;
    text-decoration: none;
    padding: 0.45rem 0.75rem;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.psv3-actions a:hover {
    background: #6b1520;
    color:#FFF;
}

/* Bouton "En savoir +" */
.psv3-actions .ps-more {
  background: #0d2738;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    width: 100%;
}

.psv3-actions .ps-more:hover {
      background: #1a3d55;
}

/* ===== MODAL — centrée en fixed ===== */
#psv3-modal {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0,0,0,0.55);
    z-index: 99999 !important;
    align-items: center;
    justify-content: center;
}

#psv3-modal.open {
    display: flex !important;
}

.psv3-modal-content {
    background: #fff;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    position: relative;
    margin: auto;
}

/* Bouton fermer */
.psv3-close {
    display: block;
    text-align: right;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    color: #8e1c2a;
    font-weight: bold;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
    user-select: none;
}

.psv3-close:hover { color: #5a0f1a; }

/* Corps scrollable */
.psv3-body {
    overflow-y: auto;
    padding-right: 0.5rem;
    flex: 1;
}

.psv3-body h2 {
    font-size: 1.5em;
    color: #0d2738;
    margin: 0 0 0.75rem 0;
}
.psv3-body h3 {
    font-size: 1.2em;
    color: #0d2738;
    margin: 0 0 0.75rem 0;
}
.psv3-body p {font-size:0.9em;}

/* Table caractéristiques */
.psv3-body table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.psv3-body table td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: top;
}

.psv3-body table td:first-child {
    font-weight: 600;
    color: #0d2738;
    white-space: nowrap;
    width: 40%;
}

.psv3-card .price.old {
    font-size: 0.85rem;
    font-weight: 400;
    color: #999;
    text-decoration: line-through;
    text-align: right;
    display: block;
    margin-bottom: 0;
}

.psv3-card .price.promo {
    color: #8e1c2a;
    font-size: 1.15rem;
}

/* Filtres */
.psv3-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.psv3-filters select {
    padding: 0.45rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #0d2738;
    background: #fff;
    cursor: pointer;
}

.psv3-filters select:focus {
    outline: 2px solid #8e1c2a;
}

/* Pagination */
.psv3-pagination {
    margin-top: 2rem;
    text-align: center;
}

.psv3-pages {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.psv3-page {
    padding: 0.4rem 0.8rem;
    border: 1px solid #0d2738;
    border-radius: 4px;
    background: #fff;
    color: #0d2738;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.psv3-page:hover,
.psv3-page.active {
    background: #0d2738;
    color: #fff;
}

.psv3-count {
    font-size: 0.8rem;
    color: #888;
    margin: 0;
}

/* Transition grille */
.psv3-wrapper {
    transition: opacity 0.2s ease;
}

/* ===== LAYOUT GÉNÉRAL ===== */
.psv3-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* ===== SIDEBAR ===== */
.psv3-sidebar {
    width: 220px;
    flex-shrink: 0;
}

.psv3-sidebar-inner {
    position: relative;
    top: 100px; /* hauteur header WP — ajuste si besoin */
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 1.25rem;
}
.psv3-container {
    position: relative; /* nécessaire pour le positionnement absolu */
}

.psv3-filter-block {
    margin-bottom: 1.5rem;
}

.psv3-filter-block h4 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0d2738;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #8e1c2a;
}

/* Cases à cocher marques */
.psv3-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #333;
    cursor: pointer;
    padding: 0.10rem 0;
    line-height: 1.3;
    font-size: 0.7em;
}

.psv3-checkbox input[type="checkbox"] {
    accent-color: #8e1c2a;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    cursor: pointer;
}

.psv3-checkbox:hover {
    color: #8e1c2a;
}

/* Boutons radio prix */
.psv3-radio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #333;
    cursor: pointer;
    padding: 0.25rem 0;
}

.psv3-radio input[type="radio"] {
    accent-color: #8e1c2a;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    cursor: pointer;
}

.psv3-radio:hover {
    color: #8e1c2a;
}

/* Bouton reset */
.psv3-reset {
    width: 100%;
    padding: 0.4rem;
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #666;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all 0.2s;
}

.psv3-reset:hover {
    border-color: #8e1c2a;
    color: #8e1c2a;
}

/* ===== MAIN ===== */
.psv3-main {
    flex: 1;
    min-width: 0;
}

.psv3-results-info {
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #666;
}
.psv3-empty {
    display: block;
    text-align: center;
    color: #999;
    padding: 3rem 1rem;
    font-size: 0.9rem;
}
.psv3-wrapper.grid:empty,
.psv3-wrapper.grid {
    width: 100%;
    min-width: 0;
}
/* ===== TOGGLE MOBILE ===== */
.psv3-filter-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: #0d2738;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1rem;
}

.psv3-active-count {
    background: #8e1c2a;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.psv3-sidebar-close {
    display: none;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
}

.psv3-sidebar-close button {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: #8e1c2a;
    font-weight: bold;
    padding: 0;
    line-height: 1;
}

@media (max-width: 768px) {

    .psv3-filter-toggle {
        display: flex;
    }

    .psv3-layout {
        flex-direction: column;
        gap: 1rem;
    }

    /* Sidebar en modal centré */
    .psv3-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        z-index: 9998;
        background: rgba(0, 0, 0, 0.6);
        align-items: center;
        justify-content: center;
    }

    .psv3-sidebar.open {
        display: flex !important;
    }

    .psv3-sidebar-inner {
        position: relative !important;
        top: auto !important;
        width: 85vw !important;
        max-width: 320px;
        max-height: 75vh;
        overflow-y: auto;
        border-radius: 12px;
        padding: 1rem;
        box-shadow: 0 8px 32px rgba(0,0,0,0.3);
        background: #fff;
    }

    .psv3-sidebar-close {
        display: flex;
    }

    /* 2 vélos par ligne */
    .psv3-wrapper.grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .psv3-card h3 {
        font-size: 0.8rem;
    }

    .psv3-card .price,
    .psv3-card .price.promo,
    .psv3-card .price.old {
        font-size: 0.8rem;
    }

    .psv3-actions a,
    .psv3-actions .ps-more {
        font-size: 0.7rem;
        padding: 0.35rem 0.4rem;
    }
}

.psv3-modal-img {
    text-align: center;
    margin: 0.75rem 0 1rem 0;
}

.psv3-modal-img img {
    max-height: 600px;
    max-width: 100%;
    object-fit: contain;
}

/* Cacher le bouton close sur desktop */
.psv3-sidebar-close {
    display: none;
}

/* Bouton imprimer */
.psv3-print-btn {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 1rem;
    padding: 0.5rem;
    background-color: #0d2738!important;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.psv3-print-btn:hover { background-color: #1a3d55!important; }

/* Header impression — caché à l'écran */
.psv3-print-header {
    display: none;
}

/* ===== MEDIA PRINT ===== */
@media print {

    /* Cache tout sauf le contenu de la popup */
    body > * { display: none !important; }

    #psv3-modal,
    #psv3-modal * { display: block !important; }

    #psv3-modal {
        position: static !important;
        background: none !important;
    }

    .psv3-modal-content {
        box-shadow: none !important;
        max-height: none !important;
        width: 100% !important;
        padding: 0 !important;
    }

    /* Cache les boutons à l'impression */
    .psv3-close,
    .psv3-print-btn,
    .psv3-buy-btn { display: none !important; }

    /* Affiche le header avec logo et infos */
    .psv3-print-header {
        display: flex !important;
        align-items: center;
        gap: 1.5rem;
        border-bottom: 2px solid #8e1c2a;
        padding-bottom: 1rem;
        margin-bottom: 1.5rem;
    }

    .psv3-print-logo {
        max-height: 60px;
        width: auto;
    }

    .psv3-print-shop {
        font-size: 0.85rem;
        line-height: 1.6;
        color: #333;
    }

    /* Mise en page impression */
    .psv3-modal-img img {
        max-height: 250px;
        display: block;
        margin: 0 auto 1rem;
    }

    .psv3-body table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.85rem;
    }

    .psv3-body table td {
        padding: 0.4rem 0.6rem;
        border: 1px solid #ddd;
    }

    .psv3-body table td:first-child {
        font-weight: 600;
        background: #f5f5f5;
        width: 40%;
    }
}

@media (max-width: 580px) {
    .psv3-wrapper.grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .psv3-container .psv3-wrapper.grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
}

@media (max-width: 768px) {
    .psv3-sidebar-inner .psv3-sidebar-close {
        display: flex !important;
        justify-content: flex-end !important;
        margin-bottom: 0.75rem !important;
    }

    .psv3-sidebar-inner .psv3-sidebar-close button {
        display: block !important;
        font-size: 1.2rem !important;
        color: #8e1c2a !important;
        font-weight: bold !important;
        background: none !important;
        border: none !important;
        cursor: pointer !important;
        padding: 0 !important;
    }
}

.psv3-buy-btn {
    display: block;
    text-align: center;
    margin-top: 1.25rem;
    padding: 0.6rem 1rem;
    background: #8e1c2a;
    color: #fff!important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.psv3-buy-btn:hover {
    background: #6b1520;
    color:#fff !important;
}