/* Similar Products : mise en page minimale, le reste vient du thème. */
.similar-products { clear: both; margin: 2.5em 0 1.5em; box-sizing: border-box; }
.similar-products > h2 { margin-bottom: 1em; }

/* Grille : N pins par rangée selon l'appareil (ordinateur dès 1000 px, tablette dès 600 px). */
.sp-grid ul.products { display: grid; grid-template-columns: repeat(var(--sp-cols-d, 5), minmax(0, 1fr)); gap: 1.2em; margin: 0; padding: 0; list-style: none; }
.sp-grid ul.products::before, .sp-grid ul.products::after { display: none !important; content: none !important; }
.sp-grid ul.products li.product { width: auto !important; float: none !important; margin: 0 !important; clear: none !important; }

/* Slider : défilement horizontal par accroche, sans bibliothèque. */
.sp-slider-wrap { position: relative; }
.sp-slider ul.products { display: flex; gap: 1em; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0; padding: 0; list-style: none; }
.sp-slider ul.products::-webkit-scrollbar { display: none; }
.sp-slider ul.products::before, .sp-slider ul.products::after { display: none !important; content: none !important; }
.sp-slider ul.products li.product { flex: 0 0 calc((100% - (var(--sp-view, 3) - 1) * 1em) / var(--sp-view, 3)); width: auto !important; float: none !important; margin: 0 !important; scroll-snap-align: start; }
.sp-slider { --sp-view: var(--sp-view-d, 3); }
.sp-nav { position: absolute; top: 40%; z-index: 2; width: 2.4em; height: 2.4em; padding: 0; border: 1px solid rgba(0, 0, 0, .2); border-radius: 50%; background: rgba(255, 255, 255, .92); color: #222; font-size: 1.4em; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.sp-nav[hidden] { display: none; }
.sp-prev { left: -.6em; }
.sp-next { right: -.6em; }

/* Carte du plugin (option "Override theme's template"). */
.sp-card { list-style: none; text-align: center; }
.sp-card img { max-width: 100%; height: auto; }
.sp-card .woocommerce-loop-product__title { font-size: 1em; margin: .6em 0 .2em; }

@media (max-width: 999px) { .sp-grid ul.products { grid-template-columns: repeat(var(--sp-cols-t, 3), minmax(0, 1fr)); } .sp-slider { --sp-view: var(--sp-view-t, 2); } }
@media (max-width: 599px) { .sp-grid ul.products { grid-template-columns: repeat(var(--sp-cols-m, 3), minmax(0, 1fr)); } .sp-slider { --sp-view: var(--sp-view-m, 1); } }

/* Nombre de pins affichés par appareil (le reste est masqué). */
@media (min-width: 1000px) { .sp-show-d-1 ul.products > li:nth-child(n+2) { display: none; } }
@media (min-width: 1000px) { .sp-show-d-2 ul.products > li:nth-child(n+3) { display: none; } }
@media (min-width: 1000px) { .sp-show-d-3 ul.products > li:nth-child(n+4) { display: none; } }
@media (min-width: 1000px) { .sp-show-d-4 ul.products > li:nth-child(n+5) { display: none; } }
@media (min-width: 1000px) { .sp-show-d-5 ul.products > li:nth-child(n+6) { display: none; } }
@media (min-width: 1000px) { .sp-show-d-6 ul.products > li:nth-child(n+7) { display: none; } }
@media (min-width: 1000px) { .sp-show-d-7 ul.products > li:nth-child(n+8) { display: none; } }
@media (min-width: 1000px) { .sp-show-d-8 ul.products > li:nth-child(n+9) { display: none; } }
@media (min-width: 1000px) { .sp-show-d-9 ul.products > li:nth-child(n+10) { display: none; } }
@media (min-width: 1000px) { .sp-show-d-10 ul.products > li:nth-child(n+11) { display: none; } }
@media (min-width: 1000px) { .sp-show-d-11 ul.products > li:nth-child(n+12) { display: none; } }
@media (min-width: 1000px) { .sp-show-d-12 ul.products > li:nth-child(n+13) { display: none; } }
@media (min-width: 600px) and (max-width: 999px) { .sp-show-t-1 ul.products > li:nth-child(n+2) { display: none; } }
@media (min-width: 600px) and (max-width: 999px) { .sp-show-t-2 ul.products > li:nth-child(n+3) { display: none; } }
@media (min-width: 600px) and (max-width: 999px) { .sp-show-t-3 ul.products > li:nth-child(n+4) { display: none; } }
@media (min-width: 600px) and (max-width: 999px) { .sp-show-t-4 ul.products > li:nth-child(n+5) { display: none; } }
@media (min-width: 600px) and (max-width: 999px) { .sp-show-t-5 ul.products > li:nth-child(n+6) { display: none; } }
@media (min-width: 600px) and (max-width: 999px) { .sp-show-t-6 ul.products > li:nth-child(n+7) { display: none; } }
@media (min-width: 600px) and (max-width: 999px) { .sp-show-t-7 ul.products > li:nth-child(n+8) { display: none; } }
@media (min-width: 600px) and (max-width: 999px) { .sp-show-t-8 ul.products > li:nth-child(n+9) { display: none; } }
@media (min-width: 600px) and (max-width: 999px) { .sp-show-t-9 ul.products > li:nth-child(n+10) { display: none; } }
@media (min-width: 600px) and (max-width: 999px) { .sp-show-t-10 ul.products > li:nth-child(n+11) { display: none; } }
@media (min-width: 600px) and (max-width: 999px) { .sp-show-t-11 ul.products > li:nth-child(n+12) { display: none; } }
@media (min-width: 600px) and (max-width: 999px) { .sp-show-t-12 ul.products > li:nth-child(n+13) { display: none; } }
@media (max-width: 599px) { .sp-show-m-1 ul.products > li:nth-child(n+2) { display: none; } }
@media (max-width: 599px) { .sp-show-m-2 ul.products > li:nth-child(n+3) { display: none; } }
@media (max-width: 599px) { .sp-show-m-3 ul.products > li:nth-child(n+4) { display: none; } }
@media (max-width: 599px) { .sp-show-m-4 ul.products > li:nth-child(n+5) { display: none; } }
@media (max-width: 599px) { .sp-show-m-5 ul.products > li:nth-child(n+6) { display: none; } }
@media (max-width: 599px) { .sp-show-m-6 ul.products > li:nth-child(n+7) { display: none; } }
@media (max-width: 599px) { .sp-show-m-7 ul.products > li:nth-child(n+8) { display: none; } }
@media (max-width: 599px) { .sp-show-m-8 ul.products > li:nth-child(n+9) { display: none; } }
@media (max-width: 599px) { .sp-show-m-9 ul.products > li:nth-child(n+10) { display: none; } }
@media (max-width: 599px) { .sp-show-m-10 ul.products > li:nth-child(n+11) { display: none; } }
@media (max-width: 599px) { .sp-show-m-11 ul.products > li:nth-child(n+12) { display: none; } }
@media (max-width: 599px) { .sp-show-m-12 ul.products > li:nth-child(n+13) { display: none; } }
