/**
 * Modern Product Cards - iOS-like Design for Demo 1
 * 
 * Clean, minimal design inspired by Apple/iOS
 * Features:
 * - Clean white cards with gray borders
 * - Fully rounded corners (16px)
 * - NO shadows anywhere
 * - NO animations/transitions
 * - Gray typography
 * - Generous white space
 * - Professional design
 * 
 * @package MLM
 * @version 2.0.0
 * @demo Demo 1 (Default)
 */

/* ============================================
   CSS Variables - iOS-like Design System
   ============================================ */
:root {
    --mlm-product-white: #ffffff;
    --mlm-product-gray-50: #f9fafb;
    --mlm-product-gray-100: #f3f4f6;
    --mlm-product-gray-200: #e5e7eb;
    --mlm-product-gray-300: #d1d5db;
    --mlm-product-gray-400: #9ca3af;
    --mlm-product-gray-500: #6b7280;
    --mlm-product-gray-600: #4b5563;
    --mlm-product-gray-700: #374151;
    --mlm-product-gray-800: #1f2937;
    --mlm-product-gray-900: #111827;
    
    --mlm-product-accent: #F97316;
    --mlm-product-accent-light: #fb923c;
    
    --mlm-product-border: 1px solid var(--mlm-product-gray-200);
    --mlm-product-radius: 12px; /* Smaller border radius */
    --mlm-product-radius-sm: 6px; /* Smaller border radius */
    --mlm-product-radius-full: 9999px;
    --mlm-card-actions-height: 64px;
    --mlm-hover-lift: 72px;
    --mlm-discount-size: 32px;
    --mlm-title-min-height: 2.8em;
    
    --mlm-product-transition: all 0.2s ease;
}

/* Products Grid - 3 products per row */
.mlm-recent-products-wrapper .modern-products-grid,
.mlm-author-content .modern-products-grid,
.mlm-products-grid .modern-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 35px 25px; /* gap عمودی بیشتر برای فضای دکمه‌ها */
    padding: 0 40px 80px; /* padding پایین برای ردیف آخر */
}

/* Modern Product Card - Home page AND Related Products AND Products Slider Widget AND Author Page */
.mlm-recent-products-wrapper .modern-product-card,
.mlm-related-products-modern .modern-product-card,
.mlm-products-slider-wrapper .modern-product-card,
.mlm-author-content .modern-product-card,
.mlm-products-grid .modern-product-card {
    background: var(--mlm-product-white) !important;
    border: var(--mlm-product-border) !important;
    border-radius: var(--mlm-product-radius) !important;
    overflow: visible; /* تغییر به visible تا دکمه‌ها بیرون بیان */
    /* NO SHADOW - iOS style */
    box-shadow: none !important;
    /* NO TRANSITION - iOS style */
    transition: none !important;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 320px !important; /* Smaller card height */
}

.mlm-recent-products-wrapper .modern-product-card:hover,
.mlm-related-products-modern .modern-product-card:hover,
.mlm-products-slider-wrapper .modern-product-card:hover,
.mlm-author-content .modern-product-card:hover,
.mlm-products-grid .modern-product-card:hover {
    /* NO transform or shadow on hover - iOS style */
    transform: none !important;
    box-shadow: none !important;
    border-color: var(--mlm-product-gray-300) !important;
}

/* Card Image Area - Rectangular با نسبت ثابت */
.mlm-recent-products-wrapper .modern-product-card .item-header,
.mlm-products-slider-wrapper .modern-product-card .item-header,
.mlm-author-content .modern-product-card .item-header,
.mlm-products-grid .modern-product-card .item-header {
    width: 100%;
    padding-top: 55% !important; /* Smaller image ratio */
    position: relative;
    overflow: hidden;
    background: var(--mlm-product-gray-100);
    border-radius: 12px 12px 0 0 !important; /* Smaller border radius */
}

.mlm-recent-products-wrapper .modern-product-card .item-header a,
.mlm-products-slider-wrapper .modern-product-card .item-header a,
.mlm-author-content .modern-product-card .item-header a,
.mlm-products-grid .modern-product-card .item-header a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mlm-recent-products-wrapper .modern-product-card .item-header img,
.mlm-products-slider-wrapper .modern-product-card .item-header img,
.mlm-author-content .modern-product-card .item-header img,
.mlm-products-grid .modern-product-card .item-header img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* تصویر کل فضا رو پر می‌کنه */
    object-position: top center; /* نمایش از بالا - پایین برش می‌خورد */
    /* NO TRANSITION - iOS style */
    transition: filter 0.35s ease;
    display: block;
}

.mlm-recent-products-wrapper .modern-product-card:hover .item-header img,
.mlm-products-slider-wrapper .modern-product-card:hover .item-header img,
.mlm-author-content .modern-product-card:hover .item-header img,
.mlm-products-grid .modern-product-card:hover .item-header img {
    /* NO transform on hover - iOS style */
    transform: none !important;
    filter: brightness(0.85);
}

/* VIP and OFF badges - با position absolute */
.mlm-recent-products-wrapper .modern-product-card .item-header .vip,
.mlm-recent-products-wrapper .modern-product-card .item-header .off,
.mlm-products-slider-wrapper .modern-product-card .item-header .vip,
.mlm-products-slider-wrapper .modern-product-card .item-header .off,
.mlm-author-content .modern-product-card .item-header .vip,
.mlm-author-content .modern-product-card .item-header .off,
.mlm-products-grid .modern-product-card .item-header .vip,
.mlm-products-grid .modern-product-card .item-header .off {
    position: absolute;
    z-index: 2;
}

.mlm-recent-products-wrapper .modern-product-card .item-header .vip,
.mlm-products-slider-wrapper .modern-product-card .item-header .vip,
.mlm-author-content .modern-product-card .item-header .vip,
.mlm-products-grid .modern-product-card .item-header .vip {
    top: 8px !important; /* Smaller spacing */
    right: 8px !important; /* Smaller spacing */
    background: var(--mlm-product-accent);
    color: var(--mlm-product-white);
    width: 24px !important; /* Smaller badge */
    height: 24px !important;
    border-radius: var(--mlm-product-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px !important; /* Smaller icon */
    /* NO SHADOW - iOS style */
    box-shadow: none !important;
    border: none;
}

.mlm-recent-products-wrapper .modern-product-card .item-header .off,
.mlm-products-slider-wrapper .modern-product-card .item-header .off,
.mlm-author-content .modern-product-card .item-header .off,
.mlm-products-grid .modern-product-card .item-header .off {
    top: 8px !important; /* Smaller spacing */
    left: 8px !important; /* Smaller spacing */
    padding: 4px 10px !important; /* Smaller padding */
    border-radius: var(--mlm-product-radius-full);
    font-size: 10px !important; /* Smaller font */
    font-weight: 600;
    color: var(--mlm-product-white);
    background: var(--mlm-product-accent);
    /* NO SHADOW - iOS style */
    box-shadow: none !important;
    border: none;
}

/* Product Title Area */
.mlm-recent-products-wrapper .modern-product-card .item-title,
.mlm-products-slider-wrapper .modern-product-card .item-title,
.mlm-author-content .modern-product-card .item-title,
.mlm-products-grid .modern-product-card .item-title {
    padding: 10px 12px !important; /* Smaller padding */
    background: var(--mlm-product-white);
    border-bottom: var(--mlm-product-border);
}

.mlm-recent-products-wrapper .modern-product-card .item-title h4,
.mlm-products-slider-wrapper .modern-product-card .item-title h4,
.mlm-author-content .modern-product-card .item-title h4,
.mlm-products-grid .modern-product-card .item-title h4 {
    margin: 0;
    font-size: 13px !important; /* Smaller font */
    font-weight: 600;
    line-height: 1.4 !important; /* Tighter line height */
    color: var(--mlm-product-gray-900);
}

.mlm-recent-products-wrapper .modern-product-card .item-title a,
.mlm-products-slider-wrapper .modern-product-card .item-title a,
.mlm-author-content .modern-product-card .item-title a,
.mlm-products-grid .modern-product-card .item-title a {
    color: var(--mlm-product-gray-900);
    text-decoration: none;
    /* NO TRANSITION - iOS style */
    transition: none !important;
}

.mlm-recent-products-wrapper .modern-product-card .item-title a:hover,
.mlm-products-slider-wrapper .modern-product-card .item-title a:hover,
.mlm-author-content .modern-product-card .item-title a:hover,
.mlm-products-grid .modern-product-card .item-title a:hover {
    color: var(--mlm-product-accent);
}

/* Product Footer - Price and Meta */
.mlm-recent-products-wrapper .modern-product-card .item-footer,
.mlm-products-slider-wrapper .modern-product-card .item-footer,
.mlm-author-content .modern-product-card .item-footer,
.mlm-products-grid .modern-product-card .item-footer {
    padding: 10px 12px !important; /* Smaller padding */
    background: var(--mlm-product-white);
    position: relative;
    flex: 1; /* فضای باقی‌مانده رو می‌گیره */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 0 0 12px 12px !important; /* Smaller border radius */
    overflow: hidden; /* برای border-radius */
}

.mlm-recent-products-wrapper .modern-product-card .item-meta,
.mlm-products-slider-wrapper .modern-product-card .item-meta,
.mlm-author-content .modern-product-card .item-meta,
.mlm-products-grid .modern-product-card .item-meta {
    display: inline-block;
    background: var(--mlm-product-gray-100);
    color: var(--mlm-product-gray-700);
    padding: 3px 8px !important; /* Smaller padding */
    border-radius: 6px !important; /* Smaller radius */
    font-size: 10px !important; /* Smaller font */
    font-weight: 600;
    margin: 1px !important; /* Smaller margin */
    border: var(--mlm-product-border);
}

.mlm-recent-products-wrapper .modern-product-card .item-meta.download,
.mlm-products-slider-wrapper .modern-product-card .item-meta.download,
.mlm-author-content .modern-product-card .item-meta.download,
.mlm-products-grid .modern-product-card .item-meta.download {
    background: var(--mlm-product-gray-50);
    color: var(--mlm-product-gray-700);
    border-color: var(--mlm-product-gray-200);
}

.mlm-recent-products-wrapper .modern-product-card .item-meta.price,
.mlm-products-slider-wrapper .modern-product-card .item-meta.price,
.mlm-author-content .modern-product-card .item-meta.price,
.mlm-products-grid .modern-product-card .item-meta.price {
    background: var(--mlm-product-gray-50);
    color: var(--mlm-product-accent);
    border-color: var(--mlm-product-gray-200);
}

/* Hover Effect - Buttons */
.mlm-recent-products-wrapper .modern-product-card,
.mlm-products-slider-wrapper .modern-product-card,
.mlm-author-content .modern-product-card,
.mlm-products-grid .modern-product-card {
    z-index: 1;
}

.mlm-recent-products-wrapper .modern-product-card:hover,
.mlm-products-slider-wrapper .modern-product-card:hover,
.mlm-author-content .modern-product-card:hover,
.mlm-products-grid .modern-product-card:hover {
    z-index: 100; /* افزایش z-index هنگام hover */
}

.mlm-recent-products-wrapper .modern-product-card .hover-buttons,
.mlm-products-slider-wrapper .modern-product-card .hover-buttons,
.mlm-author-content .modern-product-card .hover-buttons,
.mlm-products-grid .modern-product-card .hover-buttons {
    position: static;
    display: flex;
    align-items: center;
    gap: 6px !important; /* Smaller gap */
    padding: 8px 10px !important; /* Smaller padding */
    margin-top: 8px !important; /* Smaller margin */
    background: var(--mlm-product-white);
    border-top: 1px solid var(--mlm-product-gray-200);
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
    pointer-events: auto;
    border-radius: 0 0 12px 12px !important; /* Smaller border radius */
}

/* Add to Cart Button */
.mlm-recent-products-wrapper .hover-buttons .btn-add-to-cart,
.mlm-products-slider-wrapper .hover-buttons .btn-add-to-cart,
.mlm-author-content .hover-buttons .btn-add-to-cart,
.mlm-products-grid .hover-buttons .btn-add-to-cart {
    flex: 1;
    background: var(--mlm-primary-color, var(--mlm-product-gray-900));
    color: var(--mlm-product-white);
    border: none !important;
    border-radius: 6px !important; /* Smaller radius */
    padding: 8px 10px !important; /* Smaller padding */
    font-weight: 600;
    font-size: 11px !important; /* Smaller font */
    cursor: pointer;
    transition: filter 0.25s ease, background 0.25s ease !important;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    box-shadow: none !important;
}

.mlm-recent-products-wrapper .hover-buttons .btn-add-to-cart:hover,
.mlm-products-slider-wrapper .hover-buttons .btn-add-to-cart:hover,
.mlm-author-content .hover-buttons .btn-add-to-cart:hover,
.mlm-products-grid .hover-buttons .btn-add-to-cart:hover {
    filter: brightness(0.9);
}

/* Preview Button */
.mlm-recent-products-wrapper .hover-buttons .btn-preview,
.mlm-products-slider-wrapper .hover-buttons .btn-preview,
.mlm-author-content .hover-buttons .btn-preview,
.mlm-products-grid .hover-buttons .btn-preview {
    flex: 1;
    background: var(--mlm-product-white);
    color: var(--mlm-product-gray-700);
    border: var(--mlm-product-border);
    border-radius: 6px !important; /* Smaller radius */
    padding: 8px 10px !important; /* Smaller padding */
    font-weight: 600;
    font-size: 11px !important; /* Smaller font */
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease !important;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    box-shadow: none !important;
}

.mlm-recent-products-wrapper .hover-buttons .btn-preview:hover,
.mlm-products-slider-wrapper .hover-buttons .btn-preview:hover,
.mlm-author-content .hover-buttons .btn-preview:hover,
.mlm-products-grid .hover-buttons .btn-preview:hover {
    background: var(--mlm-product-gray-50);
    border-color: var(--mlm-product-gray-300);
    color: var(--mlm-product-gray-900);
}

/* Preview button always visible now */

/* Vendor Section */
.mlm-recent-products-wrapper .modern-product-card .item-vendor,
.mlm-products-slider-wrapper .modern-product-card .item-vendor,
.mlm-author-content .modern-product-card .item-vendor,
.mlm-products-grid .modern-product-card .item-vendor {
    display: flex;
    align-items: center;
    padding: 6px 0 !important; /* Smaller padding */
    text-decoration: none;
    color: var(--mlm-product-gray-600);
    /* NO TRANSITION - iOS style */
    transition: none !important;
    font-size: 10px !important; /* Smaller font */
}

.mlm-recent-products-wrapper .modern-product-card .item-vendor:hover,
.mlm-products-slider-wrapper .modern-product-card .item-vendor:hover,
.mlm-author-content .modern-product-card .item-vendor:hover,
.mlm-products-grid .modern-product-card .item-vendor:hover {
    color: var(--mlm-product-gray-900);
}

.mlm-recent-products-wrapper .modern-product-card .item-vendor img,
.mlm-products-slider-wrapper .modern-product-card .item-vendor img,
.mlm-author-content .modern-product-card .item-vendor img,
.mlm-products-grid .modern-product-card .item-vendor img {
    width: 18px !important; /* Smaller image */
    height: 18px !important;
    border-radius: var(--mlm-product-radius-full);
    margin-left: 6px !important; /* Smaller margin */
    border: var(--mlm-product-border);
    /* NO TRANSITION - iOS style */
    transition: none !important;
}

.mlm-recent-products-wrapper .modern-product-card .item-vendor.verified img,
.mlm-products-slider-wrapper .modern-product-card .item-vendor.verified img,
.mlm-author-content .modern-product-card .item-vendor.verified img,
.mlm-products-grid .modern-product-card .item-vendor.verified img {
    border-color: var(--mlm-product-gray-700);
}

/* Product Info Layout (Overrides for new design) */
.mlm-recent-products-wrapper .modern-product-card .item-info-shell,
.mlm-products-slider-wrapper .modern-product-card .item-info-shell,
.mlm-author-content .modern-product-card .item-info-shell,
.mlm-products-grid .modern-product-card .item-info-shell {
    position: relative;
    background: transparent;
    border-radius: 0 0 12px 12px !important; /* Smaller border radius */
    overflow: visible;
}

.mlm-recent-products-wrapper .modern-product-card .item-info,
.mlm-products-slider-wrapper .modern-product-card .item-info,
.mlm-author-content .modern-product-card .item-info,
.mlm-products-grid .modern-product-card .item-info {
    background: var(--mlm-product-white);
    border-top: none;
    border-radius: 0 0 12px 12px !important; /* Smaller border radius */
    padding: 10px 12px !important; /* Smaller padding */
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    overflow: hidden;
    box-shadow: none !important; /* NO SHADOW - iOS style */
    z-index: 2;
    transition: none !important; /* NO TRANSITION - iOS style */
    flex: 1 1 auto;
    justify-content: space-between;
}

.mlm-recent-products-wrapper .modern-product-card .item-info-body,
.mlm-products-slider-wrapper .modern-product-card .item-info-body,
.mlm-author-content .modern-product-card .item-info-body,
.mlm-products-grid .modern-product-card .item-info-body {
    display: flex;
    flex-direction: column;
    gap: 8px !important; /* Smaller gap */
    flex: 1 1 auto;
    min-height: 0; /* Allow flex shrinking */
}

/* Force consistent pricing height for home page cards - CRITICAL */
.mlm-recent-products-wrapper .modern-product-card .item-info-body .item-price-stack,
.mlm-author-content .modern-product-card .item-info-body .item-price-stack,
.mlm-products-grid .modern-product-card .item-info-body .item-price-stack {
    min-height: 32px !important; /* Fixed height */
    height: 32px !important; /* Force exact height even when only one line */
    padding-right: 36px !important; /* Space for discount badge (28px + 8px gap) */
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
}

/* CRITICAL: Force exact height for author page cards - exactly like home page */
.mlm-author-content .modern-product-card .item-info-body .item-pricing,
.mlm-products-grid .modern-product-card .item-info-body .item-pricing {
    min-height: 32px !important; /* Fixed height: max of price-stack (32px) and pricing-meta (18px) */
    height: 32px !important; /* Force exact height */
    align-items: flex-start !important; /* Keep items aligned to top */
}

.mlm-author-content .modern-product-card .item-info-body .item-price-stack,
.mlm-products-grid .modern-product-card .item-info-body .item-price-stack {
    min-height: 32px !important;
    height: 32px !important;
    padding-right: 36px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
}

.mlm-author-content .modern-product-card .item-info-body .item-price-current,
.mlm-products-grid .modern-product-card .item-info-body .item-price-current {
    line-height: 1.2 !important;
    min-height: 14px !important;
    display: block !important;
}

.mlm-author-content .modern-product-card .item-info-body .item-price-regular,
.mlm-products-grid .modern-product-card .item-info-body .item-price-regular {
    line-height: 1.2 !important;
    min-height: 12px !important;
}

.mlm-author-content .modern-product-card .item-info-body .item-discount-badge,
.mlm-products-grid .modern-product-card .item-info-body .item-discount-badge {
    display: inline-flex !important;
    top: 0 !important;
    right: 0 !important;
    margin: 0 !important;
}

.mlm-recent-products-wrapper .modern-product-card .item-info-body .item-pricing-meta,
.mlm-author-content .modern-product-card .item-info-body .item-pricing-meta,
.mlm-products-grid .modern-product-card .item-info-body .item-pricing-meta {
    min-height: 18px !important; /* Fixed height for metrics */
    height: 18px !important; /* Force exact height */
    align-self: flex-start !important; /* Keep aligned to top */
}

.mlm-recent-products-wrapper .modern-product-card .item-info,
.mlm-products-slider-wrapper .modern-product-card .item-info,
.mlm-author-content .modern-product-card .item-info,
.mlm-products-grid .modern-product-card .item-info {
    transform: none !important;
    padding-bottom: 0;
}

.mlm-recent-products-wrapper .modern-product-card .item-title,
.mlm-recent-products-wrapper .modern-product-card .item-info-body .item-title,
.mlm-products-slider-wrapper .modern-product-card .item-title,
.mlm-author-content .modern-product-card .item-title,
.mlm-author-content .modern-product-card .item-info-body .item-title,
.mlm-products-grid .modern-product-card .item-title {
    margin: 0;
    padding: 0 !important;
    min-height: auto !important; /* Let title take natural height, but ensure consistent pricing height */
    background: transparent !important;
    border: none !important;
}

.mlm-recent-products-wrapper .modern-product-card .item-title a,
.mlm-products-slider-wrapper .modern-product-card .item-title a,
.mlm-author-content .modern-product-card .item-title a,
.mlm-products-grid .modern-product-card .item-title a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #2F2F2F;
    font-size: 13px !important; /* Smaller font */
    font-weight: 500;
    line-height: 1.4 !important; /* Tighter line height */
    transition: color 0.25s ease !important;
}

.mlm-recent-products-wrapper .modern-product-card:hover .item-title a,
.mlm-products-slider-wrapper .modern-product-card:hover .item-title a,
.mlm-author-content .modern-product-card:hover .item-title a,
.mlm-products-grid .modern-product-card:hover .item-title a {
    color: var(--mlm-product-accent);
}

.mlm-recent-products-wrapper .modern-product-card .item-pricing,
.mlm-recent-products-wrapper .modern-product-card .item-info-body .item-pricing,
.mlm-products-slider-wrapper .modern-product-card .item-pricing,
.mlm-author-content .modern-product-card .item-pricing,
.mlm-author-content .modern-product-card .item-info-body .item-pricing,
.mlm-products-grid .modern-product-card .item-pricing {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px !important; /* Smaller gap */
    flex-wrap: nowrap;
    position: relative !important;
    min-height: 32px !important; /* Fixed height to prevent card height changes */
}

/* CRITICAL: Force exact height for home page cards */
.mlm-recent-products-wrapper .modern-product-card .item-info-body .item-pricing,
.mlm-author-content .modern-product-card .item-info-body .item-pricing,
.mlm-products-grid .modern-product-card .item-info-body .item-pricing {
    min-height: 32px !important; /* Fixed height: max of price-stack (32px) and pricing-meta (18px) */
    height: 32px !important; /* Force exact height */
    align-items: flex-start !important; /* Keep items aligned to top */
}

.mlm-recent-products-wrapper .modern-product-card .item-discount-badge,
.mlm-recent-products-wrapper .modern-product-card .item-info-body .item-discount-badge,
.mlm-recent-products-wrapper .modern-product-card .item-pricing .item-discount-badge,
.mlm-products-slider-wrapper .modern-product-card .item-discount-badge,
.mlm-author-content .modern-product-card .item-discount-badge,
.mlm-author-content .modern-product-card .item-info-body .item-discount-badge,
.mlm-author-content .modern-product-card .item-pricing .item-discount-badge,
.mlm-products-grid .modern-product-card .item-discount-badge {
    width: 28px !important; /* Smaller badge */
    height: 28px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 6px !important; /* Smaller radius */
    font-size: 11px !important; /* Smaller font */
    font-weight: 700;
    color: #fff;
    background: var(--mlm-discount-bg, var(--mlm-product-accent));
    flex-shrink: 0;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    z-index: 1;
    margin: 0 !important;
}

.mlm-recent-products-wrapper .modern-product-card .item-discount-badge.empty,
.mlm-products-slider-wrapper .modern-product-card .item-discount-badge.empty,
.mlm-author-content .modern-product-card .item-discount-badge.empty,
.mlm-products-grid .modern-product-card .item-discount-badge.empty {
    background: transparent;
    border: 1px solid transparent;
    color: transparent;
    position: absolute !important;
    top: 0;
    right: 0;
    z-index: 1;
    pointer-events: none;
}

.mlm-recent-products-wrapper .modern-product-card .item-price-stack,
.mlm-recent-products-wrapper .modern-product-card .item-info-body .item-price-stack,
.mlm-products-slider-wrapper .modern-product-card .item-price-stack,
.mlm-author-content .modern-product-card .item-price-stack,
.mlm-author-content .modern-product-card .item-info-body .item-price-stack,
.mlm-products-grid .modern-product-card .item-price-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
    min-height: 32px !important; /* Fixed height: 14px (price-current) + 2px (gap) + 12px (regular price) + 4px (buffer) */
    height: 32px !important; /* Force exact height - CRITICAL for consistent card heights */
    padding-right: 36px !important; /* Space for discount badge (28px + 8px gap) - always reserve space */
    box-sizing: border-box !important;
}

.mlm-recent-products-wrapper .modern-product-card .item-price-current,
.mlm-recent-products-wrapper .modern-product-card .item-info-body .item-price-current,
.mlm-products-slider-wrapper .modern-product-card .item-price-current,
.mlm-author-content .modern-product-card .item-price-current,
.mlm-author-content .modern-product-card .item-info-body .item-price-current,
.mlm-products-grid .modern-product-card .item-price-current {
    font-size: 12px !important; /* Smaller font */
    font-weight: 500;
    color: #2F2F2F;
    line-height: 1.2 !important; /* Tighter line height */
    min-height: 14px !important; /* Fixed height for single line */
    display: block !important;
}

.mlm-recent-products-wrapper .modern-product-card .item-price-current.free,
.mlm-products-slider-wrapper .modern-product-card .item-price-current.free,
.mlm-author-content .modern-product-card .item-price-current.free,
.mlm-products-grid .modern-product-card .item-price-current.free {
    color: var(--mlm-product-accent);
}

.mlm-recent-products-wrapper .modern-product-card .item-price-regular,
.mlm-products-slider-wrapper .modern-product-card .item-price-regular,
.mlm-author-content .modern-product-card .item-price-regular,
.mlm-products-grid .modern-product-card .item-price-regular {
    font-size: 10px !important; /* Smaller font */
    color: #B7A191;
    text-decoration: line-through;
    line-height: 1.2 !important; /* Tighter line height */
    min-height: 12px !important; /* Fixed height for single line */
}

.mlm-recent-products-wrapper .modern-product-card .item-file-meta,
.mlm-products-slider-wrapper .modern-product-card .item-file-meta,
.mlm-author-content .modern-product-card .item-file-meta,
.mlm-products-grid .modern-product-card .item-file-meta {
    font-size: 11px !important; /* Smaller font */
    color: var(--mlm-product-gray-600);
    display: inline-flex;
    align-items: center;
    gap: 4px !important; /* Smaller gap */
}

.mlm-recent-products-wrapper .modern-product-card .item-pricing-meta,
.mlm-recent-products-wrapper .modern-product-card .item-info-body .item-pricing-meta,
.mlm-products-slider-wrapper .modern-product-card .item-pricing-meta,
.mlm-author-content .modern-product-card .item-pricing-meta,
.mlm-author-content .modern-product-card .item-info-body .item-pricing-meta,
.mlm-products-grid .modern-product-card .item-pricing-meta {
    display: flex;
    align-items: center;
    gap: 8px !important; /* Smaller gap */
    flex-shrink: 0;
    min-height: 18px !important; /* Fixed height for metrics (icon 11px + gap 3px + buffer) */
}

.mlm-recent-products-wrapper .modern-product-card .metric,
.mlm-products-slider-wrapper .modern-product-card .metric,
.mlm-author-content .modern-product-card .metric,
.mlm-products-grid .modern-product-card .metric {
    display: inline-flex;
    align-items: center;
    gap: 3px !important; /* Smaller gap */
    font-size: 10px !important; /* Smaller font */
    color: var(--mlm-product-gray-500);
}

.mlm-recent-products-wrapper .modern-product-card .metric-icon svg,
.mlm-products-slider-wrapper .modern-product-card .metric-icon svg,
.mlm-author-content .modern-product-card .metric-icon svg,
.mlm-products-grid .modern-product-card .metric-icon svg {
    width: 11px !important; /* Smaller icon */
    height: 11px !important;
}

.mlm-recent-products-wrapper .modern-product-card .metric-icon-star .icon-star-full,
.mlm-products-slider-wrapper .modern-product-card .metric-icon-star .icon-star-full,
.mlm-author-content .modern-product-card .metric-icon-star .icon-star-full,
.mlm-products-grid .modern-product-card .metric-icon-star .icon-star-full {
    font-size: 12px !important; /* Smaller icon */
    color: #F5B318;
    display: inline-block;
    line-height: 1;
}

.mlm-recent-products-wrapper .modern-product-card .metric-number,
.mlm-products-slider-wrapper .modern-product-card .metric-number,
.mlm-author-content .modern-product-card .metric-number,
.mlm-products-grid .modern-product-card .metric-number {
    font-weight: 600;
    color: var(--mlm-product-gray-600);
}

.mlm-recent-products-wrapper .modern-product-card .hover-buttons,
.mlm-products-slider-wrapper .modern-product-card .hover-buttons,
.mlm-author-content .modern-product-card .hover-buttons,
.mlm-products-grid .modern-product-card .hover-buttons {
    position: static;
    display: flex;
    align-items: center;
    gap: var(--mlm-ios-space-sm, 12px);
    padding: var(--mlm-ios-space-sm, 12px) var(--mlm-ios-space-md, 16px);
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
    pointer-events: auto;
    background: var(--mlm-product-white);
    border-top: 1px solid var(--mlm-product-gray-200);
}

.mlm-recent-products-wrapper .hover-buttons .btn-add-to-cart,
.mlm-products-slider-wrapper .hover-buttons .btn-add-to-cart,
.mlm-author-content .hover-buttons .btn-add-to-cart,
.mlm-products-grid .hover-buttons .btn-add-to-cart {
    flex: 1;
    background: var(--mlm-primary-color, var(--mlm-product-gray-900));
    color: var(--mlm-product-white);
    border: none !important;
    border-radius: 6px !important; /* Smaller radius */
    padding: 8px 10px !important; /* Smaller padding */
    font-weight: 600;
    font-size: 11px !important; /* Smaller font */
    text-align: center;
    transition: filter 0.25s ease, background 0.25s ease !important;
}

.mlm-recent-products-wrapper .hover-buttons .btn-add-to-cart:hover,
.mlm-products-slider-wrapper .hover-buttons .btn-add-to-cart:hover,
.mlm-author-content .hover-buttons .btn-add-to-cart:hover,
.mlm-products-grid .hover-buttons .btn-add-to-cart:hover {
    filter: brightness(0.9);
}

.mlm-recent-products-wrapper .hover-buttons .btn-preview,
.mlm-products-slider-wrapper .hover-buttons .btn-preview,
.mlm-author-content .hover-buttons .btn-preview,
.mlm-products-grid .hover-buttons .btn-preview {
    flex: 1;
    background: var(--mlm-product-white);
    color: var(--mlm-product-gray-700);
    border: var(--mlm-product-border);
    border-radius: 6px !important; /* Smaller radius */
    padding: 8px 10px !important; /* Smaller padding */
    font-weight: 600;
    font-size: 11px !important; /* Smaller font */
    text-align: center;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease !important;
}

.mlm-recent-products-wrapper .hover-buttons .btn-preview:hover,
.mlm-products-slider-wrapper .hover-buttons .btn-preview:hover,
.mlm-author-content .hover-buttons .btn-preview:hover,
.mlm-products-grid .hover-buttons .btn-preview:hover {
    background: var(--mlm-product-gray-50);
    border-color: var(--mlm-product-gray-300);
    color: var(--mlm-product-gray-900);
}

.mlm-recent-products-wrapper .modern-product-card .item-price-stack .woocommerce-Price-currencySymbol,
.mlm-products-slider-wrapper .modern-product-card .item-price-stack .woocommerce-Price-currencySymbol,
.mlm-author-content .modern-product-card .item-price-stack .woocommerce-Price-currencySymbol,
.mlm-products-grid .modern-product-card .item-price-stack .woocommerce-Price-currencySymbol,
.mlm-recent-products-wrapper .modern-product-card .item-price-stack .woocommerce-Price-suffix,
.mlm-products-slider-wrapper .modern-product-card .item-price-stack .woocommerce-Price-suffix,
.mlm-author-content .modern-product-card .item-price-stack .woocommerce-Price-suffix,
.mlm-products-grid .modern-product-card .item-price-stack .woocommerce-Price-suffix {
    color: #747474;
    font-weight: 400;
}

/* Badge Styles */
.mlm-recent-products-wrapper .modern-product-card .vip,
.mlm-author-content .modern-product-card .vip,
.mlm-products-grid .modern-product-card .vip {
    background: var(--mlm-product-accent);
    color: var(--mlm-product-white);
    padding: 4px 10px !important; /* Smaller padding */
    border-radius: var(--mlm-product-radius-full);
    font-size: 10px !important; /* Smaller font */
    font-weight: 600;
    position: absolute;
    top: 8px !important; /* Smaller spacing */
    right: 8px !important; /* Smaller spacing */
    /* NO SHADOW - iOS style */
    box-shadow: none !important;
    border: none;
    width: 24px !important; /* Smaller badge */
    height: 24px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mlm-recent-products-wrapper .modern-product-card .off,
.mlm-author-content .modern-product-card .off,
.mlm-products-grid .modern-product-card .off {
    background: var(--mlm-product-accent);
    color: var(--mlm-product-white);
    padding: 4px 10px !important; /* Smaller padding */
    border-radius: var(--mlm-product-radius-full);
    font-size: 10px !important; /* Smaller font */
    font-weight: 600;
    position: absolute;
    top: 8px !important; /* Smaller spacing */
    left: 8px !important; /* Smaller spacing */
    /* NO SHADOW - iOS style */
    box-shadow: none !important;
    border: none;
    max-width: 60px !important; /* Smaller max width */
    max-height: 22px !important; /* Smaller max height */
}

/* Responsive Design */

/* تبلت (2 کارت) */
@media (max-width: 1024px) {
    .mlm-recent-products-wrapper .modern-products-grid,
    .mlm-author-content .modern-products-grid,
    .mlm-products-grid .modern-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 30px 20px;
    }
    
    .mlm-recent-products-wrapper .modern-product-card,
    .mlm-products-slider-wrapper .modern-product-card,
    .mlm-author-content .modern-product-card,
    .mlm-products-grid .modern-product-card {
        min-height: auto;
        overflow: hidden;
    }
    
    .mlm-recent-products-wrapper .modern-product-card .item-header,
    .mlm-products-slider-wrapper .modern-product-card .item-header,
    .mlm-author-content .modern-product-card .item-header,
    .mlm-products-grid .modern-product-card .item-header {
        padding-top: 55% !important; /* Smaller image ratio */
    }
    
    .mlm-recent-products-wrapper .modern-product-card .item-info,
    .mlm-products-slider-wrapper .modern-product-card .item-info,
    .mlm-author-content .modern-product-card .item-info,
    .mlm-products-grid .modern-product-card .item-info {
        padding-bottom: 0;
    }
    
    /* دکمه‌ها در تبلت بدون hover - همیشه نمایش داده می‌شوند */
    .mlm-recent-products-wrapper .modern-product-card .hover-buttons,
    .mlm-products-slider-wrapper .modern-product-card .hover-buttons,
    .mlm-author-content .modern-product-card .hover-buttons,
    .mlm-products-grid .modern-product-card .hover-buttons {
        position: static;
        margin-top: 0;
        border-top: none;
        box-shadow: none !important;
        border-radius: 0;
    }
}

/* موبایل (1 کارت) */
@media (max-width: 768px) {
    .mlm-recent-products-wrapper .modern-products-grid,
    .mlm-author-content .modern-products-grid,
    .mlm-products-grid .modern-products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 20px 20px;
    }
    
    .mlm-recent-products-wrapper .modern-product-card,
    .mlm-products-slider-wrapper .modern-product-card,
    .mlm-author-content .modern-product-card,
    .mlm-products-grid .modern-product-card {
        min-height: auto;
        overflow: hidden;
    }
    
    .mlm-recent-products-wrapper .modern-product-card .item-header,
    .mlm-products-slider-wrapper .modern-product-card .item-header,
    .mlm-author-content .modern-product-card .item-header,
    .mlm-products-grid .modern-product-card .item-header {
        padding-top: 55% !important; /* Smaller image ratio */
    }
    
    .mlm-recent-products-wrapper .modern-product-card .item-info,
    .mlm-products-slider-wrapper .modern-product-card .item-info,
    .mlm-author-content .modern-product-card .item-info,
    .mlm-products-grid .modern-product-card .item-info {
        padding: 15px;
        transform: none !important;
    }
    
    .mlm-recent-products-wrapper .modern-product-card .hover-buttons,
    .mlm-products-slider-wrapper .modern-product-card .hover-buttons,
    .mlm-author-content .modern-product-card .hover-buttons,
    .mlm-products-grid .modern-product-card .hover-buttons {
        position: static;
        margin-top: 0;
        border-top: none;
        flex-direction: row;
        gap: var(--mlm-ios-space-sm, 12px);
        box-shadow: none !important;
        border-radius: 0;
    }
}

/* موبایل کوچک (دکمه‌های عمودی) */
@media (max-width: 480px) {
    .mlm-recent-products-wrapper .modern-products-grid,
    .mlm-author-content .modern-products-grid,
    .mlm-products-grid .modern-products-grid {
        padding: 0 15px 20px;
    }
    
    /* دکمه‌ها به صورت عمودی */
    .mlm-recent-products-wrapper .modern-product-card .hover-buttons,
    .mlm-products-slider-wrapper .modern-product-card .hover-buttons,
    .mlm-author-content .modern-product-card .hover-buttons,
    .mlm-products-grid .modern-product-card .hover-buttons {
        flex-direction: column;
        gap: 8px;
        padding: 12px 15px;
    }
    
    .mlm-recent-products-wrapper .hover-buttons .btn-add-to-cart,
    .mlm-recent-products-wrapper .hover-buttons .btn-preview,
    .mlm-products-slider-wrapper .hover-buttons .btn-add-to-cart,
    .mlm-products-slider-wrapper .hover-buttons .btn-preview,
    .mlm-author-content .hover-buttons .btn-add-to-cart,
    .mlm-author-content .hover-buttons .btn-preview,
    .mlm-products-grid .hover-buttons .btn-add-to-cart,
    .mlm-products-grid .hover-buttons .btn-preview {
        font-size: 10px !important; /* Smaller font on small mobile */
        padding: 7px 9px !important; /* Smaller padding */
    }
}