/* Theme and base styles */
:root {
  color-scheme: light;
  --ink: #102f44;
  --muted: #49677a;
  --line: #c6d9e3;
  --teal: #00645f;
  --inset: clamp(16px, 2.4vw, 52px);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: #f3f7fa;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  line-height: 1.5;
}

h1, h2, h3, p {
  margin: 0;
}

a {
  color: #074f76;
  text-underline-offset: .2em;
}

a:hover {
  text-decoration: underline;
}

button, input, select {
  font: inherit;
}

button, a, input, select, summary {
  touch-action: manipulation;
}

:focus-visible {
  outline: 3px solid #007cc3;
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

/* Site navigation */
.mast {
  padding: 12px var(--inset);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: #fff;
}

.mast {
  border-bottom: 1px solid var(--line);
}




.mast nav, .tabs, .linkrow, .pager {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.mast nav a {
  font-size: .9rem;
  font-weight: 600;
  padding: 8px;
}

/* Search and filters */
.search-panel {
  padding: 18px var(--inset);
  background: #fff;
  border-block: 1px solid var(--line);
}

.searchbar {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, .9fr) minmax(0, .9fr) auto;
  gap: 10px;
  align-items: end;
}

label {
  font-size: .86rem;
  font-weight: 650;
  display: grid;
  gap: 4px;
  min-width: 0;
}

input, select, .category-picker {
  width: 100%;
  min-height: 44px;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid #a5bdcd;
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
}

.primary, .pager a, .pill, .pick {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 13px;
  background: white;
  color: var(--ink);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.primary {
  min-height: 44px;
  background: var(--teal);
  color: white;
  border-color: var(--teal);
  font-weight: 650;
}

.tabs {
  margin: 12px 0 0;
}

.more-filters {
  margin-top: 10px;
}

summary {
  cursor: pointer;
  font-weight: 650;
  min-height: 35px;
  padding: 4px 0;
  width: fit-content;
}

.facets {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0;
}

.filterlinks {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  font-size: .89rem;
}

.results, .category-page {
  padding: 20px var(--inset) clamp(28px, 3vw, 54px);
  min-width: 0;
}

.status {
  display: flex;
  align-items: baseline;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.status h1, .category-page h2 {
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  letter-spacing: -.025em;
}

.status p, .muted, .category-page p {
  color: var(--muted);
  font-size: .92rem;
}

/* Product grid and featured rails */
.grid-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "main";
  gap: clamp(12px, 1.25vw, 24px);
  align-items: start;
}

.grid-layout.left {
  grid-template-columns: minmax(140px, 14%) minmax(0, 1fr);
  grid-template-areas: "left main";
}

.grid-layout.right {
  grid-template-columns: minmax(0, 1fr) minmax(140px, 14%);
  grid-template-areas: "main right";
}

.grid-layout.left.right {
  grid-template-columns: minmax(140px, 14%) minmax(0, 1fr) minmax(140px, 14%);
  grid-template-areas: "left main right";
}

.grid-layout main, .feed {
  grid-area: main;
  min-width: 0;
}

.rail[data-side=left] {
  grid-area: left;
}

.rail[data-side=right] {
  grid-area: right;
}

.cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(9px, 1.1vw, 20px);
}

.cards+.cards {
  margin-top: clamp(9px, 1.1vw, 20px);
}

/* Product cards */
.tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  border: 1px solid #c1d6df;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.tile:hover, .tile:focus-within {
  border-color: #79a6ba;
}

.tile > img {
  display: block;
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: #e8f0f4;
}

.icon {
  display: grid;
  place-items: center;
  margin: 14px 0 0 14px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #dfedf2;
  color: #0b676b;
}

.icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
}

.tile-copy {
  padding: 13px;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.tile h3 {
  font-size: clamp(.98rem, 1.1vw, 1.23rem);
  line-height: 1.3;
  font-weight: 650;
}

.tile h3 a {
  color: var(--ink);
  text-decoration: none;
}

.tile h3 a:hover {
  text-decoration: underline;
}

.price {
  font-weight: 700;
  color: #075852;
  margin-top: 4px;
}

.meta, .desc {
  font-size: .86rem;
  color: var(--muted);
  margin-top: 6px;
}

.desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tile footer {
  display: flex;
  align-items: center;
  gap: 6px 10px;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 0 13px;
  padding: 9px 0;
  border-top: 1px solid #deeaef;
  font-size: .83rem;
  overflow-wrap: anywhere;
}

.tile footer a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.tile footer a:last-child {
  font-weight: 650;
}

.mark {
  align-self: flex-start;
  border-radius: 4px;
  background: #d6efed;
  color: #134f4d;
  font-size: .73rem;
  padding: 2px 6px;
  margin: 10px 12px 0;
  font-weight: 700;
}

.tile:has(>img) .mark {
  position: absolute;
  top: 0;
  left: 0;
}

.pager {
  margin-top: 20px;
}

.pager a {
  font-weight: 650;
}


/* Category browser */
.category-page {
  background: white;
  min-height: 70vh;
}

.category-page p {
  margin: 10px 0 20px;
}

.cat-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 8px;
  margin: 12px 0;
  padding: 0;
}

.cat-list a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  text-decoration: none;
}

.cat-list a:hover {
  background: #ecf5f8;
}

.pick {
  justify-content: flex-start;
  width: 100%;
}

.picker-title {
  display: grid;
  gap: 4px;
  font-size: .86rem;
  font-weight: 650;
}

dialog {
  max-width: min(640px, 94vw);
  width: 100%;
  max-height: 83vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  padding: 18px;
}

dialog::backdrop {
  background: #132f4099;
}

dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

dialog ul {
  list-style: none;
  display: grid;
  padding: 0;
  gap: 4px;
}

dialog li button {
  cursor: pointer;
  width: 100%;
  border: 0;
  text-align: left;
  padding: 9px;
  background: #eff5f7;
  color: var(--ink);
  border-radius: 4px;
}

dialog li button:hover {
  background: #d9ebef;
}

dialog .pill {
  min-height: 36px;
}

/* Responsive layout */
@media (max-width: 1400px) {
  .cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

}

@media (max-width: 1100px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .facets {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}

@media (max-width: 800px) {
  .searchbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-layout.left, .grid-layout.right, .grid-layout.left.right {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "left right" "main main";
  }

  .grid-layout.left:not(.right) {
    grid-template-areas: "left left" "main main";
  }

  .grid-layout.right:not(.left) {
    grid-template-areas: "right right" "main main";
  }

  .rail .tile > img {
    aspect-ratio: 2.5;
  }

  .rail .desc {
    display: none;
  }


}

@media (max-width: 580px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mast nav {
    gap: 2px;
  }

  .mast nav a {
    font-size: .83rem;
    padding: 4px;
  }





  .facets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .searchbar {
    gap: 8px;
  }

  .tile-copy {
    padding: 10px;
  }

  .tile footer {
    margin: 0 10px;
  }

  .desc {
    -webkit-line-clamp: 2;
  }

}

@media (max-width: 365px) {
  .mast {
    gap: 4px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .searchbar, .facets {
    grid-template-columns: 1fr;
  }

  .grid-layout.left.right {
    grid-template-columns: 1fr;
    grid-template-areas: "left" "right" "main";
  }

}

.tabs a[aria-current=true] {
  color: #fff;
  background: #16435b;
  border-color: #16435b;
}

.tabs .pill {
  font-size: .9rem;
  min-height: 37px;
  padding: 6px 12px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -5rem;
  background: white;
  color: #13384f;
  padding: .6rem;
  z-index: 3;
}

.skip:focus {
  top: .5rem;
}

/* One local image supplies the flags in the country picker and on product cards. */
.country-flag {
  display: inline-block;
  flex: 0 0 24px;
  width: 24px;
  height: 16px;
  background-image: url("./flags.png");
  background-size: 384px 256px;
  background-repeat: no-repeat;
  background-position: var(--flag-x) var(--flag-y);
}
#choose-country, 
#country-dialog li button, 
.seller-location {
  display: flex;
  align-items: center;
  gap: 8px;
}
#choose-country {
  min-height: 44px;
}
.seller-location {
  color: var(--muted);
  margin-top: 6px;
  font-size: .86rem;
}

/* Both pickers stay in the page. Their index link remains available as a second action. */
.cat-menu { position: relative; min-width: 0; }
.cat-trigger {
  display: flex; align-items: center; gap: .55rem;
  padding: .58rem .75rem; min-height: 44px; cursor: pointer; list-style: none;
  color: #133d52; font-weight: 650; border-radius: 9px;
}
.cat-trigger::-webkit-details-marker { display: none; }
.cat-menu[open] { z-index: 8; }
.cat-trigger:hover, .cat-menu[open] > summary { background: #edf8f6; }
.picker-title .cat-trigger { border: 1px solid var(--line); background-color: #fff; }
.cat-grid-icon { font-size: 1.15rem; color: #076961; }
.cat-chevron { margin-inline-start: auto; }
.cat-menu[open] .cat-chevron { transform: rotate(180deg); }
.cat-popup {
  position: absolute; z-index: 10; top: calc(100% + 5px); right: 0;
  width: min(345px, calc(100vw - 32px)); max-height: min(66vh, 510px); overflow-y: auto;
  overscroll-behavior: contain; border: 1px solid #b6d5d8; border-radius: 14px;
  background: #fff; box-shadow: 0 14px 46px #193f5333; padding: 12px; color: var(--ink);
}
.cat-popup label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; line-height: 1.4; }
.cat-popup input { width: 100%; min-width: 0; padding: .55em .75em; border: 1px solid var(--line); border-radius: 7px; }
.cat-popup ul { list-style: none; margin: .5rem 0; padding: 0; max-height: min(35vh, 260px); overflow-y: auto; }
.cat-popup li a { display: flex; gap: .65rem; align-items: center; padding: .4rem; min-height: 40px; text-decoration: none; color: #193b4b; font-size: .89rem; font-weight: 530; }
.cat-popup li a:hover, .cat-popup li a:focus-visible { background: #e7f5f2; border-radius: 6px; }
.category-icon { flex: 0 0 1.8rem; display: grid; place-items: center; height: 1.8rem; color: #006862; background: #e8f4f2; border-radius: 6px; font-size: 1.12rem; }
.cat-popup [data-more], .cat-popup .category-index { font-size: .83rem; min-height: 36px; padding: 7px; }
.cat-popup [data-more] { color: #075950; border: 1px solid var(--line); border-radius: 7px; background: #fff; cursor: pointer; }
.cat-popup .category-index { display: inline-flex; align-items: center; }
[data-category-status]:empty { display: none; }

/* House campaigns use their own photos and never occupy a product slot. */
.rail { min-width: 0; display: grid; align-content: start; gap: 12px; }
.trade-slider { min-width: 0; overflow: hidden; background: #123746; color: white; border-radius: 12px; }
.trade-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; overscroll-behavior-x: contain; }
.trade-slider:has(.trade-controls:not([hidden])) .trade-track { scrollbar-width: none; }
.trade-card {
  display: flex; position: relative; isolation: isolate; overflow: hidden; flex: 0 0 100%; min-width: 0;
  min-height: 230px; aspect-ratio: 3 / 4.4; color: white; background: #123746;
  align-items: flex-end; scroll-snap-align: start; text-decoration: none;
}
.trade-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, #031e27 1%, #042634eb 18%, #041e2b75 50%, transparent 76%);
}
.trade-card > img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.trade-card:focus-visible { outline-offset: -4px; }
.trade-copy { display: grid; align-content: end; gap: .45rem; width: 100%; padding: clamp(10px, 1.05vw, 24px); }
.trade-copy small { font-size: .66rem; letter-spacing: .025em; color: #cde9e9; }
.trade-copy strong { font: 500 clamp(1.45rem, 1.85vw, 2.8rem)/1.05 Georgia, serif; overflow-wrap: anywhere; }
.trade-link { font-size: .78rem; font-weight: 650; color: #aff0df; }
.trade-card:hover { text-decoration: none; }
.trade-card:hover .trade-link { text-decoration: underline; }
.trade-controls { display: flex; align-items: center; justify-content: space-evenly; border-top: 1px solid #ffffff26; background: #102f3c; }
.trade-controls button {
  display: grid; place-items: center; min-width: 30px; min-height: 40px; padding: 0 4px;
  font: inherit; color: #fff; background: none; border: 0; cursor: pointer;
}
.trade-controls button:hover { background: #225064; }
.trade-controls span { color: #cee4e5; font-size: .73rem; font-variant-numeric: tabular-nums; }

@media (max-width: 800px) {
  .trade-card { min-height: 145px; aspect-ratio: 1.75; }
  .trade-copy { padding: 12px; }
  .trade-copy strong { font-size: clamp(1.33rem, 3.5vw, 1.75rem); }
  .trade-controls button { min-height: 44px; }
  .grid-layout.left.right { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "left right" "main main"; }
  .picker-title .cat-popup { right: auto; left: 0; }
}


/* Marketplace search */

.searchbar .cat-trigger { width: 100%; }
.keyword-wrap { position: relative; min-width: 0; display: grid; gap: 4px; }
.keyword-wrap:has(.keyword-suggestions:not([hidden])) { z-index: 7; }
.keyword-suggestions {
  position: absolute; top: calc(100% + 5px); inset-inline: 0; padding: 8px;
  background: white; border: 1px solid #bfd6dc; box-shadow: 0 12px 36px #15374724; border-radius: 11px;
}
.keyword-suggestions ul { list-style: none; margin: 0; padding: 0; max-height: min(44vh,300px); overflow-y: auto; }
.keyword-suggestions li { display: flex; align-items: center; gap: .65rem; min-height: 42px; padding: 6px; border-radius: 6px; font-size: .88rem; cursor: pointer; overflow-wrap: anywhere; }
.keyword-suggestions li:hover, .keyword-suggestions li[aria-selected=true] { background: #e6f5f1; }
.keyword-suggestions img { width: 34px; height: 32px; flex-shrink: 0; object-fit: cover; border-radius: 4px; }
.suggest-head { display: flex; justify-content: space-between; align-items: center; padding: 5px 6px; color: var(--muted); font-size: .8rem; font-weight: 650; }
.suggest-head button { background: none; color: #13655c; border: 0; cursor: pointer; }


.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chips:empty { display: none; }
.filter-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; color: #14594e; background: #edf7f3; border: 1px solid #c4dfd7; border-radius: 20px; font-size: .85rem; text-decoration: none; }

.trade-controls button, .trade-link b { font-variant-emoji: text; }


.account-page { max-width: 32rem; margin: clamp(24px,8vh,88px) auto; padding: 26px; display: grid; gap: 16px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.account-page h1 { font-size: clamp(1.85rem,4vw,2.55rem); line-height: 1.12; }
.account-page form { display: grid; gap: 12px; }
.account-note:empty { display: none; }
@media (max-width: 650px) {


  .account-page { margin: 20px 12px; padding: 20px; }
}


/* Buyer masthead */
.mast {
  position: relative;
  padding-block: 9px;
  min-height: 68px;
  background: #f4f8fb;
  border-block-end: 1px solid #d2e1e7;
}
.mast nav { gap: 14px; }
.mast nav .buyer-link { color: #143c49; text-underline-offset: 4px; font-weight: 700; }
.mast nav .seller-cta {
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 1px;
  min-width: 96px; min-height: 44px; padding: 6px 18px; border: 3px solid transparent; border-radius: 12px;
  color: #0a343f; background: linear-gradient(#fff,#fff) padding-box,
    conic-gradient(from -22deg,#13baac 0deg 110deg,#4379ec 110deg 205deg,#ffbc4d 205deg 300deg,#13baac 300deg) border-box;
  font-size: .84rem; font-weight: 800; text-decoration: none;
}
.mast nav .seller-cta span { font-size: 1.1rem; color: #156873; }
.mast nav .seller-cta:hover { box-shadow: 0 0 0 3px #d7e9ea; }
.products-brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: #093d48; }
.products-brand:hover { text-decoration: none; }
.products-brand img { width: 40px; height: 40px; }
.products-brand > span { display: grid; gap: 2px; line-height: 1; }
.products-brand small { font-size: .76rem; font-weight: 680; color: #305766; }
.products-brand strong { font-size: 1.37rem; font-weight: 760; letter-spacing: -.045em; }

/* Search first, followed by a single category browser. */
.search-panel { padding: 16px var(--inset) 0; border-top: 0; }
.searchbar { grid-template-columns: minmax(135px,.8fr) minmax(180px,2.6fr) auto; gap: 0; }
.searchbar .picker-title { margin-inline-end: 12px; }
.searchbar :is(input,select,#choose-country,.primary) { min-height: 46px; }
.searchbar #product-query { border-radius: 8px 0 0 8px; }
.searchbar .primary { grid-column: auto; border-radius: 0 8px 8px 0; background: #094b52; border-color: #094b52; }
.browse-row { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 7px 18px; padding-block: 8px; margin-top: 10px; border-top: 1px solid #e2eaed; }
.browse-row > .cat-menu { position: static; }
.browse-row .tabs { margin: 0; gap: 5px; }
.browse-row .tabs a { min-height: 33px; padding: 5px 10px; }
.more-filters { margin: 0; }
.more-filters > summary { min-height: 36px; }
.filterlinks { margin: 0; }
.filterlinks:has([data-filter-chips]:empty):has([data-clear][hidden]):has(#live:empty) { display: none; }
.filterlinks:has(.filter-chip) { padding-bottom: 8px; }
.cat-popup {
  inset-inline: 0; width: 100%; max-height: min(66vh,550px); overflow-y: auto;
  padding: clamp(12px,1.5vw,22px); border-radius: 11px;
}
.cat-popup label { max-width: 30rem; }
.grouped-menu { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px 28px; padding: 14px 0; }
.menu-group { min-width: 0; }
.menu-group h3 { margin: 0; font-size: .96rem; }
.menu-group h3 a { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; text-decoration: none; }
.menu-group h3 img { width: 29px; height: 29px; object-fit: contain; }
.menu-group ul { max-height: none; overflow: visible; margin: 0; }
.menu-group li a { min-height: 28px; padding: 3px 4px; font-weight: 450; }
.cat-popup > [data-category-list]:not([hidden]) { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(200px,100%),1fr)); gap: 3px; }
/* Category shortcuts use one touch-scrollable row at every width. */
.category-strip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px var(--inset);
  border-bottom: 1px solid #dce5e9;
  background: white;
}
.category-shelf {
  flex: 1;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(66px, 1fr);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 4px;
  scrollbar-width: thin;
  min-width: 0;
  padding: 4px;
}
.category-tile {
  display: grid;
  justify-items: center;
  gap: 1px;
  padding: 2px;
  scroll-snap-align: start;
  color: #143d49;
  font-size: .77rem;
  font-weight: 680;
  line-height: 1.35;
  text-decoration: none;
}
.category-tile img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.category-tile:hover, .category-tile[aria-current] {
  color: #007068;
  text-decoration: underline;
}
.rail-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 40px;
  padding: 0;
  border: 1px solid #a3c0c6;
  border-radius: 10px;
  background: white;
  color: #073e45;
  font-size: 1.16rem;
  cursor: pointer;
}
.rail-button:disabled { opacity: .42; cursor: default; }
.rail-button:hover:enabled { background: #e0f3ee; }
.results .status h1 { color: #103844; font-size: clamp(1.4rem,2.2vw,2.1rem); line-height: 1.12; }
.rail-primary, .rail-additions { display: grid; align-content: start; min-width: 0; gap: 13px; }
.rail-additions > .trade-card { border-radius: 12px; aspect-ratio: 4/5; min-height: 190px; }
@media (max-width: 800px) {
  .grouped-menu { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .grid-layout.left.right { grid-template-areas: "left right" "main main" "moreleft moreright"; }
  .grid-layout.left:not(.right) { grid-template-areas: "left left" "main main" "moreleft moreleft"; }
  .grid-layout.right:not(.left) { grid-template-areas: "right right" "main main" "moreright moreright"; }
  .rail { display: contents; }
  .rail[data-side=left] .rail-primary { grid-area: left; }
  .rail[data-side=right] .rail-primary { grid-area: right; }
  .rail[data-side=left] .rail-additions { grid-area: moreleft; }
  .rail[data-side=right] .rail-additions { grid-area: moreright; }
  .rail-additions > .trade-card { aspect-ratio: 1.35; min-height: 145px; }
}
@media (max-width: 580px) {
  .mast { min-height: 60px; padding-block: 6px; }
  .mast nav { gap: 5px; }
  .mast nav .seller-cta { min-width: 76px; min-height: 44px; padding: 5px 13px; }
  .products-brand img { height: 34px; width: 34px; }
  .products-brand strong { font-size: 1.17rem; }
  .search-panel { padding-top: 10px; }
  .searchbar { grid-template-columns: minmax(0,1fr) auto; row-gap: 8px; }
  .searchbar .picker-title { grid-column: 1 / -1; margin-inline: 0; }
  .searchbar .keyword-wrap { grid-column: 1; }
  .searchbar .primary { grid-column: 2; font-size: .84rem; }
  .browse-row { gap: 4px; }
  .browse-row .cat-trigger { padding-inline: 4px; }
  .cat-popup { max-height: 60vh; }
}
.rail-additions { grid-template-columns: minmax(0,1fr); }
.rail-additions > .trade-card { width: 100%; }


/* Horizontal advertising placements */
.banner {
  color: #392918;
  background: #f8ddb5;
}
.banner-inner {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px clamp(18px, 3vw, 60px);
  padding: 17px var(--inset);
  min-height: 94px;
  isolation: isolate;
}
.banner-top {
  background: linear-gradient(105deg, #ffedd3, #f3c18c);
}
.banner-top .banner-inner::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: 48%;
  background: linear-gradient(to right, #f8d4a6, transparent 40%),
    url("https://websdocs.com/products/images/promotion-studio.webp") right 68% / cover no-repeat;
  mask-image: linear-gradient(to right, transparent, black 19%);
}
.banner-copy small {
  display: block;
  margin-bottom: 3px;
  font-size: .69rem;
  font-weight: 670;
  letter-spacing: .095em;
  text-transform: uppercase;
}
.banner h2 { font-size: clamp(1.18rem, 1.7vw, 1.9rem); line-height: 1.12; letter-spacing: -.025em; }
.banner-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 41px;
  padding: 6px 14px;
  border: 1px solid #806245;
  border-radius: 9px;
  background: #fff6e7;
  color: #38271b;
  text-decoration: none;
  font-size: .91rem;
  font-weight: 690;
}
.banner-contact:hover { text-decoration: underline; }

/* Footer promotions and navigation */
.market-footer { background: #f1f7f7; color: #143b43; border-top: 1px solid #c8dcd9; }
.footer-promos { padding: 23px var(--inset) 22px; }
.footer-promos header, .promo-controls, .footer-base, .footer-base nav {
  display: flex;
  align-items: center;
}
.footer-promos header { justify-content: space-between; gap: 14px; margin-bottom: 11px; }
.footer-promos h2 { font-size: clamp(1.25rem, 1.7vw, 1.8rem); letter-spacing: -.025em; }
.promo-controls { gap: 6px; }
.promo-track {
  list-style: none;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max(210px, 24%);
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 4px;
  scrollbar-width: thin;
  padding: 4px 4px 8px;
  margin: 0 -4px;
}
.promo-track li { min-width: 0; scroll-snap-align: start; }
.promo-card {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  position: relative;
  height: clamp(108px, 11vw, 175px);
  overflow: hidden;
  border-radius: 12px;
  color: white;
  background: #16454a;
  text-decoration: none;
}
.promo-card > * { grid-area: 1 / 1; }
.promo-card img { height: 100%; width: 100%; object-fit: cover; object-position: center 40%; }
.promo-card span {
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 14px;
  background: linear-gradient(transparent 10%, rgba(3,28,34,.88));
  font-weight: 700;
}
.banner-footer {
  color: #f8fffc;
  background: linear-gradient(108deg, #0b373c 0%, #144e53 57%, #1c6a67 100%);
}
.banner-footer .banner-inner { justify-content: space-between; padding-block: 22px; }
.banner-footer .banner-copy small { color: #9be9d7; }
.banner-footer .banner-contact { background: #cefae9; color: #133e40; border-color: #8dcabf; }
.footer-base {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 36px;
  padding: 22px var(--inset);
  background: #fff;
}
.footer-base nav { flex-wrap: wrap; gap: 6px 24px; }
.footer-base nav a { display: inline-flex; align-items: center; min-height: 40px; color: #204e57; font-size: .88rem; }
@media (max-width: 760px) {
  .banner-top .banner-inner { align-items: flex-start; flex-direction: column; gap: 5px; }
  .banner-top .banner-inner::before { width: 37%; }
  .banner-top .banner-copy { max-width: 67%; }
  .banner-contact { min-height: 38px; font-size: .85rem; }
  .banner-footer .banner-inner { gap: 10px; }
}
@media (max-width: 580px) {
  .category-strip { padding-inline: 5px; gap: 2px; }
  .category-shelf { grid-auto-columns: 72px; column-gap: 3px; }
  .category-tile img { width: 33px; height: 33px; }
  .category-strip .rail-button { width: 28px; height: 40px; }
  .promo-track { grid-auto-columns: min(75vw, 280px); }
  .footer-promos { padding-block: 15px; }
  .footer-base { gap: 8px; }
  .footer-base nav { column-gap: 16px; }
}
