/* VexHub - Main Styles */
:root {
    --primary: #232d41;
    --secondary: #8dc73f;
    --dark: #1a212e;
    --light: #f8f9fa;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --white: #ffffff;
    --danger: #dc3545;
    --success: #28a745;
    --warning: #ffc107;
    --info: #17a2b8;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 5px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light);
    color: var(--primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 70px;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

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

.btn-primary:hover {
    background: #7ab632;
    color: var(--white);
}

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

.btn-dark:hover {
    background: var(--dark);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-block {
    width: 100%;
}

/* Navbar */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
}

.logo-vex {
    color: var(--primary);
}

.logo-hub {
    color: var(--secondary);
}

.nav-search {
    flex: 1;
    max-width: 500px;
}

.nav-search form {
    display: flex;
    background: var(--light);
    border-radius: 50px;
    overflow: hidden;
}

.nav-search input {
    flex: 1;
    padding: 10px 20px;
    border: none;
    background: transparent;
    font-size: 14px;
}

.nav-search button {
    padding: 10px 20px;
    border: none;
    background: var(--secondary);
    color: var(--white);
    cursor: pointer;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--light);
    color: var(--primary);
    position: relative;
    border: none;
    cursor: pointer;
}

.nav-icon:hover {
    background: var(--secondary);
    color: var(--white);
}

.nav-icon .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--danger);
    color: var(--white);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: 10px 0;
    display: none;
    margin-top: 10px;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--primary);
}

.dropdown-menu a:hover {
    background: var(--light);
    color: var(--secondary);
}

.dropdown-divider {
    height: 1px;
    background: var(--gray-light);
    margin: 8px 0;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: var(--white);
    z-index: 2000;
    transition: var(--transition);
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-light);
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.mobile-menu-body a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: var(--primary);
    border-bottom: 1px solid var(--gray-light);
}

.mobile-menu-body a:hover {
    background: var(--light);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    display: none;
}

.mobile-menu-overlay.active {
    display: block;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    box-shadow: 0 -2px 15px rgba(0,0,0,0.1);
    z-index: 1000;
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--gray);
    font-size: 10px;
}

.bottom-nav a.active {
    color: var(--secondary);
}

.bottom-nav a i {
    font-size: 20px;
}

.bottom-nav .post-btn {
    width: 50px;
    height: 50px;
    background: var(--secondary);
    color: var(--white);
    border-radius: 50%;
    margin-top: -25px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(141, 199, 63, 0.4);
}

.bottom-nav .post-btn i {
    font-size: 24px;
}

/* Alerts */
.alert {
    padding: 15px 0;
    position: relative;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}

.alert .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-close {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.5;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--secondary);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.card-body {
    padding: 15px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--gray);
}

.card-meta i {
    margin-right: 4px;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* Phone Input */
.phone-input {
    display: flex;
    gap: 10px;
}

.phone-input select {
    width: 120px;
}

.phone-input input {
    flex: 1;
}

/* Footer */
.footer {
    background: var(--primary);
    color: var(--white);
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer h4 {
    font-size: 24px;
    margin-bottom: 15px;
}

.footer h5 {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--secondary);
}

.footer p {
    color: #adb5bd;
    font-size: 14px;
}

.footer-col a {
    display: block;
    color: #adb5bd;
    padding: 5px 0;
    font-size: 14px;
}

.footer-col a:hover {
    color: var(--secondary);
}

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.social-links a:hover {
    background: var(--secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    color: #adb5bd;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.hero h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto;
}

.hero-search form {
    display: flex;
    background: var(--white);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-search input {
    flex: 1;
    padding: 18px 25px;
    border: none;
    font-size: 16px;
}

.hero-search button {
    padding: 18px 30px;
    background: var(--secondary);
    border: none;
    color: var(--white);
    cursor: pointer;
    font-weight: 600;
}

/* Categories */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    padding: 30px 0;
}

.category-card {
    background: var(--white);
    padding: 25px 15px;
    text-align: center;
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
}

.category-card:hover {
    background: var(--secondary);
    color: var(--white);
}

.category-card i {
    font-size: 32px;
    margin-bottom: 10px;
    color: var(--secondary);
}

.category-card:hover i {
    color: var(--white);
}

.category-card span {
    display: block;
    font-weight: 600;
    font-size: 14px;
}

/* Page Header */
.page-header {
    background: var(--primary);
    color: var(--white);
    padding: 30px 0;
}

.page-header h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.breadcrumb {
    display: flex;
    gap: 10px;
    font-size: 14px;
    opacity: 0.8;
}

.breadcrumb a {
    color: var(--white);
}

/* Filters */
.filters {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    display: block;
    font-size: 12px;
    margin-bottom: 5px;
    color: var(--gray);
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-card i {
    font-size: 40px;
    color: var(--secondary);
    margin-bottom: 15px;
}

.stat-card h3 {
    font-size: 28px;
    font-weight: 700;
}

.stat-card p {
    color: var(--gray);
    font-size: 14px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

th {
    background: var(--light);
    font-weight: 600;
}

tr:hover {
    background: #fafafa;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.pagination a {
    padding: 10px 15px;
    background: var(--white);
    border-radius: var(--radius-sm);
    color: var(--primary);
}

.pagination a:hover,
.pagination a.active {
    background: var(--secondary);
    color: var(--white);
}

/* Wallet */
.wallet-balance {
    background: linear-gradient(135deg, var(--secondary) 0%, #6ba02d 100%);
    color: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
}

.wallet-balance h2 {
    font-size: 40px;
    margin-bottom: 5px;
}

.wallet-balance p {
    opacity: 0.9;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--gray-light);
}

.modal-header h3 {
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--gray-light);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 60px;
    color: var(--gray-light);
    margin-bottom: 20px;
}

.empty-state h3 {
    color: var(--gray);
    margin-bottom: 10px;
}

/* Loading */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-light);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 992px) {
    .nav-search {
        display: none;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-dropdown,
    .nav-actions .btn {
        display: none;
    }
    
    .bottom-nav {
        display: flex;
    }
    
    body {
        padding-bottom: 70px;
    }
    
    .footer {
        margin-bottom: 70px;
    }
    
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
