/* MetGooo - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar Styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Category Card */
.category-card {
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.category-card .card-title {
    color: #333;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* Listing Card */
.listing-card {
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.listing-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.listing-card img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.listing-card .placeholder-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
}

.listing-card .card-title {
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Feature Icon */
.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(13, 110, 253, 0.1);
    border-radius: 50%;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Footer */
footer {
    background-color: #212529;
    color: #fff;
    margin-top: auto;
}

footer a {
    color: #adb5bd;
    text-decoration: none;
}

footer a:hover {
    color: #fff;
}

/* Badges */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

/* Alert Messages */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Pagination */
.pagination {
    margin-top: 2rem;
}

.page-link {
    color: var(--primary-color);
    border-radius: 0.25rem;
    margin: 0 2px;
}

.page-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Message Badge */
.message-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

/* User Avatar */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Loading Spinner */
.spinner-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Image Gallery */
.image-gallery {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.image-gallery .thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid transparent;
    cursor: pointer;
    border-radius: 0.25rem;
}

.image-gallery .thumbnail:hover,
.image-gallery .thumbnail.active {
    border-color: var(--primary-color);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-badge.approved {
    background-color: #d1f2eb;
    color: #0f5132;
}

.status-badge.rejected {
    background-color: #f8d7da;
    color: #842029;
}

.status-badge.sold {
    background-color: #cff4fc;
    color: #055160;
}

/* Chat/Message Styles */
.chat-container {
    height: 500px;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

.message-item {
    margin-bottom: 1rem;
    display: flex;
}

.message-item.sent {
    justify-content: flex-end;
}

.message-item.received {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    position: relative;
}

.message-item.sent .message-bubble {
    background-color: var(--primary-color);
    color: white;
}

.message-item.received .message-bubble {
    background-color: #e9ecef;
    color: #333;
}

.message-time {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .listing-card img,
    .listing-card .placeholder-image {
        height: 150px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .category-card .card-body {
        padding: 1rem;
    }
    
    .category-card i {
        font-size: 2rem !important;
    }
}

/* Admin Panel Styles */
.admin-sidebar {
    background-color: #2c3e50;
    min-height: 100vh;
    color: white;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.admin-sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

/* Dashboard Stats */
.stat-card {
    border-left: 4px solid;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat-card.primary {
    border-left-color: var(--primary-color);
}

.stat-card.success {
    border-left-color: var(--success-color);
}

.stat-card.warning {
    border-left-color: var(--warning-color);
}

.stat-card.danger {
    border-left-color: var(--danger-color);
}

/* Table Styles */
.table-hover tbody tr:hover {
    background-color: rgba(0,0,0,0.02);
    cursor: pointer;
}

/* Search Highlight */
.search-highlight {
    background-color: #ffeb3b;
    padding: 2px 4px;
    border-radius: 2px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Utilities */
.text-truncate-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.shadow-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Explore Cards */
.explore-card {
    transition: all 0.3s ease;
    border-radius: 10px;
}

.explore-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.explore-card.border-danger {
    border-color: #dc3545 !important;
}

.explore-card.border-primary {
    border-color: #007bff !important;
}
