/* ============================================================
   TG UNIFIED HERO TREATMENT
   Applies the BuyersList wheat-spike brand decoration + gradient
   to every page hero / title section, site-wide.
   Loaded from Web.Master — no per-page markup changes required.
   ============================================================ */

/* ── Hero containers that receive the treatment ── */
.bl-hero,
.as-hero,
.cat-hero,
.sv-hero,
.ts-hero,
.sd-profile-hero,
.hero-section,
.sl-page-header,
.page-title-container {
    position: relative;
    overflow: hidden;
}

/* ── Standard pages: brand gradient + slim padding (matches .bl-hero) ── */
.page-title-container {
    background: linear-gradient(135deg, #1a6e78 0%, #2c8a94 40%, #3ba3ae 80%, #2c8a94 100%) !important;
    padding: 12px 0 !important;
    border: none !important;
    margin-bottom: 0;
    height: auto !important;
    line-height: normal !important;
    min-height: 0 !important;
}
.page-title-container .container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: none !important;
    height: auto !important;
}
/* Neutralize legacy float helpers inside the hero */
.page-title-container .pull-left,
.page-title-container .pull-right,
.page-title-container .page-title,
.page-title-container .breadcrumbs {
    float: none !important;
    height: auto !important;
    line-height: normal !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}
.page-title-container .container::before,
.page-title-container .container::after,
.page-title-container .breadcrumbs::before {
    display: none !important;
    content: none !important;
}
.page-title-container .page-title h1,
.page-title-container .page-title h2,
.page-title-container .page-title h3,
.page-title-container .entry-title {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #fff !important;
    letter-spacing: -.2px !important;
    line-height: 1.3 !important;
    text-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.page-title-container .breadcrumbs {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    margin: 0 !important;
    padding: 4px 10px !important;
    border-radius: 20px;
    background: rgba(0,0,0,.10);
    border: 1px solid rgba(255,255,255,.08);
    list-style: none;
    font-size: 11px;
}
.page-title-container .breadcrumbs li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    float: none !important;
    height: auto !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    color: rgba(255,255,255,.65) !important;
    font-size: 11px !important;
    font-weight: 600;
}
.page-title-container .breadcrumbs li::before { display: none !important; content: none !important; }
.page-title-container .breadcrumbs li a {
    color: rgba(255,255,255,.70) !important;
    font-size: 11px !important;
    text-decoration: none;
    font-weight: 600;
    transition: color .2s;
}
.page-title-container .breadcrumbs li a:hover { color: #fff !important; }
.page-title-container .breadcrumbs li:last-child { color: #fff !important; font-weight: 700; }

/* ── TG wheat-spike decoration (inline SVG, no markup needed) ── */
.bl-hero::after,
.as-hero::after,
.cat-hero::after,
.sv-hero::after,
.ts-hero::after,
.sd-profile-hero::after,
.hero-section::after,
.sl-page-header::after,
.page-title-container::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 200px;
    right: 30px;
    top: 50%;
    transform: translateY(-50%) rotate(9deg) scaleX(-1);
    opacity: .35;
    pointer-events: none;
    z-index: 0;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 240'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M72 226C82 178 91 125 95 38'/%3E%3Cpath d='M91 63C74 55 65 45 62 31C77 35 88 45 94 58'/%3E%3Cpath d='M94 83C111 74 121 63 124 48C108 52 98 62 93 77'/%3E%3Cpath d='M89 103C72 94 62 82 59 67C75 71 86 82 91 97'/%3E%3Cpath d='M92 124C110 115 120 103 123 88C107 92 97 103 91 118'/%3E%3Cpath d='M85 145C68 136 58 124 55 109C71 113 82 124 88 139'/%3E%3Cpath d='M88 166C106 157 116 145 119 130C103 134 93 145 87 160'/%3E%3Cpath d='M80 187C64 178 54 166 51 151C67 155 78 166 83 181'/%3E%3Cpath d='M82 207C99 199 109 188 112 173C97 177 87 187 81 202'/%3E%3C/g%3E%3Cg fill='%23ffffff'%3E%3Cellipse cx='77' cy='44' rx='7' ry='15' transform='rotate(-39 77 44)'/%3E%3Cellipse cx='109' cy='62' rx='7' ry='15' transform='rotate(42 109 62)'/%3E%3Cellipse cx='74' cy='81' rx='7' ry='15' transform='rotate(-39 74 81)'/%3E%3Cellipse cx='108' cy='103' rx='7' ry='15' transform='rotate(42 108 103)'/%3E%3Cellipse cx='70' cy='123' rx='7' ry='15' transform='rotate(-39 70 123)'/%3E%3Cellipse cx='104' cy='145' rx='7' ry='15' transform='rotate(42 104 145)'/%3E%3Cellipse cx='66' cy='165' rx='7' ry='15' transform='rotate(-39 66 165)'/%3E%3Cellipse cx='98' cy='188' rx='7' ry='15' transform='rotate(42 98 188)'/%3E%3C/g%3E%3C/svg%3E");
}

/* BuyersList already has an inline SVG — avoid a doubled decoration */
.bl-hero::after { display: none; }

/* RTL mirror */
html[dir="rtl"] .as-hero::after,
html[dir="rtl"] .cat-hero::after,
html[dir="rtl"] .sv-hero::after,
html[dir="rtl"] .ts-hero::after,
html[dir="rtl"] .sd-profile-hero::after,
html[dir="rtl"] .hero-section::after,
html[dir="rtl"] .sl-page-header::after,
html[dir="rtl"] .page-title-container::after,
[dir="rtl"] .as-hero::after,
[dir="rtl"] .cat-hero::after,
[dir="rtl"] .sv-hero::after,
[dir="rtl"] .ts-hero::after,
[dir="rtl"] .sd-profile-hero::after,
[dir="rtl"] .hero-section::after,
[dir="rtl"] .sl-page-header::after,
[dir="rtl"] .page-title-container::after {
    right: auto;
    left: 30px;
    transform: translateY(-50%) rotate(-9deg);
}

/* Keep hero content above the decoration */
.as-hero > *,
.cat-hero > *,
.sv-hero > *,
.ts-hero > *,
.sd-profile-hero > *,
.hero-section > *,
.sl-page-header > * {
    position: relative;
    z-index: 1;
}

/* Taller heroes (e.g. supplier profile 240px): scale shape up slightly */
.sd-profile-hero::after,
.hero-section::after,
.sl-page-header::after {
    width: 190px;
    height: 250px;
}

/* Responsive: shrink + tuck on mobile */
@media (max-width: 768px) {
    .bl-hero::after,
    .as-hero::after,
    .cat-hero::after,
    .sv-hero::after,
    .ts-hero::after,
    .sd-profile-hero::after,
    .hero-section::after,
    .sl-page-header::after,
    .page-title-container::after {
        width: 100px;
        height: 135px;
        right: 8px;
        opacity: .22;
    }
    html[dir="rtl"] .as-hero::after,
    html[dir="rtl"] .page-title-container::after,
    [dir="rtl"] .as-hero::after,
    [dir="rtl"] .page-title-container::after {
        right: auto;
        left: 8px;
    }
    .page-title-container .container {
        justify-content: center;
        text-align: center;
    }
}
