/* ================================================================
   Product Showcase Slider — product-slider.css
   استایل اسلایدر محصولات پرفروش صفحه اصلی
   ================================================================ */

/* ─── Section ──────────────────────────────────────────────── */
.product-slider-section {
    margin-bottom: 80px;
}

/* ─── Slider Wrapper ────────────────────────────────────────── */
.ps-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ─── Track Container ───────────────────────────────────────── */
.ps-track-container {
    flex: 1;
    overflow: hidden;
    border-radius: 16px;
    touch-action: pan-y;
    direction: rtl;
}

/* ─── Track (the moving belt) ──────────────────────────────── */
.ps-track {
    display: flex;
    flex-direction: row;
    direction: rtl;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    cursor: grab;
    -webkit-user-drag: none;
    user-drag: none;
}

.ps-track.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.ps-track img,
.ps-track a {
    -webkit-user-drag: none;
    user-drag: none;
}

/* ─── Individual Slide ──────────────────────────────────────── */
.ps-slide {
    flex: 0 0 calc(100% / 3);   /* دسکتاپ: ۳ کارت */
    min-width: 0;
    padding: 0 10px;
    box-sizing: border-box;
    direction: rtl;
    text-align: right;
}

/* ─── Product Card ──────────────────────────────────────────── */
.ps-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    padding: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ps-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 240, 255, 0.18), 0 0 0 1px rgba(0, 240, 255, 0.25);
    border-color: rgba(0, 240, 255, 0.3);
}

/* ─── Badges ─────────────────────────────────────────────────── */
.ps-card-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    pointer-events: none;
}

.ps-card-badge {
    font-size: 11px !important;
    font-weight: 800 !important;
    padding: 4px 10px !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
    letter-spacing: normal !important;
    pointer-events: auto;
}

.ps-badge-discount {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: #fff !important;
    font-size: 10px !important;
    padding: 4px 9px !important;
    border-radius: 20px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
    pointer-events: auto;
}

/* ─── Image Area ─────────────────────────────────────────────── */
.ps-card-image-wrap {
    display: block;
    width: 100%;
    height: 195px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.05), rgba(157, 78, 221, 0.08));
    flex-shrink: 0;
}

.ps-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.ps-card:hover .ps-card-img {
    transform: scale(1.06);
}

/* ─── Sales Overlay ──────────────────────────────────────────── */
.ps-sales-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
    padding: 22px 12px 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-emerald, #00e676);
    backdrop-filter: blur(2px);
}

/* ─── Card Body ──────────────────────────────────────────────── */
.ps-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ─── Platform Tag ───────────────────────────────────────────── */
.ps-platform-tag {
    margin-bottom: 8px;
}

/* ─── Title ──────────────────────────────────────────────────── */
.ps-card-title {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    line-height: 1.45;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Short Description ──────────────────────────────────────── */
.ps-card-desc {
    font-size: 12px;
    color: var(--text-secondary, #8892a4);
    line-height: 1.65;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* ─── Star Rating ────────────────────────────────────────────── */
.ps-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 12px;
}

.ps-stars {
    display: flex;
    align-items: center;
    gap: 1px;
}

.ps-review-count {
    font-size: 11px;
    color: var(--text-muted, #5a6270);
}

/* ─── Price Row ──────────────────────────────────────────────── */
.ps-price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

.ps-price-main {
    font-size: 18px;
    font-weight: 900;
    color: var(--accent-cyan, #00f0ff);
    letter-spacing: -0.3px;
    line-height: 1;
}

.ps-price-main small {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.8;
}

.ps-price-original {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted, #5a6270);
    text-decoration: line-through;
}

.ps-price-original small {
    font-size: 10px;
}

/* ─── CTA Button ─────────────────────────────────────────────── */
.ps-cta-btn {
    font-size: 13px !important;
    padding: 10px 16px !important;
    font-weight: 800 !important;
    transition: all 0.2s ease !important;
}

.ps-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 183, 3, 0.4) !important;
}

/* ─── Navigation Buttons ─────────────────────────────────────── */
.ps-nav-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(0, 240, 255, 0.25);
    background: rgba(0, 240, 255, 0.07);
    color: rgba(0, 240, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    outline: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 5;
}

.ps-nav-btn:hover:not(:disabled) {
    background: rgba(0, 240, 255, 0.15);
    border-color: rgba(0, 240, 255, 0.55);
    color: #00f0ff;
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.3);
    transform: scale(1.08);
}

.ps-nav-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.ps-nav-btn:disabled,
.ps-nav-btn[disabled] {
    opacity: 0.28;
    cursor: not-allowed;
    transform: none;
}

.ps-nav-btn:focus-visible {
    outline: 2px solid var(--accent-cyan, #00f0ff);
    outline-offset: 2px;
}

/* ─── Dot Indicators ─────────────────────────────────────────── */
.ps-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin-top: 22px;
    direction: rtl;
}

.ps-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.ps-dot:hover {
    background: rgba(0, 240, 255, 0.4);
}

.ps-dot.ps-dot-active {
    background: var(--accent-gold, #ffb703);
    width: 22px;
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(255, 183, 3, 0.55);
}

.ps-dot:focus-visible {
    outline: 2px solid var(--accent-cyan, #00f0ff);
    outline-offset: 2px;
}

/* ─── Responsive ─────────────────────────────────────────────── */

/* تبلت: ۲ کارت */
@media (max-width: 1023px) {
    .ps-slide {
        flex: 0 0 50%;
    }
    .ps-nav-btn {
        width: 40px;
        height: 40px;
    }
}

/* موبایل: ۱ کارت — navigation buttons زیر اسلایدر */
@media (max-width: 767px) {
    .ps-slide {
        flex: 0 0 100%;
        padding: 0 4px;
    }
    .ps-nav-btn {
        width: 38px;
        height: 38px;
    }
    .ps-slider-wrapper {
        gap: 8px;
    }
    .ps-card-image-wrap {
        height: 170px;
    }
}

@media (max-width: 480px) {
    .ps-nav-btn {
        width: 34px;
        height: 34px;
    }
    .ps-nav-btn svg {
        width: 16px;
        height: 16px;
    }
    .ps-card-body {
        padding: 14px 14px 16px;
    }
}
