/**
 * B2B unified page headers — matches top nav design language
 */

.b2b-page-head {
    --ph-accent: var(--primary-color, #313f51);
    --ph-border: #e2e8f0;
    --ph-text: #0f172a;
    --ph-muted: #64748b;
    --ph-radius: 14px;
    --ph-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

    position: relative;
    overflow: hidden;
    padding: 22px 26px;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--ph-border);
    border-radius: var(--ph-radius);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05);
    font-family: var(--ph-font);
}

.b2b-page-head::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ph-accent), color-mix(in srgb, var(--ph-accent) 45%, #0ea5e9), transparent 88%);
}

.b2b-page-head__eyebrow {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ph-accent);
    margin-bottom: 8px;
}

.b2b-page-head__main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.b2b-page-head__title {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ph-text);
    margin: 0 0 4px;
    line-height: 1.25;
}

.b2b-page-head__subtitle {
    font-size: 0.875rem;
    color: var(--ph-muted);
    margin: 0;
    max-width: 640px;
    line-height: 1.5;
}

.b2b-page-head__crumbs {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--ph-border);
}

.b2b-page-head__crumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.8125rem;
}

.b2b-page-head__crumb-list li {
    display: inline-flex;
    align-items: center;
    color: var(--ph-muted);
}

.b2b-page-head__crumb-list li:not(:last-child)::after {
    content: "/";
    margin-left: 6px;
    opacity: 0.45;
}

.b2b-page-head__crumb-list a {
    color: var(--ph-accent);
    text-decoration: none;
    font-weight: 500;
}

.b2b-page-head__crumb-list a:hover {
    text-decoration: underline;
}

.b2b-page-head__crumb-list .is-active {
    color: var(--ph-text);
    font-weight: 600;
}

.b2b-page-head--compact {
    padding: 14px 18px !important;
    margin-bottom: 0 !important;
    border-radius: 14px 14px 0 0 !important;
    box-shadow: none !important;
    border-bottom: none !important;
}

.b2b-page-head--compact::before {
    display: none;
}

.b2b-page-head-search {
    position: relative;
    max-width: 420px;
}

.b2b-page-head-search input {
    width: 100%;
    height: 42px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0 44px 0 16px;
    font-size: 0.875rem;
}

.b2b-page-head-search button {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--primary-color, #313f51);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-hero-section .b2b-page-head {
    margin-bottom: 0;
    box-shadow: none;
    border: none;
    padding: 0 !important;
    background: transparent !important;
}

.contact-hero-section .b2b-page-head::before {
    display: none;
}

[dir="rtl"] .b2b-page-head__crumb-list li:not(:last-child)::after {
    margin-left: 0;
    margin-right: 6px;
}

/* Legacy: content-header breadcrumbs */
.app-content .content-header.row:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.app-content .content-header.row:not(:empty) {
    position: relative;
    overflow: hidden;
    margin: 0 0 1.5rem !important;
    padding: 22px 26px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 1px solid var(--ph-border, #e2e8f0) !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05) !important;
}

.app-content .content-header.row:not(:empty)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color, #313f51), color-mix(in srgb, var(--primary-color, #313f51) 45%, #0ea5e9), transparent 88%);
}

.app-content .content-header-title {
    float: none !important;
    font-size: 1.375rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.03em !important;
    color: #0f172a !important;
    margin: 0 0 8px !important;
    font-family: "Inter", system-ui, sans-serif !important;
}

.app-content .content-header .breadcrumb {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0.8125rem;
}

.app-content .content-header .breadcrumb-item a {
    color: var(--primary-color, #313f51);
    font-weight: 500;
}

.app-content .content-header .breadcrumb-item.active {
    color: #64748b;
}

/* Legacy: offers / stocks hero blocks */
.offers-header,
.header_title {
    position: relative !important;
    overflow: hidden !important;
    padding: 22px 26px !important;
    margin-bottom: 1.5rem !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05) !important;
    text-align: left !important;
    min-height: 0 !important;
    display: block !important;
    animation: none !important;
}

.offers-header::before,
.offers-header::after,
.header_title::before,
.header_title::after {
    display: none !important;
}

.offers-header::before,
.header_title::before {
    display: block !important;
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 3px !important;
    background: linear-gradient(90deg, var(--primary-color, #313f51), color-mix(in srgb, var(--primary-color, #313f51) 45%, #0ea5e9), transparent 88%) !important;
    opacity: 1 !important;
    animation: none !important;
    width: auto !important;
}

.offers-header-content {
    position: relative !important;
    z-index: 1 !important;
    max-width: none !important;
    text-align: left !important;
}

.offers-header h1,
.header_title h3 {
    font-size: 1.375rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.03em !important;
    color: #0f172a !important;
    margin: 0 0 4px !important;
    line-height: 1.25 !important;
    text-shadow: none !important;
    animation: none !important;
}

.offers-header p,
.header_title p {
    font-size: 0.875rem !important;
    color: #64748b !important;
    margin: 0 !important;
    opacity: 1 !important;
    animation: none !important;
}

.header_title span {
    display: inline-block !important;
    font-size: 0.6875rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    color: var(--primary-color, #313f51) !important;
    margin-bottom: 8px !important;
    line-height: 1.2 !important;
    text-align: left !important;
}

.header_title .search_form {
    margin-top: 14px !important;
    justify-content: flex-start !important;
}

.header_title .search_form input {
    width: 100% !important;
    max-width: 420px !important;
    height: 42px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 999px !important;
    padding: 0 44px 0 16px !important;
    font-size: 0.875rem !important;
}

.header_title .search_form button {
    right: auto !important;
    left: calc(min(420px, 100%) - 40px) !important;
}

/* Dashboard hero — align with page head */
.zf-b2b-dashboard__hero {
    padding: 22px 26px !important;
    margin-bottom: 1.25rem !important;
    border-radius: 14px !important;
}

.zf-b2b-dashboard__hero h2 {
    font-size: 1.375rem !important;
}

/* Chat in-page header */
.chat_header.b2b-page-head,
.chat_header {
    position: sticky !important;
    top: 0;
    z-index: 100;
    margin: 0 0 0 !important;
    padding: 14px 18px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0 !important;
    border-radius: 14px 14px 0 0 !important;
    box-shadow: none !important;
}

.chat_header h5 {
    font-size: 0.9375rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    letter-spacing: -0.02em;
}

/* Contact hero (logged-in contact page) */
.contact-hero-section {
    position: relative;
    overflow: hidden;
    padding: 22px 26px !important;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05);
}

.contact-hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color, #313f51), color-mix(in srgb, var(--primary-color, #313f51) 45%, #0ea5e9), transparent 88%);
}

.contact-hero-section h1 {
    font-size: 1.375rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-bottom: 4px !important;
}

.contact-hero-section p {
    font-size: 0.875rem !important;
    color: #64748b !important;
    margin: 0 !important;
}

.contact-hero-section .text-center {
    text-align: left !important;
}

@media (max-width: 767px) {
    .b2b-page-head,
    .app-content .content-header.row:not(:empty),
    .offers-header,
    .header_title,
    .contact-hero-section {
        padding: 18px 16px !important;
    }

    .b2b-page-head__title,
    .offers-header h1,
    .header_title h3,
    .app-content .content-header-title {
        font-size: 1.125rem !important;
    }
}
