/* =============================================================================
   ToughGuy Toolbox - Product detail (Prod1.aspx)
   Compact buy button, constrained hero, carousel + full gallery
   ============================================================================= */

.ttb-prod-page {
  background: #f6f7f9;
}

.ttb-prod-wrap {
  padding-top: 1.25rem;
  padding-bottom: 2.5rem;
  max-width: 1100px;
}

/* --- Hero / summary --- */
.ttb-hero-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  min-height: 240px;
  max-height: min(420px, 70vh);
  padding: 12px;
}

.ttb-hero-img {
  display: block;
  width: auto !important;
  max-width: 100% !important;
  max-height: min(396px, 65vh) !important;
  height: auto !important;
  margin: 0 auto;
  object-fit: contain;
}

.ttb-prod-summary {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.ttb-shortname {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.ttb-prod-title {
  font-weight: 700;
  line-height: 1.35;
  color: #1a1a1a;
  margin-bottom: 1rem;
  word-wrap: break-word;
}

.ttb-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ttb-price-label {
  font-size: 0.85rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ttb-price {
  color: #111;
  font-weight: 700;
}

/* Buy button — compact image control (never half page / full row) */
.ttb-buy-row {
  margin: 0.5rem 0 0.35rem;
}

.ttb-buy-link {
  display: inline-block !important;
  width: auto !important;
  max-width: 100%;
  line-height: 0;
}

.ttb-buy-img,
img.ttb-buy-img,
a.ttb-buy-link img.buy-button,
.ttb-prod-page img.buy-button,
.ttb-prod-page .buybutton {
  width: auto !important;
  max-width: 160px !important;
  height: auto !important;
  display: inline-block !important;
}

.ttb-buy-hint {
  margin-top: 0.25rem;
}

/* --- Sections --- */
.ttb-section-head {
  font-weight: 700;
  font-size: 1rem;
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
}

/* Description: keep supplier HTML fluid */
.ttb-description {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #222;
  overflow-x: auto;
  max-width: 100%;
}

.ttb-description img,
.ttb-description img[style],
.ttb-description table,
.ttb-description td,
.ttb-description div[style] {
  max-width: 100% !important;
  height: auto !important;
  box-sizing: border-box !important;
}

.ttb-description table {
  width: 100% !important;
}

.ttb-description img {
  width: auto !important;
  max-width: 100% !important;
  display: block;
  margin: 0.5rem auto;
}

/* --- Horizontal thumbnail carousel --- */
.ttb-carousel-body {
  padding: 0.75rem 0.5rem 1rem;
}

.ttb-thumb-carousel {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding: 4px 8px 10px;
  scrollbar-width: thin;
}

.ttb-thumb-carousel::-webkit-scrollbar {
  height: 8px;
}

.ttb-thumb-carousel::-webkit-scrollbar-thumb {
  background: #c4c4c4;
  border-radius: 4px;
}

.ttb-thumb {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 88px;
  height: 88px;
  padding: 4px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

.ttb-thumb img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  object-fit: contain;
  display: block;
}

.ttb-thumb:hover,
.ttb-thumb:focus {
  border-color: #6b7280;
  outline: none;
}

.ttb-thumb.is-active {
  border-color: #212529;
  box-shadow: 0 0 0 1px #212529;
}

/* --- Full images stack --- */
.ttb-full-gallery {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ttb-full-item {
  margin: 0;
  text-align: center;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 12px;
}

.ttb-full-item img {
  display: block;
  width: auto !important;
  max-width: 100% !important;
  max-height: min(720px, 85vh) !important;
  height: auto !important;
  margin: 0 auto;
  object-fit: contain;
}

.ttb-full-cap {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #6b7280;
}

/* Mobile */
@media (max-width: 767.98px) {
  .ttb-prod-wrap {
    padding-top: 0.75rem;
  }

  .ttb-hero-frame {
    max-height: min(320px, 55vh);
    min-height: 180px;
  }

  .ttb-hero-img {
    max-height: min(296px, 50vh) !important;
  }

  .ttb-prod-title {
    font-size: 1.15rem;
  }

  .ttb-buy-img,
  img.ttb-buy-img,
  a.ttb-buy-link img.buy-button {
    max-width: 140px !important;
  }

  .ttb-thumb {
    width: 76px;
    height: 76px;
  }

  .ttb-full-item img {
    max-height: min(480px, 70vh) !important;
  }
}
