/**
 * Maxkinon Simple Product Styles
 * Frontend styles for custom simple product cards
 * 
 * Typography Scale:
 * - Base: 16px
 * - Small: 14px
 * - Large: 18px
 * - XL: 20px
 * - XXL: 22px
 * 
 * Spacing Scale:
 * - XS: 4px
 * - SM: 8px
 * - MD: 12px
 * - LG: 16px
 * - XL: 20px
 * - XXL: 24px
 */

/* Import Poppins Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* CSS Custom Properties for Design System - Reuse existing tokens */
:root {
    --mkvfe-primary-color: #2563eb;
    --mkvfe-primary-hover: #1d4ed8;
    --mkvfe-secondary-color: #eff6ff;
    --mkvfe-accent-color: #f59e0b;
    --mkvfe-border-color: #e2e8f0;
    --mkvfe-border-hover: #3b82f6;
    --mkvfe-text-primary: #1e293b;
    --mkvfe-text-secondary: #475569;
    --mkvfe-text-muted: #64748b;
    --mkvfe-background: #ffffff;
    --mkvfe-background-muted: #f8fafc;
    --mkvfe-background-accent: #f1f5f9;
    --mkvfe-shadow-sm: 0 2px 4px rgba(71, 85, 105, 0.08);
    --mkvfe-shadow-md: 0 4px 12px rgba(59, 130, 246, 0.12);
    --mkvfe-shadow-lg: 0 8px 24px rgba(37, 99, 235, 0.18);
    --mkvfe-radius-sm: 4px;
    --mkvfe-radius-md: 6px;
    --mkvfe-radius-lg: 8px;
    --mkvfe-radius-xl: 20px;
    --mkvfe-transition-fast: 0.15s ease;
    --mkvfe-transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --mkvfe-transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --mkvfe-spacing-xs: 4px;
    --mkvfe-spacing-sm: 8px;
    --mkvfe-spacing-md: 12px;
    --mkvfe-spacing-lg: 16px;
    --mkvfe-spacing-xl: 20px;
    --mkvfe-spacing-xxl: 24px;
    --mkvfe-font-size-sm: 14px;
    --mkvfe-font-size-base: 16px;
    --mkvfe-font-size-lg: 18px;
    --mkvfe-font-size-xl: 20px;
    --mkvfe-font-size-xxl: 22px;
    /* Price-specific variables */
    --mkvfe-price-sale-size: 24px;
    --mkvfe-price-regular-size: 16px;
    --mkvfe-price-sale-weight: 700;
    --mkvfe-price-regular-weight: 400;
}

/* Main Container */
.mkvfe-simple-product-wrapper {
    margin: var(--mkvfe-spacing-xl) 0;
    font-family: 'Poppins', sans-serif;
    position: relative;
}

/* Simple Product Selector Container */
.mkvfe-simple-product-selector {
    display: flex;
    flex-direction: column;
    margin-bottom: var(--mkvfe-spacing-xl);
    position: relative;
}

/* Simple Product Card - Three Column Layout - Selected by default */
.mkvfe-simple-product-card {
    border: 1px solid #dbdce5;
    border-radius: var(--mkvfe-radius-lg);
    padding: 20px 24px;
    background: #edf2ff;
    cursor: pointer;
    transition: all var(--mkvfe-transition-normal);
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    will-change: transform, box-shadow, border-color;
    margin-bottom: 0;
    transform: translateY(-1px);
    z-index: 10;
}

/* Left column: Selection indicator */
.mkvfe-card-left {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Center column: Product name and discount badge */
.mkvfe-card-center {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
    /* Allow text truncation */
}

/* Right column: Price */
.mkvfe-card-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.mkvfe-simple-product-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}

/* Selection Indicator (like radio button for variations) - Selected by default */
.mkvfe-selection-indicator {
    width: 20px;
    height: 20px;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    background: #3b82f6;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mkvfe-selection-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

.mkvfe-simple-product-card:hover .mkvfe-selection-indicator {
    border-color: #3b82f6;
}

.mkvfe-simple-product-card.selected .mkvfe-selection-indicator {
    border-color: #3b82f6;
    background: #3b82f6;
}

.mkvfe-simple-product-card.selected .mkvfe-selection-dot {
    opacity: 1;
    transform: scale(1);
    background: #ffffff;
}

.mkvfe-simple-product-card.selected {
    border-color: #dbdce5;
    background: #edf2ff;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.15);
    transform: translateY(-1px);
    margin-bottom: 0;
    position: relative;
    z-index: 10;
}

.mkvfe-simple-product-card.out-of-stock {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--mkvfe-background-muted);
    position: relative;
}

.mkvfe-simple-product-card.out-of-stock::after {
    content: attr(data-out-of-stock-text);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: var(--mkvfe-spacing-sm) var(--mkvfe-spacing-md);
    border-radius: var(--mkvfe-radius-md);
    font-size: var(--mkvfe-font-size-sm);
    font-weight: 600;
    color: var(--mkvfe-text-muted);
    border: 1px solid var(--mkvfe-border-color);
    pointer-events: none;
    z-index: 2;
}

.mkvfe-simple-product-card.out-of-stock:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--mkvfe-border-color);
}

/* Card States for Better UX */
.mkvfe-simple-product-card.loading {
    pointer-events: none;
    opacity: 0.7;
}

.mkvfe-simple-product-card.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--mkvfe-primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: mkvfe-spin 1s linear infinite;
    z-index: 3;
}

/* Card Header - Left Side Content (Product Name + Discount Label) */
.mkvfe-card-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    flex: 1;
    min-width: 0;
    /* Allow text truncation */
}

/* Buy Now Text Styling */
.mkvfe-buy-now-text {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    line-height: 1.4;
    transition: color var(--mkvfe-transition-fast);
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Legacy product name class for backward compatibility */
.mkvfe-product-name {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    line-height: 1.4;
    transition: color var(--mkvfe-transition-fast);
    text-transform: capitalize;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.mkvfe-simple-product-card.selected .mkvfe-product-name {
    color: #000000;
}

.mkvfe-discount-bubble {
    background-color: #e74c3c;
    color: #ffffff;
    border-radius: 7px 15px 7px 15px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    display: inline-block !important;
    line-height: 1.2;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    margin-left: 8px;
    vertical-align: middle;
}

/* Override Elementor positioning for discount bubble */
.elementor-widget-container .mkvfe-discount-bubble,
[class*="elementor-"] .mkvfe-discount-bubble {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    border-radius: 7px 15px 7px 15px !important;
    bottom: auto !important;
    display: inline-block !important;
    margin-left: 8px !important;
    vertical-align: middle !important;
}

.mkvfe-discount-bubble::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--mkvfe-accent-color), #ff8c5a);
    border-radius: var(--mkvfe-radius-xl);
    z-index: -1;
    opacity: 0.3;
}

/* Card Body - Price Display */
.mkvfe-card-body {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    text-align: right;
    flex-shrink: 0;
    font-family: 'Poppins', sans-serif;
}

.mkvfe-price-display {
    margin: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

/* Price Styling - Enhanced for better readability with Elementor overrides */
.mkvfe-card-body .price del,
.mkvfe-card-body .price del .woocommerce-Price-amount,
.mkvfe-card-body .price del .woocommerce-Price-amount.amount,
.mkvfe-card-body .price del .amount,
.mkvfe-card-body .woocommerce-Price-amount.regular-price,
.mkvfe-price-regular,
.mkvfe-card-body del,
.mkvfe-card-body del *,
.elementor-widget-container .mkvfe-card-body .price del,
.elementor-widget-container .mkvfe-card-body .price del .woocommerce-Price-amount,
.elementor-widget-container .mkvfe-card-body .price del .amount,
.elementor-widget-container .mkvfe-card-body del,
.elementor-widget-container .mkvfe-card-body del *,
[class*="elementor-"] .mkvfe-card-body .price del,
[class*="elementor-"] .mkvfe-card-body .price del .woocommerce-Price-amount,
[class*="elementor-"] .mkvfe-card-body .price del .amount,
[class*="elementor-"] .mkvfe-card-body del,
[class*="elementor-"] .mkvfe-card-body del * {
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #8c94a5 !important;
    text-decoration: line-through !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    order: 1;
    font-family: 'Poppins', sans-serif !important;
    opacity: 0.8 !important;
}

.mkvfe-card-body .price ins,
.mkvfe-card-body .price ins .woocommerce-Price-amount,
.mkvfe-card-body .price ins .woocommerce-Price-amount.amount,
.mkvfe-card-body .price ins .amount,
.mkvfe-card-body .price .woocommerce-Price-amount:not(.regular-price),
.mkvfe-card-body .woocommerce-Price-amount,
.mkvfe-price-sale,
.mkvfe-card-body ins,
.mkvfe-card-body ins *,
.mkvfe-card-body .price:not(:has(del)) .woocommerce-Price-amount,
.mkvfe-card-body .price:not(:has(del)) .amount,
.elementor-widget-container .mkvfe-card-body .price ins,
.elementor-widget-container .mkvfe-card-body .price ins .woocommerce-Price-amount,
.elementor-widget-container .mkvfe-card-body .price ins .amount,
.elementor-widget-container .mkvfe-card-body .price .woocommerce-Price-amount:not(.regular-price),
.elementor-widget-container .mkvfe-card-body .woocommerce-Price-amount,
.elementor-widget-container .mkvfe-card-body ins,
.elementor-widget-container .mkvfe-card-body ins *,
.elementor-widget-container .mkvfe-card-body .price:not(:has(del)) .woocommerce-Price-amount,
.elementor-widget-container .mkvfe-card-body .price:not(:has(del)) .amount,
[class*="elementor-"] .mkvfe-card-body .price ins,
[class*="elementor-"] .mkvfe-card-body .price ins .woocommerce-Price-amount,
[class*="elementor-"] .mkvfe-card-body .price ins .amount,
[class*="elementor-"] .mkvfe-card-body .price .woocommerce-Price-amount:not(.regular-price),
[class*="elementor-"] .mkvfe-card-body .woocommerce-Price-amount,
[class*="elementor-"] .mkvfe-card-body ins,
[class*="elementor-"] .mkvfe-card-body ins *,
[class*="elementor-"] .mkvfe-card-body .price:not(:has(del)) .woocommerce-Price-amount,
[class*="elementor-"] .mkvfe-card-body .price:not(:has(del)) .amount {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #000000 !important;
    text-decoration: none !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    order: 2;
    font-family: 'Poppins', sans-serif !important;
}

.mkvfe-card-body .price ins,
.mkvfe-card-body .price,
.mkvfe-card-body .price *,
.mkvfe-card-body .woocommerce-Price-amount,
.mkvfe-card-body ins,
.mkvfe-card-body ins * {
    text-decoration: none !important;
}

.mkvfe-card-body .price {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 !important;
}

.mkvfe-card-body .price del+ins {
    margin-left: 8px !important;
}

.mkvfe-card-body .woocommerce-Price-amount {
    font-family: 'Poppins', sans-serif !important;
}

.mkvfe-card-body .woocommerce-Price-currencySymbol {
    font-size: inherit !important;
    font-weight: inherit !important;
    color: inherit !important;
}

.mkvfe-card-body .price:not(:has(del)):not(:has(ins)) .woocommerce-Price-amount,
.mkvfe-card-body .price:not(:has(del)):not(:has(ins)) .amount {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #000000 !important;
    font-family: 'Poppins', sans-serif !important;
}

.mkvfe-card-body del {
    text-decoration: line-through !important;
    font-size: 16px !important;
    color: #8c94a5 !important;
    font-weight: 400 !important;
    opacity: 0.8 !important;
}

.mkvfe-card-body ins {
    text-decoration: none !important;
    font-size: 24px !important;
    color: #000000 !important;
    font-weight: 700 !important;
}

.mkvfe-simple-product-card.selected .mkvfe-price {
    color: #000000;
}

.mkvfe-price .woocommerce-Price-amount {
    font-weight: inherit;
    font-family: 'Poppins', sans-serif;
}

.mkvfe-price .woocommerce-Price-currencySymbol {
    font-size: 0.8em;
    opacity: 0.8;
}

.mkvfe-out-of-stock {
    font-size: var(--mkvfe-font-size-base);
    color: var(--mkvfe-text-muted);
    font-style: italic;
    font-weight: 500;
}

/* Price display error handling and fallback styles */
.mkvfe-price-unavailable {
    font-size: 14px;
    color: var(--mkvfe-text-muted);
    font-style: italic;
    font-weight: 400;
    font-family: 'Poppins', sans-serif;
}

.mkvfe-no-price {
    opacity: 0.7;
}

/* Fix for malformed HTML entities and broken price display */
.mkvfe-price-display .price {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-family: 'Poppins', sans-serif !important;
}

/* Ensure proper rendering of WooCommerce price HTML */
.mkvfe-price-display .price * {
    font-family: 'Poppins', sans-serif !important;
}

/* Fix for broken del and ins tags */
.mkvfe-price-display del,
.mkvfe-price-display del * {
    text-decoration: line-through !important;
    font-size: 16px !important;
    color: #8c94a5 !important;
    font-weight: 400 !important;
    opacity: 0.8 !important;
}

.mkvfe-price-display ins,
.mkvfe-price-display ins * {
    text-decoration: none !important;
    font-size: 24px !important;
    color: #000000 !important;
    font-weight: 700 !important;
}

/* Ensure currency symbols render properly */
.mkvfe-price-display .woocommerce-Price-currencySymbol {
    font-size: inherit !important;
    font-weight: inherit !important;
    color: inherit !important;
    font-family: 'Poppins', sans-serif !important;
}

/* Fix for broken bdi tags and other HTML entities */
.mkvfe-price-display bdi {
    font-style: normal !important;
    font-family: 'Poppins', sans-serif !important;
}

/* Expandable Features Section - Appears below card */
.mkvfe-features-section {
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Features section with no features - hidden */
.mkvfe-features-section.mkvfe-no-features {
    max-height: 0;
    opacity: 0;
}

/* Features section with features - visible by default for simple products */
.mkvfe-features-section.mkvfe-has-features {
    max-height: none;
    opacity: 1;
}

.mkvfe-features-section.expanded {
    max-height: 300px;
    opacity: 1;
}

@keyframes mkvfe-expand-features {
    0% {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        transform: translateY(-8px);
    }

    50% {
        opacity: 0.7;
        transform: translateY(-4px);
    }

    100% {
        opacity: 1;
        max-height: 300px;
        padding-top: 20px;
        padding-bottom: 24px;
        transform: translateY(0);
    }
}

.mkvfe-features-section .mkvfe-features {
    margin: 8px 0 0 0;
    padding-bottom: 16px;
}

.mkvfe-features-section .mkvfe-features h4 {
    display: none;
    /* Hide the Features heading */
}

.mkvfe-features-section .mkvfe-features ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mkvfe-features-section .mkvfe-features ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 6px;
    line-height: 1.5;
    font-size: 14px;
    color: #475569;
}

.mkvfe-features-section .mkvfe-features ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 2px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    border-radius: 50%;
    color: white;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(22, 163, 74, 0.3);
}

.mkvfe-features-section .mkvfe-features ul li:last-child {
    margin-bottom: 0;
}

/* Add to Cart Section */
.mkvfe-add-to-cart-wrapper {
    margin-top: 32px;
    text-align: center;
}

.mkvfe-add-to-cart-wrapper .single_add_to_cart_button {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
    width: 100% !important;
    padding: 18px !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    font-family: 'Poppins', sans-serif !important;
    border-radius: 5px !important;
    border: 0px !important;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: white !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2) !important;
}

.mkvfe-add-to-cart-wrapper .single_add_to_cart_button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #94a3b8;
    border-color: #94a3b8;
    box-shadow: none;
}

.mkvfe-add-to-cart-wrapper .single_add_to_cart_button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.mkvfe-button-text {
    flex: 1 !important;
    text-align: left !important;
    font-weight: 700 !important;
    font-size: 20px !important;
    color: white !important;
}

.mkvfe-button-icon {
    width: 28px !important;
    height: 28px !important;
    transition: transform 0.3s ease !important;
    flex-shrink: 0 !important;
    stroke-width: 2 !important;
    stroke: currentColor !important;
    color: white !important;
}

.mkvfe-add-to-cart-wrapper .single_add_to_cart_button:not(:disabled):hover .mkvfe-button-icon {
    transform: translateX(4px);
}

/* Elementor specific overrides for button styling */
.elementor-widget-container .mkvfe-add-to-cart-wrapper .single_add_to_cart_button,
[class*="elementor-"] .mkvfe-add-to-cart-wrapper .single_add_to_cart_button,
.elementor .single_add_to_cart_button {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
    width: 100% !important;
    padding: 18px !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    font-family: 'Poppins', sans-serif !important;
    border-radius: 5px !important;
    border: 0px !important;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2) !important;
}

.elementor-widget-container .mkvfe-button-text,
[class*="elementor-"] .mkvfe-button-text {
    flex: 1 !important;
    text-align: left !important;
    font-weight: 700 !important;
    font-size: 20px !important;
    color: white !important;
}

.elementor-widget-container .mkvfe-button-icon,
[class*="elementor-"] .mkvfe-button-icon {
    width: 28px !important;
    height: 17px !important;
    stroke-width: 2 !important;
    stroke: currentColor !important;
    color: white !important;
    flex-shrink: 0 !important;
}

/* Loading State */
.mkvfe-simple-product-wrapper.loading {
    opacity: 0.7;
    pointer-events: none;
}

.mkvfe-simple-product-wrapper.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #007cba;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Enhanced Animations */
@keyframes mkvfe-slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        margin-top: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        max-height: 500px;
        padding-top: var(--mkvfe-spacing-lg);
        margin-top: var(--mkvfe-spacing-lg);
        transform: translateY(0);
    }
}

@keyframes mkvfe-slideUp {
    from {
        opacity: 1;
        max-height: 500px;
        padding-top: var(--mkvfe-spacing-lg);
        margin-top: var(--mkvfe-spacing-lg);
        transform: translateY(0);
    }

    to {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        margin-top: 0;
        transform: translateY(-10px);
    }
}

@keyframes mkvfe-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes mkvfe-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes mkvfe-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mkvfe-bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes mkvfe-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-2px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(2px);
    }
}

/* Focus States for Accessibility */
.mkvfe-simple-product-card:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.mkvfe-simple-product-card:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

.mkvfe-simple-product-card:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.mkvfe-add-to-cart-wrapper .single_add_to_cart_button:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.mkvfe-add-to-cart-wrapper .single_add_to_cart_button:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

.mkvfe-add-to-cart-wrapper .single_add_to_cart_button:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Enhanced Responsive Design */
@media (max-width: 480px) {
    .mkvfe-simple-product-wrapper {
        margin: var(--mkvfe-spacing-md) 0;
    }

    .mkvfe-simple-product-card {
        padding: var(--mkvfe-spacing-md);
        flex-direction: column;
        align-items: flex-start;
        gap: var(--mkvfe-spacing-sm);
    }

    .mkvfe-card-header {
        width: 100%;
    }

    .mkvfe-card-body {
        width: 100%;
        justify-content: flex-start;
    }

    .mkvfe-discount-bubble {
        align-self: flex-start;
    }

    .mkvfe-product-name {
        font-size: var(--mkvfe-font-size-base);
    }

    .mkvfe-card-body .price ins,
    .mkvfe-card-body .price ins *,
    .mkvfe-card-body .price:not(:has(del)) .woocommerce-Price-amount,
    .mkvfe-card-body .price:not(:has(del)) .amount {
        font-size: 20px !important;
    }

    .mkvfe-card-body .price del,
    .mkvfe-card-body .price del * {
        font-size: 14px !important;
    }

    /* Responsive button sizing */
    .mkvfe-add-to-cart-wrapper .single_add_to_cart_button {
        width: 100% !important;
        padding: 18px !important;
        font-size: 18px !important;
    }

    .mkvfe-button-icon {
        width: 24px;
        height: 24px;
    }
}

@media (min-width: 481px) and (max-width: 767px) {
    .mkvfe-simple-product-card {
        padding: var(--mkvfe-spacing-lg);
    }
}

@media (min-width: 768px) {
    .mkvfe-simple-product-card {
        padding: var(--mkvfe-spacing-lg) var(--mkvfe-spacing-xl);
        animation: mkvfe-fadeIn 0.6s ease-out;
    }

    .mkvfe-product-name {
        font-size: var(--mkvfe-font-size-lg);
    }

    .mkvfe-card-body .price ins,
    .mkvfe-card-body .price ins *,
    .mkvfe-card-body .price:not(:has(del)) .woocommerce-Price-amount,
    .mkvfe-card-body .price:not(:has(del)) .amount {
        font-size: 26px !important;
    }

    .mkvfe-card-body .price del,
    .mkvfe-card-body .price del * {
        font-size: 18px !important;
    }
}

@media (min-width: 1024px) {
    .mkvfe-simple-product-card:hover {
        transform: translateY(-2px);
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .mkvfe-simple-product-card {
        border-width: 3px;
    }

    .mkvfe-simple-product-card:hover,
    .mkvfe-simple-product-card.selected {
        border-width: 4px;
    }

    .mkvfe-discount-bubble {
        border: 2px solid #fff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {

    .mkvfe-simple-product-card,
    .mkvfe-add-to-cart-btn,
    .mkvfe-features-section {
        transition: none;
        animation: none;
    }

    .mkvfe-simple-product-card:hover {
        transform: none;
    }

    .mkvfe-add-to-cart-btn:not(:disabled):hover {
        transform: none;
    }
}

/* Screen Reader Only */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Error Messages */
.mkvfe-error-message {
    margin: var(--mkvfe-spacing-md) 0;
    padding: var(--mkvfe-spacing-md);
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: var(--mkvfe-radius-md);
    font-size: var(--mkvfe-font-size-sm);
    animation: mkvfe-shake 0.5s ease-in-out;
    position: relative;
}

.mkvfe-error-message::before {
    content: '⚠';
    margin-right: var(--mkvfe-spacing-sm);
    font-weight: bold;
}

/* Success Messages */
.mkvfe-success-message {
    margin: var(--mkvfe-spacing-md) 0;
    padding: var(--mkvfe-spacing-md);
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: var(--mkvfe-radius-md);
    font-size: var(--mkvfe-font-size-sm);
    animation: mkvfe-bounceIn 0.5s ease-out;
}

.mkvfe-success-message::before {
    content: '✓';
    margin-right: var(--mkvfe-spacing-sm);
    font-weight: bold;
}

/* Loading States */
.mkvfe-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: var(--mkvfe-radius-lg);
}

.mkvfe-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--mkvfe-border-color);
    border-top-color: var(--mkvfe-primary-color);
    border-radius: 50%;
    animation: mkvfe-spin 1s linear infinite;
}

/* Print Styles */
@media print {
    .mkvfe-simple-product-wrapper {
        break-inside: avoid;
    }

    .mkvfe-simple-product-card {
        border: 1px solid #000;
        box-shadow: none;
        break-inside: avoid;
        margin-bottom: 10px;
    }

    .mkvfe-discount-bubble {
        background: #000 !important;
        color: #fff !important;
    }

    .mkvfe-add-to-cart-section {
        display: none;
    }
}

/* Maximum Specificity Overrides for Elementor */
.elementor .elementor-widget-container .mkvfe-simple-product-card .mkvfe-card-body .price ins,
.elementor .elementor-widget-container .mkvfe-simple-product-card .mkvfe-card-body .price ins .woocommerce-Price-amount,
.elementor .elementor-widget-container .mkvfe-simple-product-card .mkvfe-card-body .price ins .amount,
.elementor .elementor-widget-container .mkvfe-simple-product-card .mkvfe-card-body ins,
.elementor .elementor-widget-container .mkvfe-simple-product-card .mkvfe-card-body ins *,
.elementor .elementor-widget-container .mkvfe-simple-product-card .mkvfe-card-body .price:not(:has(del)) .woocommerce-Price-amount,
.elementor .elementor-widget-container .mkvfe-simple-product-card .mkvfe-card-body .price:not(:has(del)) .amount,
.elementor-section .elementor-container .elementor-widget-container .mkvfe-simple-product-card .mkvfe-card-body .price ins,
.elementor-section .elementor-container .elementor-widget-container .mkvfe-simple-product-card .mkvfe-card-body .price ins *,
.elementor-section .elementor-container .elementor-widget-container .mkvfe-simple-product-card .mkvfe-card-body ins,
.elementor-section .elementor-container .elementor-widget-container .mkvfe-simple-product-card .mkvfe-card-body ins * {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #000000 !important;
    text-decoration: none !important;
    font-family: 'Poppins', sans-serif !important;
    line-height: 1.2 !important;
}

.elementor .elementor-widget-container .mkvfe-simple-product-card .mkvfe-card-body .price del,
.elementor .elementor-widget-container .mkvfe-simple-product-card .mkvfe-card-body .price del .woocommerce-Price-amount,
.elementor .elementor-widget-container .mkvfe-simple-product-card .mkvfe-card-body .price del .amount,
.elementor .elementor-widget-container .mkvfe-simple-product-card .mkvfe-card-body del,
.elementor .elementor-widget-container .mkvfe-simple-product-card .mkvfe-card-body del *,
.elementor-section .elementor-container .elementor-widget-container .mkvfe-simple-product-card .mkvfe-card-body .price del,
.elementor-section .elementor-container .elementor-widget-container .mkvfe-simple-product-card .mkvfe-card-body .price del *,
.elementor-section .elementor-container .elementor-widget-container .mkvfe-simple-product-card .mkvfe-card-body del,
.elementor-section .elementor-container .elementor-widget-container .mkvfe-simple-product-card .mkvfe-card-body del * {
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #8c94a5 !important;
    text-decoration: line-through !important;
    font-family: 'Poppins', sans-serif !important;
    opacity: 0.8 !important;
    line-height: 1.2 !important;
}