:root {
    --primary: #10B981; /* Emerald Green */
    --primary-dark: #059669;
    --secondary: #F59E0B; /* Amber for outdoor vibes */
    --dark: #1F2937;
    --gray: #6B7280;
    --light: #F3F4F6;
    --white: #FFFFFF;
    --danger: #EF4444;
    --border: #E5E7EB;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

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

@media (min-width: 768px) {
    .grid-cols-3 {
        grid-template-columns: 1fr 2fr 1fr; /* Left sidebar, Feed, Right sidebar */
    }
}

.grid-cols-marketplace {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 0.75rem 0;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-dark);
    text-decoration: none;
}

.brand img {
    height: 56px;
    width: 56px;
    border-radius: var(--radius-md);
    object-fit: cover;
    transition: transform 0.2s;
}

.brand:hover img {
    transform: scale(1.05);
}

.nav-links {
    display: none;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
        gap: 2rem;
    }
}

.nav-link {
    text-decoration: none;
    color: var(--gray);
    font-weight: 500;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.4);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(16, 185, 129, 0.5);
}

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

.btn-secondary:hover {
    background: var(--light);
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.btn-icon {
    padding: 0.5rem;
    border-radius: var(--radius-full);
    color: var(--gray);
}
.btn-icon:hover {
    background-color: var(--light);
    color: var(--primary);
}

.nav-icon-btn {
    color: var(--gray);
    position: relative;
    padding: 0.5rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-icon-btn:hover {
    background-color: var(--light);
    color: var(--primary);
}

.nav-icon-btn svg {
    width: 24px;
    height: 24px;
}

.badge-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--danger);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

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

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background-color: #F9FAFB;
    border-top: 1px solid var(--border);
}

/* Feed Components */
.post-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background-color: #E5E7EB;
    flex-shrink: 0;
}
.avatar-sm {
    width: 32px;
    height: 32px;
}
.avatar-lg {
    width: 120px;
    height: 120px;
}

.user-meta h4 {
    margin: 0;
    font-size: 1rem;
}
.user-meta span {
    font-size: 0.875rem;
    color: var(--gray);
}

.post-content p {
    margin-bottom: 1rem;
    color: #374151;
}

.post-image {
    width: 100%;
    height: 300px;
    background-color: #E5E7EB;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    object-fit: cover;
}

.post-actions {
    display: flex;
    gap: 1.5rem;
    border-top: 1px solid var(--light);
    padding-top: 1rem;
    margin-top: 1rem;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    cursor: pointer;
    font-weight: 500;
}
.action-item:hover {
    color: var(--primary);
}

/* Sidebar Components */
.sidebar-section {
    margin-bottom: 2rem;
}
.sidebar-title {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray);
    margin-bottom: 1rem;
    font-weight: 700;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    color: var(--dark);
    text-decoration: none;
    transition: background 0.2s;
    margin-bottom: 0.25rem;
}
.menu-item:hover, .menu-item.active {
    background-color: #ECFDF5;
    color: var(--primary-dark);
}

.trending-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
}
.trending-info h5 {
    margin: 0;
    font-size: 0.95rem;
}
.trending-info span {
    font-size: 0.8rem;
    color: var(--gray);
}

/* Marketplace specific */
.product-card {
    transition: transform 0.2s;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.product-image {
    width: 100%;
    height: 200px;
    background-color: #E5E7EB;
    object-fit: cover;
}
.product-details {
    padding: 1rem;
}
.price-tag {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 1.1rem;
}
.badge {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-sale {
    background-color: #DBEAFE;
    color: #1E40AF;
}
.badge-rent {
    background-color: #FEF3C7;
    color: #92400E;
}

/* Profile Specific */
.profile-header {
    background: var(--white);
    padding-bottom: 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.cover-photo {
    height: 240px;
    background: linear-gradient(135deg, #10B981 0%, #3B82F6 100%);
    width: 100%;
    position: relative;
}
.cover-photo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.2));
}

.profile-info-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem 2rem;
}

.profile-info {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: -60px;
}

.profile-user {
    display: flex;
    align-items: flex-end;
    gap: 2rem;
}

.profile-text {
    padding-bottom: 0.5rem;
}

.mobile-edit-btn {
    display: none;
}

.profile-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.stat-item {
    text-align: left;
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--dark);
    line-height: 1.2;
}

.stat-label {
    color: var(--gray);
    font-size: 0.8rem;
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 24px;
    background-color: var(--border);
}

@media (max-width: 768px) {
    .profile-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: -50px;
    }
    
    .profile-user {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        width: 100%;
    }

    .desktop-edit-btn {
        display: none;
    }
    
    .mobile-edit-btn {
        display: inline-flex;
    }

    .profile-stats {
        justify-content: center;
        margin-top: 1rem;
    }

    .flex-between {
        justify-content: center;
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Create Post Box */
.create-post {
    padding: 1rem;
}
.create-post-input {
    width: 100%;
    border: none;
    background: #F3F4F6;
    padding: 1rem;
    border-radius: 1.5rem;
    outline: none;
}
.create-post-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.form-input, .form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    background-color: var(--white);
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Rental Specific */
.rental-hero {
    background: linear-gradient(135deg, var(--dark) 0%, #111827 100%);
    color: var(--white);
    padding: 3rem 1rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    text-align: center;
}

.rental-search-bar {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    gap: 1rem;
    max-width: 900px;
    margin: 2rem auto 0;
    flex-wrap: wrap;
    align-items: flex-end;
    box-shadow: var(--shadow-lg);
    color: var(--dark);
}

.price-detail {
    font-size: 0.875rem;
    color: var(--gray);
}

/* Utility */
.text-muted { color: var(--gray); }
.w-full { width: 100%; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* Placeholder Classes */
.placeholder-image {
    background-color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.875rem;
}
.placeholder-icon {
    display: inline-block;
    width: 1.25em;
    height: 1.25em;
    background-color: currentColor;
    mask-size: contain;
    mask-position: center;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
}
