﻿/* topnav.css - Updated for Modern Dark Premium Theme (TCGListings.com - 2026 style) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Header dimensions & transitions */
:root {
    --header-height: 56px;
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.2s ease;
}

/* Header */
.header {
    height: var(--header-height);
    padding: 0 16px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.cart-icon-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
    padding: 8px;
}

.cart-icon {
    transition: transform 0.2s;
}

.cart-icon-container:hover .cart-icon {
    transform: scale(1.1);
}

.header-top {
    display: flex;
    align-items: center;
    
    padding-top:10px;
    
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    font-size: 12px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    border-radius: 50%;
    padding: 0 4px;
    text-align: center;
    display: none;
}

    .cart-count.show {
        display: inline-block;
    }

/* ────────────────────────────────────────────────
       MOBILE RESPONSIVENESS
    ──────────────────────────────────────────────── */
.signup-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
    margin-left: 2px;
    background: #6c5ce7; /* nice purple - or change to your brand color */
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}

    .signup-btn:hover {
        background: #5a4bc7;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
    }

    .signup-btn:active {
        transform: translateY(0);
    }

/* Mobile adjustments */
@media (max-width: 900px) {
    .signup-btn {
        padding: 2px 4px;
        font-size: 0.9rem;
        margin-left: 8px;
    }
}

.navbar-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    color: inherit;
    font-size: 1.5rem;
    /* hidden by default (desktop) */
}


.hamburger-svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
}

.market-icon-btn {
    background: none;
    border: none;
    padding: 8px;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.mobile-top-links {
    display: none;
    width: 100%;
    padding: 8px 0;
    font-size: 0.95rem;
    text-align: center;
}

    .mobile-top-links a {
        margin: 0 16px;
        color: inherit;
        text-decoration: none;
        font-weight: 500;
    }

        .mobile-top-links a:hover {
            text-decoration: underline;
        }

/*.header-top {
        display: flex;
        align-items: center;
        justify-content:center;
background-color:pink;
      
    }*/

.search-container {
    flex: 1;
    min-width: 220px;
    margin: 0 16px;
}


/* ── Wide screens / desktop ── */
@media (min-width: 901px) {
    .header-top {
        align-items: center;
        justify-content:center;
    }

    .navbar-toggle-btn,
    .search-toggle-btn {
        display: none !important;
    }
}

/* ── Mobile / narrow screens ── */
@media (max-width: 900px) {
    .navbar-toggle-btn {
        display: block;
        order: 1;
    }

    .logo {
        order: 2;
    }

    .header-top {
        background-color: transparent;
        justify-content:flex-start;
        align-items: center;
    }

    .search-toggle-btn {
        display: block;
        order: 3;
    }

    .header-right {
        order: 4;
        
    }

    .search-container {
        display: none;
        order: 10;
        width: 100%;
        margin: 12px 0 4px 0;
    }

        .search-container.active {
            display: flex !important;
        }

    .mobile-top-links {
        display: block;
        order: 11;
    }

    .signup-btn {
        padding: 2px 4px;
        font-size: 0.9rem;
        margin-left: 8px;
    }
}

/* Logo */
.logo {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
    display: flex;
    align-items: center;
    color: var(--text-primary);
    transition: var(--transition);
}

    .logo:hover {
        color: var(--primary-light);
    }

.logo-hidden {
    font-weight: 500;
    opacity: 0.65;
    font-style: normal;
    margin-right: 4px;
}

.logo-meme {
    color: var(--primary-light);
    font-weight: 700;
}

/* Toggle Buttons (mobile) */
.navbar-toggle-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
    
}
.search-toggle-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

    .navbar-toggle-btn:hover,
    .search-toggle-btn:hover {
        background: var(--bg-surface-hover);
        color: var(--text-primary);
    }

/* Search Container */
.search-container {
    flex: 1;
    max-width: 520px;
    margin: 0 32px;
}

    .search-container form {
        display: flex;
        align-items: center;
        position: relative;
    }

    .search-container input[type="search"] {
        width: 100%;
        padding: 10px 16px 10px 44px;
        border: 1px solid var(--border);
        border-radius: 999px;
        background: var(--bg-secondary);
        color: var(--text-primary);
        font-size: 0.95rem;
        outline: none;
        transition: var(--transition);
    }

    .search-container input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    }

    .search-container button {
        position: absolute;
        left: 12px;
        background: none;
        border: none;
        color: var(--text-muted);
        font-size: 1.1rem;
        cursor: pointer;
    }

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.logo {
    font-size: 1.35rem;
    display: flex;
}
/* Icon Buttons (menu, theme toggle, etc.) */
.themetogglebutton,
.upload-btn,
.menu-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.3rem;
}

    .themetogglebutton:hover,
    .upload-btn:hover,
    .menu-btn:hover {
        background: var(--bg-surface-hover);
        color: var(--text-primary);
    }

        /* Menu button dropdown logic */
        .menu-btn:hover + .dropdown,
        .dropdown:hover {
            opacity: 1;
            visibility: visible;
            transition: opacity 0.2s ease, visibility 0s linear;
        }

.dropdown {
    display: block;
    position: absolute;
    top: 100%;
    /*right: 0;*/
    background: var(--card);
    border-radius: 8px;
    border: 1px solid #444;
    box-shadow: var(--shadow);
    min-width: 180px;
    padding: 8px 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0s linear 0.3s;
    overflow: visible;
}

.light-mode .dropdown {
    border-color: #ccc;
}

.dropdown a {
    display: block;
    padding: 10px 20px;
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    transition: background 0.2s ease;
}

    .dropdown a:hover {
        background: var(--hover);
        color: var(--accent);
    }
/* Nested dropdown for Admin Stats */
.dropdown-parent {
    position: relative;
    z-index: 1000;
}

.dropdown-toggle {
    display: block;
    padding: 10px 20px;
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    transition: background 0.2s ease;
}

    .dropdown-toggle:hover {
        background: var(--hover);
        color: var(--accent);
    }

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%; /* Below parent */
    left: 0; /* Aligned with parent */
    background: var(--card);
    border-radius: 8px;
    border: 1px solid #444;
    box-shadow: var(--shadow);
    min-width: 200px;
    padding: 8px 0;
    z-index: 10000;
    visibility: visible;
    opacity: 1;
}

/* Mobile Adjustments */
@media (max-width: 1024px) {
    .search-container {
        display: none;
    }

   
    .search-toggle-btn {
        display: none;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0 1px;
    }

    .logo {
        font-size: 1.35rem;
        display:none;
    }

    .themetogglebutton,
    .upload-btn,
    .menu-btn,
    .search-toggle-btn {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        display: flex;
    }
}
