/* ============================================================
   HomeOffers.css — Emperatoory Bargh
   ۱) پیشنهادات شگفت‌انگیز (.sp-offer): قاب قرمز تیره‌ی آرام + تایمر ساعت:دقیقه
   ۲) پیشنهادات روزانه (.dy-offer): بخش خیلی ساده و روشن

   این فایل باید بعد از Home.css لود شود. بخش ۱۳ قبلی Home.css (قاب مشکی
   .sp-offer) را می‌توانید پاک کنید؛ این فایل همه‌ی آن را جایگزین می‌کند
   و حتی بدون پاک کردن هم روی آن غلبه دارد.

   تغییر رنگ قاب: فقط دو متغیر --sp-a و --sp-b
   (مثلاً برای حالت زغالی: --sp-a:#33363c; --sp-b:#1e2024)
   ============================================================ */

/* ============================================================
   1) شگفت‌انگیز
   ============================================================ */
.sp-offer {
    --sp-a: #62201c;
    --sp-b: #381311;
    --sp-red: #d9362c;
    --sp-red-dark: #a8261e;
    --sp-soft: #ffb9b0;
    position: relative;
    overflow: hidden;
    margin: 14px 0 26px;
    padding: 18px 18px 20px;
    box-sizing: border-box;
    color: #fff;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--sp-a) 0%, var(--sp-b) 100%);
    box-shadow: 0 12px 26px -18px rgba(56, 19, 17, .7);
}

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

/* ---------- هدر ---------- */
.sp-head {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px 20px;
}

.sp-head-r {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

/* نشان تخفیف: ستاره‌ی چرخان (مثل نسخه‌ی قبل) */
.sp-burst {
    position: relative;
    flex: 0 0 auto;
    width: 74px;
    height: 74px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
    color: #fff;
    text-align: center;
}

    .sp-burst::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, #ff4a3d, #b31d15);
        clip-path: polygon(50% 0%, 61% 10%, 75% 6%, 80% 20%, 94% 25%, 90% 39%, 100% 50%, 90% 61%, 94% 75%, 80% 80%, 75% 94%, 61% 90%, 50% 100%, 39% 90%, 25% 94%, 20% 80%, 6% 75%, 10% 61%, 0% 50%, 10% 39%, 6% 25%, 20% 20%, 25% 6%, 39% 10%);
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .35));
        border: 0;
        border-radius: 0;
        animation: spBurst 16s linear infinite;
    }

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

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

    .sp-burst i {
        margin-top: 3px;
        font-size: 11px;
        font-weight: 800;
        color: #fff;
    }

.sp-title {
    margin: 0;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.5;
    -webkit-text-stroke: 0;
}

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

/* ---------- تایمر ---------- */
.sp-timer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 16px;
}

.sp-timer-label {
    color: rgba(255, 255, 255, .78);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

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

.sp-d {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 58px;
    padding: 7px 8px 5px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 12px;
    box-shadow: none;
}

    .sp-d b {
        font-family: iranNum, sans-serif;
        font-size: 26px;
        font-weight: 800;
        line-height: 1.1;
        letter-spacing: 1px;
        font-variant-numeric: tabular-nums;
    }

    .sp-d small {
        margin-top: 1px;
        font-size: 10.5px;
        font-weight: 700;
        color: var(--sp-soft);
        opacity: 1;
    }

.sp-colon {
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    opacity: .55;
    animation: none;
}

/* آخرین ساعت: فقط رنگ ملایم عوض می‌شود (بدون ضربان) */
.sp-urgent .sp-d {
    animation: none;
    background: rgba(255, 138, 127, .2);
    border-color: rgba(255, 138, 127, .55);
}

/* ---------- دکمه مشاهده همه ---------- */
.sp-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    color: #7a1f1a;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
    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: #7a1f1a;
        text-decoration: none;
        transform: translateY(-2px);
        box-shadow: 0 8px 18px rgba(0, 0, 0, .3);
    }

/* ---------- نوار پیشرفت ---------- */
.sp-progress {
    position: relative;
    z-index: 2;
    height: 4px;
    margin: 16px 0 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, .14);
    border-radius: 999px;
}

    .sp-progress i {
        display: block;
        height: 100%;
        width: 100%;
        background: linear-gradient(90deg, #ffd0ca, var(--sp-soft));
        border-radius: 999px;
        transition: width 1s linear;
    }

.sp-offer:not(:has(.sp-progress)) .sp-head {
    margin-bottom: 14px;
}

/* ---------- اسلایدر ---------- */
.sp-body {
    position: relative;
    z-index: 2;
}

.sp-swiper {
    position: relative;
    overflow: hidden;
    padding: 6px 0 12px;
}

    .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 5px;
    overflow: hidden;
    color: #23262b;
    text-decoration: none;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 18px -12px rgba(0, 0, 0, .55);
    transition: transform .3s cubic-bezier(.22, .61, .36, 1), box-shadow .3s ease;
}

    .sp-card:hover, .sp-card:focus {
        color: #23262b;
        text-decoration: none;
        transform: translateY(-4px);
        box-shadow: 0 14px 26px -14px rgba(0, 0, 0, .6);
    }

/* برچسب درصد تخفیف روی کارت */
.sp-ribbon {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 4px 10px;
    color: #fff;
    font-family: iranNum, sans-serif;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
    direction: ltr;
    background: linear-gradient(135deg, #e1251b, #b31d15);
    border-radius: 999px;
    box-shadow: 0 4px 10px -4px rgba(179, 29, 21, .7);
}

.sp-img {
    position: relative;
    height: 170px;
    background: linear-gradient(180deg, #fafafa 0%, #f1f2f3 100%);
}

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

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

.sp-name {
    height: 62px;
    padding: 14px 14px 6px;
    overflow: hidden;
    text-align: center;
}

    .sp-name span {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        height: 42px;
        font-size: 13px;
        font-weight: 500;
        line-height: 21px;
    }

.sp-card:hover .sp-name span {
    color: #b31d15;
}

.sp-price {
    margin-top: auto;
    min-height: 78px;
    padding: 8px 12px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-align: center;
    white-space: nowrap;
    background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
}

.sp-old {
    color: #8a9099;
    font-family: iranNum, sans-serif;
    font-size: 12px;
    text-decoration: line-through;
}

.sp-new {
    padding: 4px 12px;
    color: #23262b;
    font-family: iranNum, sans-serif;
    font-size: 15px;
    font-weight: 800;
    line-height: 20px;
    background: #fdeceb;
    border-radius: 8px;
}

    .sp-new small {
        margin-right: 3px;
        color: #b31d15;
        font-size: 10.5px;
        font-weight: 700;
    }

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

.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: 5px 18px;
        color: #fff;
        font-size: 12px;
        font-weight: 700;
        background: rgba(35, 38, 43, .85);
        border-radius: 999px;
    }

/* ---------- دکمه‌های اسلایدر ---------- */
.sp-nav {
    position: absolute;
    top: 50%;
    z-index: 10;
    width: 38px;
    height: 38px;
    margin-top: -19px;
    cursor: pointer;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
    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 #23262b;
        border-right: 2px solid #23262b;
    }

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

.sp-prev {
    right: 4px;
}

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

.sp-next {
    left: 4px;
}

    .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 spBurst {
    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: 700px) {
    .sp-offer {
        margin: 12px 8px 18px;
        padding: 14px 10px 14px;
        border-radius: 16px;
    }

    .sp-head {
        gap: 10px;
    }

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

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

        .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 auto;
        justify-content: space-between;
        gap: 8px;
        padding: 6px 10px;
    }

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

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

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

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

    .sp-colon {
        font-size: 19px;
    }

    .sp-all {
        padding: 8px 14px;
        font-size: 12px;
    }

    .sp-img {
        height: 140px;
    }

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

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

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

@media (hover: none) {
    .sp-card:hover {
        transform: none;
        box-shadow: 0 8px 18px -12px rgba(0, 0, 0, .55);
    }

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

        .sp-card:hover .sp-name span {
            color: inherit;
        }
}

/* ============================================================
   2) روزانه — قاب سفید ساده (همان قاب مینیمال بخش ۲ Home.css)،
      بدون رنگ پس‌زمینه، بدون تایمر و بدون المان تزئینی
   ============================================================ */
.Boxtitle.dy-title:has(+ .BoxParent .home-slider) {
    padding-top: 10px;
    padding-bottom: 4px;
}

    .Boxtitle.dy-title:has(+ .BoxParent .home-slider) span {
        font-size: 15px;
        font-weight: 600;
    }

        /* میله‌ی قرمز کنار عنوان: خنثی و باریک */
        .Boxtitle.dy-title:has(+ .BoxParent .home-slider) span:before {
            width: 3px;
            height: 14px;
            margin-top: -7px;
            background: #c9cdd2;
        }

.BoxParent.dy-offer:has(.home-slider) {
    box-shadow: none;
}
