/* Product pages: dark site header + breadcrumbs under it */
html.tbm-product-layout,
body.tbm-product-layout {
  margin: 0;
  padding: 0;
}

body.tbm-product-layout .page-wrapper {
  padding-top: 0;
}

body.tbm-product-layout .main-header {
  position: sticky;
  top: 0;
  z-index: 999;
  left: auto;
  right: auto;
}

body.tbm-product-layout .main-header .header-lower {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.tbm-product-layout .main-header .sticky-header {
  position: relative;
  opacity: 1;
  visibility: visible;
  z-index: auto;
}

/* На страницах товаров не используем fixed-header из script.js */
body.tbm-product-layout .main-header.fixed-header .sticky-header {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  z-index: auto;
}

/* Breadcrumbs stick under header while scrolling */
.tbm-breadcrumbs {
  display: block;
  position: sticky;
  top: var(--tbm-sticky-h, 72px);
  z-index: 998;
  background: #fff;
  border-bottom: 1px solid #ececec;
  padding: 14px 0;
  font-size: 13px;
  line-height: 1.5;
  color: #777;
}

.tbm-bc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.tbm-bc-list li {
  display: inline-flex;
  align-items: center;
}

.tbm-bc-list li + li::before {
  content: '/';
  margin: 0 10px;
  color: #ccc;
  font-weight: 400;
}

.tbm-bc-list a {
  color: #666;
  text-decoration: none;
}

.tbm-bc-list a:hover {
  color: #e30613;
}

.tbm-bc-list li[aria-current='page'] {
  color: #111;
  font-weight: 600;
}

/* Product card content */
.tbm-product-page {
  padding: 32px 0 80px;
  background: #fff;
}

body.tbm-product-layout .project-detail.tbm-product-page {
  padding-top: 32px;
}

.tbm-product-page .auto-container {
  max-width: 1700px;
}

.tbm-product-v2 {
  width: 100%;
}

/* Hero */
.tbm-hero {
  align-items: flex-start;
  margin-bottom: 40px;
}
.tbm-hero-media {
  padding-right: 20px;
}
.tbm-hero-info {
  padding-left: 12px;
}
.tbm-cat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #e30613;
  margin-bottom: 10px;
}
.tbm-model {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.05;
  color: #111;
  margin: 0 0 8px;
  letter-spacing: -0.03em;
}
.tbm-type {
  font-size: 22px;
  font-weight: 600;
  color: #222;
  margin: 0 0 18px;
}
.tbm-intro {
  font-size: 14px;
  line-height: 1.75;
  color: #555;
  margin: 0 0 22px;
  max-width: 520px;
}

/* Hero summary table — as on reference */
.tbm-highlights {
  width: 100%;
  max-width: 520px;
  border-collapse: collapse;
  font-size: 14px;
  border: 1px solid #e5e5e5;
}
.tbm-highlights th,
.tbm-highlights td {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e5e5;
  vertical-align: middle;
}
.tbm-highlights tr:last-child th,
.tbm-highlights tr:last-child td {
  border-bottom: none;
}
.tbm-highlights th {
  width: 34%;
  font-weight: 600;
  color: #333;
  text-align: left;
  background: #fafafa;
}
.tbm-highlights td {
  color: #444;
}

/* Gallery */
.tbm-gallery-main {
  position: relative;
  background: #f5f5f5;
  border: none;
  border-radius: 0;
  padding: 32px 48px;
  text-align: center;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tbm-gallery-img {
  max-width: 100%;
  max-height: 440px;
  height: auto;
  display: block;
  margin: 0 auto;
}
.tbm-gal-prev,
.tbm-gal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
  color: #333;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.tbm-gal-prev {
  left: 16px;
}
.tbm-gal-next {
  right: 16px;
}
.tbm-gal-prev:hover,
.tbm-gal-next:hover {
  color: #e30613;
}
.tbm-gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.tbm-thumb {
  width: 80px;
  height: 80px;
  padding: 3px;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
}
.tbm-thumb.active {
  border-color: #e30613;
}
.tbm-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Tabs */
.tbm-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 36px;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 32px;
}
.tbm-tab {
  display: inline-block;
  padding: 14px 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #999;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.tbm-tab:hover {
  color: #e30613;
}
.tbm-tab.active {
  color: #e30613;
  border-bottom-color: #e30613;
}

.tbm-tabs-stuck {
  position: sticky;
  top: var(--tbm-sticky-h, 72px);
  z-index: 90;
  background: #fff;
  padding-top: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

#tbm-desc,
#tbm-spec,
#tbm-dim,
#tbm-models,
#tbm-dl,
#tbm-app {
  scroll-margin-top: calc(var(--tbm-sticky-h, 72px) + 72px);
}

/* 2-column grid rows — Description|Specs, Drawing|Models, Downloads|App */
.tbm-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.tbm-grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: stretch;
}
.tbm-card {
  min-width: 0;
}
.tbm-card-empty {
  visibility: hidden;
  pointer-events: none;
}
.tbm-card-inner {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 0;
  padding: 28px 30px;
  height: 100%;
}
.tbm-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  margin: 0 0 18px;
  padding-bottom: 0;
}

/* Rich text */
.tbm-rich {
  font-size: 14px;
  line-height: 1.75;
  color: #444;
}
.tbm-rich h3 {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  margin: 22px 0 10px;
}
.tbm-rich h3:first-child {
  margin-top: 0;
}
.tbm-rich ul {
  margin: 0 0 16px;
  padding-left: 0;
  list-style: none;
}
.tbm-rich li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 8px;
}
.tbm-rich li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: #e30613;
  border-radius: 1px;
}
.tbm-rich p {
  margin: 0 0 12px;
}

/* Spec table in card */
.tbm-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.tbm-data-table th,
.tbm-data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #ececec;
  vertical-align: middle;
}
.tbm-data-table th {
  width: 44%;
  font-weight: 600;
  color: #333;
  text-align: left;
  background: #fafafa;
}
.tbm-data-table tr:last-child th,
.tbm-data-table tr:last-child td {
  border-bottom: none;
}

.tbm-html-block {
  overflow-x: auto;
}

.tbm-html-block.tbm-html-matrix {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tbm-grid-row-full {
  grid-template-columns: 1fr;
}

.tbm-card-matrix .tbm-card-inner {
  padding: 32px 24px;
}

/* Models matrix — крупнее, на всю ширину */
.tbm-spec-matrix {
  width: 100%;
  min-width: 960px;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: auto;
}
.tbm-spec-matrix th,
.tbm-spec-matrix td {
  border: 1px solid #d0d0d0;
  padding: 11px 10px;
  text-align: center;
  vertical-align: middle;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  line-height: 1.35;
}
.tbm-spec-matrix thead th {
  background: #e30613;
  color: #fff;
  font-weight: 700;
  white-space: normal;
  font-size: 12px;
  padding: 13px 8px;
  hyphens: auto;
}
.tbm-spec-matrix tbody tr:nth-child(even) {
  background: #fafafa;
}
.tbm-spec-matrix tbody td:first-child,
.tbm-spec-matrix tbody th:first-child {
  text-align: left;
  font-weight: 600;
  background: #f3f3f3;
  min-width: 160px;
}
.tbm-spec-matrix thead th:nth-child(2),
.tbm-spec-matrix tbody td:nth-child(2) {
  width: 56px;
}

/* Технические чертежи — отдельно от фото товара */
.tbm-drawing-board {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}
.tbm-drawing-sheet {
  margin: 0;
  padding: 28px 24px;
  background: #fff;
  border: 1px solid #cfcfcf;
  text-align: center;
}
.tbm-drawing-img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
}
.tbm-drawing-caption {
  margin: 14px 0 0;
  font-size: 12px;
  color: #777;
  font-style: italic;
}
#tbm-dim .tbm-card-inner {
  padding: 32px 28px;
}

/* Legacy draw grid */
.tbm-draw-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}
.tbm-draw-item {
  flex: 1 1 100%;
  max-width: 100%;
  background: #fff;
  border: 1px solid #cfcfcf;
  padding: 28px 24px;
  text-align: center;
}
.tbm-draw-item img {
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

/* Downloads */
.tbm-dl-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.tbm-dl-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #ececec;
  text-decoration: none;
  color: #333;
  font-size: 14px;
}
.tbm-dl-item:last-child {
  border-bottom: none;
}
.tbm-dl-item:hover {
  color: #e30613;
}
.tbm-dl-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 24px;
  padding: 0 6px;
  background: #e30613;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Application */
.tbm-html-block .tbm-app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.tbm-html-block .tbm-app-item {
  text-align: center;
}
.tbm-html-block .tbm-app-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  margin-bottom: 8px;
}
.tbm-html-block .tbm-app-item span {
  font-size: 13px;
  color: #555;
}

.tbm-card-sub {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

.tbm-intro-toggle {
  display: none;
}

@media (max-width: 991px) {
  .tbm-model {
    font-size: 34px;
  }
  .tbm-type {
    font-size: 18px;
  }
  .tbm-hero-media {
    padding-right: 0;
  }
  .tbm-hero-info {
    padding-left: 0;
    margin-top: 28px;
  }
  .tbm-grid-row {
    grid-template-columns: 1fr;
  }
  .tbm-card-empty {
    display: none;
  }

  /* ── Хедер на странице товара (мобилка): logo + burger ── */
  body.tbm-product-layout .main-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 999 !important;
  }

  body.tbm-product-layout .main-header .sticky-header {
    display: none !important;
  }

  body.tbm-product-layout .main-header .header-lower {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    background: #0a0a0a !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  body.tbm-product-layout .main-header .header-lower .auto-container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  body.tbm-product-layout .main-header .header-lower .inner-container {
    position: relative;
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    align-items: center !important;
    justify-items: stretch;
    min-height: 44px;
    padding: 0 !important;
    gap: 0;
  }

  body.tbm-product-layout .main-header .header-lower .inner-container::after {
    content: 'tbm-hoist';
    grid-column: 2;
    grid-row: 1;
    position: static;
    left: auto;
    top: auto;
    transform: none;
    justify-self: center;
    align-self: center;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.05em;
    pointer-events: none;
    white-space: nowrap;
    line-height: 1;
  }

  body.tbm-product-layout .main-header .logo-box {
    grid-column: 1;
    grid-row: 1;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    float: none !important;
    z-index: 2;
  }

  body.tbm-product-layout .main-header .nav-outer {
    display: none !important;
  }

  body.tbm-product-layout .main-header .logo-box .logo {
    display: flex;
    align-items: center;
    line-height: 0;
  }

  body.tbm-product-layout .main-header .logo-box .logo img {
    max-height: 28px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
  }

  body.tbm-product-layout .main-header .outer-box {
    grid-column: 3;
    grid-row: 1;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    justify-self: end;
  }

  body.tbm-product-layout .main-header .search-box-outer {
    display: none !important;
  }

  body.tbm-product-layout .main-header .mobile-nav-toggler {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
  }

  body.tbm-product-layout .main-header .mobile-nav-toggler .icon {
    color: #fff !important;
    font-size: 20px;
    line-height: 1;
  }

  body.tbm-product-layout .tbm-breadcrumbs {
    top: var(--tbm-sticky-h, 52px);
    position: sticky;
    z-index: 998;
    background: #fff;
    border-bottom: 1px solid #ececec;
  }
}

/* ── Мобильная страница товара — компактно, читаемо ── */
@media (max-width: 767px) {
  body.tbm-product-layout {
    background: #fff;
    -webkit-text-size-adjust: 100%;
  }

  body.tbm-product-layout .page-wrapper {
    background: #fff;
  }

  .tbm-breadcrumbs {
    padding: 6px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tbm-breadcrumbs::-webkit-scrollbar {
    display: none;
  }

  .tbm-breadcrumbs .auto-container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .tbm-bc-list {
    flex-wrap: nowrap;
    white-space: nowrap;
    font-size: 11px;
  }

  .tbm-bc-list li + li::before {
    margin: 0 5px;
  }

  .tbm-product-page {
    padding: 0 0 32px;
    background: #fff;
  }

  body.tbm-product-layout .project-detail.tbm-product-page {
    padding-top: 0 !important;
  }

  .tbm-product-page .auto-container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .tbm-hero {
    margin-bottom: 10px;
  }

  /* Галерея — с отступами */
  .tbm-hero-media {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: none;
    padding: 0 4px;
    box-sizing: border-box;
  }

  .tbm-gallery-main {
    min-height: 0;
    padding: 12px 36px;
    background: #faf8f5;
    border: 1px solid #e8e8e8;
    border-radius: 0;
  }

  .tbm-gallery-img {
    max-height: 200px;
    width: auto;
    object-fit: contain;
  }

  .tbm-gal-prev,
  .tbm-gal-next {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .tbm-gal-prev { left: 6px; }
  .tbm-gal-next { right: 6px; }

  .tbm-gallery-thumbs {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    margin-top: 8px;
    padding: 2px 12px 6px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tbm-gallery-thumbs::-webkit-scrollbar {
    display: none;
  }

  .tbm-thumb {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 0;
    border: 1px solid #ddd;
    scroll-snap-align: start;
  }

  /* Заголовок товара — компактно, по центру */
  .tbm-hero-info {
    margin-top: 12px;
    background: transparent;
    border-radius: 0;
    padding: 0 8px 16px;
    box-shadow: none;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
  }

  .tbm-hero-info .tbm-highlights {
    display: table;
    max-width: 100%;
    margin: 12px auto 0;
  }

  .tbm-cat-label {
    display: none;
  }

  .tbm-model {
    font-size: 20px;
    line-height: 1.25;
    margin-bottom: 4px;
  }

  .tbm-type {
    font-size: 13px;
    margin-bottom: 10px;
    color: #666;
    font-weight: 500;
  }

  .tbm-intro {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
    max-width: none;
    margin-bottom: 0;
    text-align: left;
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
  }

  .tbm-intro-toggle {
    display: none !important;
  }

  /* Вкладки на мобилке не нужны — секции и так с заголовками */
  .tbm-tabs {
    display: none !important;
  }

  .tbm-breadcrumbs {
    border-bottom: 1px solid #ececec;
  }

  /* Карточки секций — плоский стиль */
  .tbm-grid {
    gap: 16px;
  }

  .tbm-card-inner {
    border: 1px solid #e0e0e0;
    border-radius: 0;
    padding: 16px 12px;
    box-shadow: none;
    background: #fff;
  }

  .tbm-card-title {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .tbm-rich {
    font-size: 14px;
    line-height: 1.6;
  }

  .tbm-rich h3 {
    font-size: 15px;
    margin-top: 14px;
  }

  .tbm-rich li {
    margin-bottom: 8px;
  }

  /* Таблицы — читаемый список «параметр : значение» */
  .tbm-highlights,
  .tbm-data-table {
    display: block;
    width: 100%;
    border: none;
    border-radius: 0;
    background: transparent;
  }

  .tbm-highlights tbody,
  .tbm-data-table tbody {
    display: block;
  }

  .tbm-highlights tr,
  .tbm-data-table tr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #eee;
  }

  .tbm-highlights tr:last-child,
  .tbm-data-table tr:last-child {
    border-bottom: none;
  }

  .tbm-highlights th,
  .tbm-highlights td,
  .tbm-data-table th,
  .tbm-data-table td {
    display: block;
    padding: 0;
    border: none;
    background: transparent;
    text-align: left;
  }

  .tbm-highlights th,
  .tbm-data-table th {
    flex: 1 1 50%;
    color: #666;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
  }

  .tbm-highlights td,
  .tbm-data-table td {
    flex: 0 1 50%;
    color: #111;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.35;
    text-align: right;
  }

  /* Модели — переключатель + одна карточка */
  .tbm-card-matrix .tbm-card-inner {
    padding: 12px;
  }

  .tbm-html-block.tbm-html-matrix .tbm-matrix-scroll,
  .tbm-html-block.tbm-html-matrix .tbm-matrix-scroll-hint {
    display: none !important;
  }

  .tbm-model-picker {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 0 12px;
    padding: 0 2px 4px;
  }

  .tbm-model-picker::-webkit-scrollbar {
    display: none;
  }

  .tbm-model-pick {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 0;
    background: #fff;
    color: #111;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
  }

  .tbm-model-pick.active {
    background: #111;
    border-color: #111;
    color: #fff;
  }

  .tbm-model-cards {
    display: block;
  }

  .tbm-model-card {
    display: none;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    overflow: hidden;
  }

  .tbm-model-card.active {
    display: block;
  }

  .tbm-model-card-name {
    display: none;
  }

  .tbm-model-card-rows {
    display: block;
    padding: 4px 0;
  }

  .tbm-model-card-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
  }

  .tbm-model-card-row:last-child {
    border-bottom: none;
  }

  .tbm-model-card-k {
    flex: 1 1 55%;
    color: #666;
    font-weight: 500;
    line-height: 1.4;
  }

  .tbm-model-card-v {
    flex: 0 1 45%;
    color: #111;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.35;
    text-align: right;
  }

  .tbm-draw-item {
    border-radius: 0;
    padding: 12px 10px;
    background: #fafafa;
    border: 1px solid #eee;
  }

  .tbm-draw-item img {
    border-radius: 0;
  }

  .tbm-dl-item {
    padding: 12px 0;
    font-size: 14px;
  }

  .tbm-html-block .tbm-app-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tbm-card-inner > [id] {
    scroll-margin-top: calc(var(--tbm-sticky-h, 46px) + var(--tbm-bc-h, 32px) + 52px);
  }
}

/* Lightbox фото товара */
.tbm-photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.tbm-photo-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.tbm-photo-lightbox-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.tbm-photo-lightbox-close svg {
  display: block;
}

.tbm-photo-lightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 12px 24px;
  touch-action: pan-y;
  user-select: none;
}

.tbm-photo-lightbox-img {
  max-width: 100%;
  max-height: min(78vh, 720px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.tbm-photo-lightbox-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 12px 20px;
}

.tbm-photo-lightbox-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  padding: 0;
  cursor: pointer;
}

.tbm-photo-lightbox-dot.active {
  background: #fff;
  transform: scale(1.15);
}

@media (max-width: 767px) {
  .tbm-gallery-main {
    cursor: zoom-in;
  }

  .tbm-gallery-img {
    cursor: zoom-in;
  }

  .tbm-gal-prev,
  .tbm-gal-next {
    width: 36px;
    height: 36px;
    font-size: 0;
    background: rgba(10, 10, 10, 0.72);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  }

  .tbm-gal-prev::before,
  .tbm-gal-next::before {
    content: '';
    display: block;
    width: 9px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-right: none;
    margin: 0 auto;
  }

  .tbm-gal-prev::before {
    transform: rotate(45deg) translate(2px, -1px);
  }

  .tbm-gal-next::before {
    transform: rotate(-135deg) translate(2px, -1px);
  }
}

@media (max-width: 991px) {
  .tbm-product-dock {
    display: none !important;
  }

  body.tbm-product-dock-on .tbm-product-page {
    padding-bottom: 40px;
  }

  .tbm-product-nav {
    display: none !important;
  }
}
