/* ============================================================
   Mid America Wire & Cable Site Header
   Brand palette:
     --primary-color:   #003366   (deep navy)
     --secondary-color: #0066cc   (bright blue)
     --light-gray:      #f8f9fa
   ============================================================ */

.site-header {
    padding: 0.35rem 0 !important;
    background: #ffffff !important;
    border-bottom: 1px solid #e5e9f0 !important;
    box-shadow: 0 1px 3px rgba(0, 51, 102, 0.06) !important;
    min-height: 64px;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Logo: noticeably larger, sharp edges */
.site-header .navbar-brand {
    margin-right: 2rem !important;
    display: flex;
    align-items: center;
    padding: 0;
}

.site-header .navbar-brand img,
.site-header .site-logo {
    filter: none !important;
    height: 50px !important;
    width: auto;
    max-width: none;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    transition: transform 0.25s ease;
}

.site-header .navbar-brand:hover .site-logo {
    transform: scale(1.03);
}

/* ---- Navigation links ---- */
.site-header .navbar-nav .nav-link {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    padding: 0.45rem 0.85rem !important;
    position: relative;
    background: transparent !important;
    transition: color 0.2s ease;
    border-radius: 0;
    letter-spacing: 0.01em;
}

.site-header .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0066cc, #003366);
    transition: width 0.25s ease, left 0.25s ease;
    transform: none !important;
}

.site-header .navbar-nav .nav-link:hover,
.site-header .navbar-nav .nav-link.active {
    color: #003366 !important;
    background: transparent !important;
    transform: none !important;
}

.site-header .navbar-nav .nav-link:hover::after,
.site-header .navbar-nav .nav-link.active::after {
    width: calc(100% - 2rem);
    left: 1rem;
}

.site-header .navbar-nav .dropdown-toggle::after {
    margin-left: 0.35rem;
    vertical-align: 0.12em;
    border-top-color: #8b97a3;
    transition: border-top-color 0.2s ease;
}

.site-header .navbar-nav .dropdown-toggle:hover::after,
.site-header .navbar-nav .dropdown-toggle.active::after {
    border-top-color: #003366;
}

.site-header .dropdown-menu {
    border: 1px solid #e5e9f0;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 51, 102, 0.12);
    padding: 0.5rem;
    min-width: 220px;
    margin-top: 0.4rem;
}

.site-header .dropdown-item {
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    font-size: 0.92rem;
    color: #2c3e50;
    transition: all 0.15s ease;
}

.site-header .dropdown-item:hover,
.site-header .dropdown-item:focus {
    background: #eef5fd;
    color: #003366;
}

/* ---- Right-side action cluster ---- */
.site-header .header-actions {
    flex-shrink: 0;
    gap: 0.6rem !important;
}

/* ---- Compact search ---- */
.site-header .quick-search {
    width: 210px;
    margin-right: 0 !important;
}

.site-header .quick-search .input-group {
    border: 1px solid #e0e5ec !important;
    border-radius: 999px !important;
    background: #f7f9fc !important;
    overflow: hidden;
    box-shadow: none !important;
    transition: all 0.2s ease;
}

.site-header .quick-search .input-group:focus-within {
    border-color: #0066cc !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15) !important;
}

.site-header .quick-search .input-group-text {
    background: transparent !important;
    border: none !important;
    padding: 0.45rem 0.2rem 0.45rem 0.9rem;
}

.site-header .quick-search .input-group-text i {
    color: #8b97a3 !important;
    font-size: 0.85rem !important;
    background: transparent !important;
    transform: none !important;
}

.site-header .quick-search .form-control {
    background: transparent !important;
    border: none !important;
    padding: 0.45rem 1rem 0.45rem 0.3rem !important;
    font-size: 0.88rem !important;
    color: #2c3e50;
    box-shadow: none !important;
}

.site-header .quick-search .form-control::placeholder {
    color: #a7b0bc;
}

/* ---- Sales phone: prominent trust signal in brand navy ---- */
.site-header .sales-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.45rem 0.95rem;
    border: 1px solid #d5e1f2;
    border-radius: 10px;
    background: linear-gradient(135deg, #f0f6ff 0%, #ffffff 100%);
    color: #003366;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}

.site-header .sales-phone:hover {
    border-color: #0066cc;
    background: linear-gradient(135deg, #003366 0%, #0066cc 100%);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 51, 102, 0.2);
    transform: translateY(-1px);
    text-decoration: none;
}

.site-header .sales-phone i {
    color: #0066cc;
    font-size: 1.05rem;
    transition: color 0.2s ease;
}

.site-header .sales-phone:hover i {
    color: #ffffff;
}

.site-header .sales-phone__label {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
}

.site-header .sales-phone__caption {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #6c7a89;
    text-transform: uppercase;
    transition: color 0.2s ease;
    line-height: 1;
}

.site-header .sales-phone:hover .sales-phone__caption {
    color: rgba(255, 255, 255, 0.85);
}

.site-header .sales-phone__number {
    font-size: 0.95rem;
    font-weight: 700;
    color: inherit;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    line-height: 1;
}

/* ---- Copper price chip ---- */
.site-header .copper-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f7f9fc !important;
    border: 1px solid #e0e5ec !important;
    border-radius: 999px !important;
    padding: 0.35rem 0.9rem !important;
    box-shadow: none !important;
    transition: all 0.2s ease;
    cursor: help;
}

.site-header .copper-price:hover {
    background: #eef5fd !important;
    border-color: #c9dff5 !important;
}

.site-header .copper-price i.fa-coins {
    color: #c77700 !important;
    font-size: 0.95rem !important;
}

.site-header .copper-price .copper-label {
    font-size: 0.58rem !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #8b97a3 !important;
    font-weight: 600;
    line-height: 1;
}

.site-header .copper-price .price-value {
    display: block;
    font-size: 0.85rem !important;
    font-weight: 700;
    color: #003366 !important;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    margin-top: 1px;
}

/* ---- Cart: ghost icon; only shows brand color when items present ---- */
.site-header .cart-button {
    background: transparent !important;
    border: 1px solid #e0e5ec !important;
    border-radius: 10px !important;
    color: #003366 !important;
    padding: 0 !important;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600 !important;
    box-shadow: none !important;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.site-header .cart-button i {
    font-size: 1rem !important;
    margin: 0 !important;
    color: #003366 !important;
    transition: color 0.2s ease;
}

.site-header .cart-button:hover {
    border-color: #0066cc !important;
    background: #eef5fd !important;
    color: #003366 !important;
    transform: none !important;
    box-shadow: 0 2px 6px rgba(0, 51, 102, 0.08) !important;
}

.site-header .cart-button.has-items {
    background: linear-gradient(135deg, #003366 0%, #0066cc 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.22) !important;
}

.site-header .cart-button.has-items i {
    color: #ffffff !important;
}

.site-header .cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #c92a2a;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 999px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* ---- Ghost logout ---- */
.site-header .btn-ghost-dark {
    background: transparent;
    border: 1px solid #e0e5ec;
    color: #6c7a89;
    border-radius: 10px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.site-header .btn-ghost-dark:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #c92a2a;
}

.site-header .btn-ghost-dark i {
    font-size: 0.95rem;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1399.98px) {
    .site-header .sales-phone__caption {
        display: none;
    }
}

@media (max-width: 1199.98px) {
    .site-header .quick-search {
        width: 190px;
    }
    .site-header .navbar-nav .nav-link {
        padding: 0.6rem 0.75rem !important;
        font-size: 0.9rem !important;
    }
    .site-header .sales-phone {
        padding: 0.4rem 0.75rem;
    }
}

@media (max-width: 991.98px) {
    .site-header {
        padding: 0.75rem 0 !important;
        min-height: auto;
    }

    .site-header .site-logo {
        height: 54px !important;
    }

    .site-header .navbar-collapse {
        background: #ffffff;
        padding: 1rem 0.5rem 1.5rem;
        margin: 0.75rem -1rem 0 -1rem;
        border-top: 1px solid #e5e9f0;
        box-shadow: 0 10px 24px rgba(0, 51, 102, 0.08);
    }

    .site-header .navbar-nav {
        margin: 0 0 1rem 0 !important;
    }

    .site-header .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
    }

    .site-header .navbar-nav .nav-link::after {
        display: none;
    }

    .site-header .navbar-nav .nav-link.active {
        background: #eef5fd !important;
        border-radius: 8px;
        color: #003366 !important;
    }

    .site-header .header-actions {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }

    .site-header .quick-search {
        width: 100%;
    }

    .site-header .sales-phone {
        justify-content: center;
        padding: 0.75rem 1rem;
        width: 100%;
    }

    .site-header .sales-phone__caption {
        display: inline;
    }

    .site-header .copper-price,
    .site-header .cart-button,
    .site-header .btn-ghost-dark {
        width: 100% !important;
        height: auto !important;
        padding: 0.7rem 1rem !important;
        border-radius: 10px !important;
        justify-content: center;
    }

    .site-header .cart-button i {
        margin-right: 0.4rem !important;
    }
}
