.floating-ad {

    position: fixed;

    left: 50%;
    bottom: 20px;

    transform: translateX(-50%);

    width: calc(100% - 30px);
    max-width: 720px;

    background: rgba(12, 12, 12, .94);

    backdrop-filter: blur(16px);

    border: 1px solid rgba(210, 243, 65, .12);

    border-radius: 20px;

    overflow: hidden;

    z-index: 9999;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, .35),
        0 0 25px rgba(210, 243, 65, .04);

    transition:
        opacity .35s ease,
        transform .35s ease;
}

.floating-ad::before {

    content: '';

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(210, 243, 65, .35),
        transparent
    );
}

.floating-ad.hide {

    opacity: 0;

    transform:
        translateX(-50%)
        translateY(40px);

    pointer-events: none;
}

/* ==========================
   Header
========================== */

.floating-ad__controls {

    display: flex;

    justify-content: space-between;
    align-items: center;

    padding: 10px 14px;
}

.floating-ad__badge {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    padding: 5px 12px;

    border-radius: 999px;

    background: rgba(210, 243, 65, .08);

    border: 1px solid rgba(210, 243, 65, .15);

    color: #d2f341;

    font-size: 11px;

    font-weight: 700;
}

.floating-ad__actions {

    display: flex;

    gap: 8px;
}

.floating-ad__pricing,
.floating-ad__close {

    width: 34px;
    height: 34px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    border: none;

    text-decoration: none;

    background: rgba(255,255,255,.04);

    color: #a7a7a7;

    cursor: pointer;

    transition: .25s;
}

.floating-ad__pricing:hover {

    color: #d2f341;

    background: rgba(210,243,65,.08);
}

.floating-ad__close:hover {

    color: #fff;

    background: rgba(255,255,255,.08);
}

/* ==========================
   Image Mode
========================== */

.floating-ad__image {

    display: block;

    padding: 0 14px 14px;

    text-decoration: none;
}

.floating-ad__image img {

    width: 100%;

    height: 90px;

    object-fit: cover;

    display: block;

    border-radius: 14px;

    transition: .3s;
}

.floating-ad__image:hover img {

    transform: scale(1.015);
}

/* ==========================
   Placeholder Mode
========================== */

.floating-ad__placeholder {

    display: flex;

    align-items: center;

    gap: 14px;

    margin: 0 14px 14px;

    padding: 14px;

    min-height: 90px;

    border-radius: 14px;

    background: rgba(210,243,65,.03);

    border: 1px dashed rgba(210,243,65,.15);
}

.floating-ad__placeholder-icon {

    width: 54px;
    height: 54px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background: rgba(210,243,65,.08);

    border: 1px solid rgba(210,243,65,.12);

    color: #d2f341;

    font-size: 22px;
}

.floating-ad__placeholder-content {

    flex: 1;
}

.floating-ad__placeholder-content h5 {

    margin: 0 0 4px;

    color: #fff;

    font-size: 15px;

    font-weight: 800;
}

.floating-ad__placeholder-content p {

    margin: 0;

    color: #9d9d9d;

    font-size: 12px;

    line-height: 1.9;
}

/* ==========================
   Mobile
========================== */

@media (max-width: 768px) {

    .floating-ad {

        width: calc(100% - 20px);

        bottom: 10px;
    }

    .floating-ad__image img {

        height: 75px;
    }

    .floating-ad__placeholder {

        min-height: 75px;

        padding: 12px;
    }

    .floating-ad__placeholder-icon {

        width: 46px;
        height: 46px;

        font-size: 18px;
    }

    .floating-ad__placeholder-content h5 {

        font-size: 13px;
    }

    .floating-ad__placeholder-content p {

        font-size: 11px;
    }
}

.floating-side-ad {

    position: fixed;

    top: 50%;

    transform: translateY(-50%);

    width: 180px;

    background: rgba(12,12,12,.94);

    backdrop-filter: blur(16px);

    border: 1px solid rgba(210,243,65,.12);

    border-radius: 20px;

    overflow: hidden;

    z-index: 999;

    box-shadow:
        0 10px 30px rgba(0,0,0,.35),
        0 0 25px rgba(210,243,65,.04);

    animation: sideAdFade .45s ease;
}

.floating-side-ad::before {

    content: '';

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(210,243,65,.35),
        transparent
    );
}

/* موقعیت */

.floating-side-ad--right {

    right: 20px;
}

.floating-side-ad--left {

    left: 20px;
}

/* Header */

.floating-side-ad__header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 10px;
}

.floating-side-ad__badge {

    padding: 4px 8px;

    border-radius: 999px;

    background: rgba(210,243,65,.08);

    border: 1px solid rgba(210,243,65,.15);

    color: #d2f341;

    font-size: 10px;

    font-weight: 700;
}

.floating-side-ad__actions {

    display: flex;

    gap: 6px;
}

.floating-side-ad__pricing,
.floating-side-ad__close {

    width: 28px;
    height: 28px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 8px;

    border: none;

    text-decoration: none;

    background: rgba(255,255,255,.05);

    color: #a7a7a7;

    cursor: pointer;

    transition: .25s;
}

.floating-side-ad__pricing:hover {

    color: #d2f341;

    background: rgba(210,243,65,.08);
}

.floating-side-ad__close:hover {

    color: #fff;

    background: rgba(255,255,255,.08);
}

/* حالت عکس */

.floating-side-ad__image {

    display: block;

    padding: 0 10px 10px;
}

.floating-side-ad__image img {

    width: 100%;

    height: 320px;

    object-fit: cover;

    border-radius: 12px;

    display: block;

    transition: .25s;
}

.floating-side-ad__image:hover img {

    transform: scale(1.02);
}

/* Placeholder */

.floating-side-ad__placeholder {

    padding: 15px;

    text-align: center;
}

.floating-side-ad__placeholder-icon {

    width: 60px;
    height: 60px;

    margin: 0 auto 15px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 16px;

    background: rgba(210,243,65,.08);

    border: 1px solid rgba(210,243,65,.12);

    color: #d2f341;

    font-size: 24px;
}

.floating-side-ad__placeholder h5 {

    color: #fff;

    font-size: 14px;

    font-weight: 800;

    line-height: 1.8;

    margin-bottom: 10px;
}

.floating-side-ad__placeholder p {

    color: #9d9d9d;

    font-size: 12px;

    line-height: 1.9;

    margin: 0;
}

/* انیمیشن */

@keyframes sideAdFade {

    from {

        opacity: 0;

        transform:
            translateY(-50%)
            translateX(15px);
    }

    to {

        opacity: 1;

        transform:
            translateY(-50%)
            translateX(0);
    }
}

.floating-side-ad.hide {

    opacity: 0;

    transition: .35s;

    pointer-events: none;
}

/* فقط دسکتاپ های عریض */

@media (max-width: 1600px) {

    .floating-side-ad {

        display: none;
    }
}