/* Full responsive + overflow safety — last CSS layer (light / dark inherit tokens) */

html {
  overflow-x: hidden;
  overflow-x: clip;
}
body.tbt-site {
  overflow-x: hidden;
  overflow-x: clip;
  min-width: 0;
}
img,
video,
iframe,
svg {
  max-width: 100%;
  height: auto;
}
.tbt-top__inner,
.tbt-hero__grid,
.tbt-head,
.tbt-foot__grid,
.tbt-wrap,
.tbt-container,
.tbt-form,
.tbt-search__form,
.tbt-cookie__inner,
.tbt-notice__inner,
.tbt-auth-shell,
.tbt-auth-panel,
.tbt-account-forms {
  min-width: 0;
}
.tbt-h1,
.tbt-h2,
.tbt-lead,
.tbt-index strong,
.tbt-row strong {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tbt-container {
  width: 100%;
  max-width: var(--tbt-max, 1160px);
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}
.tbt-page--404 .tbt-container {
  padding-top: 4rem;
  padding-bottom: 5rem;
}

.tbt-btn,
.tbt-text-btn,
.tbt-text-link,
.tbt-burger,
.moo-nav__toggle {
  min-height: 44px;
}
.tbt-top__rail {
  min-height: 40px;
}
.tbt-top__rail .tbt-lang__btn,
.tbt-top__rail .tbt-theme,
.tbt-top__rail .tbt-search-open,
.tbt-top__rail .tbt-tool {
  min-height: 0;
  height: 100%;
}

/* Cookie / notice: brand gold, wrap on small screens */
.tbt-cookie__inner {
  background: var(--tbt-surface);
  border: 1px solid var(--tbt-border);
  flex-wrap: wrap;
}
.tbt-cookie__msg { color: var(--tbt-text); min-width: 0; }
.tbt-cookie__msg a { color: var(--tbt-gold); }
.tbt-cookie__accept {
  background: var(--tbt-gold);
  color: #111;
  font-family: var(--tbt-cond);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  min-height: 44px;
}
body.tbt-light .tbt-cookie__inner { background: #fff; }
.tbt-notice {
  background: var(--tbt-gold);
  color: #111;
}
.tbt-notice__inner {
  flex-wrap: wrap;
  padding-right: 2.75rem;
}
.tbt-notice__text { color: #111; }

.tbt-ai {
  font-family: var(--tbt-font);
}
.tbt-ai__fab {
  background: var(--tbt-gold);
  color: #111;
  font-family: var(--tbt-cond);
  box-shadow: none;
  border-radius: 0;
}
.tbt-ai__head {
  color: var(--tbt-gold);
  font-family: var(--tbt-cond);
}

.tbt-search__form {
  width: min(720px, calc(100vw - 2rem));
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem;
  background: var(--tbt-surface);
  border: 1px solid var(--tbt-border);
}
.tbt-search__form input {
  flex: 1 1 12rem;
  min-width: 0;
}

@media (max-width: 1100px) {
  .tbt-top__tools { gap: 0.5rem; }
  .tbt-promo { text-align: center; }
  .tbt-sector-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .tbt-top__rail {
    height: 44px;
    min-height: 44px;
  }
  .tbt-lang__panel {
    position: fixed;
    top: auto;
    right: 1rem;
    left: 1rem;
    width: auto;
    bottom: 1rem;
    max-height: min(70vh, 420px);
    overflow: auto;
  }
  .tbt-hero {
    padding: 2.5rem 1rem 2rem;
  }
  .tbt-block { padding: 3rem 1rem; }
  .tbt-hero__grid { gap: 1.5rem; }
  .tbt-band .tbt-wrap {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    text-align: left;
  }
  .tbt-foot__bar {
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-start;
  }
  .tbt-table { min-width: 520px; }
  .tbt-form { max-width: none; }
  .tbt-sector-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tbt-wrap--split { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .tbt-hero__grid,
  .tbt-quote-grid { grid-template-columns: 1fr; }
  .tbt-hero__visual {
    min-height: 220px;
    grid-template-columns: 1fr 1fr;
  }
  .tbt-index a,
  .tbt-row {
    grid-template-columns: 2.2rem minmax(0, 1fr);
    gap: 0.65rem;
  }
  .tbt-index span,
  .tbt-row span {
    grid-column: 2;
  }
  .tbt-pkg-stage { grid-template-columns: 1fr; }
  .tbt-cookie {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }
  .tbt-cookie__inner {
    flex-direction: column;
    align-items: stretch;
  }
  .tbt-cookie__accept { width: 100%; }
  .tbt-ai {
    right: 12px;
    bottom: 12px;
  }
  .tbt-ai__panel {
    width: min(380px, calc(100vw - 24px));
    bottom: 60px;
    max-height: min(68vh, 480px);
  }
}

@media (max-width: 640px) {
  .tbt-logo__img { height: 40px; max-width: 150px; }
  .tbt-promo { font-size: 10px; gap: 0.45rem; padding: 0.4rem 0.75rem; }
  .tbt-top__inner { padding: 0.25rem 0.75rem; min-height: 58px; gap: 0.5rem; }
  .tbt-hero__visual {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .tbt-tile:first-child {
    grid-column: auto;
    grid-row: auto;
    min-height: 180px;
  }
  .tbt-tile { min-height: 140px; }
  .tbt-h1 { font-size: clamp(1.85rem, 9vw, 2.6rem); }
  .tbt-hero__ctas,
  .tbt-product-cta,
  .tbt-section-cta {
    flex-direction: column;
    align-items: stretch;
  }
  .tbt-hero__ctas .tbt-btn,
  .tbt-hero__ctas .tbt-text-link { width: 100%; justify-content: center; }
  .tbt-search { padding-top: 18vh; }
  .tbt-search__form { flex-direction: column; align-items: stretch; }
  .tbt-search__form input,
  .tbt-search__form .tbt-btn { width: 100%; }
  .tbt-steps { grid-template-columns: 1fr; }
  .tbt-filmstrip,
  .tbt-gallery,
  .tbt-media-grid { grid-template-columns: 1fr; }
  .tbt-container--split { display: block; }
  .tbt-table { min-width: 460px; }
}

@media (max-width: 480px) {
  body.tbt-site { font-size: 16px; }
  .tbt-block { padding: 2.25rem 0.85rem; }
  .tbt-wrap { padding: 0; }
  .tbt-frame { padding: 8px 12px; }
  .tbt-cat { grid-template-columns: 1fr; }
  .tbt-index a,
  .tbt-row { padding: 0.9rem 0; }
  .tbt-foot { padding: 2.5rem 0.85rem 1.25rem; }
  .tbt-ai { left: 12px; right: 12px; }
  .tbt-ai__fab { width: 100%; }
  .tbt-ai__panel { left: 0; right: 0; width: auto; }
}

@media (max-width: 360px) {
  .tbt-logo__img { height: 34px; max-width: 120px; }
  .tbt-top__rail .tbt-lang__btn,
  .tbt-top__rail .tbt-tool {
    padding: 0 0.4rem;
    min-width: 40px;
  }
  .tbt-top__rail .tbt-theme {
    width: 40px;
    min-width: 40px;
  }
}

@media (min-width: 981px) and (max-width: 1100px) {
  .tbt-menu__list > li > a {
    padding: 0.55rem 0.45rem;
    font-size: 12px;
    letter-spacing: 0.08em;
  }
}

/* Woo tables / shop */
.woocommerce table.shop_table,
.woocommerce-page table.shop_table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
}

@media (max-width: 640px) {
  .woocommerce ul.products { display: grid; grid-template-columns: 1fr; gap: 1rem; }
  .woocommerce ul.products li.product { width: 100% !important; margin: 0 !important; }
}
