/* Mobile App Style Components */

/* General mobile styling */
body {
    font-family: 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    padding-bottom: 80px; /* Space for bottom navigation */
    background-color: #f0f2f5; /* Consistent with sidebar background */
}

/* Mobile-friendly container */
.container-mobile {
    max-width: 100%;
    padding: 0 10px;
    margin: 0 auto;
}

/* Card styling for mobile */
.card-mobile {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    overflow: hidden;
}

.card-header-mobile {
    background-color: #0d6efd;
    color: white;
    padding: 12px 15px;
    font-weight: 600;
}

.card-body-mobile {
    padding: 15px;
}

/* Button styling */
.btn-mobile {
    border-radius: 8px;
    padding: 10px 15px;
    font-weight: 500;
    width: 100%;
    margin: 5px 0;
}

.btn-primary-mobile {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.btn-outline-primary-mobile {
    border-color: #0d6efd;
    color: #0d6efd;
}

/* Input styling */
.form-control-mobile {
    border-radius: 8px;
    padding: 10px 12px;
    border: 1px solid #ddd;
}

/* Quantity selector */
.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e9ecef;
    border: none;
    border-radius: 50%;
    font-weight: bold;
    font-size: 18px;
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 10px 0;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
}

.product-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.product-info {
    padding: 10px;
}

.product-title {
    font-weight: 500;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    color: #0d6efd;
    font-weight: 600;
}

/* Bottom navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    padding: 8px 0;
    z-index: 1000;
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 5px 0;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #6c757d;
    font-size: 12px;
}

.nav-link.active {
    color: #0d6efd;
}

.nav-icon {
    font-size: 18px;
    margin-bottom: 3px;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,.1);
    border-radius: 50%;
    border-top-color: #0d6efd;
    animation: spin 1s ease-in-out infinite;
}

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

/* Hide elements on small screens if needed */
.d-mobile-none {
    display: none;
}

@media (min-width: 576px) {
    .d-mobile-none {
        display: block;
    }
    
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Utility classes */
.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

/* IQD currency styling */
.iqd-price {
    font-weight: 600;
    color: #28a745;
}

/* Hover lift effect for cards */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Fade-in animation */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Status badge styling */
.status-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
}

/* Empty state icon */
.empty-state-icon {
    animation: bounceIn 1s ease;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}