/**
 * BulkDevices main header — logo, search, phone, cart, nav row
 */

#header.bdus-header {
    --bb-header-accent: #eb7d1e;
    --bb-header-accent-hover: #c96a18;
    --bb-header-navy: #1a3a6e;
    --bb-header-navy-hover: #142d57;
    --bb-header-text: #111827;
    --bb-header-text-secondary: #374151;
    --bb-header-muted: #6b7280;
    --bb-header-border: #e5e7eb;
    --bb-header-input-border: #d1d5db;
    --bb-header-surface: #ffffff;

    position: relative;
    z-index: 30;
    width: 100%;
    background: var(--bb-header-surface);
    border-bottom: 1px solid var(--bb-header-border);
    box-shadow: none;
    color: var(--bb-header-text);
}

.bdus-header__container {
    width: 100%;
    margin-inline: auto;
    padding-inline: 1.5rem;
    box-sizing: border-box;
}

/* Main row */
.bdus-header__main {
    display: flex;
    align-items: center;
    gap: 1rem 1.5rem;
    padding-block: 0.875rem;
}

.bdus-header__logo-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.bdus-header__logo-wrap .logo {
    display: block;
    margin: 0;
    line-height: 0;
}

.bdus-header__logo-wrap .logo img {
    display: block;
    max-height: 64px;
    width: auto;
    height: auto;
}

.bdus-header__search {
    display: none;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 42rem;
    margin-inline: auto;
}

.bdus-header__actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-shrink: 0;
}

/* Phone */
.bdus-header__phone {
    display: none;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.bdus-header__phone:hover {
    opacity: 0.85;
}

.bdus-header__phone-icon {
    display: inline-flex;
    flex-shrink: 0;
    color: var(--bb-header-accent);
}

.bdus-header__phone-icon svg {
    display: block;
    width: 2rem;
    height: 2rem;
}

.bdus-header__phone-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    line-height: 1.2;
}

.bdus-header__phone-label {
    font-size: 0.75rem;
    color: var(--bb-header-muted);
}

.bdus-header__phone-number {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--bb-header-text);
    white-space: nowrap;
}

/* Cart */
.bdus-header__cart {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0;
    border: none;
    background: transparent;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.bdus-header__cart:hover {
    opacity: 0.85;
}

.bdus-header__cart-icon {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    color: var(--bb-header-accent);
}

.bdus-header__cart-icon svg {
    display: block;
    width: 2rem;
    height: 2rem;
}

.bdus-header__cart-badge {
    position: absolute;
    top: -0.35rem;
    right: -0.35rem;
    min-width: 1.125rem;
    height: 1.125rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: var(--bb-header-accent);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1.125rem;
    text-align: center;
}

.bdus-header__cart-text {
    display: none;
    flex-direction: column;
    gap: 0.125rem;
    line-height: 1.2;
    text-align: left;
}

.bdus-header__cart-count {
    font-size: 0.75rem;
    color: var(--bb-header-muted);
}

.bdus-header__cart-total {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--bb-header-text);
    white-space: nowrap;
}

/* Search form */
.bdus-header-search {
    width: 100%;
}

.bdus-header-search .form.minisearch {
    display: flex;
    align-items: stretch;
    width: 100%;
    margin: 0;
}

.bdus-header-search .input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
    position: relative;
}

.bdus-header-search .form-input,
.bdus-header-search #search {
    flex: 1 1 auto;
    min-width: 0;
    height: 2.75rem;
    padding: 0 1rem;
    border: 1px solid var(--bb-header-input-border);
    border-right: none;
    border-radius: 4px 0 0 4px;
    background: var(--bb-header-surface);
    font-size: 0.875rem;
    color: var(--bb-header-text);
    box-shadow: none;
}

.bdus-header-search .form-input::placeholder,
.bdus-header-search #search::placeholder {
    color: #9ca3af;
}

.bdus-header-search .form-input:focus,
.bdus-header-search #search:focus {
    outline: none;
    border-color: var(--bb-header-accent);
    box-shadow: 0 0 0 2px rgb(235 125 30 / 0.15);
}

.bdus-header-search .btn[type="submit"] {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid var(--bb-header-navy);
    border-radius: 0 4px 4px 0;
    background: var(--bb-header-navy);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.bdus-header-search .btn[type="submit"]:hover {
    background: var(--bb-header-navy-hover);
    border-color: var(--bb-header-navy-hover);
}

.bdus-header-search kbd {
    display: none !important;
}

.bdus-header-search nav[aria-label] {
    left: 0;
    right: 0;
}

/* Nav row */
.bdus-header__nav {
    display: none;
    border-top: 1px solid #d1d5db;
    overflow: visible;
}

/* Mobile controls */
.bdus-header__mobile-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border: none;
    background: transparent;
    color: var(--bb-header-text-secondary);
    cursor: pointer;
}

.bdus-header__mobile-search svg {
    width: 1.5rem;
    height: 1.5rem;
}

.bdus-header__account {
    display: block;
}

.bdus-header__mobile-panel {
    border-top: 1px solid var(--bb-header-border);
    padding: 0.75rem 1.5rem;
    background: var(--bb-header-surface);
}

@media (min-width: 640px) {
    .bdus-header__cart-text {
        display: flex;
    }
}

@media (min-width: 1024px) {
    .bdus-header__search {
        display: flex;
    }

    .bdus-header__phone {
        display: inline-flex;
    }

    .bdus-header__nav {
        display: block;
    }

    .bdus-header__mobile-search {
        display: none;
    }

    .bdus-header__account {
        display: none;
    }

    .bdus-header__main {
        padding-block: 1rem;
    }
}

@media (max-width: 1023px) {
    .bdus-header__main {
        flex-wrap: wrap;
    }

    .bdus-header__logo-wrap {
        flex: 1 1 auto;
    }

    .bdus-header__actions {
        gap: 0.75rem;
    }
}
