/* ═══════════════════════════════════════════════════════════
   رادیک وب — بخش محصولات ویژه
   فایل: assets/css/products_featured.css
   نسخه: 2.0 — نهایی
   ═══════════════════════════════════════════════════════════ */

/* ═══ ریست پایه ═══ */
.rw-featured-products,
.rw-featured-products * {
    box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════
   بخش اصلی
   ═══════════════════════════════════════════════════════════ */
.rw-featured-products {
    padding: 55px 0;
    background: linear-gradient(180deg, #F8FAFC 0%, #EFF6FF 100%);
    position: relative;
    overflow: hidden;
    direction: rtl;
}

.rw-featured-products::before {
    content: "";
    position: absolute;
    top: -100px;
    right: -100px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.07), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.rw-featured-products::after {
    content: "";
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(30, 58, 138, 0.05), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.rw-fp-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════════════════════
   سربرگ وسط‌چین
   ═══════════════════════════════════════════════════════════ */
.rw-fp-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 16px;
    margin-bottom: 30px;
}

.rw-fp-title-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ═══ آیکون ═══ */
.rw-fp-title-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--rw-primary, #2563EB), var(--rw-secondary, #1E3A8A));
    color: #fff;
    border-radius: 18px;
    font-size: 28px;
    flex-shrink: 0;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
    position: relative;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rw-fp-title-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.35), transparent 60%);
    pointer-events: none;
}

.rw-fp-title-wrap:hover .rw-fp-title-icon {
    transform: scale(1.08) rotate(-5deg);
}

/* ═══ متن ═══ */
.rw-fp-title-text {
    text-align: center;
}

.rw-fp-title-text h2 {
    font-family: 'Lalezar-ExtraBold', sans-serif;
    font-size: clamp(1.4rem, 2.2vw + 0.5rem, 2.2rem);
    color: #1E3A8A;
    margin: 0 0 6px;
    line-height: 1.2;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.rw-fp-title-text h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--rw-primary, #2563EB), transparent);
    margin: 10px auto 0;
    border-radius: 3px;
}

.rw-fp-title-text p {
    font-family: 'Shabnam-Bold-P', Tahoma, sans-serif;
    font-size: 13px;
    color: #64748B;
    margin: 8px 0 0;
    line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════
   اسکرول افقی
   ═══════════════════════════════════════════════════════════ */
.rw-fp-scroll-wrap {
    position: relative;
    margin: 0 -20px;
    padding: 0 20px;
}

.rw-fp-scroll {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 14px 4px 24px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    scrollbar-width: thin;
    scrollbar-color: rgba(37, 99, 235, 0.4) transparent;
}

.rw-fp-scroll.rw-fp-grabbing {
    cursor: grabbing;
    scroll-behavior: auto;
    user-select: none;
}

/* ═══ اسکرول‌بار ═══ */
.rw-fp-scroll::-webkit-scrollbar {
    height: 8px;
}
.rw-fp-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.04);
    border-radius: 10px;
    margin: 0 20px;
}
.rw-fp-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--rw-primary, #2563EB), var(--rw-secondary, #1E3A8A));
    border-radius: 10px;
    transition: opacity 0.3s;
}
.rw-fp-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--rw-primary-hover, #1D4ED8);
}

/* ═══════════════════════════════════════════════════════════
   دکمه‌های ناوبری
   ═══════════════════════════════════════════════════════════ */
.rw-fp-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    background: #fff;
    border: 2px solid rgba(37, 99, 235, 0.12);
    border-radius: 50%;
    color: var(--rw-primary, #2563EB);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 5;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    padding: 0;
}

.rw-fp-nav-btn i {
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rw-fp-nav-prev {
    right: -10px;
}
.rw-fp-nav-next {
    left: -10px;
}

.rw-fp-nav-btn:hover {
    background: linear-gradient(135deg, var(--rw-primary, #2563EB), var(--rw-secondary, #1E3A8A));
    color: #fff;
    border-color: transparent;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.4);
}

.rw-fp-nav-btn.rw-fp-nav-disabled {
    opacity: 0.3;
    pointer-events: none;
    transform: translateY(-50%) scale(0.9);
}

/* ═══ گرادیان‌های محو ═══ */
.rw-fp-fade {
    position: absolute;
    top: 0;
    bottom: 24px;
    width: 50px;
    pointer-events: none;
    z-index: 2;
}

.rw-fp-fade-right {
    right: 0;
    background: linear-gradient(to left, rgba(248, 250, 252, 0.95), transparent);
}

.rw-fp-fade-left {
    left: 0;
    background: linear-gradient(to right, rgba(248, 250, 252, 0.95), transparent);
}

/* ═══════════════════════════════════════════════════════════
   کارت محصول
   ═══════════════════════════════════════════════════════════ */
.rw-fp-card {
    flex: 0 0 240px;
    max-width: 240px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
    scroll-snap-align: start;
    position: relative;
}

.rw-fp-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.18);
    border-color: rgba(37, 99, 235, 0.2);
}

/* ═══ تصویر ═══ */
.rw-fp-img {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #F1F5F9;
}

.rw-fp-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.rw-fp-card:hover .rw-fp-img img {
    transform: scale(1.08);
}

.rw-fp-img-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #E2E8F0, #CBD5E1);
}

.rw-fp-img-empty i {
    font-size: 46px;
    color: #94A3B8;
    opacity: 0.6;
}

/* ═══ برچسب ویژه ═══ */
.rw-fp-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: linear-gradient(135deg, #FBBF24, #D97706);
    color: #fff;
    border-radius: 20px;
    font-family: 'Shabnam-Bold-P', Tahoma, sans-serif;
    font-size: 10px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.45);
    z-index: 3;
    letter-spacing: 0.2px;
}

.rw-fp-badge i {
    font-size: 10px;
    line-height: 1;
}

/* ═══ برچسب تخفیف ═══ */
.rw-fp-discount {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 46px;
    padding: 0 8px;
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: #fff;
    border-radius: 50%;
    font-family: 'Shabnam-Bold-P', Tahoma, sans-serif;
    font-weight: 700;
    z-index: 3;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.5);
    transform: rotate(-8deg);
    transition: transform 0.3s ease;
}

.rw-fp-card:hover .rw-fp-discount {
    transform: rotate(0) scale(1.1);
}

.rw-fp-discount strong {
    font-family: 'Lalezar-ExtraBold', sans-serif;
    font-size: 15px;
    line-height: 1;
    font-weight: 400;
}

.rw-fp-discount small {
    font-size: 8px;
    opacity: 0.9;
    line-height: 1;
    margin-top: 2px;
}

/* ═══ ناموجود ═══ */
.rw-fp-out {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.rw-fp-out span {
    display: inline-block;
    padding: 8px 20px;
    background: #fff;
    color: #DC2626;
    font-family: 'Shabnam-Bold-P', Tahoma, sans-serif;
    font-weight: 700;
    font-size: 12px;
    border-radius: 20px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* ═══════════════════════════════════════════════════════════
   اطلاعات محصول
   ═══════════════════════════════════════════════════════════ */
.rw-fp-info {
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.rw-fp-name {
    font-family: 'Shabnam-Bold-P', Tahoma, sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #1F2937;
    margin: 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 42px;
}

/* ═══ قیمت ═══ */
.rw-fp-price-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px dashed rgba(0, 0, 0, 0.06);
}

.rw-fp-price-old {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #94A3B8;
}

.rw-fp-price-old del {
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.rw-fp-price-old span {
    font-size: 9px;
}

.rw-fp-price-new {
    display: flex;
    align-items: baseline;
    gap: 4px;
    color: var(--rw-primary, #2563EB);
}

.rw-fp-price-new strong {
    font-family: 'Lalezar-ExtraBold', sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
}

.rw-fp-price-new span {
    font-size: 10px;
    opacity: 0.85;
}

/* ═══ دکمه خرید ═══ */
.rw-fp-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 12px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--rw-primary, #2563EB);
    border-radius: 10px;
    font-family: 'Shabnam-Bold-P', Tahoma, sans-serif;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.3s ease;
    margin-top: 4px;
}

.rw-fp-action i {
    font-size: 13px;
    line-height: 1;
}

.rw-fp-card:hover .rw-fp-action {
    background: linear-gradient(135deg, var(--rw-primary, #2563EB), var(--rw-secondary, #1E3A8A));
    color: #fff;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

/* ═══════════════════════════════════════════════════════════
   ریسپانسیو
   ═══════════════════════════════════════════════════════════ */

/* تبلت بزرگ */
@media (max-width: 1200px) {
    .rw-fp-nav-prev { right: 0; }
    .rw-fp-nav-next { left: 0; }
}

/* تبلت */
@media (max-width: 992px) {
    .rw-featured-products { padding: 45px 0; }
    .rw-fp-title-icon { width: 52px; height: 52px; font-size: 24px; border-radius: 16px; }
    .rw-fp-title-wrap { gap: 12px; }
    .rw-fp-card { flex: 0 0 210px; max-width: 210px; }
    .rw-fp-price-new strong { font-size: 18px; }
    .rw-fp-nav-btn { width: 42px; height: 42px; font-size: 18px; }
}

/* موبایل بزرگ */
@media (max-width: 768px) {
    .rw-featured-products { padding: 35px 0; }
    .rw-fp-container { padding: 0 14px; }
    .rw-fp-scroll-wrap { margin: 0 -14px; padding: 0 14px; }
    .rw-fp-fade { width: 30px; }
    .rw-fp-header { margin-bottom: 22px; }
    .rw-fp-title-wrap { gap: 10px; flex-wrap: nowrap; }
    .rw-fp-title-icon { width: 46px; height: 46px; font-size: 22px; border-radius: 14px; }
    .rw-fp-title-text h2 { font-size: 1.4rem; }
    .rw-fp-title-text p { font-size: 12px; margin-top: 6px; }
    .rw-fp-card { flex: 0 0 180px; max-width: 180px; }
    .rw-fp-name { font-size: 12px; min-height: 38px; }
    .rw-fp-price-new strong { font-size: 17px; }
    .rw-fp-action { font-size: 10px; padding: 8px 10px; }
    .rw-fp-info { padding: 12px 12px 14px; }
    .rw-fp-nav-btn { display: none; }
}

/* موبایل */
@media (max-width: 480px) {
    .rw-featured-products { padding: 28px 0; }
    .rw-fp-title-wrap { flex-direction: column; gap: 8px; }
    .rw-fp-title-icon { width: 44px; height: 44px; font-size: 20px; }
    .rw-fp-title-text h2 { font-size: 1.2rem; }
    .rw-fp-title-text p { font-size: 11px; }
    .rw-fp-card { flex: 0 0 160px; max-width: 160px; }
    .rw-fp-badge { font-size: 9px; padding: 4px 10px; }
    .rw-fp-discount { min-width: 40px; height: 40px; }
    .rw-fp-discount strong { font-size: 13px; }
    .rw-fp-discount small { font-size: 7px; }
    .rw-fp-price-old { font-size: 10px; }
    .rw-fp-price-new strong { font-size: 15px; }
}

/* ═══════════════════════════════════════════════════════════
   حالت تاریک
   ═══════════════════════════════════════════════════════════ */
[data-theme="dark"] .rw-featured-products {
    background: linear-gradient(180deg, #0B1220, #0F172A);
}
[data-theme="dark"] .rw-featured-products::before {
    background: radial-gradient(circle, rgba(96, 165, 250, 0.08), transparent 70%);
}
[data-theme="dark"] .rw-featured-products::after {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.06), transparent 70%);
}
[data-theme="dark"] .rw-fp-title-text h2 { color: #F1F5F9; }
[data-theme="dark"] .rw-fp-title-text p { color: #94A3B8; }
[data-theme="dark"] .rw-fp-card {
    background: #111C2F;
    border-color: #1E293B;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .rw-fp-name { color: #E2E8F0; }
[data-theme="dark"] .rw-fp-price-wrap { border-top-color: #1E293B; }
[data-theme="dark"] .rw-fp-nav-btn {
    background: #111C2F;
    border-color: #334155;
    color: #60A5FA;
}
[data-theme="dark"] .rw-fp-fade-right {
    background: linear-gradient(to left, rgba(11, 18, 32, 0.95), transparent);
}
[data-theme="dark"] .rw-fp-fade-left {
    background: linear-gradient(to right, rgba(11, 18, 32, 0.95), transparent);
}
[data-theme="dark"] .rw-fp-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
}