/* ==========================================================================
   Catalog: product cards, listing pages and the home page.
   Loaded globally after store.css and ui.css; uses the --tb-* tokens.
   Old store.css card/grid rules are neutralised here for the new markup only
   (.tb-pcard, .tb-grid, .tb-listing, .tb-home) so accessory cards keep their look.
   ========================================================================== */

/* ---------- Product grid ---------- */
.tb-grid,
.products-grid:has(> .tb-pcard) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) { .tb-grid, .products-grid:has(> .tb-pcard) { gap: 16px; } }
@media (min-width: 768px) { .tb-grid, .products-grid:has(> .tb-pcard) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .tb-grid, .products-grid:has(> .tb-pcard) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1280px) { .tb-grid, .products-grid:has(> .tb-pcard) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Product card ---------- */
.tb-pcard.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 8px;
  background: var(--tb-surface);
  border: 1px solid var(--tb-line);
  border-radius: var(--tb-r-lg);
  box-shadow: none;
  transform: none;
  overflow: hidden;
  color: var(--tb-ink);
  transition: box-shadow .2s var(--tb-ease), border-color .2s var(--tb-ease);
  cursor: pointer;
}
html.light-mode .tb-pcard.product-card { background: var(--tb-surface); border: 1px solid var(--tb-line); }
.tb-pcard.product-card:hover,
html.light-mode .tb-pcard.product-card:hover,
body.glass-enabled .tb-pcard.product-card:hover {
  transform: none;
  background: var(--tb-surface);
  border-color: var(--tb-line-strong);
  box-shadow: var(--tb-shadow-2);
}
.tb-pcard.product-card:focus-within { border-color: var(--tb-line-strong); }

/* Image stage */
.tb-pcard__media.tb-stage { border-radius: var(--tb-r-md); isolation: isolate; }
/* Images fill the square stage absolutely: a grid item with height:100% would fall back to its intrinsic ratio */
.tb-pcard__media > img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; font-size: 0; color: transparent; }
.tb-pcard__media > .tb-pcard__img { transition: transform .35s var(--tb-ease), opacity .3s var(--tb-ease); }
.tb-pcard--cutout .tb-pcard__media > .tb-pcard__img { padding: 11%; filter: drop-shadow(0 14px 16px rgba(15, 23, 42, 0.16)); }
.tb-pcard__media > .tb-pcard__photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  padding: 0; object-fit: cover; filter: none;
  opacity: 0; display: none;
  transition: opacity .3s var(--tb-ease);
}
.tb-pcard__media--empty { color: var(--tb-ink-3); }
.tb-pcard__placeholder {
  display: grid; place-items: center; width: 44%; aspect-ratio: 1;
  border-radius: 50%; background: var(--tb-surface); border: 1px solid var(--tb-line);
  font-size: clamp(1.5rem, 5vw, 2.25rem); color: var(--tb-ink-3);
}

.tb-pcard__hint {
  position: absolute; left: 8px; bottom: 8px; z-index: 2;
  display: none; align-items: center; gap: 5px;
  height: 24px; padding: 0 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; line-height: 1;
  color: var(--tb-ink-2); background: var(--tb-surface); border: 1px solid var(--tb-line);
  pointer-events: none;
}
.tb-pcard__hint i { font-size: 10px; }

/* Real photo crossfade: only with a mouse on wide screens (touch users open the product page). */
@media (hover: hover) and (min-width: 1024px) {
  .tb-pcard--has-photo .tb-pcard__photo { display: block; }
  .tb-pcard--has-photo .tb-pcard__hint { display: inline-flex; }
  .tb-pcard--has-photo:hover .tb-pcard__photo { opacity: 1; }
  .tb-pcard--has-photo:hover .tb-pcard__img { opacity: 0; }
  .tb-pcard--cutout:not(.tb-pcard--has-photo):hover .tb-pcard__img { transform: scale(1.03); }
}

.tb-pcard__flags {
  position: absolute; left: 8px; top: 8px; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 4px; max-width: calc(100% - 56px);
  pointer-events: none;
}
.tb-pcard__flags .tb-chip { height: 22px; padding: 0 8px; font-size: 11px; }
.tb-pcard__badge.tb-chip { background: var(--badge-bg, var(--tb-surface)); color: var(--badge-text, var(--tb-ink-2)); border-color: transparent; }

/* Wishlist: 40px tap target, quiet until active */
.tb-pcard .btn-wishlist-card.tb-pcard__wish {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 40px; height: 40px; padding: 0; margin: 0;
  display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--tb-line);
  background: var(--tb-surface); color: var(--tb-ink-3);
  box-shadow: none; transform: none; opacity: 1;
  cursor: pointer; transition: color .15s var(--tb-ease), border-color .15s var(--tb-ease);
}
.tb-pcard .btn-wishlist-card.tb-pcard__wish i { font-size: 15px; color: inherit; }
.tb-pcard .btn-wishlist-card.tb-pcard__wish:hover { color: #e11d48; border-color: var(--tb-line-strong); transform: none; background: var(--tb-surface); }
.tb-pcard .btn-wishlist-card.tb-pcard__wish.active { color: #e11d48; background: var(--tb-surface); border-color: var(--tb-line); }

/* Black Friday round badge (partials/bf-badge.ejs): top-right of the image, ~32% of its width.
   The wishlist heart moves to the bottom-right corner (the device is anchored bottom-left, so that corner is free) and
   the admin chips stay top-left, so nothing overlaps the badge or the device. */
.tb-bfbadge {
  position: absolute; z-index: 2; display: block;
  height: auto; aspect-ratio: 1; margin: 0; padding: 0;
  border-radius: 50%; pointer-events: none; user-select: none; -webkit-user-drag: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.28));
}
.tb-pcard__media > .tb-bfbadge.tb-bfbadge--card {
  inset: 6px 6px auto auto; width: clamp(64px, 32%, 112px); height: auto;
  padding: 0; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.28));
}
/* The heart is positioned on the card, the image is a square of the card width minus its padding: a margin-top in %
   (relative to the card WIDTH) lands it in the image's bottom-right corner (card padding 8px, heart 40px, 4px gap). */
.tb-pcard--bfbadge .btn-wishlist-card.tb-pcard__wish { top: 0; right: 12px; left: auto; bottom: auto; margin-top: calc(100% - 52px); }
.tb-pcard--bfbadge .tb-pcard__flags { max-width: calc(100% - 20px - clamp(64px, 32%, 112px)); }
/* Keep the cut-out device clear of the badge (top-right) and of the heart (bottom-right): smaller, anchored
   bottom-left. Checked against the device pixels of phones, tablets and watches, not the element box. */
.tb-pcard--bfbadge.tb-pcard--cutout .tb-pcard__media > .tb-pcard__img {
  padding: 28% 27% 4% 5%; object-fit: contain; object-position: 25% 100%;
}

/* Body */
.tb-pcard__body {
  display: flex; flex-direction: column; flex: 1; gap: 6px;
  padding: 12px 6px 4px;
  min-width: 0;
}
.tb-pcard__title {
  margin: 0; font-size: var(--tb-fs-md); font-weight: 600; line-height: 1.3; letter-spacing: -0.005em;
  color: var(--tb-ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tb-pcard__link { color: inherit; text-decoration: none; }
.tb-pcard__link:hover { color: inherit; text-decoration: none; }
/* Stretched link: the whole card is clickable, buttons stay above it */
.tb-pcard__link::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.tb-pcard__link:focus-visible { outline: none; }
.tb-pcard__link:focus-visible::after { outline: 2px solid var(--tb-brand); outline-offset: -2px; border-radius: var(--tb-r-lg); }

.tb-pcard__meta {
  margin: 0; font-size: var(--tb-fs-sm); color: var(--tb-ink-3); line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tb-pcard__facts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 18px; }
.tb-pcard__cond { display: inline-flex; align-items: center; gap: 6px; font-size: var(--tb-fs-xs); font-weight: 600; color: var(--tb-ink-2); white-space: nowrap; line-height: 1.2; }
.tb-pcard__cond::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--tb-ink-3); flex: none; }
.tb-pcard__cond--new::before { background: var(--tb-new); }
.tb-pcard__cond--top::before { background: var(--tb-ok); }
.tb-pcard__cond--good::before { background: var(--tb-info); }
.tb-pcard__cond--fair::before { background: var(--tb-warn); }


.tb-pcard__foot {
  margin-top: auto; padding-top: 6px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
}
.tb-pcard__price { gap: 0 8px; min-width: 0; }
.tb-pcard__price .tb-price__now { flex-basis: 100%; font-size: var(--tb-fs-lg); line-height: 1.2; }
.tb-pcard__price .tb-price__was { font-size: var(--tb-fs-xs); }

.tb-pcard .btn-add-cart.tb-pcard__cart {
  position: relative; z-index: 2; flex: none;
  width: 40px; height: 40px; min-width: 40px; padding: 0; margin: 0;
  display: grid; place-items: center;
  border-radius: var(--tb-r-md); border: 1px solid var(--tb-line-strong);
  background: var(--tb-surface); color: var(--tb-ink-2);
  box-shadow: none; transform: none; font-size: 15px; cursor: pointer;
  transition: border-color .15s var(--tb-ease), color .15s var(--tb-ease), background-color .15s var(--tb-ease);
}
.tb-pcard .btn-add-cart.tb-pcard__cart:hover { border-color: var(--tb-brand); color: var(--tb-brand); background: var(--tb-surface); transform: none; }
.tb-pcard .btn-add-cart.tb-pcard__cart.btn-success { background: var(--tb-ok-soft); color: var(--tb-ok); border-color: transparent; }
.tb-pcard .btn-add-cart.tb-pcard__cart i { margin: 0; font-size: inherit; }
/* cart.js rewrites the button with two text spans: keep them for screen readers only */
.tb-pcard .btn-add-cart.tb-pcard__cart .btn-add-cart-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; display: block;
}
.tb-pcard .btn-add-cart.tb-pcard__cart .btn-add-cart-text-mobile { display: none; }

.tb-pcard__line { margin: 0; font-size: var(--tb-fs-xs); color: var(--tb-ink-3); line-height: 1.35; }
.tb-pcard__line i { margin-right: 4px; }
/* Real reduction (utils/blackFriday.js): saving in lei, kept on phones too */
.tb-pcard__line.tb-pcard__line--save { color: var(--tb-bad); font-weight: 600; }
.tb-pcard__last { color: var(--tb-warn); font-weight: 600; }

@media (max-width: 639px) {
  .tb-pcard.product-card { padding: 6px; border-radius: var(--tb-r-md); }
  .tb-pcard__media.tb-stage { border-radius: 10px; }
  .tb-pcard__body { padding: 10px 4px 2px; gap: 5px; }
  .tb-pcard__title { font-size: var(--tb-fs-sm); }
  .tb-pcard__meta { font-size: var(--tb-fs-xs); }
  .tb-pcard__price .tb-price__now { font-size: var(--tb-fs-md); }
  .tb-pcard .btn-wishlist-card.tb-pcard__wish { top: 8px; right: 8px; }
  .tb-pcard--bfbadge .btn-wishlist-card.tb-pcard__wish { top: 0; right: 9px; left: auto; width: 32px; height: 32px; margin-top: calc(100% - 41px); }
  .tb-pcard--bfbadge .btn-wishlist-card.tb-pcard__wish i { font-size: 13px; }
  .tb-pcard__media > .tb-bfbadge.tb-bfbadge--card { inset: 3px 3px auto auto; width: clamp(50px, 34%, 112px); }
  .tb-pcard--bfbadge .tb-pcard__flags { max-width: calc(100% - 14px - clamp(50px, 34%, 112px)); }
  .tb-pcard--bfbadge.tb-pcard--cutout .tb-pcard__media > .tb-pcard__img { padding: 27% 30% 4% 3%; object-position: 20% 100%; }
  /* BF deal under 100 Lei (no round badge): the chips must fit next to the heart on narrow cards */
  .tb-pcard__flags { flex-wrap: nowrap; min-width: 0; }
  .tb-pcard__flags .tb-chip { min-width: 0; flex: 0 1 auto; padding: 0 6px; }
  .tb-pcard__flags .tb-chip--bf { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 20px; letter-spacing: 0.02em; }
  .tb-pcard__flags .tb-chip--off { flex-shrink: 0; }
  .tb-pcard__line { display: none; }
  .tb-pcard__line.tb-pcard__line--save { display: block; }
  .tb-pcard .tb-battery { font-size: 11px; }
}
.tb-pcard__flags .tb-chip__short { display: none; }
/* Narrow phones: "BLACK FRIDAY" + "−8%" + the heart do not fit in ~125px, the BF chip reads "BF" (full text kept for
   screen readers) */
@media (max-width: 419px) {
  .tb-pcard__flags .tb-chip__long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tb-pcard__flags .tb-chip__short { display: inline; }
}

/* ==========================================================================
   Breadcrumb (partials/breadcrumb.ejs): one line, scrolls sideways on phones
   ========================================================================== */
.tb-crumbs { margin: 0 0 12px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tb-crumbs::-webkit-scrollbar { display: none; }
.tb-crumbs .seo-breadcrumb-list { display: flex; align-items: center; flex-wrap: nowrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: var(--tb-fs-sm); line-height: 1.4; }
.tb-crumbs .seo-breadcrumb-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tb-crumbs a { color: var(--tb-ink-3); text-decoration: none; display: inline-flex; align-items: center; min-height: 40px; }
.tb-crumbs a:hover { color: var(--tb-ink); text-decoration: underline; }
.tb-crumbs .seo-breadcrumb-sep { color: var(--tb-ink-3); font-size: 9px; opacity: .7; }
.tb-crumbs .seo-breadcrumb-current { color: var(--tb-ink-2); font-weight: 500; }

/* ==========================================================================
   Listing (/products, /telefoane, /telefoane/<brand>, SEO landings)
   ========================================================================== */
.tb-listing { padding: 16px 0 48px; color: var(--tb-ink); }
.tb-listing .container { overflow-x: visible; }

.tb-listing__head { margin: 0 0 20px; display: grid; gap: 10px; }
.tb-listing__title {
  margin: 0; font-size: var(--tb-fs-3xl); font-weight: 700; line-height: 1.15; letter-spacing: -0.015em; color: var(--tb-ink);
  background: none; -webkit-text-fill-color: currentColor;
}
.tb-listing__intro { margin: 0; max-width: 72ch; font-size: var(--tb-fs-md); line-height: 1.55; color: var(--tb-ink-2); }
@media (max-width: 639px) {
  .tb-listing__intro { font-size: var(--tb-fs-sm); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}

/* Quick links (types / brands) */
.tb-quick { margin-top: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin-inline: calc(-1 * var(--container-padding, 16px)); padding-inline: var(--container-padding, 16px); }
.tb-quick::-webkit-scrollbar { display: none; }
.tb-quick__list { display: flex; gap: 8px; margin: 0; padding: 0 0 2px; list-style: none; width: max-content; }
.tb-quick__item {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 1px;
  min-height: 44px; padding: 6px 14px; border-radius: var(--tb-r-md);
  background: var(--tb-surface); border: 1px solid var(--tb-line); color: var(--tb-ink);
  font-size: var(--tb-fs-sm); font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: border-color .15s var(--tb-ease);
}
.tb-quick__item small { font-size: 11px; font-weight: 500; color: var(--tb-ink-3); }
.tb-quick__item:hover { border-color: var(--tb-ink-3); color: var(--tb-ink); text-decoration: none; }

/* Layout */
.tb-listing__layout.products-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; padding: 0; margin: 0; }
@media (min-width: 1024px) {
  .tb-listing__layout.products-layout { grid-template-columns: 248px minmax(0, 1fr); gap: 28px; }
  .tb-listing__layout--full.products-layout { grid-template-columns: minmax(0, 1fr); }
}
.tb-listing__main { min-width: 0; }

/* Filters: sticky column on desktop, drawer on smaller screens */
.tb-filters {
  background: var(--tb-surface); border: 1px solid var(--tb-line); border-radius: var(--tb-r-lg);
  color: var(--tb-ink);
}
@media (min-width: 1024px) {
  .tb-filters { position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto; scrollbar-width: thin; }
  .tb-filters__head { padding: 16px 16px 0; }
  .tb-filters__close, .tb-filters__apply-mobile, .tb-filters-overlay { display: none !important; }
}
.tb-filters__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tb-filters__title { margin: 0; font-size: var(--tb-fs-lg); font-weight: 700; color: var(--tb-ink); }
.tb-filters__close {
  width: 40px; height: 40px; display: grid; place-items: center; flex: none;
  border-radius: 50%; border: 1px solid var(--tb-line); background: var(--tb-surface); color: var(--tb-ink); font-size: 18px; cursor: pointer;
}
.tb-filters__form { display: flex; flex-direction: column; margin: 0; }
.tb-filters__body { display: grid; gap: 18px; padding: 16px; }
.tb-filters__foot { display: grid; gap: 4px; padding: 0 16px 16px; }
.tb-filters__foot .tb-btn { min-height: 44px; font-size: var(--tb-fs-sm); }

.tb-field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.tb-field__label { padding: 0; font-size: var(--tb-fs-sm); font-weight: 600; color: var(--tb-ink); }
.tb-field__control {
  width: 100%; min-height: 44px; padding: 0 12px; box-sizing: border-box;
  font: 500 var(--tb-fs-sm)/1.2 var(--tb-font); color: var(--tb-ink);
  background: var(--tb-surface); border: 1px solid var(--tb-line-strong); border-radius: var(--tb-r-md);
  appearance: none; -webkit-appearance: none;
}
select.tb-field__control {
  padding-right: 36px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--tb-ink-3) 50%), linear-gradient(135deg, var(--tb-ink-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.tb-field__control:hover { border-color: var(--tb-ink-3); }
.tb-field__control:focus { outline: none; border-color: var(--tb-brand); box-shadow: 0 0 0 3px var(--tb-brand-soft); }
.tb-field__control::placeholder { color: var(--tb-ink-3); }
.tb-range { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; color: var(--tb-ink-3); }

.tb-radios { display: flex; flex-wrap: wrap; gap: 6px; }
.tb-radio { position: relative; display: inline-flex; cursor: pointer; margin: 0; }
.tb-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tb-radio span {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--tb-line-strong); background: var(--tb-surface);
  font-size: var(--tb-fs-sm); font-weight: 500; color: var(--tb-ink-2); white-space: nowrap;
}
.tb-radio:hover span { border-color: var(--tb-ink-3); }
.tb-radio input:checked + span { border-color: var(--tb-brand); color: var(--tb-ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--tb-brand); background: var(--tb-brand-soft); }
.tb-radio input:focus-visible + span { outline: 2px solid var(--tb-brand); outline-offset: 2px; }
.tb-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tb-ink-3); flex: none; }
.tb-dot--new { background: var(--tb-new); }
.tb-dot--top { background: var(--tb-ok); }
.tb-dot--good { background: var(--tb-info); }
.tb-dot--fair { background: var(--tb-warn); }

@media (max-width: 1023px) {
  .tb-filters {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 10050;
    width: min(92vw, 400px); border-radius: 0 var(--tb-r-lg) var(--tb-r-lg) 0; border-left: 0;
    display: flex; flex-direction: column; overflow: hidden;
    transform: translateX(-102%); visibility: hidden;
    transition: transform .25s var(--tb-ease), visibility 0s linear .25s;
    box-shadow: var(--tb-shadow-2);
  }
  .tb-filters.is-open { transform: none; visibility: visible; transition: transform .25s var(--tb-ease), visibility 0s; }
  .tb-filters__head { padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--tb-line); }
  .tb-filters__form { flex: 1; min-height: 0; }
  .tb-filters__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
  .tb-filters__foot {
    position: sticky; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--tb-surface); border-top: 1px solid var(--tb-line);
  }
  .tb-filters__apply-desktop { display: none; }
  .tb-filters-overlay { position: fixed; inset: 0; z-index: 10040; background: rgba(2, 6, 23, 0.5); }
  .tb-filters-overlay[hidden] { display: none; }
  html.tb-drawer-open, html.tb-drawer-open body { overflow: hidden; }
  html.tb-drawer-open .whatsapp-float { display: none; }
}

/* Toolbar */
.tb-toolbar { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; min-height: 44px; }
.tb-toolbar__count { margin: 0; font-size: var(--tb-fs-sm); color: var(--tb-ink-3); font-variant-numeric: tabular-nums; }
.tb-toolbar__sort { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tb-toolbar__sort label { font-size: var(--tb-fs-sm); color: var(--tb-ink-3); white-space: nowrap; }
.tb-toolbar__sort .tb-field__control { width: auto; min-width: 168px; }
.tb-toolbar__filters.tb-btn { min-height: 44px; padding: 0 14px; font-size: var(--tb-fs-sm); }
.tb-toolbar__badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--tb-brand); color: var(--tb-brand-ink); font-size: 11px; font-weight: 700;
}
@media (min-width: 1024px) { .tb-toolbar__filters { display: none !important; } }
@media (max-width: 639px) {
  .tb-toolbar { flex-wrap: wrap; gap: 8px; }
  .tb-toolbar__count { order: 3; width: 100%; }
  .tb-toolbar__sort label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tb-toolbar__sort .tb-field__control { min-width: 0; width: 100%; }
  .tb-toolbar__sort { flex: 1; }
  .tb-toolbar__filters.tb-btn { flex: 1; }
}

/* Active filter chips: links built by the server */
.tb-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.tb-chips__item {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px;
  border-radius: 999px; background: var(--tb-surface-2); border: 1px solid var(--tb-line);
  font-size: var(--tb-fs-sm); font-weight: 500; color: var(--tb-ink); text-decoration: none;
}
.tb-chips__item i { font-size: 12px; color: var(--tb-ink-3); }
.tb-chips__item:hover { border-color: var(--tb-ink-3); color: var(--tb-ink); text-decoration: none; }
.tb-chips__clear { display: inline-flex; align-items: center; min-height: 36px; padding: 0 4px; font-size: var(--tb-fs-sm); font-weight: 600; color: var(--tb-ink-2); text-decoration: underline; text-underline-offset: 3px; }

/* Empty state */
.tb-empty { display: grid; justify-items: center; gap: 10px; padding: 56px 16px; text-align: center; background: var(--tb-surface); border: 1px solid var(--tb-line); border-radius: var(--tb-r-lg); }
.tb-empty__icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: var(--tb-surface-2); color: var(--tb-ink-3); font-size: 20px; }
.tb-empty__title { margin: 0; font-size: var(--tb-fs-xl); font-weight: 700; color: var(--tb-ink); }
.tb-empty__text { margin: 0 0 6px; color: var(--tb-ink-2); }

/* Pagination: shared .tb-pager in ui.css (views/partials/pagination.ejs) */

/* FAQ on SEO landings */
.tb-faq { margin-top: 48px; max-width: 860px; }
.tb-faq__title { margin: 0 0 12px; font-size: var(--tb-fs-xl); font-weight: 700; color: var(--tb-ink); }
.tb-faq__list { border-top: 1px solid var(--tb-line); }
.tb-faq__item { border-bottom: 1px solid var(--tb-line); }
.tb-faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 12px 0;
  font-weight: 600; color: var(--tb-ink); cursor: pointer; list-style: none;
}
.tb-faq__item summary::-webkit-details-marker { display: none; }
.tb-faq__item summary::after { content: '+'; font-size: 20px; font-weight: 400; color: var(--tb-ink-3); flex: none; }
.tb-faq__item[open] summary::after { content: '−'; }
.tb-faq__item p { margin: 0 0 16px; color: var(--tb-ink-2); line-height: 1.6; }

/* ==========================================================================
   Home
   ========================================================================== */
.tb-home { color: var(--tb-ink); }
.tb-home .container { overflow-x: visible; }

/* Hero */
.tb-hero { padding: 24px 0 24px; }
.tb-hero__inner { display: grid; gap: 28px; align-items: center; }
@media (min-width: 1024px) {
  .tb-hero { padding: 48px 0 24px; }
  .tb-hero__inner { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; }
}
.tb-hero__copy { display: grid; gap: 16px; justify-items: start; max-width: 600px; }
.tb-hero__eyebrow { margin: 0; font-size: var(--tb-fs-sm); font-weight: 600; color: var(--tb-ink-3); letter-spacing: 0.01em; }
.tb-hero__title {
  margin: 0; font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.018em;
  color: var(--tb-ink); background: none; -webkit-text-fill-color: currentColor; text-wrap: balance;
}
.tb-hero__lead { margin: 0; font-size: var(--tb-fs-lg); line-height: 1.55; color: var(--tb-ink-2); max-width: 52ch; }
.tb-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.tb-hero__actions .tb-btn { text-decoration: none; }
.tb-hero__facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 0; padding: 0; list-style: none; font-size: var(--tb-fs-sm); color: var(--tb-ink-2); }
.tb-hero__facts li { display: inline-flex; align-items: center; gap: 6px; }
.tb-hero__facts i { color: var(--tb-ok); font-size: 12px; }
@media (max-width: 639px) {
  .tb-hero__lead { font-size: var(--tb-fs-md); }
  .tb-hero__actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .tb-hero__actions .tb-btn { padding: 0 12px; font-size: var(--tb-fs-sm); }
}

.tb-hero__shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.tb-hero__shelf:has(> li:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tb-hero__tile { display: grid; gap: 10px; color: var(--tb-ink); text-decoration: none; }
.tb-hero__tile:hover { color: var(--tb-ink); text-decoration: none; }
.tb-hero__stage.tb-stage { border-radius: var(--tb-r-xl); background: radial-gradient(120% 90% at 50% 100%, color-mix(in srgb, var(--tb-tint) 30%, transparent) 0%, transparent 70%), var(--tb-surface); border: 1px solid var(--tb-line); }
.tb-hero__stage > img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 10%; transition: transform .35s var(--tb-ease); }
.tb-hero__tile:hover .tb-hero__stage > img { transform: translateY(-4px); }
.tb-hero__caption { display: grid; gap: 2px; padding: 0 4px; }
.tb-hero__caption strong { font-size: var(--tb-fs-sm); font-weight: 600; line-height: 1.3; }
.tb-hero__caption span { font-size: var(--tb-fs-sm); color: var(--tb-ink-3); font-variant-numeric: proportional-nums; }
@media (min-width: 1024px) {
  .tb-hero__shelf { gap: 16px; }
  .tb-hero__item:nth-child(2) { transform: translateY(-20px); }
}
@media (max-width: 639px) {
  .tb-hero__shelf { gap: 8px; }
  .tb-hero__stage.tb-stage { border-radius: var(--tb-r-lg); }
  .tb-hero__caption strong, .tb-hero__caption span { font-size: var(--tb-fs-xs); }
}

/* Sections */
.tb-section { padding: 32px 0; }
@media (min-width: 1024px) { .tb-section { padding: 48px 0; } }
.tb-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 16px; }
.tb-section__title {
  margin: 0; font-size: var(--tb-fs-2xl); font-weight: 700; line-height: 1.2; letter-spacing: -0.015em;
  color: var(--tb-ink); background: none; -webkit-text-fill-color: currentColor;
}
.tb-section__title::after { content: none; }
@media (max-width: 639px) { .tb-section__title { font-size: var(--tb-fs-xl); } }
.tb-section__link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: var(--tb-fs-sm); font-weight: 600; color: var(--tb-ink-2); text-decoration: none; white-space: nowrap; }
.tb-section__link:hover { color: var(--tb-ink); text-decoration: underline; text-underline-offset: 3px; }
.tb-section__link i { font-size: 12px; }
.tb-section__more { display: flex; justify-content: center; margin-top: 24px; }
.tb-section__more .tb-btn { text-decoration: none; }

/* Categories */
.tb-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 1024px) { .tb-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
.tb-cats__item {
  display: flex; align-items: center; gap: 12px; height: 100%; padding: 10px;
  background: var(--tb-surface); border: 1px solid var(--tb-line); border-radius: var(--tb-r-lg);
  color: var(--tb-ink); text-decoration: none; transition: border-color .15s var(--tb-ease), box-shadow .2s var(--tb-ease);
}
.tb-cats__item:hover { color: var(--tb-ink); text-decoration: none; border-color: var(--tb-line-strong); box-shadow: var(--tb-shadow-2); }
.tb-cats__media.tb-stage { width: 64px; flex: none; border-radius: var(--tb-r-md); color: var(--tb-ink-3); font-size: 22px; }
.tb-cats__media > img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 8%; }
.tb-cats__media.tb-stage--photo > img { padding: 0; }
.tb-cats__text { display: grid; gap: 2px; min-width: 0; }
.tb-cats__text strong { font-size: var(--tb-fs-md); font-weight: 600; }
.tb-cats__text strong { overflow-wrap: anywhere; }
.tb-cats__text span { font-size: var(--tb-fs-xs); color: var(--tb-ink-3); line-height: 1.35; white-space: nowrap; }
@media (max-width: 639px) {
  .tb-cats__item { flex-direction: column; align-items: flex-start; gap: 10px; padding: 10px; }
  .tb-cats__media.tb-stage { width: 56px; }
  .tb-cats__text strong { font-size: var(--tb-fs-sm); }
}

/* Brands */
.tb-brands { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 1024px) { .tb-brands { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.tb-brands__item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 100%; min-height: 88px; padding: 14px 14px 14px 18px;
  background: var(--tb-surface); border: 1px solid var(--tb-line); border-radius: var(--tb-r-lg);
  color: var(--tb-ink); text-decoration: none; transition: border-color .15s var(--tb-ease), box-shadow .2s var(--tb-ease);
}
.tb-brands__item:hover { color: var(--tb-ink); text-decoration: none; border-color: var(--tb-line-strong); box-shadow: var(--tb-shadow-2); }
.tb-brands__text { display: grid; gap: 4px; min-width: 0; }
.tb-brands__name { font-family: var(--tb-font-display); font-size: var(--tb-fs-lg); font-weight: 700; letter-spacing: -0.01em; }
.tb-brands__meta { display: flex; flex-wrap: wrap; gap: 0 6px; font-size: var(--tb-fs-sm); color: var(--tb-ink-3); font-variant-numeric: tabular-nums; }
.tb-brands__meta > span { white-space: nowrap; }
.tb-brands__meta > span + span::before { content: '·'; margin-right: 6px; }
.tb-brands__thumb.tb-stage { width: 72px; flex: none; border-radius: var(--tb-r-md); }
.tb-brands__thumb > img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 6%; }
.tb-brands__thumb.tb-stage--photo > img { padding: 0; }
.tb-brands__thumb--mono { color: var(--tb-ink-3); font-size: 28px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; user-select: none; }
@media (max-width: 639px) {
  .tb-brands__item { flex-direction: column-reverse; align-items: flex-start; padding: 12px; min-height: 0; }
  .tb-brands__thumb.tb-stage { width: 56px; }
  .tb-brands__thumb--mono { font-size: 22px; }
  .tb-brands__name { font-size: var(--tb-fs-md); }
  .tb-brands__meta { font-size: var(--tb-fs-xs); flex-direction: column; }
  .tb-brands__meta > span + span::before { content: none; }
}

/* Sell + service */
.tb-duo { display: grid; gap: 12px; }
@media (min-width: 768px) { .tb-duo { grid-template-columns: 1fr 1fr; gap: 16px; } }
.tb-duo__card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px;
  background: var(--tb-surface); border: 1px solid var(--tb-line); border-radius: var(--tb-r-xl);
  color: var(--tb-ink); text-decoration: none; transition: border-color .15s var(--tb-ease), box-shadow .2s var(--tb-ease);
}
.tb-duo__card:hover { color: var(--tb-ink); text-decoration: none; border-color: var(--tb-line-strong); box-shadow: var(--tb-shadow-2); }
.tb-duo__text { display: grid; gap: 8px; min-width: 0; }
.tb-duo__kicker { font-size: var(--tb-fs-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tb-ink-3); }
.tb-duo__title { font-family: var(--tb-font-display); font-size: var(--tb-fs-xl); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.tb-duo__body { font-size: var(--tb-fs-sm); line-height: 1.55; color: var(--tb-ink-2); max-width: 46ch; }
.tb-duo__cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font-size: var(--tb-fs-sm); font-weight: 700; color: var(--tb-brand-text); }
.tb-duo__cta i { font-size: 12px; transition: transform .15s var(--tb-ease); }
.tb-duo__card:hover .tb-duo__cta i { transform: translateX(3px); }
.tb-duo__media.tb-stage { width: 128px; flex: none; border-radius: var(--tb-r-lg); }
.tb-duo__media > img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 8%; }
.tb-duo__media--icon { width: 88px; height: 88px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--tb-surface-2); border: 1px solid var(--tb-line); color: var(--tb-ink-2); font-size: 30px; }
@media (max-width: 639px) {
  .tb-duo__card { padding: 18px; align-items: flex-start; }
  .tb-duo__media.tb-stage { width: 84px; }
  .tb-duo__media--icon { width: 56px; height: 56px; font-size: 20px; }
  .tb-duo__title { font-size: var(--tb-fs-lg); }
}

/* Trust strip */
.tb-trust-strip { padding-top: 8px; }
.tb-trust-strip__list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; padding: 0; list-style: none;
  background: var(--tb-line); border: 1px solid var(--tb-line); border-radius: var(--tb-r-xl); overflow: hidden;
}
@media (min-width: 1024px) { .tb-trust-strip__list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tb-trust-strip__item { display: flex; align-items: flex-start; gap: 12px; padding: 18px; background: var(--tb-surface); font-size: var(--tb-fs-sm); line-height: 1.35; }
.tb-trust-strip__item strong { display: block; font-weight: 600; color: var(--tb-ink); }
.tb-trust-strip__item span > span { color: var(--tb-ink-3); font-size: var(--tb-fs-xs); }
.tb-trust-strip__icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--tb-brand-soft); color: var(--tb-brand-text); font-size: 16px; }
@media (max-width: 639px) {
  .tb-trust-strip__item { flex-direction: column; gap: 8px; padding: 14px; }
  .tb-trust-strip__icon { width: 36px; height: 36px; font-size: 14px; }
}
.tb-textblock { text-align: center; max-width: 720px; }
.tb-textblock p { color: var(--tb-ink-2); }
.tb-home__acc.products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 1024px) { .tb-home__acc.products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
/* Fills the rest of the last row when there are fewer accessories than columns (home.ejs sets the span) */
.tb-home__acc-more {
  display: none; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px;
  padding: 20px; border-radius: var(--tb-r-lg); border: 1px dashed var(--tb-line-strong);
  background: var(--tb-surface-2); color: var(--tb-ink-2); font-size: var(--tb-fs-sm); line-height: 1.45;
}
.tb-home__acc-more strong { font-size: var(--tb-fs-md); font-weight: 600; color: var(--tb-ink); }
.tb-home__acc-more p { margin: 0; max-width: 38ch; }
.tb-home__acc-more .tb-btn { min-height: 40px; padding: 0 16px; font-size: var(--tb-fs-sm); }
@media (max-width: 1023.98px) { .tb-home__acc-more--odd { display: flex; } }
@media (min-width: 1024px) {
  .tb-home__acc-more { display: flex; grid-column: span var(--acc-span, 1); }
  .tb-home__acc-more--full { display: none; }
}
