/* ============================================================
 *  Janiyar Segal — Featured Products (Modern Isometric)
 *
 * @version 1.0.0
 * ============================================================ */

/* ============================================================
 *  Wrapper بخش
 * ============================================================ */
.js-featured-modern {
    position: relative;
    padding-block: clamp(60px, 8vw, 100px);
    background: #f5f6f8;
    overflow: hidden;
}

.js-featured-modern::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(10, 22, 40, 0.08) 50%, transparent 100%);
}

/* ============================================================
 *  هدر بخش
 * ============================================================ */
.js-featured-modern__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 16px;
}

.js-featured-modern__eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #8a9099;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.js-featured-modern__title {
    font-size: clamp(26px, 3.5vw, 38px);
    font-weight: 900;
    color: #0a1628;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

/* ============================================================
 *  توضیحات + دکمه
 * ============================================================ */
.js-featured-modern__intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 32px;
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid #e2e5eb;
    flex-wrap: wrap;
}

.js-featured-modern__desc {
    font-size: 14.5px;
    line-height: 2;
    color: #64748b;
    margin: 0;
    max-width: 620px;
    text-align: right;
}

.js-featured-modern__all-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    background: #ffffff;
    color: #0a1628 !important;
    -webkit-text-fill-color: #0a1628;
    border: 1.5px solid #e2e5eb;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}
.js-featured-modern__all-btn:hover {
    background: #0a1628;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
    border-color: #0a1628;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(10, 22, 40, 0.15);
}
.js-featured-modern__all-btn svg {
    transition: transform 280ms ease;
}
.js-featured-modern__all-btn:hover svg {
    transform: translateX(-4px);
}

/* ============================================================
 *  گرید محصولات — ۴ ستونی
 * ============================================================ */
.js-featured-modern__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

/* ============================================================
 *  کارت محصول
 * ============================================================ */
.js-featured-modern__card {
    background: #ffffff;
    border: 1px solid #e8eaee;
    border-radius: 14px;
    overflow: hidden;
    transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.js-featured-modern__card::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #d4a84b 0%, #e5bd5f 100%);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 500ms cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.js-featured-modern__card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 20px 40px rgba(10, 22, 40, 0.12),
        0 4px 12px rgba(10, 22, 40, 0.06);
    border-color: rgba(212, 168, 75, 0.4);
}

.js-featured-modern__card:hover::before {
    transform: scaleX(1);
}

.js-featured-modern__card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
    flex: 1;
}

/* ============================================================
 *  تصویر محصول
 * ============================================================ */
.js-featured-modern__card-media {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(135deg, #fafbfc 0%, #f0f2f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.js-featured-modern__card-media::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 100%, rgba(10, 22, 40, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.js-featured-modern__card-media img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 8px 20px rgba(10, 22, 40, 0.08));
}

.js-featured-modern__card:hover .js-featured-modern__card-media img {
    transform: scale(1.08) translateY(-4px);
    filter: drop-shadow(0 16px 32px rgba(10, 22, 40, 0.15));
}

/* ============================================================
 *  اطلاعات محصول
 * ============================================================ */
.js-featured-modern__card-body {
    padding: 18px 20px 8px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.js-featured-modern__card-title {
    font-size: 15.5px;
    font-weight: 800;
    color: #0a1628;
    margin: 0;
    line-height: 1.4;
    letter-spacing: -0.2px;
}

.js-featured-modern__card-subtitle {
    font-size: 11.5px;
    font-weight: 500;
    color: #8a9099;
    margin: 0;
    line-height: 1.4;
    letter-spacing: 0.3px;
}

/* ============================================================
 *  دکمه کارت
 * ============================================================ */
.js-featured-modern__card-footer {
    padding: 12px 20px 20px;
    display: flex;
    justify-content: center;
}

.js-featured-modern__card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    color: #0a1628;
    border: 1.5px solid #e2e5eb;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    transition: all 320ms cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.js-featured-modern__card-btn svg {
    transition: transform 320ms ease;
}

.js-featured-modern__card:hover .js-featured-modern__card-btn {
    background: #0a1628;
    color: #ffffff;
    border-color: #0a1628;
    box-shadow: 0 8px 20px rgba(10, 22, 40, 0.2);
}

.js-featured-modern__card:hover .js-featured-modern__card-btn svg {
    transform: translateX(-4px);
}

/* ============================================================
 *  ریسپانسیو
 * ============================================================ */
@media (max-width: 1024px) {
    .js-featured-modern__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .js-featured-modern {
        padding-block: 60px;
    }

    .js-featured-modern__intro {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        margin-bottom: 32px;
        padding-bottom: 24px;
    }

    .js-featured-modern__all-btn {
        justify-content: center;
        width: 100%;
    }

    .js-featured-modern__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .js-featured-modern__card-body {
        padding: 14px 14px 6px;
    }

    .js-featured-modern__card-title {
        font-size: 14px;
    }

    .js-featured-modern__card-subtitle {
        font-size: 10.5px;
    }

    .js-featured-modern__card-footer {
        padding: 10px 14px 16px;
    }

    .js-featured-modern__card-btn {
        font-size: 12.5px;
        padding: 9px 14px;
    }
}

@media (max-width: 480px) {
    .js-featured-modern__title {
        font-size: 24px;
    }
    .js-featured-modern__desc {
        font-size: 13.5px;
    }
}

/* ============================================================
 *  Reduced motion
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .js-featured-modern__card,
    .js-featured-modern__card-media img,
    .js-featured-modern__card-btn {
        transition: none;
    }
}