/* ========== کامپوننت مستقل اسلایدر ========== */
.digi-slider-wrapper {
    width: 100%;
    position: relative;
    border-radius: 5px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    padding: 0.75rem 0 1.25rem 0;
    margin: 0 auto;
    /* استایل‌های اختصاصی – بدون وابستگی به بدنه */
}

/* هدر اسلایدر با تگ و دکمه بیشتر */
.slider-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem 0.75rem 1rem;
    position: relative;
    z-index: 2;
}

.title-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge-icon {
    border-radius: 32px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 800;
    color: white;
    letter-spacing: 0.5px;
}

.slider-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #23262e;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.02);
}

.more-link {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ED1D25;
    backdrop-filter: blur(4px);
    padding: 6px 14px;
    border-radius: 40px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: #1f2b38;
    font-weight: 500;
    font-size: 0.85rem;
}

.more-link:hover {
    background: rgba(0, 0, 0, 0.1);
    gap: 10px;
}

.arrow-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* بخش کاروسل - اسکرول افقی smooth */
.carousel-track-container {
    position: relative;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    white-space: nowrap;
    padding: 8px 12px 16px 12px;
    direction: rtl;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f1f1f1;
}

.carousel-track-container::-webkit-scrollbar {
    height: 6px;
}

.carousel-track-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 12px;
}

.carousel-track-container::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 12px;
}

.products-slider {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    width: fit-content;
    direction: rtl;
}

/* کارت محصول — طراحی الهام گرفته از DigiStyle */
.product-card {
    width: 190px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.03), 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s;
    overflow: hidden;
    display: inline-flex;
    flex-direction: column;
    direction: rtl;
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.12);
}

/* جایگاه تصویر (با قابلیت تعویض عکس واقعی) */
.image-placeholder {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #f9f6f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid #f0ede8;
}

/* استایل img واقعی برای آینده */
.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.product-img:hover {
    transform: scale(1.02);
}

/* ایموجی به عنوان placeholder */
.emoji-placeholder {
    font-size: 64px;
    filter: drop-shadow(2px 6px 10px rgba(0, 0, 0, 0.1));
    background: #fff1e0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}


/* اطلاعات محصول */
.product-info {
    padding: 12px 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: white;
}

.brand-name {
    font-weight: 700;
    font-size: 14px;
    color: #3c3f48;
}

.product-title {
    font-size: 12px;
    font-weight: 500;
    color: #6c6f78;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.price-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.old-price {
    font-size: 13px;
    color: #a2a5b0;
    text-decoration: line-through;
    position: relative;
}

.discount-badge {
    background: #e94560;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 20px;
    line-height: 1.3;
}

.current-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-weight: 800;
    font-size: 18px;
    color: #202020;
    margin-right: auto;
}

.toman-symbol {
    font-size: 14px;
    font-weight: 500;
}

/* کارت "همه محصولات" */
.view-all-card {
    background: linear-gradient(145deg, #f2f0ec, #fffbf5);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s;
}

.view-all-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 1rem;
    text-align: center;
}

.view-all-text {
    font-weight: 700;
    font-size: 16px;
    color: #2c2e36;
}

.responsive-tip {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 60px;
    padding: 6px 12px;
}

/* ریسپانسیو */
@media (min-width: 768px) {
    .product-card {
        width: 220px;
    }
    .slider-title {
        font-size: 1.5rem;
    }
    .badge-icon {
        padding: 8px 18px;
        font-size: 16px;
    }
    .product-title {
        font-size: 13px;
    }
}

/* فضای انتهایی */
.dummy-margin {
    width: 8px;
    flex-shrink: 0;
}

/* اضافه کردن استایل دکمه‌های ناوبری (فقط روی دسکتاپ نمایش داده می‌شوند) */
.nav-arrow {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 40px;
height: 40px;
background: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
z-index: 10;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
transition: all 0.2s ease;
border: 1px solid rgba(0, 0, 0, 0.08);
opacity: 0;
visibility: hidden;
pointer-events: none;
}

.digi-slider-wrapper:hover .nav-arrow {
opacity: 1;
visibility: visible;
pointer-events: auto;
}

.nav-arrow:hover {
background: #f0f0f0;
transform: translateY(-50%) scale(1.05);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.nav-arrow-left {
right: 12px;
}

.nav-arrow-right {
left: 12px;
}

.nav-arrow svg {
width: 24px;
height: 24px;
fill: #23262e;
}

/* پنهان کردن اسکرول بار در تمام مرورگرها (ویندوز، مک، موبایل) */
.carousel-track-container {
scrollbar-width: none; /* فایرفاکس */
-ms-overflow-style: none; /* اینترنت اکسپلورر و اج قدیم */
}

.carousel-track-container::-webkit-scrollbar {
display: none; /* کروم، سافاری، اج جدید */
}

/* فعال کردن drag-to-scroll با ماوس */
.carousel-track-container {
cursor: grab;
user-select: none;
scroll-behavior: smooth;
}

.carousel-track-container:active {
cursor: grabbing;
}

/* اطمینان از اینکه لینک‌ها هنگام drag باز نمی‌شوند */
.products-slider a {
pointer-events: auto;
}

/* جلوگیری از انتخاب متن هنگام drag */
.carousel-track-container.dragging {
cursor: grabbing;
scroll-behavior: auto;
}

.carousel-track-container.dragging .product-card {
pointer-events: none;
}

/* ریسپانسیو: پنهان کردن دکمه‌های ناوبری در موبایل */
@media (max-width: 768px) {
.nav-arrow {
display: none;
}
}
