/* Mobile-Optimized Product Cards CSS */
/* Design inspired by modern mobile e-commerce interfaces */

/* Product Cards Container */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
    width: 100%;
    max-width: 100%;
}

/* Individual Product Card - Nyamakima Inspired */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f1f5f9;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 300px;
    flex-shrink: 0;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    border-color: #e2e8f0;
}

/* Product Image Container - Nyamakima Style */
.product-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f1f5f9;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 16px;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}



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

.product-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
}

.product-badge.sale {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    animation: pulse 2s infinite;
}

.product-badge.new {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.product-badge.hot {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.product-badge.limited {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Product Content - Nyamakima Style */
.product-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: white;
}

/* Product Title */
.product-title {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 42px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.product-title:hover {
    color: #3b82f6;
}



/* Product Features */
.product-features {
    margin-bottom: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.feature-icon {
    width: 16px;
    height: 16px;
    color: var(--gray-500);
    flex-shrink: 0;
}

/* Price Section - Nyamakima Style */
.product-price {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
}

.current-price {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}

.original-price {
    font-size: 12px;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 500;
    opacity: 0.8;
}

.discount-percentage {
    font-size: 12px;
    color: #ef4444;
    font-weight: 700;
    background: #fef2f2;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
    margin-top: 4px;
}

/* Action Buttons - Hidden by default, shown on hover */
.product-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: auto;
}

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

/* Button Styles */
.btn-primary, .btn-secondary {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    min-height: 44px;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--gray-900);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--gray-900);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Quick Action Buttons (top-right overlay) */
.quick-actions {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    z-index: 4;
}

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

.quick-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--white);
    color: var(--gray-700);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.quick-action-btn:hover {
    background: var(--gray-900);
    color: var(--white);
    transform: scale(1.1);
}

.quick-action-btn.wishlist:hover {
    background: #dc2626;
}

.quick-action-btn.quick-view:hover {
    background: #059669;
}

/* Stock Badge - Nyamakima Style */
.product-card .stock-badge {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-size: 10px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    z-index: 2;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    backdrop-filter: blur(4px);
}

.product-card .stock-badge.in-stock {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.product-card .stock-badge.out-of-stock {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}



/* Responsive Design */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0.75rem 0;
    }
    
    .product-card {
        min-height: 320px;
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-content {
        padding: 0.75rem;
    }
    
    .product-title {
        font-size: 0.875rem;
    }
    
    .current-price {
        font-size: 1.125rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 0.625rem 0.875rem;
        font-size: 0.75rem;
        min-height: 40px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .product-card {
        min-height: 300px;
    }
    
    .product-image {
        height: 140px;
    }
    
    .product-content {
        padding: 0.625rem;
    }
    
    .product-title {
        font-size: 0.8125rem;
    }
    
    .current-price {
        font-size: 1rem;
    }
}

/* Loading Animation */
.product-card.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}


