/* Mobile Product Cards v5.0 - Compact Style with Large Images */
@media (max-width: 768px) {
    /* FULL WIDTH - ONLY for products section, NOT header */
    main .container,
    .category-page-content,
    .products-new-section,
    section.products-new-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Override container padding ONLY inside main, not header */
    main {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Product Grid Container - 2 Column Grid FULL WIDTH */
    .products-grid,
    div.products-grid,
    .products-new-section .products-grid,
    .category-products .products-grid,
    .product-list .products-grid,
    main .products-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        grid-auto-rows: auto !important;
        gap: 2px !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    /* Product Card - Compact like reference image */
    .product-card,
    .product-card a.product-card-link {
        display: flex !important;
        flex-direction: column !important;
        background: white !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1) !important;
        border: 1px solid #e5e5e5 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 360px !important;
        max-height: none !important;
        height: auto !important;
        position: relative !important;
        transition: transform 0.2s ease, box-shadow 0.2s ease !important;
        padding: 8px !important;
        flex: 0 0 auto !important;
        grid-column: span 1 !important;
    }

    .product-card:active {
        transform: scale(0.98) !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
    }

    /* Image Container - 200px for consistent mobile design */
    .product-card .product-image,
    .product-card-image-container,
    .container section.products-new-section .products-grid .product-card .product-image,
    body.homepage .products-new-section .product-image,
    body.homepage .products-new-section .product-card .product-image,
    div.product-card div.product-image {
        position: relative !important;
        width: 100% !important;
        height: 200px !important;
        min-height: 200px !important;
        max-height: 200px !important;
        flex-shrink: 0 !important;
        background: #f8f9fb !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 10px !important;
        box-sizing: border-box !important;
        border-radius: 12px !important;
        margin: 0 !important;
    }

    .product-card .product-image img,
    .product-card-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        max-width: 100% !important;
        max-height: 100% !important;
    }

    .product-card .product-image a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: 100% !important;
    }

    /* Hide quick actions overlay on mobile */
    .product-card .quick-actions {
        display: none !important;
    }

    /* Badges - Top of Image - More Compact */
    .product-card .discount-badge {
        position: absolute !important;
        top: 8px !important;
        right: 8px !important;
        padding: 4px 10px !important;
        border-radius: 8px !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        background: #ff4444 !important;
        color: white !important;
        z-index: 10 !important;
        box-shadow: 0 2px 6px rgba(255, 68, 68, 0.3) !important;
    }

    .product-card .stock-badge {
        position: absolute !important;
        top: 8px !important;
        left: 8px !important;
        padding: 4px 10px !important;
        border-radius: 8px !important;
        font-size: 10px !important;
        font-weight: 600 !important;
        background: #10b981 !important;
        color: white !important;
        z-index: 10 !important;
        box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3) !important;
    }

    .product-card .stock-badge.supplier {
        background: #f59e0b !important;
    }

    .product-card .stock-badge.out {
        background: #9ca3af !important;
    }

    /* Product Info - Compact for 2-column */
    .product-card .product-info,
    .product-card-body {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 8px 5px 20px 5px !important;
        gap: 3px !important;
        justify-content: flex-start !important;
        min-width: 0 !important;
        overflow: visible !important;
        min-height: 0 !important;
        background: white !important;
    }

    /* Product Header - Optimized text */
    .product-card .product-header {
        display: flex !important;
        flex-direction: column !important;
        gap: 1px !important;
        margin-bottom: 2px !important;
    }

    .product-card .product-name {
        font-size: 12px !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
        color: #1a1a1a !important;
        margin: 8px 0 !important;
        min-height: 40px !important;
        display: block !important;
        -webkit-line-clamp: unset !important;
        -webkit-box-orient: unset !important;
        overflow: visible !important;
        text-overflow: clip !important;
        max-height: none !important;
        word-wrap: break-word !important;
        white-space: normal !important;
    }

    .product-card .product-name a {
        color: #1a1a1a !important;
        text-decoration: none !important;
    }

    .product-card .brand-name {
        font-size: 10px !important;
        font-weight: 600 !important;
        color: #888 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        margin-bottom: 4px !important;
    }

    .product-card .efficiency-badge {
        display: none !important;
    }

    /* Product Features - Hide on mobile to save space */
    .product-card .product-features {
        display: none !important;
    }

    .product-card .product-attributes {
        display: none !important;
    }

    /* Price Section - COMPACT */
    .product-card .price-section {
        display: flex !important;
        flex-direction: column !important;
        gap: 1px !important;
        margin: 3px 0 0 0 !important;
        margin-top: auto !important;
    }

    .product-card .product-price {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1px !important;
    }

    .product-card .price-current {
        font-size: 16px !important;
        font-weight: 800 !important;
        color: #2034ad !important;
        line-height: 1 !important;
        margin-bottom: 2px !important;
    }

    .product-card .price-old {
        font-size: 9px !important;
        color: #999 !important;
        text-decoration: line-through !important;
        font-weight: 400 !important;
    }

    .product-card .price-info {
        font-size: 7px !important;
        color: #aaa !important;
        font-weight: 400 !important;
        margin-bottom: 0 !important;
    }

    /* Add to Cart Button - Optimized for 2-column */
    .product-card .btn-add-to-cart,
    .product-card-actions .btn,
    .product-card-actions button {
        padding: 10px 5px !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        border-radius: 8px !important;
        background: linear-gradient(135deg, #2034ad 0%, #3f57ff 100%) !important;
        color: white !important;
        border: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 5px !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        width: 100% !important;
        box-shadow: 0 2px 6px rgba(32, 52, 173, 0.25) !important;
        text-transform: uppercase !important;
        letter-spacing: 0.2px !important;
        margin-top: 15px !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }

    .product-card .btn-add-to-cart:active {
        transform: scale(0.96) !important;
        box-shadow: 0 1px 3px rgba(37, 99, 235, 0.4) !important;
    }

    .product-card .btn-add-to-cart:disabled {
        background: #9ca3af !important;
        cursor: not-allowed !important;
        box-shadow: none !important;
    }

    .product-card .btn-add-to-cart .cart-icon {
        width: 14px !important;
        height: 14px !important;
        flex-shrink: 0 !important;
    }

    /* "Vezi Detalii" button - make it smaller or hide */
    .product-card .btn-quick-view,
    .product-card .btn-view-details {
        display: none !important;
    }

    /* OVERRIDE products-new-grid.css button positioning on mobile */
    .product-card .btn-add-to-cart,
    body .product-card .btn-add-to-cart,
    .container .product-card .btn-add-to-cart {
        position: static !important;
        bottom: auto !important;
        left: auto !important;
        width: 100% !important;
        margin-bottom: 0 !important;
    }
}
