/* ============================================================
   1) شگفت‌انگیز — Side Rail + Glass Cards
   ============================================================ */
.sp-offer {
    --sp-navy: #0b1440;
    --sp-navy-2: #141c4d;
    --sp-gold: #d4a83c;
    --sp-gold-deep: #a8841f;
    --sp-gold-light: #f3d98b;
    --sp-rail: 272px;
    --sp-pad: 28px;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: var(--sp-rail) minmax(0, 1fr);
    grid-template-rows: auto auto auto auto 1fr;
    column-gap: 28px;
    margin: 14px 0 34px;
    padding: var(--sp-pad);
    box-sizing: border-box;
    color: #fff;
    border-radius: 30px;
    border: 1px solid rgba(243, 217, 139, .22);
    background: radial-gradient(ellipse 45% 90% at 100% 0%, rgba(212, 168, 60, .22) 0%, rgba(212, 168, 60, 0) 65%), radial-gradient(ellipse 50% 100% at 0% 100%, rgba(60, 80, 190, .35) 0%, rgba(60, 80, 190, 0) 65%), linear-gradient(135deg, var(--sp-navy-2) 0%, var(--sp-navy) 100%);
    box-shadow: 0 26px 40px -28px rgba(11, 20, 64, .85);
}

    .sp-offer *, .sp-offer *::before, .sp-offer *::after {
        box-sizing: border-box;
    }

    /* علامت درصدِ بزرگ و محو در پس‌زمینه */
    .sp-offer::before {
        content: "%";
        position: absolute;
        right: -18px;
        bottom: -70px;
        font-family: iranNum, sans-serif;
        font-size: 300px;
        font-weight: 900;
        line-height: 1;
        color: rgba(243, 217, 139, .045);
        pointer-events: none;
    }

    /* خط جداکننده‌ی عمودی بین ستون و اسلایدر */
    .sp-offer::after {
        content: "";
        position: absolute;
        top: var(--sp-pad);
        bottom: var(--sp-pad);
        right: calc(var(--sp-pad) + var(--sp-rail) + 14px);
        width: 1px;
        background: linear-gradient(180deg, rgba(243, 217, 139, 0), rgba(243, 217, 139, .4), rgba(243, 217, 139, 0));
        pointer-events: none;
    }

/* ---------- ستون راست ---------- */
.sp-head {
    display: contents;
}

.sp-head-r {
    position: relative;
    z-index: 2;
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
    margin-bottom: 18px;
}
.sp-timer {
    position: relative;
    z-index: 2;
    grid-column: 1;
    grid-row: 2;
}

.sp-progress {
    position: relative;
    z-index: 2;
    grid-column: 1;
    grid-row: 3;
    align-self: start;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 4px 0;
}

.sp-track {
    flex: 1 1 auto;
    height: 4px;
    overflow: hidden;
    background: rgba(255, 255, 255, .1);
    border-radius: 999px;
}

    .sp-track i {
        display: block;
        height: 100%;
        width: 100%;
        background: linear-gradient(90deg, var(--sp-gold-deep), var(--sp-gold-light));
        border-radius: 999px;
        transition: width 1s linear;
    }

.sp-pct {
    flex: 0 0 auto;
    min-width: 34px;
    color: var(--sp-gold-light);
    font-family: iranNum, sans-serif;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-align: left;
    direction: ltr;
}

.sp-all {
    position: relative;
    z-index: 2;
    grid-column: 1;
    grid-row: 4;
    margin-top: 18px;
}
.sp-burst {
    position: relative;
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
    color: var(--sp-gold-light);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, rgba(243, 217, 139, .25), rgba(243, 217, 139, .04) 70%);
    border: 1px solid rgba(243, 217, 139, .55);
    box-shadow: 0 0 0 6px rgba(243, 217, 139, .07), inset 0 0 18px rgba(243, 217, 139, .12);
}

    .sp-burst::before {
        content: "";
        position: absolute;
        inset: -10px;
        border-radius: 50%;
        border: 1px dashed rgba(243, 217, 139, .35);
        animation: spRing 28s linear infinite;
    }

    .sp-burst b, .sp-burst i {
        position: relative;
        font-style: normal;
    }

    .sp-burst b {
        font-family: iranNum, sans-serif;
        font-size: 27px;
        font-weight: 900;
    }

    .sp-burst i {
        margin-top: 3px;
        font-size: 10.5px;
        font-weight: 700;
        color: #fff;
        opacity: .85;
    }

.sp-title {
    margin: 0;
    color: #fff;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.4;
}

.sp-subtitle {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, .6);
    font-size: 12.5px;
    line-height: 1.7;
}

/* ---------- تایمر عمودی ---------- */
.sp-timer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(243, 217, 139, .2);
    border-radius: 20px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.sp-timer-label {
    color: rgba(255, 255, 255, .75);
    font-size: 12.5px;
    font-weight: 700;
    text-align: center;
}

.sp-digits {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    direction: ltr;
}

.sp-d {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    padding: 8px 4px 6px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .05));
    border: 1px solid rgba(243, 217, 139, .28);
    border-radius: 13px;
}

    .sp-d b {
        font-family: iranNum, sans-serif;
        font-size: 25px;
        font-weight: 800;
        line-height: 1.1;
        font-variant-numeric: tabular-nums;
        color: var(--sp-gold-light);
    }

    .sp-d small {
        margin-top: 1px;
        font-size: 10.5px;
        font-weight: 700;
        color: rgba(255, 255, 255, .6);
    }

.sp-colon {
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    color: var(--sp-gold);
    opacity: .6;
}

.sp-urgent .sp-d {
    background: rgba(243, 217, 139, .16);
    border-color: rgba(243, 217, 139, .65);
}

/* ---------- دکمه ---------- */
.sp-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    color: var(--sp-navy);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    background: linear-gradient(135deg, var(--sp-gold-light), var(--sp-gold));
    border-radius: 14px;
    box-shadow: 0 10px 20px -10px rgba(212, 168, 60, .85);
    transition: transform .2s ease, box-shadow .2s ease;
}

    .sp-all::after {
        content: "";
        width: 7px;
        height: 7px;
        border-left: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
    }

    .sp-all:hover, .sp-all:focus {
        color: var(--sp-navy);
        text-decoration: none;
        transform: translateY(-2px);
        box-shadow: 0 16px 24px -12px rgba(212, 168, 60, .95);
    }



/* ---------- اسلایدر ---------- */
.sp-body {
    position: relative;
    z-index: 2;
    grid-column: 2;
    grid-row: 1 / -1;
    min-width: 0;
}

.sp-swiper {
    position: relative;
    overflow: hidden;
    padding: 8px 0 10px;
}

    .sp-swiper .swiper-wrapper {
        position: relative;
        display: flex;
        width: 100%;
        height: auto;
    }

    .sp-swiper .swiper-slide {
        flex-shrink: 0;
        display: flex;
        height: auto;
    }

/* ---------- کارت شیشه‌ای ---------- */
.sp-card {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    margin: 0 7px;
    padding: 8px;
    overflow: hidden;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .04));
    border: 1px solid rgba(243, 217, 139, .22);
    border-radius: 22px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: transform .35s cubic-bezier(.22, .61, .36, 1), box-shadow .35s ease, border-color .35s ease, background .35s ease;
}

    .sp-card:hover, .sp-card:focus {
        color: #fff;
        text-decoration: none;
        transform: translateY(-7px);
        border-color: rgba(243, 217, 139, .7);
        background: linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .06));
        box-shadow: 0 24px 34px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(243, 217, 139, .15);
    }

/* برچسب درصد: طلایی توپر */
.sp-ribbon {
    position: absolute;
    top: 16px;
    left: 16px;
    right: auto;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 5px 11px;
    color: var(--sp-navy);
    font-family: iranNum, sans-serif;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    direction: ltr;
    background: linear-gradient(135deg, var(--sp-gold-light), var(--sp-gold));
    border-radius: 999px;
    box-shadow: 0 8px 14px -6px rgba(212, 168, 60, .8);
}

    .sp-ribbon small {
        font-size: 10px;
        font-weight: 700;
        color: var(--sp-navy);
        opacity: .8;
    }

.sp-img {
    position: relative;
    height: 170px;
    overflow: hidden;
    border-radius: 16px;
    background: radial-gradient(ellipse at 50% 92%, #ece3cb 0%, rgba(236, 227, 203, 0) 62%), linear-gradient(180deg, #fff 0%, #f8f5ec 100%);
}

    .sp-img img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        padding: 14px;
        object-fit: contain;
        mix-blend-mode: multiply;
        transition: transform .5s cubic-bezier(.22, .61, .36, 1);
    }

.sp-card:hover .sp-img img {
    transform: scale(1.07);
}

.sp-name {
    height: 60px;
    padding: 12px 8px 4px;
    overflow: hidden;
    text-align: right;
}

    .sp-name span {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        height: 42px;
        color: rgba(255, 255, 255, .92);
        font-size: 13px;
        font-weight: 500;
        line-height: 21px;
        transition: color .2s ease;
    }

.sp-card:hover .sp-name span {
    color: var(--sp-gold-light);
}

.sp-price {
    margin: auto 8px 0;
    min-height: 76px;
    padding: 10px 0 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    text-align: right;
    white-space: nowrap;
    border-top: 1px dashed rgba(243, 217, 139, .3);
}

.sp-old {
    color: rgba(255, 255, 255, .45);
    font-family: iranNum, sans-serif;
    font-size: 11.5px;
    text-decoration: line-through;
}

.sp-new {
    padding: 0;
    color: var(--sp-gold-light);
    font-family: iranNum, sans-serif;
    font-size: 18px;
    font-weight: 800;
    line-height: 22px;
    background: none;
    border-radius: 0;
}

    .sp-new small {
        margin-right: 4px;
        color: rgba(255, 255, 255, .6);
        font-size: 10.5px;
        font-weight: 600;
    }

/* اتمام موجودی */
.sp-card.sp-sold .sp-img img {
    filter: grayscale(1);
    opacity: .5;
}

.sp-soldout {
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    z-index: 4;
    transform: translateY(-50%);
    text-align: center;
}

    .sp-soldout span {
        display: inline-block;
        padding: 6px 20px;
        color: var(--sp-gold-light);
        font-size: 12px;
        font-weight: 700;
        background: rgba(11, 20, 64, .88);
        border: 1px solid rgba(243, 217, 139, .35);
        border-radius: 999px;
    }

/* ---------- دکمه‌های اسلایدر ---------- */
.sp-nav {
    position: absolute;
    top: 50%;
    z-index: 10;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    cursor: pointer;
    background: var(--sp-gold-light);
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 50%;
    box-shadow: 0 10px 20px -8px rgba(0, 0, 0, .6);
    transition: background-color .2s ease, opacity .25s ease, visibility .25s ease;
}

    .sp-nav::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 9px;
        height: 9px;
        border-top: 2px solid var(--sp-navy);
        border-right: 2px solid var(--sp-navy);
    }

    .sp-nav:hover {
        background: #fff;
    }

.sp-prev {
    right: 0;
}

    .sp-prev::before {
        transform: translate(-50%, -50%) rotate(45deg) translate(-1px, 1px);
    }

.sp-next {
    left: 0;
}

    .sp-next::before {
        transform: translate(-50%, -50%) rotate(-135deg) translate(-1px, 1px);
    }

.sp-nav.swiper-button-disabled {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@keyframes spRing {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sp-burst::before {
        animation: none;
    }
}

/* ---------- ریسپانسیو ---------- */
@media (max-width: 1080px) {
    .sp-nav {
        display: none;
    }
}

/* زیر ۹۸۰: ستون راست به هدر افقی بالای اسلایدر تبدیل می‌شود */
@media (max-width: 980px) {
    .sp-offer {
        display: block;
        --sp-pad: 20px;
    }

        .sp-offer::before, .sp-offer::after {
            display: none;
        }

    .sp-head {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
    }

    .sp-head-r {
        flex: 1 1 100%;
        width: 100%;
        flex-direction: row;
        align-items: center;
        margin-bottom: 0;
    }
    .sp-head-r, .sp-timer, .sp-all, .sp-progress {
        grid-column: auto;
        grid-row: auto;
    }

    .sp-burst {
        width: 60px;
        height: 60px;
    }

    .sp-title {
        font-size: 21px;
    }

    .sp-timer {
        flex: 1 1 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        direction: rtl;
        gap: 12px;
        padding: 8px 14px;
    }
    .sp-timer-label {
        white-space: nowrap;
    }

    .sp-d {
        flex: 0 0 auto;
        min-width: 54px;
    }

    .sp-all {
        flex: 1 1 100%;
        margin-top: 0;
    }

    .sp-progress {
        width: 100%;
        margin: 16px 0 14px;
    }
}

@media (max-width: 700px) {
    .sp-offer {
        margin: 12px 8px 22px;
        padding: 16px 10px 12px;
        border-radius: 22px;
    }

    .sp-head-r {
        width: 100%;
        gap: 12px;
    }

    .sp-burst {
        width: 52px;
        height: 52px;
    }

        .sp-burst b {
            font-size: 19px;
        }

        .sp-burst i {
            font-size: 9.5px;
        }

    .sp-title {
        font-size: 18px;
    }

    .sp-subtitle {
        font-size: 11.5px;
    }

    .sp-timer {
        flex: 1 1 100%;
        justify-content: space-between;
        gap: 8px;
        padding: 6px 10px;
    }

    .sp-timer-label {
        font-size: 11.5px;
        white-space: normal;
    }

    .sp-d {
        min-width: 44px;
        padding: 5px 5px 4px;
    }

        .sp-d b {
            font-size: 19px;
        }

        .sp-d small {
            font-size: 9.5px;
        }

    .sp-all {
        padding: 10px 16px;
        font-size: 12.5px;
    }

    .sp-img {
        height: 140px;
    }

    .sp-name span {
        font-size: 12px;
    }

    .sp-new {
        font-size: 15px;
    }
}

@media (max-width: 539px) {
    .sp-offer {
        margin: 10px 0 18px;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }
}

@media (hover: none) {
    .sp-card:hover {
        transform: none;
        border-color: rgba(243, 217, 139, .22);
        box-shadow: none;
    }

        .sp-card:hover .sp-img img {
            transform: none;
        }

        .sp-card:hover .sp-name span {
            color: rgba(255, 255, 255, .92);
        }
}
