/* ========================================
   CAROUSEL
   ======================================== */

.carousel-section {
    text-align: center;
    padding: 60px 0;
    background: #f5f3fa;
    color: #1a1a2e;
    position: relative;
    overflow: hidden;
}

.carousel-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(160, 73, 204, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.carousel-section::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -15%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(160, 73, 204, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.carousel-section .section-title {
    color: #1a1a2e;
}

.carousel-section .section-title::after {
    background: #a049cc;
}

.carousel-wrapper {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}

.carousel-container {
    width: 90%;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    padding-bottom: 10px;
    padding-top: 10px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    margin: 20px;
}

/* -------------- CAROUSEL CARDS -------------- */
.carousel-card {
    flex: 0 0 auto;
    width: 260px;
    margin: 0 12px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #ece6f2;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.carousel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(160, 73, 204, 0.15);
}

.carousel-card a::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    border-radius: 12px;
}

.carousel-card a::before {
    content: "Voir en 3D";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

.carousel-card:hover a::after,
.carousel-card:hover a::before {
    opacity: 1;
}

.carousel-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    background: #f5f5f5;
}

.carousel-card a {
    text-decoration: none;
    color: #1a1a2e;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.carousel-card h3 {
    color: #1a1a2e;
    padding: 12px 10px;
    font-size: 0.88rem;
    font-weight: 500;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    border-top: 1px solid #f0f0f0;
}

.carousel-card p {
    color: #666;
    padding: 0 10px 12px;
    font-size: 0.82rem;
}

/* -------------- SPECIAL CARDS (random) -------------- */
.carousel-card.special h3 {
    color: #1a1a2e;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-card.special p {
    color: #666;
}

/* -------------- NAV BUTTONS -------------- */
.carousel-btn {
    backdrop-filter: blur(8px);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(160, 73, 204, 0.7);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: rgba(160, 73, 204, 0.95);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

/* -------------- RESPONSIVE -------------- */
@media (max-width: 768px) {
    .carousel-section {
        padding: 30px 0;
    }

    .carousel-card {
        width: 200px;
        margin: 0 8px;
    }

    .carousel-card img {
        height: 160px;
    }

    .carousel-card h3 {
        font-size: 0.8rem;
        padding: 8px;
        min-height: 40px;
    }

    .carousel-card.special h3 {
        font-size: 0.8rem;
    }

    .carousel-track {
        margin: 0;
    }

    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}
