/* BaltTrade home — banner, hero, trust strip, departments, product and supplier rails, campaigns, editorial, testimonials, supplier CTA. */

/* Screen classes (static media queries, never on scroll), same as the header tiers in bt-shell.css:
   phone < 768; tablet 768–1023; short laptop >= 1024 with height <= 860; tall desktop >= 1024 with height >= 861; very short <= 500.
   Height changes spacing, media and layout only, never font size: browser zoom lowers the CSS height and must not shrink text. */

/* ── Section rhythm ── */
.bt-home-section{padding-top:var(--section-y-sm)}
.bt-home-onboarding{margin-bottom:var(--space-4)}
@media (max-width:767.98px){
  .bt-home-section{padding-top:var(--space-6)}
  .bt-home-section > .bt-section-head{margin-bottom:var(--space-4)}
  .bt-product-rail > .bt-section-head{flex-wrap:nowrap;gap:var(--space-2)}
  .bt-product-rail > .bt-section-head > .bt-section-head__action{flex:none}
}
@media (min-width:1024px) and (max-height:860.98px){
  .bt-home-section{padding-top:max(var(--space-4),calc(var(--section-y-sm) - var(--space-7)))}
  .bt-home-section > .bt-section-head{margin-bottom:var(--space-3)}
}

/* ── Placeholders (empty sources) ── */
.bt-home-ph{pointer-events:none}
.bt-home-ph__bar{display:block;flex-shrink:0;width:80%;height:var(--space-3);border-radius:var(--radius-xs);background:var(--skeleton-base)}
.bt-home-ph__bar--title{width:90%;height:var(--space-4)}
.bt-home-ph__bar--short{width:45%}
.bt-home-ph__bar--price{width:30%;height:var(--space-4);margin-top:var(--space-1-5)}
.bt-home-ph__bar--wide{width:100%}
.bt-home-ph__logo{--bt-logo-size:var(--space-14);background:var(--skeleton-base)}

/* ── Banner (hero, campaigns, supplier CTA) ── */
.bt-banner{
  --bt-banner-bg:var(--bt-navy-900);--bt-banner-fg:var(--text-inverse);--bt-banner-body:var(--text-inverse-secondary);--bt-banner-eyebrow:var(--bt-gold-400);
  --bt-banner-text-basis:340px;--bt-banner-media-basis:300px;--bt-banner-media-min-h:240px;--bt-banner-body-max:520px;
  --bt-banner-lines-w:min(62%,560px);--bt-banner-lines-reserve:calc(min(62cqi,560px) * 0.24 + var(--space-8) + var(--space-1));
  position:relative;display:flex;flex-wrap:wrap;align-items:stretch;overflow:hidden;
  background:var(--bt-banner-bg);color:var(--bt-banner-fg);border-radius:var(--radius-xl);container-type:inline-size
}
.bt-banner--teal{--bt-banner-bg:var(--bt-teal-700);--bt-banner-body:var(--bt-teal-100);--bt-banner-eyebrow:var(--bt-gold-300)}
.bt-banner--cream{--bt-banner-bg:var(--bt-sand-100);--bt-banner-fg:var(--text-primary);--bt-banner-body:var(--text-secondary);--bt-banner-eyebrow:var(--text-brand)}
.bt-banner--media{--bt-banner-lines-w:min(48%,460px);--bt-banner-lines-reserve:calc(min(48cqi,460px) * 0.24 + var(--space-8) + var(--space-1))}

.bt-banner__text{position:relative;z-index:1;display:flex;flex:1 1 var(--bt-banner-text-basis);flex-direction:column;justify-content:center;gap:calc(var(--space-3) + var(--space-0-5));min-width:0;padding:clamp(var(--space-6),4cqi,var(--space-14))}
.bt-banner--lines .bt-banner__text{padding-bottom:var(--bt-banner-lines-reserve)}
.bt-banner__eyebrow{margin:0;font-size:var(--fs-micro);font-weight:var(--fw-bold);line-height:var(--lh-compact);letter-spacing:var(--ls-overline);text-transform:uppercase;color:var(--bt-banner-eyebrow)}
.bt-banner__title{margin:0;font-family:var(--font-display);font-size:var(--fs-h2);font-weight:var(--fw-extrabold);line-height:1.12;letter-spacing:var(--ls-heading);color:var(--bt-banner-fg);text-wrap:balance;overflow-wrap:anywhere}
.bt-banner__body{max-width:var(--bt-banner-body-max);font-size:var(--fs-body);line-height:var(--lh-body);color:var(--bt-banner-body)}
.bt-banner__actions{display:flex;flex-wrap:wrap;gap:var(--space-3);margin-top:var(--space-2)}

.bt-banner__media{position:relative;z-index:1;flex:1 1 var(--bt-banner-media-basis);min-width:0;min-height:var(--bt-banner-media-min-h);background:var(--media-bg)}
.bt-banner .bt-banner__media > *{position:absolute;inset:0;width:100%;height:100%}
.bt-banner .bt-banner__media > img{object-fit:cover}

.bt-banner__lines{position:absolute;right:0;bottom:clamp(var(--space-3),2cqi,var(--space-7));z-index:0;width:var(--bt-banner-lines-w);pointer-events:none}
.bt-banner--media .bt-banner__lines{right:auto;left:0}

/* ── Hero: text-only band; box capped by window height from 768 ── */
.bt-hero{padding-top:var(--space-3)}
.bt-banner--hero{--bt-hero-min-h:clamp(240px,42vh,420px)}
@supports (height:1svh){
  .bt-banner--hero{--bt-hero-min-h:clamp(240px,42svh,420px)}
}
.bt-banner--hero .bt-banner__title{font-size:var(--fs-display);line-height:1.04}
@media (max-width:767.98px){
  .bt-banner--hero .bt-banner__text{gap:var(--space-2);padding:var(--space-5) var(--space-4)}
  .bt-banner--hero .bt-banner__title{font-size:var(--fs-h1)}
  .bt-banner--hero .bt-banner__actions{gap:var(--space-2);margin-top:var(--space-2)}
  .bt-banner--hero .bt-btn--lg{min-height:var(--button-h-md);padding-inline:var(--space-5)}
}
@media (min-width:768px){
  .bt-hero{padding-top:var(--space-6)}
  .bt-banner--hero{min-height:var(--bt-hero-min-h)}
}
@media (min-width:768px) and (max-height:860.98px){
  .bt-banner--hero{--bt-hero-min-h:clamp(200px,42vh - 90px,420px)}
  @supports (height:1svh){
    .bt-banner--hero{--bt-hero-min-h:clamp(200px,42svh - 90px,420px)}
  }
}
@media (min-width:768px) and (max-height:500px){
  .bt-hero{padding-top:var(--space-3)}
  .bt-banner--hero .bt-banner__text{gap:var(--space-2);padding:var(--space-4) var(--space-6)}
  .bt-banner--hero .bt-btn--lg{min-height:var(--button-h-md);padding-inline:var(--space-5)}
}
/* short laptop: the title gets the whole band width, then text left and buttons right */
@media (min-width:1024px) and (max-height:860.98px){
  .bt-hero{padding-top:var(--space-3)}
  .bt-banner--hero:not(.bt-banner--media) .bt-banner__text{display:grid;grid-template-columns:minmax(0,38rem) auto;justify-content:space-between;align-content:center;align-items:end;column-gap:var(--space-8);row-gap:var(--space-2);padding:clamp(var(--space-4),2.4svh,var(--space-10)) var(--space-8)}
  .bt-banner--hero:not(.bt-banner--media) .bt-banner__text > *{grid-column:1 / -1}
  .bt-banner--hero:not(.bt-banner--media) .bt-banner__text > .bt-banner__body{grid-column:1;max-width:none;margin-top:var(--space-1)}
  .bt-banner--hero:not(.bt-banner--media) .bt-banner__text > .bt-banner__actions{grid-column:2;margin-top:0}
}
@media (max-height:500px){
  .bt-banner--hero{--bt-hero-min-h:0px}
}

/* ── Trust strip: rail on phones and very short tablets, grid elsewhere;
   short laptops: one row of compact items (18px glyph in the title line, description below across the whole item); each column is as wide
   as its text while the row has room, otherwise the longest columns narrow and their text wraps, never cut ── */
.bt-trust-strip{margin-top:var(--space-6);background:var(--surface-card);border-block:var(--border-width) solid var(--border-subtle)}
.bt-trust-strip__inner{padding-block:var(--space-5)}
.bt-trust-strip__list{--bt-gap:var(--space-5);--bt-rail-item:240px;margin-block:0;list-style:none}
@media (max-width:767.98px), (max-width:1023.98px) and (max-height:500px){
  .bt-trust-strip{margin-top:var(--space-3)}
  .bt-trust-strip__inner{padding-block:var(--space-3)}
  .bt-trust-strip__list{--bt-gap:var(--space-4);--bt-rail-item:min(17.5rem,86cqi)}
  .bt-trust-strip .bt-trust{gap:calc(var(--space-2) + var(--space-0-5))}
  .bt-trust-strip .bt-trust__icon{width:var(--space-8);height:var(--space-8)}
}
@media (min-width:768px) and (min-height:501px), (min-width:1024px){
  .bt-trust-strip .bt-trust-strip__list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin-inline:0;padding:0;overflow:visible;scroll-snap-type:none}
}
@media (min-width:1024px){
  .bt-trust-strip .bt-trust-strip__list{grid-template-columns:repeat(var(--bt-trust-cols,5),minmax(0,1fr))}
}
@media (min-width:1024px) and (max-height:860.98px){
  .bt-trust-strip{margin-top:var(--space-3)}
  .bt-trust-strip__inner{padding-block:var(--space-2)}
  .bt-trust-strip .bt-trust-strip__list{--bt-gap:var(--space-4);grid-template-columns:repeat(var(--bt-trust-cols,5),minmax(0,auto));justify-content:space-between}
  .bt-trust-strip .bt-trust{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:0 var(--space-1-5)}
  .bt-trust-strip .bt-trust__icon{align-self:start;width:auto;height:calc(0.9375rem * 1.3);background:none}
  .bt-trust-strip .bt-trust__icon > svg{width:18px;height:18px}
  .bt-trust-strip .bt-trust__body{display:contents}
  .bt-trust-strip .bt-trust__title{text-wrap:balance}
  .bt-trust-strip .bt-trust__text{grid-column:1 / -1;text-wrap:balance}
}

/* ── Department grid: grid on tall desktops; elsewhere a scroll-snap strip of compact tiles sized to their names
   (phone: two rows; tablet and short laptop: one row). No visible heading or product count: the heading is for screen readers only.
   The edge fade sits exactly over the gutter the strip bleeds into, so a tile aligned to the content edge is never faded. ── */
.bt-dept-grid__list{--bt-cols-sm:2;--bt-cols-md:3;--bt-gap:var(--space-3);margin:0;padding:0;list-style:none}
.bt-dept-grid__item{display:flex;min-width:0}
.bt-dept-grid__item > *{flex:1;min-width:0}
@media not all and (min-width:1024px) and (min-height:861px){
  .bt-dept-grid .bt-dept-grid__list{
    --bt-dept-tile:min(17rem,92cqi);--bt-dept-rows:2;--bt-dept-ring:var(--space-1-5);
    --bt-dept-bleed-start:var(--bt-container-pad);--bt-dept-bleed-end:var(--bt-container-pad);
    display:grid;grid-template-columns:none;grid-template-rows:repeat(var(--bt-dept-rows),auto);grid-auto-flow:column;grid-auto-columns:max-content;gap:var(--space-2);
    margin-block:calc(var(--bt-dept-ring) * -1);margin-inline:calc(var(--bt-dept-bleed-start) * -1) calc(var(--bt-dept-bleed-end) * -1);
    padding-block:var(--bt-dept-ring);padding-inline:var(--bt-dept-bleed-start) var(--bt-dept-bleed-end);
    overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scroll-padding-inline:var(--bt-dept-bleed-start) var(--bt-dept-bleed-end);scrollbar-width:none;
    -webkit-mask-image:linear-gradient(to right,transparent,#000 var(--bt-dept-bleed-start),#000 calc(100% - var(--bt-dept-bleed-end)),transparent);
    mask-image:linear-gradient(to right,transparent,#000 var(--bt-dept-bleed-start),#000 calc(100% - var(--bt-dept-bleed-end)),transparent)
  }
  .bt-dept-grid .bt-dept-grid__list::-webkit-scrollbar{display:none}
  .bt-dept-grid__item{max-width:var(--bt-dept-tile);scroll-snap-align:start}
  .bt-dept-grid .bt-category-card--tile{flex-direction:row;align-items:center;gap:var(--space-2);padding:var(--space-1-5) calc(var(--space-2) + var(--space-0-5)) var(--space-1-5) var(--space-1-5)}
  .bt-dept-grid .bt-category-card--tile .bt-category-card__media{flex:none;width:var(--space-12);aspect-ratio:1;border-radius:var(--radius-md)}
  .bt-dept-grid .bt-category-card--tile .bt-category-card__media .bt-media-ph > svg{width:24px;height:24px}
  .bt-dept-grid .bt-category-card--tile .bt-category-card__foot{flex:1;min-width:0;padding:0}
  .bt-dept-grid .bt-category-card--tile .bt-category-card__title{overflow-wrap:break-word;hyphens:manual;text-wrap:balance}
  .bt-dept-grid .bt-category-card__arrow{display:none}
}
@media (min-width:768px){
  .bt-dept-grid .bt-dept-grid__list{--bt-dept-rows:1;--bt-dept-tile:18rem}
}
@media not all and (min-width:1024px) and (min-height:861px){
  @media (min-width:768px) and (pointer:fine){
    .bt-dept-grid .bt-dept-grid__list{padding-bottom:var(--space-2);scrollbar-width:thin;scrollbar-color:var(--border-default) transparent}
    .bt-dept-grid .bt-dept-grid__list::-webkit-scrollbar{display:block;height:6px}
    .bt-dept-grid .bt-dept-grid__list::-webkit-scrollbar-thumb{border-radius:var(--radius-full);background:var(--border-default)}
  }
}
@media (min-width:1024px) and (max-height:860.98px){
  .bt-dept-grid .bt-dept-grid__list{--bt-dept-tile:30rem}
}

/* ── Product rail: rail on mobile, grid of full rows from 768px (3-up, 4-up from 1100px) ── */
.bt-product-rail__list{--bt-rail-item:46%;margin-block:0;list-style:none}
.bt-product-rail__item{display:flex;min-width:0}
.bt-product-rail__item > *{flex:1;min-width:0}
@media (min-width:768px){
  .bt-product-rail .bt-product-rail__list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--product-grid-gap);margin-inline:0;padding:0;overflow:visible;scroll-snap-type:none}
}
@media (min-width:768px) and (max-width:1099.98px){
  .bt-product-rail__item:nth-child(3n+4):nth-last-child(-n+2),
  .bt-product-rail__item:nth-child(3n+4):nth-last-child(-n+2) ~ .bt-product-rail__item{display:none}
}
@media (min-width:1100px){
  .bt-product-rail .bt-product-rail__list{grid-template-columns:repeat(4,minmax(0,1fr))}
  .bt-product-rail__item:nth-child(4n+5):nth-last-child(-n+3),
  .bt-product-rail__item:nth-child(4n+5):nth-last-child(-n+3) ~ .bt-product-rail__item{display:none}
}

/* ── Campaigns ── */
.bt-campaigns__grid{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--space-4)}
@media (min-width:1024px){
  .bt-campaigns__grid--2{grid-template-columns:minmax(0,1.25fr) minmax(0,1fr)}
  .bt-campaigns__grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* ── Supplier rail: rail on mobile (grid layout: 1-up), 2-up on tablet, 4-up on desktop ── */
.bt-supplier-rail__list{margin-block:0;list-style:none}
.bt-supplier-rail__item{display:flex;min-width:0}
.bt-supplier-rail__item > *{flex:1;min-width:0}
.bt-supplier-rail--grid .bt-supplier-rail__list{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--product-grid-gap);margin-inline:0;padding:0;overflow:visible;scroll-snap-type:none}
@media (min-width:768px){
  .bt-supplier-rail .bt-supplier-rail__list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--product-grid-gap);margin-inline:0;padding:0;overflow:visible;scroll-snap-type:none}
}
@media (min-width:1024px){
  .bt-supplier-rail .bt-supplier-rail__list{grid-template-columns:repeat(4,minmax(0,1fr))}
}
.bt-supplier-rail__list + .bt-supplier-rail__apps{margin-top:var(--space-6)}

/* ── Editorial grid ── */
.bt-editorial__list{--bt-cols:3;--bt-cols-md:3;--bt-cols-sm:1;--bt-gap:var(--product-grid-gap);margin:0;padding:0;list-style:none}
.bt-editorial__card{display:flex;flex-direction:column;gap:calc(var(--space-2) + var(--space-0-5));height:100%;margin:0}
.bt-editorial__media{position:relative;aspect-ratio:var(--aspect-article);border-radius:var(--radius-lg);background:var(--media-bg);overflow:hidden}
.bt-editorial__media > *{position:absolute;inset:0;width:100%;height:100%}
.bt-editorial__media > img{object-fit:cover}
.bt-editorial__tag{font-size:var(--fs-micro);font-weight:var(--fw-bold);line-height:var(--lh-compact);color:var(--text-brand)}
.bt-editorial__title{margin:0}
.bt-editorial__link{color:var(--text-primary);text-decoration:none}
.bt-editorial__link:hover{color:var(--text-link);text-decoration:underline;text-underline-offset:0.2em}
.bt-editorial__excerpt{font-size:calc(var(--fs-body) * 0.9375);line-height:var(--lh-body);color:var(--text-secondary)}

/* ── Testimonials ── */
.bt-testimonials__list{--bt-cols:3;--bt-cols-md:3;--bt-cols-sm:1;--bt-gap:var(--product-grid-gap);margin:0;padding:0;list-style:none}
.bt-testimonials__item{display:flex;min-width:0}
.bt-testimonials__item > *{flex:1;min-width:0}
.bt-testimonials__list + .bt-testimonials__apps{margin-top:var(--space-6)}
