/* Base */
body {
    font-family: sans-serif;
    background-color: #f9fafb;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* pour pouvoir ajuster le margin-top */
    padding: 2rem;
}

/* Descendre la carte vers le milieu */
.card {
    max-width: 24rem;
    background-color: white;
    border-radius: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-top: 8rem; /* ajuste la position verticale */
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Slider */
.slider { position: relative; overflow: hidden; height: 16rem; }
.slides { display: flex; transition: transform 0.5s ease-in-out; }
.slide { min-width: 100%; object-fit: cover; height: 16rem; }

/* Radio buttons */
input[name="slider"] { display: none; }

/* Slider dynamique */
#slide1:checked ~ .slider .slides { transform: translateX(0%); }
#slide2:checked ~ .slider .slides { transform: translateX(-100%); }
#slide3:checked ~ .slider .slides { transform: translateX(-200%); }

/* Flèches */
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    width: 2rem; height: 2rem;
    display: none;
    justify-content: center;
    align-items: center;
    border-radius: 9999px;
    cursor: pointer;
    font-weight: bold;
    z-index: 10;
}

/* Affichage flèches selon slide */
#slide1:checked ~ .slider label.prev.slide1,
#slide1:checked ~ .slider label.next.slide1,
#slide2:checked ~ .slider label.prev.slide2,
#slide2:checked ~ .slider label.next.slide2,
#slide3:checked ~ .slider label.prev.slide3,
#slide3:checked ~ .slider label.next.slide3 {
    display: flex;
}

.prev { left: 0.5rem; }
.next { right: 0.5rem; }

/* Compteur */
.counter {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
}

/* Contenu produit */
.card-content { padding: 1rem; }
.card-title { font-size: 1.125rem; font-weight: 600; color: #111827; }
.card-price { font-size: 1.125rem; font-weight: 600; color: #111827; }
.card-stars svg { height: 1.25rem; width: 1.25rem; }
.card-button {
    width: 100%;
    background-color: #4f46e5;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.625rem;
    border-radius: 0.75rem;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s;
}
.card-button:hover { background-color: #4338ca; }
