/**
 * C'EST MOI - Luxury Instagram Slider (Maison de Parfum Styling)
 * Strict 9:16 aspect ratio & responsive mobile center styling
 * Author: DAMC - Massimo D'Andrea (https://www.damc.it)
 */

.cestmoi-ig-slider-wrap {
    position: relative;
    width: 100%;
    margin: 15px auto;
    padding: 10px 0 20px;
    box-sizing: border-box;
}

.cestmoi-ig-swiper {
    position: relative;
    overflow: hidden;
    padding: 10px 4px 20px !important;
}

.cestmoi-ig-slide {
    height: auto;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Card Container */
.cestmoi-ig-card {
    display: block;
    position: relative;
    width: 100%;
    text-decoration: none !important;
    outline: none !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    background-color: transparent !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.cestmoi-ig-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}

/* Media Box - RIGID 9:16 ASPECT RATIO NEVER DEFORMED */
.cestmoi-ig-media-box {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16 !important;
    height: auto !important;
    max-height: 600px;
    overflow: hidden;
    background-color: #1e1b18;
    border-radius: 16px;
}

.cestmoi-ig-img {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    object-position: center center !important;
    display: block;
    border-radius: 16px;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cestmoi-ig-card:hover .cestmoi-ig-img {
    transform: scale(1.04);
}

/* Soft luxury vignette */
.cestmoi-ig-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.02) 65%, rgba(0,0,0,0.35) 100%);
    pointer-events: none;
    border-radius: 16px;
}

/* Instagram circular official badge (Maison de Parfum style) */
.cestmoi-ig-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: #ffffff;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #1a1a1a;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
}

.cestmoi-ig-card:hover .cestmoi-ig-badge {
    transform: scale(1.1);
}

.cestmoi-ig-icon {
    display: block;
}

/* Perfectly Circular Minimal Luxury Navigation Arrows */
div.cestmoi-ig-nav {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    border-radius: 50% !important;
    background: rgba(18, 16, 14, 0.65) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 20 !important;
    transition: all 0.25s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    user-select: none;
    line-height: 1 !important;
    text-align: center !important;
}

div.cestmoi-ig-nav svg {
    display: block !important;
    margin: 0 auto !important;
}

.cestmoi-ig-prev {
    left: 8px !important;
}

.cestmoi-ig-next {
    right: 8px !important;
}

div.cestmoi-ig-nav:hover {
    background: rgba(18, 16, 14, 0.9) !important;
    color: #d4af37 !important;
    border-color: rgba(212, 175, 55, 0.6) !important;
    transform: translateY(-50%) scale(1.08) !important;
}

div.cestmoi-ig-nav.swiper-button-disabled {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Pagination (Hidden by default, minimal if enabled) */
.cestmoi-ig-pagination {
    position: relative;
    margin-top: 15px;
    text-align: center;
}

.cestmoi-ig-pagination .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
    margin: 0 4px;
    transition: all 0.3s ease;
}

.cestmoi-ig-pagination .swiper-pagination-bullet-active {
    width: 18px;
    border-radius: 3px;
    background: #ffffff;
}

/* Mobile & Tablet Optimizations */
@media (max-width: 768px) {
    .cestmoi-ig-swiper {
        padding: 5px 0 15px !important;
        overflow: visible !important;
    }

    .cestmoi-ig-slider-wrap {
        overflow: hidden;
    }

    /* Small, perfectly round, discrete navigation arrows on mobile */
    div.cestmoi-ig-nav {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        max-width: 30px !important;
        min-height: 30px !important;
        max-height: 30px !important;
        border-radius: 50% !important;
        background: rgba(15, 14, 12, 0.6) !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    }

    div.cestmoi-ig-nav svg {
        width: 14px !important;
        height: 14px !important;
    }

    /* Placed on screen edges so they don't block the centered slide */
    .cestmoi-ig-prev {
        left: 4px !important;
    }

    .cestmoi-ig-next {
        right: 4px !important;
    }

    /* Side slides slightly transparent and smaller on mobile for focus */
    .swiper-slide:not(.swiper-slide-active) .cestmoi-ig-card {
        opacity: 0.5;
        transform: scale(0.92);
    }

    .swiper-slide-active .cestmoi-ig-card {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    }

    .cestmoi-ig-badge {
        width: 26px !important;
        height: 26px !important;
        bottom: 8px !important;
        right: 8px !important;
    }

    .cestmoi-ig-badge svg {
        width: 13px !important;
        height: 13px !important;
    }
}
