/* MK Product Widgets v5.0.0 - Frontend Stylesheet (10 Themes x 6 Layouts) */
:root {
    --mk-primary: #2563eb;
    --mk-primary-hover: #1d4ed8;
    --mk-primary-soft: rgba(37, 99, 235, 0.12);
    --mk-success: #059669;
    --mk-danger: #ef4444;
    --mk-surface: #ffffff;
    --mk-surface-alt: #f8fafc;
    --mk-border: #e2e8f0;
    --mk-text: #0f172a;
    --mk-text-muted: #64748b;
    --mk-radius: 18px;
}

.mk-widget-section {
    font-family: "mk_product_widgets", Vazirmatn, IRANSans, Tahoma, sans-serif;
    margin: 42px 0;
    direction: rtl;
    text-align: right;
    position: relative;
    container-type: inline-size;
    container-name: mkwidget;
}
.mk-widget-section *, .mk-widget-section *::before, .mk-widget-section *::after {
    box-sizing: border-box;
}

/* Radius Modes */
.mk-radius-sharp { --mk-radius: 8px; }
.mk-radius-rounded { --mk-radius: 18px; }
.mk-radius-pill { --mk-radius: 28px; }

/* Header */
.mk-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 14px;
}
.mk-widget-heading-group { display: flex; flex-direction: column; gap: 6px; }
.mk-widget-title {
    font-size: 23px;
    font-weight: 800;
    color: var(--mk-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.4;
}
.mk-widget-title::before {
    content: "";
    width: 6px;
    height: 28px;
    background: var(--mk-primary);
    border-radius: 99px;
    display: inline-block;
    flex-shrink: 0;
}
.mk-widget-subtitle {
    margin: 0;
    padding-right: 18px;
    font-size: 13.5px;
    color: var(--mk-text-muted);
    line-height: 1.6;
}
.mk-header-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 99px;
    background: var(--mk-primary-soft);
    color: var(--mk-primary) !important;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.25s ease;
}
.mk-header-cta:hover {
    background: var(--mk-primary);
    color: #fff !important;
    transform: translateX(-3px);
}

/* Card Base */
.tf-card {
    width: 100%;
    background: var(--mk-surface);
    border-radius: var(--mk-radius);
    overflow: hidden;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    border: 1px solid var(--mk-border);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}
.tf-card-accent {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    width: 100%;
    background: var(--mk-primary);
    z-index: 6;
    pointer-events: none;
}

/* Hover Effects */
.mk-hover-lift .tf-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 22px 38px -10px var(--mk-primary-soft), 0 6px 14px -4px rgba(15, 23, 42, 0.08);
    border-color: var(--mk-primary);
    z-index: 5;
}
.mk-hover-glow .tf-card:hover {
    box-shadow: 0 0 0 2px var(--mk-primary), 0 14px 32px -4px var(--mk-primary-soft);
    border-color: var(--mk-primary);
    z-index: 5;
}
.mk-hover-zoom .tf-card:hover {
    transform: scale(1.025);
    box-shadow: 0 18px 34px -8px rgba(15, 23, 42, 0.14);
    z-index: 5;
}
.mk-hover-tilt .tf-card:hover {
    transform: translateY(-5px) rotate(-0.6deg);
    box-shadow: 0 20px 34px -8px rgba(15, 23, 42, 0.14);
    z-index: 5;
}
.mk-hover-none .tf-card:hover { transform: none; }

/* Featured Card Highlight */
.tf-card.is-featured {
    border: 2px solid var(--mk-primary);
    box-shadow: 0 12px 30px -6px var(--mk-primary-soft);
}
.mk-featured-chip {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 99px;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.35);
}
.mk-featured-banner {
    background: var(--mk-primary);
    color: #fff;
    text-align: center;
    font-size: 11.5px;
    font-weight: 800;
    padding: 5px 12px;
    letter-spacing: 0.3px;
}

/* =========================================================
   10 READY-MADE PREMIUM THEMES
   ========================================================= */

/* 1. Modern SaaS */
.mk-theme-modern .tf-card { background: #ffffff; border-color: #e2e8f0; }

/* 2. Dark VIP */
.mk-theme-dark .tf-card {
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
    border-color: #334155;
    box-shadow: 0 12px 30px -6px rgba(2, 6, 23, 0.48);
}
.mk-theme-dark .tf-card-body { background: transparent; }
.mk-theme-dark .tf-card-title, .mk-theme-dark .mk-features-list li { color: #f8fafc; }
.mk-theme-dark .tf-card-subtitle { color: #93c5fd; }
.mk-theme-dark .tf-card-desc { color: #cbd5e1; }
.mk-theme-dark .tf-card-footer { border-top-color: #334155; }
.mk-theme-dark .tf-price { color: #34d399; }
.mk-theme-dark .tf-price.is-free { color: #38bdf8; }
.mk-theme-dark .tf-price span { color: #94a3b8; }
.mk-theme-dark .tf-old-price { color: #64748b; }
.mk-theme-dark .mk-countdown { background: rgba(239, 68, 68, 0.14); border-color: rgba(248, 113, 113, 0.35); color: #fca5a5; }
.mk-theme-dark .mk-cd-box { background: rgba(15, 23, 42, 0.85); color: #fecaca; }
.mk-theme-dark .mk-comp-price-box { background: rgba(15, 23, 42, 0.65); border-color: #334155; }
.mk-theme-dark .tf-btn-demo { background: #334155; color: #f8fafc !important; border-color: #475569; }

/* 3. Nordic Minimal */
.mk-theme-minimal .tf-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    box-shadow: none;
}
.mk-theme-minimal .tf-card:hover { background: #ffffff; }
.mk-theme-minimal .tf-card-body { background: transparent; }
.mk-theme-minimal .tf-btn { background: #0f172a; box-shadow: none; }
.mk-theme-minimal .tf-btn:hover { background: var(--mk-primary); }

/* 4. Glassmorphism Pro */
.mk-theme-glass {
    background: radial-gradient(circle at 85% 15%, rgba(99, 102, 241, 0.12), transparent 45%),
                radial-gradient(circle at 15% 85%, rgba(236, 72, 153, 0.10), transparent 45%);
    padding: 26px;
    border-radius: calc(var(--mk-radius) + 8px);
}
.mk-theme-glass .tf-card {
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 10px 35px -5px rgba(79, 70, 229, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.mk-theme-glass .tf-card-body { background: transparent; }
.mk-theme-glass .tf-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.3);
}

/* 5. Aurora Gradient Hero */
.mk-theme-gradient_hero .tf-card {
    background: #ffffff;
    border-color: #e0e7ff;
}
.mk-theme-gradient_hero .tf-card-accent {
    display: block;
    height: 5px;
    background: linear-gradient(90deg, #4f46e5, #ec4899, #06b6d4);
}
.mk-theme-gradient_hero .tf-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.28);
}

/* 6. Cyber Neon Gaming */
.mk-theme-neon_gaming .tf-card {
    background: linear-gradient(180deg, #090d16 0%, #111827 100%);
    border: 1px solid rgba(6, 182, 212, 0.35);
    box-shadow: 0 0 24px rgba(6, 182, 212, 0.10);
}
.mk-theme-neon_gaming .tf-card:hover {
    border-color: #22d3ee;
    box-shadow: 0 0 32px rgba(6, 182, 212, 0.28);
}
.mk-theme-neon_gaming .tf-card-accent {
    display: block;
    height: 3px;
    background: linear-gradient(90deg, #06b6d4, #a855f7);
}
.mk-theme-neon_gaming .tf-card-body { background: transparent; }
.mk-theme-neon_gaming .tf-card-title, .mk-theme-neon_gaming .mk-features-list li { color: #ecfeff; }
.mk-theme-neon_gaming .tf-card-subtitle { color: #22d3ee; }
.mk-theme-neon_gaming .tf-card-desc { color: #94a3b8; }
.mk-theme-neon_gaming .tf-card-footer { border-top-color: rgba(6, 182, 212, 0.22); }
.mk-theme-neon_gaming .tf-price { color: #22d3ee; text-shadow: 0 0 12px rgba(34, 211, 238, 0.3); }
.mk-theme-neon_gaming .tf-price span { color: #94a3b8; }
.mk-theme-neon_gaming .tf-btn {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.35);
}
.mk-theme-neon_gaming .mk-comp-price-box { background: rgba(6, 182, 212, 0.08); border-color: rgba(6, 182, 212, 0.25); }
.mk-theme-neon_gaming .tf-btn-demo { background: #1e293b; color: #22d3ee !important; border-color: #0891b2; }

/* 7. Royal Gold VIP */
.mk-theme-gold_luxury .tf-card {
    background: linear-gradient(165deg, #18181b 0%, #27272a 100%);
    border: 1px solid rgba(245, 158, 11, 0.42);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.38);
}
.mk-theme-gold_luxury .tf-card:hover {
    border-color: #fbbf24;
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.22);
}
.mk-theme-gold_luxury .tf-card-accent {
    display: block;
    height: 4px;
    background: linear-gradient(90deg, #b45309, #fbbf24, #b45309);
}
.mk-theme-gold_luxury .tf-card-body { background: transparent; }
.mk-theme-gold_luxury .tf-card-title, .mk-theme-gold_luxury .mk-features-list li { color: #fefce8; }
.mk-theme-gold_luxury .tf-card-subtitle { color: #fbbf24; }
.mk-theme-gold_luxury .tf-card-desc { color: #d4d4d8; }
.mk-theme-gold_luxury .tf-card-footer { border-top-color: rgba(245, 158, 11, 0.24); }
.mk-theme-gold_luxury .tf-price { color: #fbbf24; }
.mk-theme-gold_luxury .tf-price span { color: #a1a1aa; }
.mk-theme-gold_luxury .tf-btn {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    color: #18181b !important;
    font-weight: 800;
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35);
}
.mk-theme-gold_luxury .mk-comp-price-box { background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.28); }
.mk-theme-gold_luxury .tf-btn-demo { background: #27272a; color: #fbbf24 !important; border-color: #92400e; }

/* 8. Soft Clay Pastel */
.mk-theme-soft_pastel .tf-card {
    background: linear-gradient(180deg, #ffffff 0%, #fdf2f8 100%);
    border: 1px solid #fbcfe8;
    border-radius: 26px;
    box-shadow: 0 10px 25px -5px rgba(236, 72, 153, 0.10);
}
.mk-theme-soft_pastel .tf-card-body { background: transparent; }
.mk-theme-soft_pastel .tf-card-subtitle { color: #db2777; }
.mk-theme-soft_pastel .tf-btn {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    border-radius: 99px;
    box-shadow: 0 6px 16px rgba(236, 72, 153, 0.26);
}

/* 9. Corporate Enterprise B2B */
.mk-theme-corporate_pro .tf-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.mk-theme-corporate_pro .tf-card-accent {
    display: block;
    height: 4px;
    background: #0f766e;
}
.mk-theme-corporate_pro .tf-price { color: #0f766e; }
.mk-theme-corporate_pro .tf-btn {
    background: #0f766e;
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.24);
}
.mk-theme-corporate_pro .tf-btn:hover { background: #115e59; }

/* 10. Flash Sale High Conversion */
.mk-theme-flash_sale .tf-card {
    background: linear-gradient(180deg, #fffbfb 0%, #fff1f2 100%);
    border: 1.5px solid #fecdd3;
    box-shadow: 0 8px 24px -4px rgba(225, 29, 72, 0.12);
}
.mk-theme-flash_sale .tf-card-accent {
    display: block;
    height: 4px;
    background: linear-gradient(90deg, #e11d48, #f97316);
}
.mk-theme-flash_sale .tf-card-body { background: transparent; }
.mk-theme-flash_sale .tf-price { color: #e11d48; }
.mk-theme-flash_sale .tf-btn {
    background: linear-gradient(135deg, #e11d48, #f97316);
    box-shadow: 0 6px 18px rgba(225, 29, 72, 0.32);
}

/* Image Wrapper */
.tf-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 194px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    flex-shrink: 0;
}
.tf-img-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.34) 0%, transparent 50%);
    pointer-events: none;
}
.tf-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    display: block;
}
.tf-card:hover .tf-card-img { transform: scale(1.07); }

/* Badges & Ribbons */
.mk-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #fff;
    padding: 4px 11px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 800;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
    line-height: 1.45;
    max-width: calc(100% - 96px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mk-badge.mk-ribbon-corner {
    top: 0;
    right: 14px;
    border-radius: 0 0 10px 10px;
    padding: 5px 12px;
}
.mk-badge.mk-ribbon-glow {
    animation: mkPulseBadge 2.2s infinite;
}
@keyframes mkPulseBadge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

.mk-cat-pill {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #f8fafc;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
    max-width: calc(100% - 92px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mk-discount-pill {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    color: #fff;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 800;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(225, 29, 72, 0.35);
    white-space: nowrap;
}
.mk-rating-pill {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.94);
    color: #b45309;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    white-space: nowrap;
}

/* Countdown Timer */
.mk-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: #fef2f2;
    color: #dc2626;
    font-size: 11.5px;
    padding: 7px 10px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-weight: 700;
    border: 1px solid #fecaca;
    flex-wrap: wrap;
}
.mk-cd-box {
    background: #ffffff;
    color: #b91c1c;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 800;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    font-variant-numeric: tabular-nums;
}
.mk-countdown.is-expired { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }

/* Card Body & Typography */
.tf-card-body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    background: var(--mk-surface);
    z-index: 2;
}
.tf-card-title {
    font-size: 16.5px;
    font-weight: 800;
    color: var(--mk-text);
    margin: 0 0 6px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tf-card-subtitle {
    font-size: 12px;
    font-weight: 700;
    color: var(--mk-primary);
    margin-bottom: 10px;
    line-height: 1.4;
}
.tf-card-desc {
    font-size: 13.5px;
    color: var(--mk-text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Features List */
.mk-features-list {
    list-style: none;
    margin: 0 0 16px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex-grow: 1;
}
.mk-features-list.is-inline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
}
.mk-features-list li {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--mk-text);
    line-height: 1.45;
}
.mk-features-list li svg { color: #10b981; flex-shrink: 0; }

/* Card Footer & Actions */
.tf-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 15px;
    border-top: 1px dashed var(--mk-border);
    margin-top: auto;
    gap: 10px;
}
.tf-price-wrap { display: flex; flex-direction: column; min-width: 0; }
.tf-old-price { font-size: 12px; color: #94a3b8; text-decoration: line-through; font-weight: 600; margin-bottom: 2px; }
.tf-price { font-size: 17.5px; font-weight: 900; color: var(--mk-success); line-height: 1.25; }
.tf-price.is-free { color: #0284c7; }
.tf-price span { font-size: 11px; font-weight: 600; color: #64748b; display: block; margin-top: 2px; }

.tf-actions-wrap { display: flex; align-items: center; gap: 7px; flex-shrink: 0; margin-right: auto; }
.tf-btn {
    background: var(--mk-primary);
    color: #fff !important;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px var(--mk-primary-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
    max-width: 100%;
}
.tf-btn:hover { filter: brightness(1.08); transform: translateY(-2px); color: #fff !important; }
.tf-btn.tf-btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 9px; }
.tf-btn-demo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 11px;
    border-radius: 11px;
    background: #f1f5f9;
    color: #334155 !important;
    border: 1px solid #cbd5e1;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none !important;
    transition: 0.2s;
}
.tf-btn-demo:hover { background: #e2e8f0; color: #0f172a !important; }

/* =========================================================
   6 LAYOUT MODES
   ========================================================= */
.mk-grid {
    display: grid;
    grid-template-columns: repeat(var(--mk-cols-desktop, 4), minmax(0, 1fr));
    gap: 24px;
    padding: 8px 0;
}
.mk-grid-item { display: flex; min-width: 0; }
.mk-swiper { overflow: hidden; width: 100%; padding: 14px 0 40px 0; }
.mk-swiper .swiper-wrapper { display: flex; }
.mk-swiper .swiper-slide { height: auto !important; display: flex; flex-shrink: 0; }
.mk-widget-container { position: relative; padding: 0 54px; }
.mk-widget-container.is-grid { padding: 0; }

/* Layout: List */
.mk-list { display: flex; flex-direction: column; gap: 18px; }
.mk-layout-list .tf-card { flex-direction: row; align-items: stretch; }
.mk-layout-list .tf-img-wrapper { width: 280px; height: auto; min-height: 195px; flex-shrink: 0; }
.mk-layout-list .tf-card-body { flex-direction: column; justify-content: space-between; min-width: 0; }

/* Layout: Bento */
.mk-bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.mk-bento .is-bento-hero { grid-column: span 2; }
.mk-bento .is-bento-hero .tf-card { flex-direction: row; }
.mk-bento .is-bento-hero .tf-img-wrapper { width: 46%; height: auto; min-height: 260px; flex-shrink: 0; }
.mk-bento .is-bento-hero .tf-card-body { min-width: 0; }

/* Layout: Comparison */
.mk-comparison {
    display: grid;
    grid-template-columns: repeat(var(--mk-cols-comp, 3), minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}
.mk-layout-comparison .tf-card-body { padding: 24px 22px; text-align: center; }
.mk-comp-cat { font-size: 11.5px; font-weight: 700; color: var(--mk-primary); margin-bottom: 6px; text-transform: uppercase; }
.mk-comp-price-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    margin: 14px 0 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.mk-comp-discount {
    background: #ffe4e6;
    color: #e11d48;
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 800;
}
.mk-layout-comparison .mk-features-list li { justify-content: flex-start; text-align: right; }
.mk-comp-footer { flex-direction: column; border-top: none; padding-top: 8px; }

/* Layout: Compact Strip */
.mk-compact-grid {
    display: grid;
    grid-template-columns: repeat(var(--mk-cols-compact, 4), minmax(0, 1fr));
    gap: 14px;
}
.mk-compact-inner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; }
.mk-compact-thumb { width: 58px; height: 58px; border-radius: 12px; overflow: hidden; flex-shrink: 0; background: #f1f5f9; }
.mk-compact-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mk-compact-info { flex-grow: 1; min-width: 0; }
.mk-compact-info .tf-card-title { font-size: 14px; margin-bottom: 3px; -webkit-line-clamp: 1; }
.mk-compact-price .tf-price { font-size: 14.5px; }
.mk-compact-price .tf-price span { display: inline; margin-right: 4px; font-size: 11px; }

/* Swiper Navigation */
.mk-widget-container .swiper-button-next,
.mk-widget-container .swiper-button-prev {
    background: #ffffff !important;
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.12) !important;
    color: var(--mk-primary) !important;
    border: 1px solid var(--mk-border) !important;
    transition: 0.25s !important;
    margin: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    cursor: pointer;
}
.mk-widget-container .swiper-button-next svg,
.mk-widget-container .swiper-button-prev svg {
    width: 18px !important;
    height: 18px !important;
    transform: none !important;
    display: block !important;
    flex-shrink: 0 !important;
}
.mk-widget-container .swiper-button-next:hover,
.mk-widget-container .swiper-button-prev:hover {
    background: var(--mk-primary) !important;
    color: #fff !important;
    border-color: var(--mk-primary) !important;
}
.mk-widget-container .swiper-button-next.swiper-button-disabled,
.mk-widget-container .swiper-button-prev.swiper-button-disabled {
    opacity: 0.42 !important;
    pointer-events: none;
}
.mk-widget-container .swiper-button-next::after,
.mk-widget-container .swiper-button-prev::after { display: none !important; content: none !important; }
.mk-widget-container .swiper-button-prev { right: 0 !important; left: auto !important; }
.mk-widget-container .swiper-button-next { left: 0 !important; right: auto !important; }
.mk-widget-container .swiper-pagination { position: relative; margin-top: 4px; text-align: center; }
.mk-widget-container .swiper-pagination-bullet {
    width: 8px; height: 8px; transition: 0.3s; background: #cbd5e1;
    opacity: 1; display: inline-block; margin: 0 4px; border-radius: 50%; cursor: pointer;
}
.mk-widget-container .swiper-pagination-bullet-active {
    background: var(--mk-primary); width: 24px; border-radius: 10px;
}

template.mk-widget-tpl { display: none; }

/* Container-Aware & Viewport Responsive Rules */
@container mkwidget (max-width: 960px) {
    .mk-grid { grid-template-columns: repeat(var(--mk-cols-tablet, 2), minmax(0, 1fr)); }
    .mk-comparison { grid-template-columns: repeat(var(--mk-cols-comp-tab, 2), minmax(0, 1fr)); }
    .mk-compact-grid { grid-template-columns: repeat(var(--mk-cols-tablet, 2), minmax(0, 1fr)); }
    .mk-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mk-bento .is-bento-hero { grid-column: span 2; }
    .mk-layout-list .tf-img-wrapper { width: 220px; }
}

@container mkwidget (max-width: 640px) {
    .mk-widget-title { font-size: 19px; }
    .mk-widget-container { padding: 0 4px; }
    .mk-widget-container .swiper-button-prev,
    .mk-widget-container .swiper-button-next { display: none !important; }
    .mk-grid { grid-template-columns: repeat(var(--mk-cols-mobile, 1), minmax(0, 1fr)); gap: 16px; }
    .mk-comparison { grid-template-columns: 1fr; }
    .mk-compact-grid { grid-template-columns: repeat(var(--mk-cols-mobile, 1), minmax(0, 1fr)); }
    .mk-layout-list .tf-card,
    .mk-bento .is-bento-hero .tf-card { flex-direction: column; }
    .mk-layout-list .tf-img-wrapper,
    .mk-bento .is-bento-hero .tf-img-wrapper { width: 100%; height: 175px; min-height: 175px; }
    .mk-bento { grid-template-columns: 1fr; }
    .mk-bento .is-bento-hero { grid-column: span 1; }
    .mk-features-list.is-inline { grid-template-columns: 1fr; }
    .tf-img-wrapper { height: 172px; }
    .tf-card-body { padding: 16px; }
    .tf-price { font-size: 16px; }
    .tf-btn { padding: 9px 13px; font-size: 12.5px; }
    .mk-badge, .mk-discount-pill { font-size: 10px; padding: 3px 8px; }
    .mk-cat-pill, .mk-rating-pill { font-size: 10px; padding: 2px 7px; }
}

@media (max-width: 992px) {
    .mk-grid { grid-template-columns: repeat(var(--mk-cols-tablet, 2), minmax(0, 1fr)); }
    .mk-comparison { grid-template-columns: repeat(var(--mk-cols-comp-tab, 2), minmax(0, 1fr)); }
    .mk-compact-grid { grid-template-columns: repeat(var(--mk-cols-tablet, 2), minmax(0, 1fr)); }
    .mk-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mk-bento .is-bento-hero { grid-column: span 2; }
    .mk-layout-list .tf-img-wrapper { width: 220px; }
}
@media (max-width: 768px) {
    .mk-widget-section { margin: 28px 0; }
    .mk-widget-title { font-size: 19px; }
    .mk-widget-container { padding: 0 4px; }
    .mk-widget-container .swiper-button-prev,
    .mk-widget-container .swiper-button-next { display: none !important; }
    .mk-grid { grid-template-columns: repeat(var(--mk-cols-mobile, 1), minmax(0, 1fr)); gap: 16px; }
    .mk-comparison { grid-template-columns: 1fr; }
    .mk-compact-grid { grid-template-columns: repeat(var(--mk-cols-mobile, 1), minmax(0, 1fr)); }
    .mk-layout-list .tf-card,
    .mk-bento .is-bento-hero .tf-card { flex-direction: column; }
    .mk-layout-list .tf-img-wrapper,
    .mk-bento .is-bento-hero .tf-img-wrapper { width: 100%; height: 175px; min-height: 175px; }
    .mk-bento { grid-template-columns: 1fr; }
    .mk-bento .is-bento-hero { grid-column: span 1; }
    .mk-features-list.is-inline { grid-template-columns: 1fr; }
    .tf-img-wrapper { height: 172px; }
    .tf-card-body { padding: 16px; }
    .tf-price { font-size: 16px; }
    .tf-btn { padding: 9px 13px; font-size: 12.5px; }
    .mk-badge, .mk-discount-pill { font-size: 10px; padding: 3px 8px; }
    .mk-cat-pill, .mk-rating-pill { font-size: 10px; padding: 2px 7px; }
}
