/* Tiankang primary brand color sampled from the official site's active header navigation: rgb(43, 58, 161) */
:root {
  --brand-primary: #2B3AA1;
  --brand-primary-hover: #222E81;
}

/* Shared primary accents across every page in this Tilda project */
a:hover,
a:focus-visible,
.t-menu__link-item.t-active,
.t-menu__link-item:hover,
.t-btn:not(.t-btn_sm):not(.t-btn_xs),
.t-submit,
.t-form__submit,
.t-store__card__btn,
.t-store__prod-popup__btn {
  --tilda-brand-primary: var(--brand-primary);
}

.t-btn:not(.t-btn_sm):not(.t-btn_xs),
.t-submit,
.t-form__submit,
.t-store__card__btn,
.t-store__prod-popup__btn {
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
}

.t-btn:not(.t-btn_sm):not(.t-btn_xs):hover,
.t-submit:hover,
.t-form__submit:hover,
.t-store__card__btn:hover,
.t-store__prod-popup__btn:hover {
  background-color: var(--brand-primary-hover) !important;
  border-color: var(--brand-primary-hover) !important;
}

.t-menu__link-item.t-active,
.t-menu__link-item:hover,
.t-descr a,
.t-text a,
.t-title a {
  color: var(--brand-primary);
}

:focus-visible {
  outline-color: var(--brand-primary);
}

/* Remove duplicate header compensation on breadcrumb pages.
   The shared header already reserves its own normal-flow height;
   the per-page 85/73 px padding was adding a second blank band. */
html body #allrecords[data-tilda-page-id="301527709"],
html body #allrecords[data-tilda-page-id="306299609"],
html body #allrecords[data-tilda-page-id="308683809"],
html body #allrecords[data-tilda-page-id="309490009"],
html body #allrecords[data-tilda-page-id="310132109"],
html body #allrecords[data-tilda-page-id="310647209"],
html body #allrecords[data-tilda-page-id="310647309"] {
  padding-top: 0 !important;
}

/* About page applied its duplicate offset to the breadcrumb record itself. */
html body #rec4839369901 {
  padding-top: 0 !important;
}

/* Collapse the 1 px shared-header helper footprint only on crumb pages.
   Keep the visible header artboard and its clearance unchanged. */
#allrecords[data-tilda-page-id="301526009"] #t-header,
#allrecords[data-tilda-page-id="301527709"] #t-header,
#allrecords[data-tilda-page-id="306299609"] #t-header,
#allrecords[data-tilda-page-id="308683809"] #t-header,
#allrecords[data-tilda-page-id="309490009"] #t-header,
#allrecords[data-tilda-page-id="310132109"] #t-header,
#allrecords[data-tilda-page-id="310647209"] #t-header,
#allrecords[data-tilda-page-id="310647309"] #t-header,
#allrecords[data-tilda-page-id="301526009"] #rec4801927001,
#allrecords[data-tilda-page-id="301527709"] #rec4801927001,
#allrecords[data-tilda-page-id="306299609"] #rec4801927001,
#allrecords[data-tilda-page-id="308683809"] #rec4801927001,
#allrecords[data-tilda-page-id="309490009"] #rec4801927001,
#allrecords[data-tilda-page-id="310132109"] #rec4801927001,
#allrecords[data-tilda-page-id="310647209"] #rec4801927001,
#allrecords[data-tilda-page-id="310647309"] #rec4801927001 {
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Site-wide breadcrumb and button palette; homepage intentionally excluded. */
#allrecords:not([data-tilda-page-id="300432609"]) .r:has(.tk-crumb) .t396__artboard,
#allrecords:not([data-tilda-page-id="300432609"]) .tk-pcrumbs {
  background-color: #142d4e !important;
}
#allrecords:not([data-tilda-page-id="300432609"]) .r:has(.tk-crumb) .tn-atom,
#allrecords:not([data-tilda-page-id="300432609"]) .r:has(.tk-crumb) .tn-atom a,
#allrecords:not([data-tilda-page-id="300432609"]) .r:has(.tk-crumb) .tn-atom span,
#allrecords:not([data-tilda-page-id="300432609"]) .tk-pcrumbs,
#allrecords:not([data-tilda-page-id="300432609"]) .tk-pcrumbs a,
#allrecords:not([data-tilda-page-id="300432609"]) .tk-pcrumbs .tk-cur {
  color: #ffffff !important;
}
#allrecords:not([data-tilda-page-id="300432609"]) .tk-pcrumbs .tk-sep,
#allrecords:not([data-tilda-page-id="300432609"]) .r:has(.tk-crumb) .tk-sep {
  color: #c3d0df !important;
}
#allrecords:not([data-tilda-page-id="300432609"]) .t-btn:not(.t-btn_sm):not(.t-btn_xs),
#allrecords:not([data-tilda-page-id="300432609"]) .t-submit,
#allrecords:not([data-tilda-page-id="300432609"]) .t-form__submit,
#allrecords:not([data-tilda-page-id="300432609"]) .t-store__card__btn,
#allrecords:not([data-tilda-page-id="300432609"]) .t-store__prod-popup__btn,
#allrecords:not([data-tilda-page-id="300432609"]) .tn-elem[data-elem-type="button"] .tn-atom {
  background-color: #142d4e !important;
  border-color: #142d4e !important;
  color: #ffffff !important;
}
#allrecords:not([data-tilda-page-id="300432609"]) .t-btn:not(.t-btn_sm):not(.t-btn_xs):hover,
#allrecords:not([data-tilda-page-id="300432609"]) .t-submit:hover,
#allrecords:not([data-tilda-page-id="300432609"]) .t-form__submit:hover,
#allrecords:not([data-tilda-page-id="300432609"]) .t-store__card__btn:hover,
#allrecords:not([data-tilda-page-id="300432609"]) .t-store__prod-popup__btn:hover,
#allrecords:not([data-tilda-page-id="300432609"]) .tn-elem[data-elem-type="button"]:hover .tn-atom {
  background-color: #1d3b61 !important;
  border-color: #1d3b61 !important;
  color: #ffffff !important;
}

/* Category pages: hero and request-form side padding follow the shared header gutter
   (clamp(20px,5.6vw,88px)) instead of a fixed 72px, so left edges match at every width. */
#allrecords:is([data-tilda-page-id="309490009"],[data-tilda-page-id="310132109"],[data-tilda-page-id="310647209"],[data-tilda-page-id="310647309"],[data-tilda-page-id="312414209"],[data-tilda-page-id="312414809"],[data-tilda-page-id="312416009"],[data-tilda-page-id="312416709"],[data-tilda-page-id="312417009"],[data-tilda-page-id="312627609"],[data-tilda-page-id="312798409"],[data-tilda-page-id="312799509"]) .r:not(#t-header *):not(#t-footer *) .t396__artboard-flex:has(>.tn-group) {
  padding-left: clamp(20px, 5.6vw, 88px) !important;
  padding-right: clamp(20px, 5.6vw, 88px) !important;
}
@media (max-width: 700px) {
  #allrecords:is([data-tilda-page-id="309490009"],[data-tilda-page-id="310132109"],[data-tilda-page-id="310647209"],[data-tilda-page-id="310647309"],[data-tilda-page-id="312414209"],[data-tilda-page-id="312414809"],[data-tilda-page-id="312416009"],[data-tilda-page-id="312416709"],[data-tilda-page-id="312417009"],[data-tilda-page-id="312627609"],[data-tilda-page-id="312798409"],[data-tilda-page-id="312799509"]) .r:not(#t-header *):not(#t-footer *) .t396__artboard-flex:has(>.tn-group) {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* === Product card shared base styles === */
body:has(.t-catalog__product-snippet) .t-catalog__prod-popup__col-left {
  align-self: start;
}
body:has(.t-catalog__product-snippet) .t-catalog__prod-popup__slider {
  height: auto;
}
body:has(.t-catalog__product-snippet) .t-slds__thumbsbullet {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  min-width: 0 !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  border: 2px solid #e5e7eb !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  cursor: pointer;
  box-sizing: border-box !important;
}
body:has(.t-catalog__product-snippet) .t-slds__thumbsbullet.t-slds__bullet_active {
  border-color: #142d4e !important;
  box-shadow: 0 0 0 1px #142d4e !important;
}
body:has(.t-catalog__product-snippet) .t-slds__thumbsbullet .t-slds__bgimg {
  background-size: cover !important;
  background-position: center !important;
}
body:has(.t-catalog__product-snippet) .t-slds__thumbsbullet-border {
  display: none !important;
}
body:has(.t-catalog__product-snippet) .t-slds__arrow {
  border-radius: 50% !important;
  opacity: 0.85;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12) !important;
}
body:has(.t-catalog__product-snippet) .t-slds__arrow:hover {
  opacity: 1 !important;
}

body:has(.t-catalog__product-snippet) .t-catalog__prod-popup__name {
  font-size: clamp(28px, 2.7vw, 38px) !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.25 !important;
  color: #0f172a !important;
  margin-bottom: 22px !important;
  padding-bottom: 0 !important;
}
body:has(.t-catalog__product-snippet) .t-catalog__prod-popup__text {
  font-size: 17px !important;
  line-height: 1.7 !important;
  color: #334155 !important;
  max-width: 640px !important;
  padding-bottom: 0 !important;
}
body:has(.t-catalog__product-snippet) .tk-chips {
  margin-top: 32px !important;
  margin-bottom: 32px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}
body:has(.t-catalog__product-snippet) .tk-chip {
  font-size: 13.5px !important;
  font-weight: 500 !important;
  padding: 6px 14px !important;
  border-radius: 6px !important;
  background: #f1f5f9 !important;
  color: #1e293b !important;
  border: 1px solid #e2e8f0 !important;
}
body:has(.t-catalog__product-snippet) .tk-product-inquiry {
  padding: 15px 36px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 6px rgba(20, 45, 78, 0.2) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease !important;
}
body:has(.t-catalog__product-snippet) .tk-product-inquiry:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(20, 45, 78, 0.3) !important;
}

/* Distance under documents block to footer */
body:has(.t-catalog__product-snippet) .t-catalog__prod-snippet__container {
  padding-bottom: 100px !important;
}
body:has(.t-catalog__product-snippet) .t-catalog__tabs {
  display: block !important;
  margin-top: 42px !important;
  margin-bottom: 0 !important;
  border-top: 2px solid #e2e8f0 !important;
}
body:has(.t-catalog__product-snippet) .t-catalog__tabs__item-title {
  font-size: 22px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  letter-spacing: -0.01em !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
}
body:has(.t-catalog__product-snippet) .t-catalog__tabs__content {
  margin-top: 2px !important;
  padding: 0 !important;
  font-size: 15.5px !important;
  line-height: 1.7 !important;
  color: #334155 !important;
  max-width: 100% !important;
}
body:has(.t-catalog__product-snippet) .t-catalog__tabs__content .js-catalog-prod-charcs {
  font-size: 15px !important;
  line-height: 1.7 !important;
}

/* === Desktop: bottom-aligned button via flex column stretching === */
@media (min-width: 960px) {
  html body:has(.t-catalog__product-snippet) {
    --tk-main: 470px;
    --tk-thumb: 92px;
  }
  html body:has(.t-catalog__product-snippet) .t-catalog__prod-snippet__container>.t-catalog__product-snippet>.t-container>div:first-of-type {
    grid-template-columns: calc(var(--tk-main) + var(--tk-thumb) + 14px) minmax(0, 1fr) !important;
    column-gap: 56px !important;
    align-items: stretch !important;
  }
  html body:has(.t-catalog__product-snippet) .t-catalog__prod-popup__col-right {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
  }
  html body:has(.t-catalog__product-snippet) .t-catalog__prod-popup__text {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    margin-bottom: 0 !important;
  }
  html body:has(.t-catalog__product-snippet) .js-catalog-prod-all-text {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
  }
  html body:has(.t-catalog__product-snippet) .tk-product-inquiry {
    margin-top: auto !important;
    margin-bottom: 0 !important;
    align-self: flex-start !important;
  }
  html body:has(.t-catalog__product-snippet) .t-slds {
    display: grid !important;
    grid-template-columns: var(--tk-main) var(--tk-thumb) !important;
    grid-template-rows: var(--tk-main) !important;
    column-gap: 14px !important;
    row-gap: 0 !important;
    align-items: start !important;
    height: auto !important;
    overflow: visible !important;
  }
  html body:has(.t-catalog__product-snippet) .t-slds__main {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: var(--tk-main) !important;
    height: var(--tk-main) !important;
    max-width: none !important;
    overflow: hidden !important;
    border-radius: 10px !important;
    border: 1px solid #f0f2f5 !important;
    box-sizing: border-box !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
  }
  html body:has(.t-catalog__product-snippet) .t-slds__thumbsbullet-wrapper {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: repeat(4, 1fr) !important;
    gap: 10px !important;
    width: var(--tk-thumb) !important;
    height: var(--tk-main) !important;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    bottom: auto !important;
    align-self: start !important;
  }
  html body:has(.t-catalog__product-snippet) .t-catalog__tabs__item {
    grid-template-columns: 220px minmax(0, 1fr) !important;
    gap: 40px !important;
    padding-top: 36px !important;
    padding-bottom: 36px !important;
    border-top: 1px solid #edf2f7 !important;
    align-items: start !important;
  }
  html body:has(.t-catalog__product-snippet) .t-catalog__tabs__item:first-of-type {
    margin-top: 28px !important;
  }
  html body:has(.t-catalog__product-snippet) .t-catalog__tabs__content .js-catalog-prod-charcs {
    grid-template-columns: minmax(340px, 420px) minmax(0, 1fr) !important;
    gap: 32px !important;
  }
  html body:has(.t-catalog__product-snippet) .t-catalog__tabs__item[data-tab-title="Применение"] .t-catalog__tabs__content ul {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0 48px !important;
  }
}

@media(max-width:959px){
  body:has(.t-catalog__product-snippet) {
    --tk-main: min(55vw, 340px);
    --tk-thumb: 72px;
  }
  body:has(.t-catalog__product-snippet) .t-catalog__prod-snippet__container>.t-catalog__product-snippet>.t-container>div:first-of-type {
    grid-template-columns: 1fr !important;
  }
  body:has(.t-catalog__prod-snippet) .t-catalog__prod-popup__col-left {
    width: calc(var(--tk-main) + var(--tk-thumb) + 12px) !important;
    max-width: 100%;
  }
  body:has(.t-catalog__product-snippet) .t-slds {
    display: grid !important;
    grid-template-columns: var(--tk-main) var(--tk-thumb) !important;
    grid-template-rows: var(--tk-main) !important;
    column-gap: 12px !important;
  }
  body:has(.t-catalog__product-snippet) .t-slds__main {
    width: var(--tk-main) !important;
    height: var(--tk-main) !important;
  }
  body:has(.t-catalog__product-snippet) .t-slds__thumbsbullet-wrapper {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: repeat(4, 1fr) !important;
    gap: 8px !important;
    width: var(--tk-thumb) !important;
    height: var(--tk-main) !important;
  }
  body:has(.t-catalog__product-snippet) .tk-product-inquiry {
    margin-top: 24px !important;
    margin-bottom: 0 !important;
  }
  body:has(.t-catalog__product-snippet) .t-catalog__tabs__item {
    grid-template-columns: 200px minmax(0, 1fr) !important;
    gap: 32px !important;
    padding-top: 28px !important;
    padding-bottom: 28px !important;
    border-top: 1px solid #edf2f7 !important;
  }
}

@media(max-width:599px){
  body:has(.t-catalog__product-snippet) {
    --tk-main: calc(100vw - 40px);
    --tk-thumb: 64px;
  }
  body:has(.t-catalog__product-snippet) .t-catalog__prod-popup__col-left {
    width: 100% !important;
    max-width: 100% !important;
  }
  body:has(.t-catalog__product-snippet) .t-slds {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
    row-gap: 10px !important;
    column-gap: 0 !important;
  }
  body:has(.t-catalog__product-snippet) .t-slds__main {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
  }
  body:has(.t-catalog__product-snippet) .t-slds__thumbsbullet-wrapper {
    grid-column: 1 !important;
    grid-row: 2 !important;
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    grid-template-rows: 1fr !important;
    width: 100% !important;
    height: auto !important;
    gap: 8px !important;
    position: static !important;
  }
  body:has(.t-catalog__product-snippet) .t-slds__thumbsbullet {
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
  }
  body:has(.t-catalog__product-snippet) .t-catalog__prod-popup__name {
    font-size: 22px !important;
    margin-bottom: 12px !important;
  }
  body:has(.t-catalog__product-snippet) .t-catalog__prod-popup__text {
    font-size: 14.5px !important;
    margin-bottom: 16px !important;
  }
  body:has(.t-catalog__product-snippet) .tk-chips {
    margin-bottom: 20px !important;
  }
  body:has(.t-catalog__product-snippet) .tk-product-inquiry {
    margin-top: 16px !important;
    margin-bottom: 0 !important;
  }
  body:has(.t-catalog__product-snippet) .t-catalog__tabs__item {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding-top: 24px !important;
    padding-bottom: 24px !important;
    border-top: 1px solid #edf2f7 !important;
  }
  body:has(.t-catalog__product-snippet) .t-catalog__tabs__item-title {
    font-size: 18px !important;
  }
  body:has(.t-catalog__product-snippet) .t-catalog__tabs__content {
    margin-top: 0 !important;
  }
}

@media (max-width: 760px) {
  body:has(.t-catalog__product-snippet) .t-catalog__tabs__content .js-catalog-prod-charcs {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
  }
  body:has(.t-catalog__product-snippet) .t-catalog__tabs__item[data-tab-title="Применение"] .t-catalog__tabs__content ul {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }
}

/* Product page (desktop): remove the empty 66 px grid row gap and 42 px bottom padding under the image/description block, so the characteristics start right after it. */
@media (min-width: 960px) {
  body:has(.t-catalog__product-snippet) .t-catalog__prod-snippet__container>.t-catalog__product-snippet>.t-container>div:first-of-type {
    row-gap: 0 !important;
    padding-bottom: 0 !important;
  }
}

/* Product card description (TK3051 / product pages): text spans the full right column, same width as title and chips. */
html body:has(.t-catalog__product-snippet) #allrecords .t-catalog__prod-popup__text {
  max-width: none !important;
}

/* Product pages: breadcrumbs band sits flush under the fixed header without blank space */
body:has(.t-catalog__product-snippet) #allrecords .r:has(.tk-pcrumbs),
body:has(.t-catalog__product-snippet) #rec4848086601 {
  padding-top: 0 !important;
}
