/* ======================================================================
   HEADER CSS (header.css)
   ====================================================================== */

.top-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 40px 16px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: 72px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 240px;
    max-width: 240px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 200px;
    height: auto;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

/* ===== MINIMALIST HEADER SEARCH TRIGGER ===== */
.header-search-trigger {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    height: 38px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-search-trigger i {
    font-size: 13px;
    color: #94a3b8;
    flex-shrink: 0;
    transition: color 0.2s;
}

.header-search-trigger span {
    flex: 1;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    color: #b0b8c4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-search-trigger kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #b0b8c4;
    font-family: inherit;
    flex-shrink: 0;
}

.header-search-trigger:hover {
    border-color: #cbd5e1;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.header-search-trigger:hover i {
    color: #64748b;
}

.header-search-trigger:hover span {
    color: #64748b;
}

/* Dark theme */
body.dark-theme .header-search-trigger {
    background: #2a2a2a;
    border-color: #3a3a3a;
}

body.dark-theme .header-search-trigger span {
    color: #6b7280;
}

body.dark-theme .header-search-trigger i {
    color: #6b7280;
}

body.dark-theme .header-search-trigger kbd {
    background: #333;
    border-color: #444;
    color: #6b7280;
}

body.dark-theme .header-search-trigger:hover {
    background: #333;
    border-color: #4a4a4a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-theme .header-search-trigger:hover i {
    color: #9ca3af;
}

body.dark-theme .header-search-trigger:hover span {
    color: #9ca3af;
}

@media (max-width: 768px) {
    .header-search-trigger {
        position: static;
        transform: none;
        min-width: 38px;
        max-width: 38px;
        width: 38px;
        height: 38px;
        padding: 0;
        justify-content: center;
        border-radius: 10px;
    }

    .header-search-trigger span,
    .header-search-trigger kbd {
        display: none;
    }
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 16px;
    position: relative;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: transparent;
}

/* Theme Toggle Button */
.theme-toggle-btn .moon-icon {
    display: none;
    color: #6b7280;
    transition: color 0.3s ease;
}

.theme-toggle-btn .sun-icon {
    display: block;
    color: #6b7280;
    transition: color 0.3s ease;
}

.theme-toggle-btn:hover .sun-icon {
    color: #f59e0b;
    /* Bright amber sun hover */
}

.cart-btn {
    position: relative;
}

/* Favorites Button */
.favorites-btn {
    position: relative;
    text-decoration: none;
    color: #6b7280;
    transition: all 0.2s ease;
}

.favorites-btn:hover {
    color: #ef4444;
}

.favorites-btn i {
    font-size: 18px;
}

.cart-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #10b981;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.btn-seller {
    background: #10b981;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-seller:hover {
    background: #059669;
}

.avatar {
    font-size: 24px;
}

/* ── DARK THEME ── */
body.dark-theme .top-header {
    background: #252525;
    border-bottom-color: #2a2a2a;
}

body.dark-theme .icon-btn {
    background: transparent;
    color: #9ca3af;
}

body.dark-theme .icon-btn:hover {
    background: transparent;
}

/* Dark Theme Toggle Button */
body.dark-theme .theme-toggle-btn .sun-icon {
    display: none;
}

body.dark-theme .theme-toggle-btn .moon-icon {
    display: block;
    color: #9ca3af;
}

body.dark-theme .theme-toggle-btn:hover .moon-icon {
    color: #eab308;
    /* Bright yellow moon hover that is distinct */
}

body.dark-theme .favorites-btn {
    color: #9ca3af;
}

body.dark-theme .favorites-btn:hover {
    color: #ef4444;
}