/* SAM PARTS — brand refresh. Original brands/search hook class names preserved. */
:root {
    --sam-teal: #006B68;
    --sam-charcoal: #1D2929;
    --sam-white: #FFFFFF;
    --sam-line: #D8E4E2;
    --sam-mist: #F3F7F6;
    --sam-light-teal: #E3F2EF;
    --sam-fa: 'Vazirmatn', Tahoma, sans-serif;
    --sam-en: 'Inter', Arial, sans-serif;
    --sam-container: 1650px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; overflow-x: hidden; color: var(--sam-charcoal); background: var(--sam-white); font-family: var(--sam-fa); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
button { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #0c9995; outline-offset: 3px; }
.wide-container { width: min(calc(100% - 5.3%), var(--sam-container)); margin-inline: auto; }

/* Header based on supplied reference — actual logo image, not synthetic lettering. */
.site-header { width: 100%; background: #fff; border-bottom: 1px solid #E5EBEA; }
.header-inner { height: 96px; display: flex; direction: ltr; align-items: center; justify-content: space-between; gap: 28px; }
.header-brand-line { display: flex; align-items: center; gap: 18px; min-width: 0; }
.site-wordmark { flex: 0 0 auto; display: flex; align-items: center; }
.site-wordmark img { width: 280px; height: auto; max-height: 56px; object-fit: contain; }
.header-brand-divider { background: var(--sam-line); width: 2px; height: 45px; flex: 0 0 2px; }
.header-tagline { color: #151C1C; font: 500 clamp(13px,1.32vw,21px)/1.4 var(--sam-en); white-space: nowrap; letter-spacing: -.015em; }
.header-actions { display: flex; direction: ltr; align-items: center; gap: 24px; flex: 0 0 auto; }
.header-icon { display: grid; place-items: center; width: 44px; height: 48px; border-radius: 9px; color: var(--sam-charcoal); transition: background .2s, color .2s; }
.header-icon:hover { background: var(--sam-light-teal); color: var(--sam-teal); }
.header-icon svg { width: 33px; height: 33px; }

/* Hero uses the user's PREVIOUS photo. The photo is merely repositioned and tinted via CSS. */
.hero-section { padding: 0; }
.hero-banner { height: 612px; min-height: 612px; position: relative; overflow: visible; isolation: isolate; background: linear-gradient(100deg,#E7F8F5 0%,#E3F2EF 58%,#D8EDE8 100%); }
.hero-image { pointer-events: none; position: absolute; z-index: -1; top: 0; bottom: 0; right: 0; width: 48%; background: url('../Assets/SamHome/hero-main.jpg') left center / auto 100% no-repeat; -webkit-mask-image: linear-gradient(to right,transparent 0%,#000 16%); mask-image: linear-gradient(to right,transparent 0%,#000 16%); }
.hero-image::after { content: ''; position: absolute; inset: 0; background: rgba(0,107,104,.085); mix-blend-mode: multiply; }
.hero-banner::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(231,248,245,.36) 0%, transparent 60%, rgba(227,242,239,.12) 100%); pointer-events: none; }
.hero-inner { height: 100%; position: relative; display: flex; align-items: center; justify-content: flex-start; direction: ltr; }
.hero-content { width: 55%; max-width: 950px; position: relative; z-index: 2; display: flex; flex-direction: column; gap: 29px; align-items: stretch; direction: rtl; }
.hero-content h1 { margin: 0; font-size: clamp(20px,1.65vw,26px); line-height: 1.85; font-weight: 600; text-align: right; color: var(--sam-charcoal); letter-spacing: 0; }
.part-search { width: 100%; position: relative; }
.search-field { display: flex; align-items: center; width: 100%; min-height: 76px; padding: 6px 12px 6px 17px; background: rgba(255,255,255,.97); border-radius: 19px; border: 1px solid #d7e2e1; box-shadow: 0 7px 19px rgba(29,41,41,.13); }
.search-submit { display: grid; place-items: center; flex: 0 0 56px; height: 55px; width: 56px; border: 0; background: none; color: var(--sam-teal); border-radius: 11px; cursor: pointer; transition: background .2s; }
.search-submit:hover { background: var(--sam-light-teal); }
.search-submit svg { width: 29px; height: 29px; }
.search-input { width: 100%; min-width: 0; height: 59px; padding: 0 12px; border: 0; outline: none; background: transparent; color: var(--sam-charcoal); font-size: clamp(13px,1.22vw,19px); font-weight: 400; direction: rtl; text-align: right; }
.search-input::placeholder { color: #5A7170; opacity: 1; }
.search-input::-webkit-search-cancel-button { display: none; }
.search-clear { border: 0; background: var(--sam-light-teal); color: var(--sam-teal); width: 29px; height: 29px; border-radius: 50%; cursor: pointer; flex: 0 0 29px; }
.search-results { position: absolute; z-index: 30; top: calc(100% + 9px); inset-inline: 0; max-height: min(410px,70vh); overflow-y: auto; padding: 6px; background: #fff; border: 1px solid var(--sam-line); border-radius: 16px; box-shadow: 0 17px 43px rgba(29,41,41,.16); }
.search-result-item { display: flex; align-items: center; gap: 15px; padding: 12px; border-radius: 8px; }
.search-result-item + .search-result-item { border-top: 1px solid #ECF3F1; }
.search-result-item:hover { background: var(--sam-mist); }
.search-result-text { flex: 1; min-width: 0; }
.search-result-text b { display: block; font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-text small { display: block; color: #6D8180; font-size: 11px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-code { direction: ltr; text-align: left; font: 600 11px/1.5 var(--sam-en); color: var(--sam-teal); flex: 0 0 auto; max-width: 38%; overflow: hidden; text-overflow: ellipsis; }
.search-status { padding: 20px; text-align: center; font-size: 13px; color: #607473; }

/* Brand slider — appearance/layout preserved from original stylesheet. */
.brands-section { padding: 60px 0 26px; }
.brands-surface { padding: 15px; border: 1px solid #eff0f2; border-radius: 18px; background: #fff; box-shadow: 0 8px 38px rgba(35,50,72,.065); }
.brands-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(176px, 1fr); gap: 12px; overflow-x: auto; direction: ltr; scroll-snap-type: x proximity; overscroll-behavior-inline: contain; padding: 3px 2px 9px; scrollbar-width: thin; scrollbar-color: #d9dce1 transparent; }
.brand-card { height: 108px; display: flex; align-items: center; justify-content: center; min-width: 0; padding: 18px 16px; background: #fff; border: 1px solid #ebedf0; border-radius: 13px; box-shadow: 0 5px 13px rgba(26,37,51,.055); cursor: pointer; scroll-snap-align: start; transition: transform .2s, box-shadow .2s, border-color .2s; }
.brand-card:hover { transform: translateY(-3px); box-shadow: 0 11px 23px rgba(24,43,69,.12); border-color: #d4dee8; }
.brand-card img { width: 100%; height: 100%; max-height: 72px; max-width: 176px; object-fit: contain; }
.brand-card span { font: 700 16px/1.3 var(--sam-en); color: #303b48; text-align: center; overflow-wrap: anywhere; }

/* Three-column mega category menu matching reference. */
.categories-section { padding: 69px 0 80px; }
.section-heading { margin: 0 0 32px; text-align: center; }
.section-heading h2 { margin: 0; font: 800 clamp(27px,2.65vw,40px)/1.35 var(--sam-en); color: var(--sam-charcoal); letter-spacing: .075em; }
.category-grid { display: block; direction: ltr; min-height: 490px; }
.sam-mega { width: 100%; display: grid; grid-template-columns: 27% 34% 39%; min-height: 490px; padding: 18px 14px; border: 1px solid var(--sam-line); border-radius: 11px; background: #fff; box-shadow: 0 5px 17px rgba(29,41,41,.035); }
.sam-mega-main { display: flex; flex-direction: column; gap: 1px; padding-right: 20px; border-right: 1px solid var(--sam-line); }
.sam-category-button { width: 100%; min-height: 41px; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 18px; border: 0; border-radius: 5px; background: none; color: var(--sam-charcoal); text-align: left; font: 500 16px/1.3 var(--sam-en); cursor: pointer; transition: background .16s,color .16s; }
.sam-category-button:hover, .sam-category-button.is-active { background: var(--sam-light-teal); color: #005D5A; }
.sam-category-button.is-active { font-weight: 700; }
.sam-chevron { display: inline-flex; align-items: center; justify-content: center; width: 19px; flex: 0 0 19px; }
.sam-chevron svg { width: 17px; height: 17px; }
.sam-mega-sub { padding: 4px 25px 10px 30px; min-width: 0; }
.sam-mega-heading { margin: 0 0 12px; font: 700 clamp(24px,2vw,31px)/1.35 var(--sam-en); color: var(--sam-charcoal); }
.sam-mega-accent { height: 2px; margin-bottom: 12px; background: linear-gradient(to right,var(--sam-teal) 0 58px, var(--sam-line) 58px 100%); }
.sam-mega-sublist { display: flex; flex-direction: column; }
.sam-subcategory-link { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 4px; border-bottom: 1px solid #E5EAE9; text-align: left; color: var(--sam-charcoal); font: 400 15.5px/1.35 var(--sam-en); transition: color .16s, padding .16s; }
.sam-subcategory-link:hover { color: var(--sam-teal); padding-left: 10px; }
.sam-empty { font: 500 14px/1.6 var(--sam-en); color: #667C78; padding: 15px 0; }
.sam-mega-visual { display: flex; align-items: center; justify-content: center; min-width: 0; padding: 15px 21px 15px 6px; }
.sam-photo-placeholder { height: 100%; width: 100%; min-height: 368px; border: 2px dashed #BFD6D1; border-radius: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: linear-gradient(145deg,#fbfefd,#f3f9f7); color: #7A9490; text-align: center; }
.sam-photo-placeholder svg { width: 54px; height: 54px; stroke: #8BAEAA; }
.sam-photo-placeholder span { font: 600 14px/1.5 var(--sam-en); }
.sam-photo-placeholder small { font: 400 12px/1.5 var(--sam-en); opacity: .8; }
.sam-mega-loading { display: grid; place-items: center; min-height: 390px; color: #66807b; }

/* Footer: same columns, cleaner spacing, new original wordmark. */
.site-footer { background: var(--sam-mist); padding: 58px 0 30px; border-top: 1px solid var(--sam-line); }
.footer-main { display: grid; grid-template-columns: 1.45fr 1fr 1fr .95fr; direction: ltr; align-items: start; column-gap: 45px; border-bottom: 1px solid var(--sam-line); padding: 0 15px 46px; }
.footer-identity { padding-top: 2px; text-align: left; }
.footer-logo { display: inline-flex; align-items: center; }
.footer-logo img { width: 260px; height: auto; max-height: 48px; object-fit: contain; }
.footer-identity p { margin: 9px 0 0; font: 400 clamp(10px,.83vw,13px)/1.45 var(--sam-en); letter-spacing: .025em; color: #536361; }
.footer-column { direction: rtl; text-align: right; display: flex; flex-direction: column; align-items: flex-start; gap: 11px; }
.footer-column h3 { align-self: stretch; font-size: clamp(15px,1.05vw,18px); font-weight: 700; line-height: 1.5; margin: 0 0 9px; color: var(--sam-charcoal); }
.footer-column a, .footer-column span { font-size: clamp(12px,.9vw,14px); line-height: 1.7; color: #52625f; white-space: nowrap; }
.footer-column a:hover { color: var(--sam-teal); }
.footer-contact { align-items: stretch; }
.footer-bottom { color: #697B78; text-align: right; font-size: 12px; padding: 25px 14px 0; }

@media (max-width: 1200px) {
    .header-tagline { font-size: 14px; }
    .site-wordmark img { width: 235px; }
    .header-actions { gap: 10px; }
    .hero-content { width: 57%; }
    .hero-image { width: 46%; }
    .sam-category-button { font-size: 13px; padding-inline: 11px; }
    .sam-mega-sub { padding-inline: 19px; }
    .sam-subcategory-link { font-size: 13px; }
    .footer-main { gap: 25px; }
}
@media (max-width: 920px) {
    .header-inner { height: 79px; }
    .header-brand-divider, .header-tagline { display: none; }
    .site-wordmark img { width: 235px; }
    .hero-banner { height: 530px; min-height: 530px; }
    .hero-image { width: 51%; }
    .hero-content { width: 59%; }
    .hero-content h1 { font-size: 21px; }
    .search-field { min-height: 65px; }
    .search-input { font-size: 13px; }
    .sam-mega { grid-template-columns: 32% 35% 33%; }
    .sam-mega-visual { padding: 12px 8px; }
    .sam-mega-sub { padding-inline: 15px; }
    .footer-main { grid-template-columns: repeat(3,minmax(0,1fr)); row-gap: 31px; }
    .footer-identity { grid-column: 1 / -1; }
}
@media (max-width: 650px) {
    .wide-container { width: calc(100% - 30px); }
    .header-inner { height: 68px; gap: 6px; }
    .site-wordmark img { width: 167px; }
    .header-actions { gap: 0; }
    .header-icon { width: 35px; height: 43px; }
    .header-icon svg { width: 24px; height: 24px; }
    .hero-banner { height: auto; min-height: 585px; overflow: hidden; }
    .hero-image { top: 0; right: 0; bottom: auto; width: 100%; height: 300px; background-size: auto 115%; background-position: left center; -webkit-mask-image: linear-gradient(to bottom,#000 0%,#000 75%,transparent 100%); mask-image: linear-gradient(to bottom,#000 0%,#000 75%,transparent 100%); }
    .hero-inner { min-height: 585px; align-items: flex-end; justify-content: flex-start; padding-bottom: 42px; }
    .hero-content { width: 100%; gap: 18px; }
    .hero-content h1 { font-size: clamp(17px,4.5vw,23px); line-height: 1.7; }
    .desktop-break { display: none; }
    .search-field { min-height: 58px; border-radius: 13px; padding: 5px; }
    .search-submit { width: 44px; height: 45px; flex-basis: 44px; }
    .search-submit svg { width: 23px; height: 23px; }
    .search-input { height: 45px; font-size: 11.5px; padding-inline: 6px; }
    .brands-section { padding: 36px 0 0; }
    .brands-surface { border-radius: 12px; padding: 10px 7px; box-shadow: 0 5px 28px rgba(35,50,72,.055); }
    .brands-track { grid-auto-columns: 160px; gap: 9px; padding-bottom: 6px; }
    .brand-card { height: 84px; padding: 15px 12px; }
    .brand-card img { max-height: 52px; }
    .categories-section { padding: 51px 0 47px; }
    .section-heading { margin-bottom: 23px; }
    .section-heading h2 { font-size: 26px; letter-spacing: .03em; }
    .sam-mega { padding: 12px; display: block; }
    .sam-mega-main { display: flex; flex-direction: row; gap: 6px; overflow-x: auto; white-space: nowrap; padding: 0 0 12px; border-right: 0; border-bottom: 1px solid var(--sam-line); scrollbar-width: thin; }
    .sam-category-button { min-height: 37px; width: auto; flex: 0 0 auto; gap: 5px; padding: 7px 11px; border-radius: 6px; font-size: 12px; }
    .sam-chevron { width: 13px; flex-basis: 13px; }
    .sam-chevron svg { width: 13px; height: 13px; }
    .sam-mega-sub { padding: 18px 3px 12px; }
    .sam-mega-heading { font-size: 24px; }
    .sam-subcategory-link { min-height: 40px; font-size: 13px; }
    .sam-mega-visual { padding: 0; }
    .sam-photo-placeholder { min-height: 190px; }
    .footer-main { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px 15px; padding-inline: 0; }
    .footer-identity { grid-column: 1 / -1; }
    .footer-logo img { width: 220px; }
    .footer-identity p { font-size: 10px; }
    .footer-column { gap: 7px; }
    .footer-column h3 { font-size: 14px; margin-bottom: 5px; }
    .footer-column a, .footer-column span { font-size: 11px; white-space: normal; }
    .footer-contact { grid-column: 1 / -1; }
    .footer-bottom { font-size: 11px; padding-inline: 0; }
}
@media (max-width: 375px) {
    .site-wordmark img { width: 141px; }
    .header-icon { width: 32px; }
    .search-input { font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ===========================================================
   HERO ALIGNMENT — right product photo, left search (Nov 2026)
   Existing brand and category styles intentionally untouched.
   =========================================================== */
.site-header .header-inner { height: 58px; gap: 15px; }
.site-header .header-brand-line { gap: 11px; }
.site-header .site-wordmark img { width: 178px; height: auto; max-height: 31px; }
.site-header .header-brand-divider { width: 1px; flex-basis: 1px; height: 27px; }
.site-header .header-tagline { font-size: 11.5px; font-weight: 500; line-height: 1.3; letter-spacing: 0; }
.site-header .header-actions { gap: 7px; }
.site-header .header-icon { width: 33px; height: 35px; }
.site-header .header-icon svg { width: 21px; height: 21px; }

.hero-section .hero-banner {
    height: 204px;
    min-height: 204px;
    overflow: visible;
    background: linear-gradient(100deg, #DFF4F1 0%, #E3F2EF 60%, #F3F7F6 100%);
}
/* Original photo, not mirrored (Agilent logos remain legible).
   The photo is placed ONLY on the right via CSS. */
.hero-section .hero-image {
    top: 0; bottom: 0; left: auto; right: 0;
    height: 100%; width: 45%;
    background: url('../Assets/SamHome/hero-main-teal.jpg')  60px center / auto 350px no-repeat;
    opacity: .96;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.25) 13%, #000 51%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.25) 13%, #000 51%);
}
.hero-section .hero-image::after { background: transparent; }
.hero-section .hero-banner::before {
    background: linear-gradient(90deg, rgba(227,242,239,.04) 0%, rgba(227,242,239,.04) 52%, rgba(227,242,239,.12) 100%);
}
.hero-section .hero-inner {
    height: 100%; min-height: 204px;
    display: flex; align-items: center; justify-content: flex-start;
    direction: ltr; padding: 0;
}
.hero-section .hero-content {
    width: 64%; max-width: 1010px;
    margin: 0; padding: 0;
    display: flex; flex-direction: column;
    align-items: stretch; justify-content: center;
    gap: 13px; direction: rtl;
    position: relative; z-index: 2; text-align: right;
}
.hero-section .hero-content h1 {
    display: block;
    align-self: flex-start;
    width: max-content;
    max-width: none;
    margin: 0;
    white-space: nowrap;
    text-align: right;
    direction: rtl;
    font-size: clamp(23px, 2.05vw, 32px);
    font-weight: 700;
    line-height: 1.65;
    color: var(--sam-charcoal);
    transform-origin: right center;
}
.hero-section .part-search { width: 100%; margin: 0; }
.hero-section .search-field {
    height: 61px; min-height: 61px;
    padding: 4px 8px 4px 13px;
    border-radius: 14px;
    box-shadow: 0 6px 17px rgba(29,41,41,.10);
}
.hero-section .search-submit { width: 46px; height: 46px; flex-basis: 46px; }
.hero-section .search-submit svg { width: 24px; height: 24px; }
.hero-section .search-input { height: 51px; font-size: clamp(12px, 1.2vw, 17px); }
.hero-section .search-clear { width: 25px; height: 25px; flex-basis: 25px; }
.categories-section .section-heading { margin-bottom: 24px; }
.categories-section .section-heading h2 {
    font-size: clamp(19px, 1.45vw, 24px);
    font-weight: 600; letter-spacing: .055em;
}
@media (max-width: 920px) {
    .site-header .header-inner { height: 56px; }
    .site-header .site-wordmark img { width: 160px; }
    .site-header .header-tagline { font-size: 10.5px; }
    .hero-section .hero-content { width: 67%; }
    .hero-section .hero-image { width: 46%; background-size: auto 285px; background-position: 80px center; }
    .hero-section .hero-content h1 { font-size: 24px; }
}
@media (max-width: 650px) {
    .site-header .header-inner { height: 53px; gap: 6px; }
    .site-header .header-brand-line { gap: 0; }
    .site-header .site-wordmark img { width: 128px; max-height: 28px; }
    .site-header .header-brand-divider, .site-header .header-tagline { display: none; }
    .site-header .header-actions { gap: 0; }
    .site-header .header-icon { width: 31px; height: 32px; }
    .site-header .header-icon svg { width: 18px; height: 18px; }
    .hero-section .hero-banner { height: 204px; min-height: 204px; overflow: visible; }
    .hero-section .hero-image {
        top: 0; bottom: 0; right: 0; left: auto;
        width: 52%; height: 100%;
        background-size: auto 215px;
        background-position: 43px center;
        opacity: .76;
        -webkit-mask-image: linear-gradient(to right,transparent 0%,#000 30%);
        mask-image: linear-gradient(to right,transparent 0%,#000 30%);
    }
    .hero-section .hero-image::after {
        background: linear-gradient(to bottom,rgba(227,242,239,.82),rgba(227,242,239,.38) 36%,transparent 66%);
        mix-blend-mode: normal;
    }
    .hero-section .hero-inner {
        height: 100%; min-height: 204px;
        display: flex; justify-content: flex-start;
        align-items: center; padding: 20px 0 0;
    }
    /* The long Persian heading spans the whole hero; the search stays on the LEFT. */
    .hero-section .hero-content {
        position: static;
        width: 64%; max-width: none;
        margin: 0; padding: 17px 0 0;
        gap: 0;
    }
    .hero-section .hero-content h1 {
        position: absolute;
        top: 33px;
        right: 0;
        left: auto;
        width: 100%;
        max-width: 100%;
        font-size: 17px;
        line-height: 1.5;
        font-weight: 700;
        color: #153A38;
        white-space: nowrap;
        text-align: center;
        transform: none;
    }
    .hero-section .part-search { width: 100%; }
    .hero-section .search-field { height: 52px; min-height: 52px; padding: 4px 5px; border-radius: 11px; }
    .hero-section .search-submit { width: 35px; height: 37px; flex-basis: 35px; }
    .hero-section .search-submit svg { width: 20px; height: 20px; }
    .hero-section .search-input { height: 40px; font-size: clamp(9px,2.7vw,12px); padding-inline: 5px; }
    .categories-section .section-heading h2 { font-size: 18px; }
}
@media (max-width: 375px) {
    .site-header .site-wordmark img { width: 115px; }
    .site-header .header-icon { width: 28px; }
}


/* ONLY HERO PHOTOGRAPH AND COLOR — from supplied 2026-11-14 reference.
   All existing height, typography, positioning, search, brands and footer preserved. */
.hero-section .hero-banner {
    background: #DEF2F3 url('../Assets/SamHome/hero-reference-clean.jpg') center center / 100% 100% no-repeat;
}
.hero-section .hero-image { display: none; }
.hero-section .hero-banner::before { display: none; }
@media (max-width: 650px) {
    .hero-section .hero-banner {
        background-image: url('../Assets/SamHome/hero-reference-mobile.jpg');
        background-position: center center;
        background-size: 100% 100%;
    }
}
