/* Smartmart ヘッダー */

.dev-mode-banner {
    background: #ff9800;
    color: white;
    text-align: center;
    padding: 5px;
    font-size: 12px;
}

.site-header {
    background: var(--sm-black, #1a1a1a);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar {
    padding: 0;
    display: block;
}

.navbar-top-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.navbar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 0;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.navbar-bottom {
    background: var(--gray-midashi, #374151);
    padding: 0;
}

.navbar-bottom-inner {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    padding: 10px 0;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 40px;
}

.logo img {
    height: 100%;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
}

/* 検索バー */
.search-container {
    flex: 1;
    max-width: 800px;
}

.search-form {
    display: flex;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    background: white;
}

.search-category {
    background: var(--bg-secondary, #f8f9fa);
    border: none;
    padding: 0 12px;
    font-size: 12px;
    color: var(--text-primary, #333);
    cursor: pointer;
    border-right: 1px solid var(--border-color, #ddd);
}

.search-input {
    flex: 1;
    border: none;
    padding: 0 12px;
    font-size: 14px;
    color: var(--text-primary, #333);
}

.search-input:focus {
    outline: none;
}

.search-button {
    background: var(--primary-color, #0668E1);
    border: none;
    padding: 0 20px;
    cursor: pointer;
    transition: background 0.2s;
    color: white;
}

.search-button:hover {
    background: var(--secondary-color, #0080FB);
}

/* ナビゲーション */
.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
}

.nav-user:hover,
.header-cart:hover {
    opacity: 0.8;
}

.nav-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.nav-greeting {
    font-size: 12px;
    color: #ccc;
}

.nav-name {
    font-size: 14px;
    font-weight: 600;
}

.header-cart {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
}

.cart-wrapper {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color, #0668E1);
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.cart-text {
    font-size: 14px;
    font-weight: 600;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

/* ドロップダウン */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle::after {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f078";
    font-size: 9px;
    margin-left: 5px;
    opacity: 0.7;
    transition: transform 0.2s;
    vertical-align: middle;
    border: none;
}

.nav-dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 4px;
    display: none;
    z-index: 1000;
    margin-top: 4px;
    padding: 8px 0;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: var(--text-primary, #333);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--bg-secondary, #f8f9fa);
    color: var(--primary-color, #0668E1);
}

@media (max-width: 768px) {
    .navbar-top {
        flex-wrap: wrap;
        padding: 12px 10px;
    }

    .search-container {
        width: 100%;
        order: 3;
        margin-top: 10px;
    }

    .navbar-bottom {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .navbar-bottom-inner {
        padding: 10px;
    }

    .nav-text {
        display: none;
    }

    .cart-text {
        display: none;
    }
}
