/* ----------------------------------------------------------------
   Widget: Before/After Slider
----------------------------------------------------------------- */
.ba-slider {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    cursor: col-resize;
    direction: ltr !important;
    text-align: left !important;
    aspect-ratio: 16/9;
    /* Hardware acceleration fix for safari border-radius clipping */
    transform: translateZ(0);
    isolation: isolate;
    touch-action: pan-y;
}

.ba-slider.animate-return .resize,
.ba-slider.animate-return .handle {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ba-slider img {
    display: block;
    pointer-events: none;
    max-width: none !important;
    user-select: none;
}

.ba-slider>img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.ba-slider .resize {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50%;
    overflow: hidden;
    border-right-width: 3px;
    border-right-style: solid;
    z-index: 10;
    will-change: width;
    pointer-events: none !important;
}

.ba-slider .resize img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100% !important;
    width: auto !important;
    min-width: 100%;
}

.ba-slider .handle {
    position: absolute;
    height: 40px;
    width: 40px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    z-index: 20;
    pointer-events: none !important;
    will-change: left;
}

.ba-slider .handle::after {
    /* FontAwesome Icon Code */
    content: '\f337';
    font-family: "Font Awesome 5 Free", "Font Awesome 6 Free", sans-serif;
    font-weight: 900;
    font-size: 18px;
}

.ba-slider .ba-label {
    position: absolute;
    bottom: 20px;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    pointer-events: none !important;
    white-space: nowrap;
    direction: rtl !important;
    line-height: 1.5;
    z-index: 30;
}

.ba-slider .label-before {
    right: 20px;
}

.ba-slider .label-after {
    left: 20px;
}


/* ----------------------------------------------------------------
   Widget: Comparison Card
----------------------------------------------------------------- */
.shadan-card-wrapper {
    position: relative;
    padding: 20px;
    isolation: isolate;
}

.shadan-card-wrapper.with-backlight .ambient-light {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    z-index: -1;
    animation: floatLight 8s infinite alternate ease-in-out;
}

/* Animations */
@keyframes floatLight {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(5px, 5px) scale(1.05);
    }
}

@keyframes floatCenter {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        transform: translate(-45%, -45%) scale(1.05);
    }
}

.shadan-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-align: center;
    direction: rtl;
    cursor: default;
    display: flex;
    flex-direction: column;
}

.shadan-card:hover {
    transform: translateY(-8px);
}

.shadan-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 30%;
    right: 30%;
    height: 3px;
    border-radius: 0 0 10px 10px;
    opacity: 0.5;
    transition: all 0.4s ease;
    z-index: 2;
}

.shadan-card:hover::after {
    left: 20%;
    right: 20%;
    opacity: 1;
    height: 4px;
}

.shadan-card .icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

.shadan-card:hover .icon-box {
    transform: scale(1.1);
}

/* Ensure Icons are properly sized and centered */
.shadan-card .main-icon i,
.shadan-card .main-icon svg {
    line-height: 1 !important;
    transition: color 0.3s ease !important;
}

.shadan-card .card-heading {
    margin-bottom: 30px;
    letter-spacing: -0.5px;
    position: relative;
}

.shadan-card .compare-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.shadan-card .compare-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-radius: 14px;
    font-size: 13px;
    transition: all 0.3s ease;
    text-align: right;
}

.shadan-card .compare-item.old {
    position: relative;
}

.shadan-card .compare-item.old span {
    opacity: 0.7;
    position: relative;
}

/* Strike-through line */
.shadan-card .compare-item.old span::after {
    content: '';
    position: absolute;
    left: -5px;
    right: -5px;
    top: 50%;
    height: 1px;
    opacity: 0.4;
}

.shadan-card .compare-item.new {
    transform: scale(1.02);
    position: relative;
    overflow: hidden;
}

/* Shine Animation for New Item */
.shadan-card .compare-item.new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.1) 50%, transparent 60%);
    background-size: 200% 200%;
    animation: shine 3s infinite linear;
    pointer-events: none;
}

@keyframes shine {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.shadan-card .compare-item.new span {
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.shadan-card .status-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    position: relative;
    z-index: 1;
}

/* Fix Icon Sizing in small circles */
.shadan-card .status-icon i,
.shadan-card .status-icon svg {
    width: auto;
    height: auto;
    font-size: inherit;
}

.shadan-card .card-footer {
    margin-top: 24px;
    padding-top: 20px;
    font-size: 12px;
    line-height: 1.6;
    text-align: right;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.shadan-card .card-footer i,
.shadan-card .card-footer svg {
    margin-top: 4px;
    flex-shrink: 0;
}

.shadan-card .footer-content p {
    margin: 0;
    padding: 0;
}