/* Professional Product Listing Cards - Following Specification */

/* Product Grid Layout */
.product-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 2.5rem !important;
    margin-bottom: 3rem !important;
    padding: 1rem 0 !important;
}

/* Premium Dark Product Card Design - Global Application */
.product-card {
    background: linear-gradient(145deg, #2C2C2C 0%, #1A1A1A 100%) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    position: relative !important;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    border: 2px solid transparent !important;
    cursor: pointer !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    margin: 0 !important;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(255, 215, 0, 0.2) !important;
    border-color: #FFD700 !important;
    background: linear-gradient(145deg, #333333 0%, #1F1F1F 100%) !important;
}

/* Product Image Section */
.product-image-container {
    position: relative !important;
    height: 280px !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, #2C2C2C 0%, #1A1A1A 100%) !important;
    border-radius: 0 !important;
}

.product-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    border-radius: 0 !important;
    filter: brightness(0.95) !important;
}

.product-card:hover .product-image {
    transform: scale(1.08) !important;
    filter: brightness(1.1) !important;
}

.product-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F8F9FA;
    color: #ADB5BD;
}

/* Product Badges */
.product-badges {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    z-index: 3 !important;
}

.product-badge {
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(8px) !important;
    color: white !important;
    padding: 4px 10px !important;
    border-radius: 16px !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.product-badge.new { 
    background: linear-gradient(145deg, #FF6B6B, #FF5252) !important; 
    border-color: rgba(255, 107, 107, 0.3) !important;
}
.product-badge.bestseller { 
    background: linear-gradient(145deg, #4ECDC4, #26C6DA) !important; 
    border-color: rgba(78, 205, 196, 0.3) !important;
}
.product-badge.local { 
    background: linear-gradient(145deg, #45B7D1, #42A5F5) !important; 
    border-color: rgba(69, 183, 209, 0.3) !important;
}
.product-badge.organic { 
    background: linear-gradient(145deg, #96CEB4, #81C784) !important; 
    border-color: rgba(150, 206, 180, 0.3) !important;
}
.product-badge.uk-grown { 
    background: linear-gradient(145deg, #FFD700, #FFC107) !important; 
    color: #000000 !important; 
    border-color: rgba(255, 215, 0, 0.3) !important;
}

/* Action Buttons Overlay */
.product-actions-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    z-index: 3;
}

.product-card:hover .product-actions-overlay {
    opacity: 1;
    transform: translateX(0);
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.action-btn:hover {
    background: #FFD700;
    transform: scale(1.1);
}

.action-btn i {
    font-size: 0.875rem;
    color: #495057;
}

.action-btn:hover i {
    color: #333;
}

/* Quick View Button */
.quick-view-btn {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    background: #007BFF;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
}

.product-card:hover .quick-view-btn {
    transform: translateX(-50%) translateY(0);
}

.quick-view-btn:hover {
    background: #0056B3;
}

/* Product Content Section */
.product-content {
    padding: 20px !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    background: transparent !important;
    color: #FFFFFF !important;
}

/* Vendor Information */
.vendor-info {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 10px !important;
}

.vendor-name {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.vendor-name:hover {
    color: #FFD700 !important;
    text-decoration: none !important;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.3) !important;
}

.product-location {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.75rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.product-location i {
    font-size: 0.7rem !important;
    color: #FFD700 !important;
}

/* Product Title */
.product-title {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: #FFFFFF !important;
    margin: 6px 0 14px 0 !important;
    line-height: 1.3 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.product-title:hover {
    color: #FFD700 !important;
    text-decoration: none !important;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.4) !important;
}

/* Price Section */
.product-pricing {
    margin-bottom: 14px !important;
}

.price-display {
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    color: #FFFFFF !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.price-unit {
    font-size: 0.9rem !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500 !important;
    margin-left: 6px !important;
}

.price-range {
    font-size: 1.2rem !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

/* Rating Section */
.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.rating-stars {
    display: flex;
    gap: 1px;
}

.rating-stars i {
    font-size: 0.8rem;
    color: #FFD700;
}

.rating-stars i.far {
    color: #DEE2E6;
}

.rating-text {
    font-size: 0.75rem;
    color: #6C757D;
}

/* Stock Indicator */
.stock-status {
    margin-bottom: 12px !important;
}

.stock-indicator {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    display: inline-block !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.stock-indicator.in-stock {
    background: rgba(40, 167, 69, 0.2) !important;
    color: #28A745 !important;
    border: 1px solid rgba(40, 167, 69, 0.3) !important;
}

.stock-indicator.low-stock {
    background: rgba(255, 193, 7, 0.2) !important;
    color: #FFC107 !important;
    border: 1px solid rgba(255, 193, 7, 0.3) !important;
}

.stock-indicator.out-of-stock {
    background: rgba(220, 53, 69, 0.2) !important;
    color: #DC3545 !important;
    border: 1px solid rgba(220, 53, 69, 0.3) !important;
}

/* Product Tags */
.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.product-tag {
    background: #F8F9FA;
    color: #495057;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid #E9ECEF;
}

/* Bottom Actions */
.product-actions {
    display: flex !important;
    gap: 12px !important;
    margin-top: auto !important;
    padding-top: 16px !important;
}

.btn-add-cart {
    flex: 1 !important;
    background: linear-gradient(145deg, #FFD700 0%, #FFC107 100%) !important;
    color: #000000 !important;
    border: none !important;
    padding: 12px 20px !important;
    border-radius: 10px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.3) !important;
}

.btn-add-cart:hover {
    background: linear-gradient(145deg, #FFC107 0%, #FFB300 100%) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 24px rgba(255, 193, 7, 0.4) !important;
}

.btn-add-cart:disabled {
    background: rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.btn-favorite {
    width: 34px;
    height: 34px;
    background: #F8F9FA;
    color: #6C757D;
    border: 1px solid #DEE2E6;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-favorite:hover,
.btn-favorite.active {
    background: #FFE5E5;
    color: #DC3545;
    border-color: #DC3545;
}

/* Quick View Modal */
.quick-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: none !important; /* Hide by default to prevent blocking interactions */
}

.quick-view-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-view-content {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80%;
    overflow-y: auto;
}

.quick-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #DEE2E6;
}

.quick-view-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #6C757D;
}

.quick-view-body {
    padding: 1rem;
}

/* Responsive Design - App-like Mobile Experience */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
        padding: 0.5rem 0 !important;
    }
    
    .product-card {
        border-radius: 12px !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
    }
    
    .product-image-container {
        height: 180px !important;
    }
    
    .product-content {
        padding: 12px !important;
    }
    
    .vendor-info {
        margin-bottom: 8px !important;
    }
    
    .vendor-name {
        font-size: 0.75rem !important;
    }
    
    /* Hide location icon on mobile for cleaner look */
    .product-location i {
        display: none !important;
    }
    
    .product-location {
        font-size: 0.7rem !important;
    }
    
    .product-title {
        font-size: 0.95rem !important;
        margin: 4px 0 10px 0 !important;
        -webkit-line-clamp: 2 !important;
    }
    
    .price-display {
        font-size: 1.15rem !important;
    }
    
    .price-unit {
        font-size: 0.8rem !important;
    }
    
    .product-actions {
        gap: 8px !important;
        padding-top: 12px !important;
    }
    
    .btn-add-cart {
        padding: 10px 12px !important;
        font-size: 0.8rem !important;
        border-radius: 8px !important;
    }
    
    /* Hide action button icons on mobile for cleaner CTAs */
    .btn-add-cart i {
        display: none !important;
    }
    
    .product-badge {
        font-size: 0.65rem !important;
        padding: 3px 8px !important;
    }
    
    .product-badges {
        top: 8px !important;
        left: 8px !important;
        gap: 4px !important;
    }
    
    /* Hide action overlay buttons on mobile */
    .product-actions-overlay {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
        padding: 0.25rem 0 !important;
    }
    
    .product-card {
        border-radius: 10px !important;
    }
    
    .product-image-container {
        height: 160px !important;
    }
    
    .product-content {
        padding: 10px !important;
    }
    
    .vendor-name {
        font-size: 0.7rem !important;
    }
    
    /* Hide location icon on mobile */
    .product-location i {
        display: none !important;
    }
    
    .product-location {
        font-size: 0.65rem !important;
    }
    
    .product-title {
        font-size: 0.9rem !important;
        margin: 3px 0 8px 0 !important;
    }
    
    .price-display {
        font-size: 1.05rem !important;
    }
    
    .price-unit {
        font-size: 0.75rem !important;
    }
    
    .product-actions {
        gap: 6px !important;
        padding-top: 10px !important;
    }
    
    .btn-add-cart {
        padding: 9px 10px !important;
        font-size: 0.75rem !important;
        letter-spacing: 0.3px !important;
    }
    
    /* Hide button icons on mobile */
    .btn-add-cart i {
        display: none !important;
    }
    
    .product-badge {
        font-size: 0.6rem !important;
        padding: 2px 6px !important;
    }
    
    .product-pricing {
        margin-bottom: 10px !important;
    }
    
    /* Hide action overlay on mobile */
    .product-actions-overlay {
        display: none !important;
    }
    
    .quick-view-content {
        width: 95%;
    }
}