@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

.aafe-image-3d-carousel-wrapper h1,
.aafe-image-3d-carousel-wrapper h2,
.aafe-image-3d-carousel-wrapper h3,
.aafe-image-3d-carousel-wrapper h4,
.aafe-image-3d-carousel-wrapper h5,
.aafe-image-3d-carousel-wrapper h6 {
    font-family: 'Sora', sans-serif;
}

.aafe-image-3d-carousel-wrapper p,
.aafe-image-3d-carousel-wrapper span,
.aafe-image-3d-carousel-wrapper li,
.aafe-image-3d-carousel-wrapper a,
.aafe-image-3d-carousel-wrapper .aafe-image-3d-carousel__title {
    font-family: 'Inter', sans-serif;
}

.aafe-image-3d-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 40px 0 80px 0;
    user-select: none;
    transition: all var(--aafe-transition, 300ms) var(--aafe-easing, ease);
}

.aafe-image-3d-carousel__container {
    width: 200px;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
}

.aafe-image-3d-carousel__slides {
    display: flex;
    width: fit-content;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.aafe-image-3d-carousel__slide {
    width: 200px;
    max-width: 100%;
    perspective: 1000px;
    flex-shrink: 0;
    margin: 0;
    cursor: pointer;
    transition: all var(--aafe-transition, 300ms) var(--aafe-easing, ease);
}

.aafe-image-3d-carousel__slide-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    transition: transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform, scale;
    transform-style: preserve-3d;
}

.aafe-image-3d-carousel__image-wrap {
    width: 100%;
    height: auto;
    aspect-ratio: 3/4;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all var(--aafe-transition, 300ms) var(--aafe-easing, ease);
}

.aafe-image-3d-carousel__image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    transition: transform var(--aafe-transition, 300ms) var(--aafe-easing, ease);
}

.aafe-image-3d-carousel__slide:hover .aafe-image-3d-carousel__image-wrap img {
    transform: scale(1.05);
}

.aafe-image-3d-carousel__title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    transition: opacity 1s ease, filter 1s ease, color var(--aafe-transition, 300ms) var(--aafe-easing, ease);
    will-change: opacity, filter;
    margin: 0;
}

.aafe-image-3d-carousel__controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
    border-radius: 50px;
    background: rgba(229, 229, 229, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(229, 229, 229, 0.8);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 10;
}

.aafe-image-3d-carousel-wrapper .aafe-image-3d-carousel__btn {
    background: transparent !important;
    border: none !important;
    color: #444;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50% !important;
    transition: all 0.3s ease;
    padding: 0 !important;
    box-shadow: none !important;
}

.aafe-image-3d-carousel-wrapper .aafe-image-3d-carousel__btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    display: inline-block;
    line-height: 1;
}

.aafe-image-3d-carousel-wrapper .aafe-image-3d-carousel__btn:hover {
    background: rgba(0,0,0,0.05) !important;
    color: #000;
}

.aafe-image-3d-carousel__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 180px;
}

.aafe-image-3d-carousel__dot {
    height: 8px;
    width: 8px;
    border-radius: 4px;
    background-color: rgba(0,0,0,0.3);
    cursor: pointer;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.aafe-image-3d-carousel__dot.is-active {
    width: 28px;
    background-color: #000;
}

/* Hover Effects System */
.aafe-image-3d-carousel-wrapper[data-hover="lift"]:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.aafe-image-3d-carousel-wrapper[data-hover="scale"]:hover {
    transform: scale(var(--aafe-hover-scale, 1.03));
}

.aafe-image-3d-carousel-wrapper[data-hover="glow"]:hover {
    box-shadow: 0 0 0 3px #4F46E5, 0 8px 30px rgba(79,70,229,0.25);
}

.aafe-image-3d-carousel-wrapper[data-hover="border-pop"]:hover {
    border-color: #4F46E5;
    transform: scale(1.01);
}

.aafe-image-3d-carousel-wrapper[data-hover="shine"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.3) 50%,
        rgba(255,255,255,0) 100%
    );
    transform: skewX(-25deg);
    pointer-events: none;
    z-index: 10;
}

.aafe-image-3d-carousel-wrapper[data-hover="shine"]:hover::after {
    left: 125%;
    transition: left 0.6s ease;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .aafe-image-3d-carousel__container,
    .aafe-image-3d-carousel__slide {
        width: 300px;
    }
}

/* AAFE IMPROVEMENT: RTL Support */
[dir="rtl"] .aafe-image-3d-carousel-wrapper .aafe-image-3d-carousel__btn svg {
    transform: scaleX(-1);
}
[dir="rtl"] .aafe-image-3d-carousel__controls {
    flex-direction: row-reverse;
}
