/**
 * AuctionHaul - Main Stylesheet
 * Modern, Premium Marketplace Design
 */

/* =====================================================
   CSS VARIABLES & DESIGN TOKENS
   ===================================================== */
:root {
    /* Primary Colors */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;

    /* Secondary Colors */
    --secondary-color: #0ea5e9;
    --secondary-dark: #0284c7;

    /* Accent Colors */
    --accent-color: #f59e0b;
    --accent-dark: #d97706;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;

    /* Neutral Colors */
    --dark-color: #1e293b;
    --gray-900: #0f172a;
    --gray-800: #1e293b;
    --gray-700: #334155;
    --gray-600: #475569;
    --gray-500: #64748b;
    --gray-400: #94a3b8;
    --gray-300: #cbd5e1;
    --gray-200: #e2e8f0;
    --gray-100: #f1f5f9;
    --light-color: #f8fafc;
    --white: #ffffff;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Outfit', var(--font-primary);

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* =====================================================
   BASE STYLES & RESET
   ===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--gray-800);
    background-color: var(--gray-100);
    line-height: 1.6;
    padding-top: 80px;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--gray-900);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
}

/* =====================================================
   NAVBAR STYLES
   ===================================================== */
.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    padding: 0.75rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar-brand {
    display: flex;
    align-items: center;
    padding: 0.25rem 0;
}

.navbar-brand:hover {
    opacity: 0.9;
}

.navbar-logo {
    height: 45px !important;
    width: auto !important;
    max-width: 240px !important;
    object-fit: contain;
}

.nav-link {
    font-weight: 500;
    color: var(--gray-700) !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--primary-color) !important;
    background: var(--gray-100);
}

.nav-link.active {
    color: var(--primary-color) !important;
    background: rgba(99, 102, 241, 0.1);
}

/* Highlighted Pricing Link in Navbar */
.nav-link-pricing {
    color: var(--primary-color) !important;
    font-weight: 600 !important;
    background: rgba(99, 102, 241, 0.08);
    border: 1.5px solid var(--primary-color);
    border-radius: var(--radius-full) !important;
    padding: 0.35rem 1rem !important;
    margin-left: 0.25rem;
    transition: var(--transition-fast);
}

.nav-link-pricing:hover {
    background: var(--primary-color) !important;
    color: #fff !important;
}

/* Mobile Pricing Button (next to hamburger, always visible) */
.btn-pricing-mobile {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff !important;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.3rem 0.85rem;
    white-space: nowrap;
    order: 3;
}

.btn-pricing-mobile:hover,
.btn-pricing-mobile:active {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: #fff !important;
}

/* Post Ad Button in Navbar */
.btn-post-ad {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white) !important;
    font-weight: 600;
    padding: 0.6rem 1.5rem !important;
    border-radius: var(--radius-full);
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
    transition: var(--transition-base);
}

.btn-post-ad:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
    color: var(--white) !important;
}

/* User Dropdown */
.user-dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-dropdown .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--primary-light);
}

.user-dropdown .user-avatar-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 0.9rem;
    border: 2px solid var(--primary-light);
}

/* Seller Avatar Icon for Ad View Page */
.seller-avatar-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.user-dropdown .dropdown-menu {
    border: none;
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    min-width: 200px;
}

.user-dropdown .dropdown-item {
    border-radius: var(--radius-md);
    padding: 0.6rem 1rem;
    font-weight: 500;
}

.user-dropdown .dropdown-item:hover {
    background: var(--gray-100);
    color: var(--primary-color);
}

.user-dropdown .dropdown-item i {
    width: 20px;
    margin-right: 0.5rem;
    color: var(--gray-500);
}

/* =====================================================
   HERO SECTION & SEARCH
   ===================================================== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 4rem 0;
    margin-top: -20px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Search Container */
.search-container {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    max-width: 900px;
    margin: 0 auto;
}

.search-container .form-control,
.search-container .form-select {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.search-container .form-control:focus,
.search-container .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.search-container .btn-search {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    color: var(--white);
    transition: var(--transition-base);
}

.search-container .btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* =====================================================
   CATEGORY GRID
   ===================================================== */
.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-full);
}

.categories-grid {
    padding: 3rem 0;
}

.category-card {
    display: block;
    text-decoration: none;
    transition: var(--transition-base);
}

.category-card:hover {
    transform: translateY(-8px);
}

.category-card .card {
    border: none;
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    overflow: hidden;
}

.category-card:hover .card {
    box-shadow: var(--shadow-xl);
}

.category-card .card-body {
    padding: 1.5rem;
    text-align: center;
}

.category-card .category-icon {
    width: 55px;
    height: 55px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(14, 165, 233, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: var(--transition-base);
}

.category-card:hover .category-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.category-card .category-icon i {
    font-size: 1.35rem;
    color: var(--primary-color);
    transition: var(--transition-base);
}

.category-card:hover .category-icon i {
    color: var(--white);
}

.category-card h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

/* =====================================================
   AD CARD LINK
   ===================================================== */
.ad-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.ad-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* =====================================================
   AD CARDS
   ===================================================== */
.ads-grid {
    padding: 2rem 0 3rem;
}

.ad-card {
    border: none;
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition-base);
    height: 100%;
}

.ad-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.ad-card .card-img-wrapper {
    position: relative;
    padding-top: 75%;
    /* 4:3 aspect ratio */
    overflow: hidden;
}

.ad-card .card-img-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-base);
}

.ad-card:hover .card-img-top {
    transform: scale(1.05);
}

.ad-card .ad-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.ad-card .badge-featured {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: var(--white);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ad-card .favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 2;
}

.ad-card .favorite-btn:hover {
    background: var(--danger-color);
    color: var(--white);
}

.ad-card .favorite-btn.active {
    background: var(--danger-color);
    color: var(--white);
}

.ad-card .card-body {
    padding: 1.25rem;
}

.ad-card .ad-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ad-card .ad-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.ad-card .ad-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--gray-500);
    font-size: 0.85rem;
}

.ad-card .ad-location {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ad-card .ad-date {
    font-size: 0.8rem;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    font-weight: 500;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    color: var(--white);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    border: none;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.1rem;
}

/* =====================================================
   FORMS
   ===================================================== */
.form-control,
.form-select {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.input-group-text {
    background: var(--gray-100);
    border: 2px solid var(--gray-200);
    color: var(--gray-500);
}

/* =====================================================
   CARDS
   ===================================================== */
.card {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    background: var(--white);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* =====================================================
   ALERTS
   ===================================================== */
.alert {
    border: none;
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
}

.alert-info {
    background: rgba(14, 165, 233, 0.1);
    color: var(--secondary-dark);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-dark);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* =====================================================
   BADGES
   ===================================================== */
.badge {
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-full);
}

.badge-status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-dark);
}

.badge-status-approved {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.badge-status-rejected {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.badge-status-expired {
    background: rgba(100, 116, 139, 0.15);
    color: var(--gray-600);
}

/* Item Condition Badges */
.badge-condition {
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-new {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: var(--white);
}

.badge-used {
    background: rgba(245, 158, 11, 0.9);
    color: var(--white);
}

.badge-refurbished {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    color: var(--white);
}

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-brand {
    display: block;
    margin-bottom: 1rem;
}

.footer-logo {
    height: 40px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    filter: brightness(1.1);
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray-400);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-300);
    transition: var(--transition-base);
}

.footer-social a:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    margin-top: 3rem;
    text-align: center;
    color: var(--gray-500);
}

/* =====================================================
   CHAT WIDGET
   ===================================================== */
.chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1050;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border: none;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-base);
}

.chat-toggle:hover {
    transform: scale(1.1);
}

.chat-toggle i {
    font-size: 1.5rem;
}

.chat-box {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 380px;
    height: 500px;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1050;
}

.chat-box.active {
    display: flex;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header h5 {
    margin: 0;
    color: var(--white);
    font-size: 1rem;
}

.chat-header .btn-close-chat {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.8;
}

.chat-header .btn-close-chat:hover {
    opacity: 1;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--gray-100);
}

.chat-message {
    margin-bottom: 1rem;
    max-width: 80%;
}

.chat-message.sent {
    margin-left: auto;
}

.chat-message .message-content {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
}

.chat-message.received .message-content {
    background: var(--white);
    border-bottom-left-radius: 4px;
}

.chat-message.sent .message-content {
    background: var(--primary-color);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.chat-message .message-time {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.chat-input {
    padding: 1rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 0.5rem;
}

.chat-input input {
    flex: 1;
}

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination {
    gap: 0.25rem;
}

.page-link {
    border: none;
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    color: var(--gray-700);
    font-weight: 500;
}

.page-link:hover {
    background: var(--gray-100);
    color: var(--primary-color);
}

.page-item.active .page-link {
    background: var(--primary-color);
    color: var(--white);
}

/* =====================================================
   UTILITIES
   ===================================================== */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
}

/* =====================================================
   RESPONSIVE STYLES
   ===================================================== */
@media (max-width: 992px) {
    body {
        padding-top: 70px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .search-container {
        padding: 1.25rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    .hero-section {
        padding: 1.5rem 0;
        margin-top: -10px;
    }

    .hero-title {
        font-size: 1.35rem;
        margin-bottom: 0.25rem;
    }

    .hero-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    /* OLX-style Search - compact mobile */
    .search-container {
        padding: 0.75rem;
        border-radius: var(--radius-md);
    }

    .search-container .row>div {
        margin-bottom: 0.5rem;
    }

    .search-container .form-control,
    .search-container .form-select {
        font-size: 0.9rem;
        padding: 0.6rem 0.75rem;
    }

    .search-container .btn-search {
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
    }

    /* OLX-style Categories on Mobile - horizontal scroll */
    .categories-grid {
        padding: 1.25rem 0;
    }

    .categories-grid .container {
        overflow: visible;
    }

    .categories-grid .row {
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
        scrollbar-width: none;
    }

    .categories-grid .row::-webkit-scrollbar {
        display: none;
    }

    .categories-grid .row>div {
        flex: 0 0 80px;
        min-width: 80px;
        max-width: 80px;
        padding: 0 4px;
    }

    .categories-grid .category-card .card {
        box-shadow: none;
        border-radius: 0;
        background: transparent;
    }

    .categories-grid .category-card .card-body {
        padding: 0.5rem 0;
    }

    .categories-grid .category-card .category-icon {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        margin-bottom: 0.5rem;
    }

    .categories-grid .category-card .category-icon i {
        font-size: 1.15rem;
    }

    .categories-grid .category-card h5 {
        font-size: 0.7rem;
        line-height: 1.2;
        color: var(--gray-700);
    }

    .categories-grid .section-title {
        display: none;
    }

    /* OLX-style Ads on Mobile - 2 column grid */
    .category-ads-section {
        padding: 1rem 0;
    }

    .category-section-title {
        font-size: 1.1rem !important;
        font-weight: 700;
    }

    .category-section-title i {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.9rem !important;
        border-radius: 8px;
    }

    .view-all-btn {
        font-size: 0.8rem;
        padding: 0.35rem 0.75rem;
    }

    /* Convert horizontal scroll to 2-column grid on mobile */
    .ads-scroll-track {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        overflow-x: visible !important;
        padding: 0 0.5rem;
    }

    .ads-scroll-track .ad-card-item {
        flex: none !important;
        min-width: unset !important;
        width: 100% !important;
    }

    /* Mobile Ad Card Styles - OLX-like */
    .ads-scroll-track .ad-card {
        border-radius: 6px;
        box-shadow: none;
        border: 1px solid #e8e8e8;
    }

    .ads-scroll-track .ad-card .card-img-wrapper {
        padding-top: 85%;
    }

    .ads-scroll-track .ad-card .card-body {
        padding: 0.65rem;
    }

    .ads-scroll-track .ad-card .ad-price {
        font-size: 1rem;
        font-weight: 700;
        color: #002F34;
        margin-bottom: 0.25rem;
    }

    .ads-scroll-track .ad-card .ad-title {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
        -webkit-line-clamp: 2;
    }

    .ads-scroll-track .ad-card .ad-meta {
        font-size: 0.7rem;
    }

    .ads-scroll-track .ad-card .ad-badges {
        top: 6px;
        left: 6px;
    }

    .ads-scroll-track .ad-card .badge-featured {
        font-size: 0.6rem;
        padding: 0.2rem 0.5rem;
    }

    .ads-scroll-track .ad-card .favorite-btn {
        width: 28px;
        height: 28px;
        top: 6px;
        right: 6px;
    }

    .ads-scroll-track .ad-card .favorite-btn i {
        font-size: 0.85rem;
    }

    /* Hide scroll nav on mobile */
    .scroll-nav {
        display: none !important;
    }

    /* Chat widget mobile */
    .chat-box {
        width: calc(100% - 32px);
        right: 16px;
        height: 450px;
    }

    .chat-toggle {
        width: 50px;
        height: 50px;
    }

    /* Mobile Footer - compact */
    .site-footer {
        padding: 2rem 0 1rem;
    }

    /* Mobile-specific: Bottom bar spacing */
    .bg-light.py-4 {
        padding-bottom: 0 !important;
    }

    /* Why choose us - hide on mobile or make compact */
    .py-5.bg-white .row .col-md-4 {
        margin-bottom: 0.5rem;
    }

    .py-5.bg-white .category-icon.mx-auto {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 576px) {
    .search-container .row>div {
        margin-bottom: 0.5rem;
    }

    .ad-card .ad-price {
        font-size: 1rem;
    }

    /* Even more compact on very small screens */
    .hero-section {
        padding: 1rem 0;
    }

    .hero-title {
        font-size: 1.2rem;
    }

    .hero-subtitle {
        font-size: 0.8rem;
    }

    .categories-grid .row>div {
        flex: 0 0 72px;
        min-width: 72px;
        max-width: 72px;
    }

    .categories-grid .category-card .category-icon {
        width: 38px;
        height: 38px;
    }
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease;
}

.animate-slide-up {
    animation: slideInUp 0.5s ease;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* =====================================================
   LANGUAGE SWITCHER
   ===================================================== */
.language-switcher .btn {
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
}

.language-switcher .dropdown-menu {
    min-width: 120px;
}

.language-switcher .dropdown-item.active {
    background: var(--primary-color);
    color: var(--white);
}

/* =====================================================
   RTL (RIGHT-TO-LEFT) SUPPORT FOR URDU
   ===================================================== */
html[dir="rtl"] {
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Urdu Typesetting', var(--font-primary);
}

html[dir="rtl"] body {
    text-align: right;
}

html[dir="rtl"] .navbar-brand {
    margin-right: 0;
    margin-left: 1rem;
}

html[dir="rtl"] .me-1 {
    margin-right: 0 !important;
    margin-left: 0.25rem !important;
}

html[dir="rtl"] .me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

html[dir="rtl"] .me-3 {
    margin-right: 0 !important;
    margin-left: 1rem !important;
}

html[dir="rtl"] .me-auto {
    margin-right: 0 !important;
    margin-left: auto !important;
}

html[dir="rtl"] .ms-1 {
    margin-left: 0 !important;
    margin-right: 0.25rem !important;
}

html[dir="rtl"] .ms-2 {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

html[dir="rtl"] .ms-3 {
    margin-left: 0 !important;
    margin-right: 1rem !important;
}

html[dir="rtl"] .ms-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

html[dir="rtl"] .text-start {
    text-align: right !important;
}

html[dir="rtl"] .text-end {
    text-align: left !important;
}

html[dir="rtl"] .dropdown-menu-end {
    right: auto;
    left: 0;
}

html[dir="rtl"] .navbar-nav {
    flex-direction: row-reverse;
}

html[dir="rtl"] .input-group> :not(:last-child) {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

html[dir="rtl"] .input-group> :last-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

html[dir="rtl"] .input-group-text:first-child {
    border-right: 1px solid var(--gray-300);
    border-left: none;
}

html[dir="rtl"] .dashboard-sidebar {
    right: 0;
    left: auto;
}

html[dir="rtl"] .dashboard-content {
    margin-right: 280px;
    margin-left: 0;
}

html[dir="rtl"] .sidebar-toggle {
    right: auto;
    left: 1rem;
}

html[dir="rtl"] .fa-arrow-right:before {
    content: "\f060";
}

html[dir="rtl"] .fa-arrow-left:before {
    content: "\f061";
}

html[dir="rtl"] .fa-chevron-right:before {
    content: "\f053";
}

html[dir="rtl"] .fa-chevron-left:before {
    content: "\f054";
}

html[dir="rtl"] .breadcrumb-item+.breadcrumb-item::before {
    float: right;
    padding-right: 0;
    padding-left: 0.5rem;
}

html[dir="rtl"] .form-check {
    padding-left: 0;
    padding-right: 1.5em;
}

html[dir="rtl"] .form-check-input {
    float: right;
    margin-left: 0;
    margin-right: -1.5em;
}

@media (max-width: 991.98px) {
    html[dir="rtl"] .dashboard-content {
        margin-right: 0;
    }
}