/* ==========================================================================
   Magnetech Showcase Box Frontend Styles
   ========================================================================== */

@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

.magnetech-showcase-container {
    direction: rtl;
    text-align: right;
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    border-radius: 24px;
    padding: 24px 28px;
    margin: 32px 0;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04), 0 4px 12px -2px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.6);
    position: relative;
    box-sizing: border-box;
    transition: all 0.3s ease;
    overflow: hidden;
}

.magnetech-showcase-container * {
    box-sizing: border-box;
}

/* Header Section */
.magnetech-showcase-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.magnetech-header-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.magnetech-badge-icon {
    width: 44px;
    height: 44px;
    background: #ffffff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.magnetech-header-titles {
    display: flex;
    align-items: center;
}

/* Prefixed so a theme's heading margins cannot push the title off the icon's centre. */
.magnetech-showcase-container .magnetech-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.3;
    color: inherit;
}

/* Showcase Slider / Wrapper */
.magnetech-showcase-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.magnetech-cards-track {
    display: flex;
    gap: 16px;
    width: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 6px 4px;
    scrollbar-width: none; /* Firefox */
}

.magnetech-cards-track::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Navigation Arrows */
.magnetech-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: #334155;
    transition: all 0.2s ease;
}

.magnetech-slider-btn:hover {
    background: #2563EB;
    color: #ffffff;
    border-color: #2563EB;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
}

.magnetech-prev-btn {
    right: -16px;
}

.magnetech-next-btn {
    left: -16px;
}

/* Card Design */
.magnetech-card {
    flex: 0 0 100%;
    max-width: 100%;
    background: #ffffff;
    border-radius: 18px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.magnetech-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.magnetech-card-image {
    width: 84px;
    height: 84px;
    flex-shrink: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #F8FAFC;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #F1F5F9;
}

.magnetech-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.magnetech-placeholder-img {
    display: flex;
    align-items: center;
    justify-content: center;
}

.magnetech-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.magnetech-card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.magnetech-card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0F172A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.magnetech-card-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #FEF9C3;
    color: #854D0E;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    flex-shrink: 0;
}

.magnetech-card-rating .star {
    color: #EAB308;
    font-size: 0.85rem;
}

.magnetech-card-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.magnetech-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
}

.category-badge {
    background: #F1F5F9;
    color: #475569;
}

.pro-badge {
    background: linear-gradient(135deg, #EC4899, #8B5CF6);
    color: #ffffff;
}

.magnetech-card-desc {
    margin: 0;
    font-size: 0.82rem;
    color: #64748B;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.magnetech-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 4px;
}

.magnetech-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2563EB;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.magnetech-card-btn:hover {
    background: #1D4ED8;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
    transform: translateX(-3px);
}

.magnetech-card-btn svg {
    transition: transform 0.2s ease;
}

.magnetech-card-btn:hover svg {
    transform: translateX(-3px);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .magnetech-showcase-container {
        padding: 18px 16px;
        border-radius: 18px;
    }

    .magnetech-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px 16px;
    }

    .magnetech-card-image {
        width: 100%;
        height: 140px;
    }

    .magnetech-card-header-row {
        width: 100%;
    }

    .magnetech-card-footer {
        width: 100%;
    }

    .magnetech-card-btn {
        width: 100%;
        justify-content: center;
    }
}
