/**
 * Mobile Products Page Styles for Industralink
 * Professional marketplace-ready mobile layout
 */

@media (max-width: 768px) {
    /* Products Page Container - Clean layout */
    .products-page-container {
        display: flex;
        flex-direction: column;
        min-height: calc(100vh - 160px);
        padding: 10px;
        background: #f5f5f5;
    }
    
    /* Hide desktop sidebar on mobile */
    .products-sidebar {
        display: none !important;
    }
    
    /* Products Main Area */
    .products-main {
        width: 100%;
        padding: 0;
    }
    
    /* Top Bar - Clean and compact */
    .products-topbar {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 12px;
        background: #fff;
        border-radius: 8px;
        margin-bottom: 10px;
    }
    
    .products-count {
        font-size: 13px;
        color: #666;
    }
    
    .products-sort {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .sort-label {
        font-size: 12px;
        color: #999;
    }
    
    .sort-dropdown {
        position: relative;
    }
    
    .sort-dropdown-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px 12px;
        background: #f5f5f5;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        font-size: 12px;
        color: #333;
        cursor: pointer;
    }
    
    .sort-dropdown-btn i {
        font-size: 10px;
        color: #666;
    }
    
    .sort-dropdown-content {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        z-index: 100;
    }
    
    .sort-dropdown:hover .sort-dropdown-content,
    .sort-dropdown.active .sort-dropdown-content {
        display: block;
    }
    
    .sort-dropdown-content a {
        display: block;
        padding: 10px 12px;
        font-size: 12px;
        color: #333;
        text-decoration: none;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .sort-dropdown-content a:last-child {
        border-bottom: none;
    }
    
    .sort-dropdown-content a.active,
    .sort-dropdown-content a:hover {
        background: #fff5f5;
        color: #E60023;
    }
    
    /* Products Grid - 2 columns on mobile */
    .products-content {
        padding: 0;
    }
    
    .products-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 0 !important;
    }
    
    /* Product Card - Compact design */
    .product-card {
        background: #fff !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        box-shadow: 0 1px 4px rgba(0,0,0,0.08) !important;
        margin: 0 !important;
        transition: transform 0.2s, box-shadow 0.2s;
    }
    
    .product-card:hover {
        transform: none !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.12) !important;
    }
    
    .product-link {
        display: block;
        text-decoration: none;
    }
    
    .product-image {
        position: relative !important;
        width: 100% !important;
        aspect-ratio: 1 !important;
        overflow: hidden !important;
    }
    
    .product-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    .product-badge {
        position: absolute !important;
        top: 8px !important;
        left: 8px !important;
        background: #E60023 !important;
        color: #fff !important;
        font-size: 10px !important;
        padding: 2px 6px !important;
        border-radius: 4px !important;
        font-weight: 600 !important;
    }
    
    .product-info {
        padding: 10px !important;
    }
    
    .product-title {
        font-size: 12px !important;
        line-height: 1.4 !important;
        color: #333 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        margin-bottom: 6px !important;
        min-height: auto !important;
    }
    
    .product-price {
        font-size: 14px !important;
        font-weight: 700 !important;
        color: #E60023 !important;
        margin-bottom: 4px !important;
    }
    
    .product-moq {
        font-size: 10px !important;
        color: #999 !important;
        margin-bottom: 4px !important;
    }
    
    .product-supplier {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        font-size: 10px !important;
        color: #666 !important;
    }
    
    .verified-icon {
        color: #28a745 !important;
        font-size: 10px !important;
    }
    
    .supplier-name {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 60px !important;
    }
    
    .supplier-location {
        color: #999 !important;
        font-size: 9px !important;
    }
    
    .product-actions {
        display: none !important;
    }
    
    /* No Products State */
    .no-products {
        padding: 40px 20px !important;
        text-align: center !important;
        background: #fff !important;
        border-radius: 8px !important;
        margin: 10px 0 !important;
    }
    
    .no-products i {
        font-size: 48px !important;
        color: #ddd !important;
        margin-bottom: 16px !important;
    }
    
    .no-products h2 {
        font-size: 16px !important;
        color: #333 !important;
        margin-bottom: 8px !important;
    }
    
    .no-products p {
        font-size: 13px !important;
        color: #666 !important;
    }
    
    .browse-btn {
        display: inline-block !important;
        margin-top: 16px !important;
        padding: 10px 20px !important;
        background: #E60023 !important;
        color: #fff !important;
        border-radius: 6px !important;
        text-decoration: none !important;
        font-size: 13px !important;
        font-weight: 600 !important;
    }
    
    /* Pagination - Mobile friendly */
    .pagination {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 6px !important;
        padding: 16px !important;
        flex-wrap: wrap !important;
    }
    
    .page-btn {
        min-width: 36px !important;
        height: 36px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 8px !important;
        background: #fff !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 6px !important;
        font-size: 12px !important;
        color: #333 !important;
        text-decoration: none !important;
        transition: all 0.2s !important;
    }
    
    .page-btn:hover {
        border-color: #E60023 !important;
        color: #E60023 !important;
    }
    
    .page-btn.active {
        background: #E60023 !important;
        border-color: #E60023 !important;
        color: #fff !important;
    }
    
    .page-btn.prev-btn,
    .page-btn.next-btn {
        padding: 0 12px !important;
    }
    
    .page-ellipsis {
        color: #999 !important;
        font-size: 12px !important;
    }
    
    /* Mobile Filter Toggle */
    .mobile-filter-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 100%;
        padding: 10px;
        background: #fff;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        font-size: 13px;
        color: #333;
        cursor: pointer;
        margin-bottom: 10px;
    }
    
    .mobile-filter-toggle i {
        color: #666;
    }
}
