/* Modern Color Scheme and Design Tokens */
:root {
    /* Primary Colors */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;

    /* Secondary Colors */
    --secondary-color: #4b5563;
    --secondary-light: #f3f4f6;

    /* Accent Colors */
    --accent-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;

    /* Neutral Colors */
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --border-color: #e5e7eb;
    --bg-light: #f9fafb;
    --card-bg: #ffffff;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;

    /* Typography */
    --font-sans: 'Cairo', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-light);
    color: var(--text-primary);
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Layout */
.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    padding-top: 1rem;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space);
}

/* Responsive Container */
@media (min-width: 640px) {
    .container {
        padding: 0 var(--space-md);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 var(--space-lg);
    }
}

/* Modern Header Styles */
.header-modern {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--card-bg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.8);
}

.header-modern.scrolled {
    box-shadow: var(--shadow);
    background-color: rgba(255, 255, 255, 0.95);
}

/* .top-bar {
    font-size: 0.875rem;
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 0;
} */

.top-bar a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.top-bar a:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.navbar {
    padding: 0.75rem 0;
    transition: var(--transition);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-brand img {
    height: 40px;
    width: auto;
    transition: var(--transition);
}

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

.navbar .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition);
    position: relative;
    font-size: 0.95rem;
}

.navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 1rem;
    left: 1rem;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: center;
    transition: var(--transition);
}

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

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
    transform: scaleX(1);
}

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

.nav-actions .nav-link {
    padding: 0.5rem;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background-color: var(--secondary-light);
}

.nav-actions .nav-link:hover {
    color: var(--primary-color);
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

.nav-actions .nav-link .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--danger-color);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
}

.notification-dropdown {
    width: 300px;
    padding: 0;
}

.notification-dropdown .dropdown-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.notification-dropdown .dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-menu {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: none;
    border-radius: 8px;
}

/* Category Items */
.category-item {
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-item:hover {
    background-color: #f8f9fa;
    transform: translateY(-5px);
}

.category-item i {
    margin-bottom: 0.5rem;
}

.category-item p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Listing Cards */
.listing-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background: white;
    margin-bottom: 1rem;
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.listing-card .card-img-top {
    height: 200px;
    object-fit: cover;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.listing-card .card-body {
    padding: 1rem;
}

.listing-card .card-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
}

/* Featured Listings */
.featured {
    border: 2px solid var(--featured-color);
}

.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--featured-color);
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.featured-badge i {
    margin-right: 0.25rem;
}

/* Search Section */
.search-section {
    background-color: #f8f9fa;
    padding: 2rem 0;
}

/* Custom Button Styles */
.btn-success {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-success:hover {
    background-color: #218838;
    border-color: #218838;
}

/* Stats Section */
.stat-item {
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-item h3 {
    font-size: 1.75rem;
    color: var(--primary-color);
}

/* Trending Searches */
.trending-tags .btn {
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

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

/* Verified Sellers */
.seller-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.seller-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.seller-avatar {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.seller-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.verified-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: white;
    border-radius: 50%;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* How It Works */
.step-card {
    background: white;
    border-radius: 12px;
    padding: 2rem 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.step-icon {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Advanced Search */
.advanced-search .collapse {
    margin-top: 1rem;
}

.advanced-search .card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Modern Footer Styles */
.footer-modern {
    background-color: #1a1a1a;
    position: relative;
    width: 100%;
    z-index: 10;
}

.main-footer {
    padding: 60px 0 40px;
    background-color: #1a1a1a;
}

.copyright-section {
    background-color: #151515;
    border-top: 1px solid rgba(255,255,255,0.1);
    width: 100%;
    position: relative;
    bottom: 0;
    left: 0;
    z-index: 10;
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-links a {
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-color) !important;
    transform: translateX(-5px);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-newsletter .form-control {
    background-color: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    border-radius: 8px !important;
    padding: 0.75rem 1rem;
}

.footer-newsletter .form-control:focus {
    background-color: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}

.footer-newsletter .btn {
    border-radius: 8px !important;
    padding: 0.75rem 1.5rem;
}

.app-badges img {
    transition: transform 0.3s ease;
}

.app-badges img:hover {
    transform: translateY(-3px);
}

.hover-success:hover {
    color: var(--primary-color) !important;
}

/* Footer Responsive */
@media (max-width: 768px) {
    .footer-title {
        margin-top: 1.5rem;
    }

    .sub-footer {
        text-align: center;
    }

    .sub-footer ul {
        justify-content: center;
        margin-top: 1rem;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .seller-card {
        padding: 1rem;
    }

    .step-card {
        padding: 1.5rem 1rem;
    }

    .stat-item h3 {
        font-size: 1.5rem;
    }

    .seller-avatar {
        width: 80px;
        height: 80px;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .category-item p {
        font-size: 0.8rem;
    }

    .card-img-top {
        height: 150px;
    }
}

/* Add to Favorites Button - Commented out to avoid conflicts with modern card styles */
/* .favorite-btn {
    position: absolute;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.favorite-btn:hover {
    background: #fff;
} */

/* Price Badge */
.price-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(40,167,69,0.9);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}
