/* css/global.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300;400;500;600;700&display=swap');
body {
    font-family: 'Comfortaa', Verdana, Geneva, Tahoma, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

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

/* Navbar */
.navbar {
    background: #fff;
    /* box-shadow removed to blend with categories */
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: bold;
    font-size: 24px;
}

.logo-text {
    color: #8b0000;
}

.logo-sub {
    color: #666;
    font-size: 14px;
}

.location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.2s;
    position: relative;
}

.location:hover {
    background: #f5f5f5;
}

.location-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    min-width: 200px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.location-list {
    padding: 8px 0;
}

.location-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
    color: #333;
}

.location-item:hover {
    background: #f5f5f5;
}

.location-item.active {
    background: #fff5f5;
    color: #8b0000;
    font-weight: 600;
}

.search-bar {
    flex: 1;
    max-width: 500px;
    display: flex;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    align-items: center;
    transition: all 0.2s ease;
}

.search-bar:focus-within {
    background: #fff;
    border-color: #8b0000;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

.mobile-search-icon {
    display: none;
    color: #666;
    padding-left: 12px;
    cursor: pointer;
}

.search-bar input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    outline: none;
    background: transparent;
    color: #333;
}

.search-bar input::placeholder {
    color: #999;
}

.search-bar button {
    padding: 0 20px;
    background: transparent;
    color: #666;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    border-left: 1px solid #e0e0e0;
}

.search-bar button:hover {
    color: #8b0000;
    background: transparent;
}

.desktop-category-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    transition: all 0.2s;
    white-space: nowrap;
}

.desktop-category-filter:hover {
    border-color: #8b0000;
    color: #8b0000;
    background: #fff5f5;
}

.desktop-category-filter .location-dropdown {
    top: calc(100% + 8px);
    left: 0;
    min-width: 250px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: #f5f5f5;
    color: #333;
}

.sell-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #8b0000;
    color: white;
    padding: 10px 16px;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.2s;
}

.sell-btn:hover {
    background: #a00000;
}

/* Categories */
.categories {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 16px 0;
    overflow-x: auto;
    position: relative;
    z-index: 900;
    display: block;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.categories-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    gap: 32px;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 80px;
    color: #555;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    position: relative;
}

.category-item:hover {
    color: #8b0000;
    transform: translateY(-4px);
    background-color: #fff5f5;
}

.category-item i {
    font-size: 22px;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.category-item:hover i {
    transform: scale(1.1);
}

.category-item span {
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

/* Active state for desktop categories */
.category-item.active {
    color: #8b0000;
    font-weight: 600;
    background-color: #fff5f5;
}

/* Desktop navbar sizing tweaks */
@media (min-width: 1024px) {
    .nav-container {
        padding: 20px 20px;
    }
    .nav-link i {
        font-size: 18px;
    }
    .search-bar {
        max-width: 560px;
    }
    .search-bar input {
        padding: 14px 18px;
        font-size: 15px;
    }
    .search-bar button {
        padding: 0 22px;
        font-size: 16px;
    }
    .sell-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
    .sell-btn i {
        font-size: 18px;
    }
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: #e5e5e5;
    padding: 60px 0 20px;
    margin-top: 60px;
    font-size: 14px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 24px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    font-weight: 700;
}

.footer-section p {
    color: #999;
    margin-bottom: 16px;
    line-height: 1.6;
}

.footer-section a {
    display: block;
    margin-bottom: 12px;
    color: #999;
    transition: all 0.2s;
    text-decoration: none;
}

.footer-section a:hover {
    color: #fff;
    transform: translateX(4px);
}

/* Brand Section Specifics */
.brand-section {
    grid-column: span 1;
}

@media (min-width: 1024px) {
    .brand-section {
        grid-column: span 1; /* Adjust if we want it wider */
    }
}

/* Social Links */
.social-links {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #333;
    border-radius: 50%;
    color: #fff;
    transition: all 0.3s;
    margin-bottom: 0; /* Override default */
}

.social-links a:hover {
    background: #8b0000;
    transform: translateY(-3px);
}

/* Contact Info */
.contact-info {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.contact-info i {
    color: #8b0000;
}

.contact-info a {
    margin: 0;
    display: inline-flex;
    align-items: center;
}

.footer-section .contact-info {
    margin: 12px 0;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 24px;
    text-align: center;
    color: #666;
    font-size: 13px;
}

/* Buttons */
.btn-primary {
    background: #8b0000;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #a00000;
}

.btn-secondary {
    background: #666;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #555;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    background: #4CAF50;
    color: white;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transform: translateX(150%);
    transition: transform 0.3s ease;
    z-index: 9999;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: #f44336;
}

.notification.warning {
    background: #ff9800;
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px;
    color: #666;
}

.loading i {
    font-size: 32px;
}

/* Mobile Utilities */
.mobile-only {
    display: none !important;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    button.mobile-only, a.mobile-only {
        display: flex !important;
    }
    
    div.mobile-header-extensions.mobile-only {
        display: block !important;
    }

    /* Navbar Mobile Layout */
    .nav-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 16px;
        gap: 12px;
    }

    /* Profile Button */
    .mobile-menu-btn {
        background: none;
        color: #666;
        font-size: 24px;
        padding: 0;
        margin-right: 4px;
        border: none;
    }

    /* Search Bar Mobile */
    .search-bar {
        flex: 1;
        margin: 0;
        border-radius: 8px;
        background: #f5f5f5;
        border: 1px solid #e0e0e0;
        height: 40px;
        display: flex;
        align-items: center;
        padding: 0 12px;
        width: auto;
        max-width: none;
    }

    .mobile-search-icon {
        display: block; /* Show icon on mobile */
        font-size: 14px;
        color: #999;
        padding-left: 0;
        margin-right: 4px;
    }

    .search-bar input {
        background: transparent;
        font-size: 14px;
        padding: 0 4px;
        width: 100%;
        border: none;
        outline: none;
    }

    /* Sell Button Mobile */
    .mobile-sell-btn {
        color: #666;
        font-size: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: 4px;
    }
    
    /* Mobile Header Extensions */
    .mobile-header-extensions {
        background: white;
        border-bottom: 1px solid #eee;
        width: 100%;
        position: relative;
    }

    .location-bar-mobile {
        display: flex;
        align-items: center;
        padding: 10px 16px;
        color: #333;
        font-size: 14px;
        border-bottom: 1px solid #f5f5f5;
        cursor: pointer;
    }

    .location-bar-mobile i {
        margin-right: 8px;
        color: #666;
    }
    
    .location-bar-mobile i.fa-chevron-down {
        margin-left: auto;
        font-size: 12px;
        color: #999;
    }

    .filter-pills-scroll {
        display: flex;
        overflow-x: auto;
        padding: 12px 16px;
        gap: 8px;
        scrollbar-width: none;
    }
    
    .filter-pills-scroll::-webkit-scrollbar {
        display: none;
    }

    .pill {
        white-space: nowrap;
        padding: 6px 16px;
        border-radius: 16px;
        border: 1px solid #ddd;
        background: white;
        color: #666;
        font-size: 14px;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    
    /* Ensure categories are visible and well spaced */
    .categories {
        display: block;
        padding: 30px 0 24px;
        margin-top: 16px; /* Visual separation from navbar */
        background: #fff;
        position: relative;
        z-index: 5;
    }
    
    .categories-container {
        gap: 20px;
        padding: 0 16px; /* Add horizontal padding */
        justify-content: flex-start;
    }
    
    .category-item {
        min-width: 72px;
        opacity: 1;
        padding: 0;
        background-color: transparent;
        border-radius: 0;
    }

    .category-item:hover {
        transform: none;
        background-color: transparent;
    }

    .category-item.active {
        background-color: transparent;
    }
    
    .category-item i {
        font-size: 24px;
        background: #fff;
        width: 56px;
        height: 56px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        margin-bottom: 8px;
        color: #8b0000;
        box-shadow: 0 2px 10px rgba(0,0,0,0.08);
        border: 1px solid #f0f0f0;
    }
    
    .category-item span {
        font-size: 12px;
        font-weight: 600;
        color: #444;
    }
}

/* Dropdown Search */
.dropdown-search-container {
    padding: 10px;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 10;
}

.dropdown-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.dropdown-search-input:focus {
    border-color: #8b0000;
}
