/* Thunder EV — product detail page (share links / product-detail?id=) */

body.tev-product-detail-page {
  background: #fff;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: 'Poppins', sans-serif;
  width: 100%;
  overflow-x: hidden;
}

body.tev-product-detail-page .tev-pd-header {
  z-index: 200;
}

body.tev-product-detail-page .tev-pd-nav__actions {
  gap: 0.4rem;
}

body.tev-product-detail-page .tev-pd-nav-login {
  font-size: 0.68rem;
  padding: 0.32rem 0.62rem;
  white-space: nowrap;
}

body.tev-product-detail-page .tev-pd-nav-login--assoc {
  background: #38bdf8;
  color: #0b1026;
}

body.tev-product-detail-page .tev-subpage-category-tiles {
  width: 100%;
  margin: 0.5rem 0 0.85rem;
  padding: 0 clamp(0.5rem, 2vw, 1rem);
}

body.tev-product-detail-page .tev-pd-page-main {
  flex: 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.65rem clamp(0.65rem, 2vw, 1.75rem) 1.25rem;
  box-sizing: border-box;
}

body.tev-product-detail-page .tev-pd-main {
  padding: 0;
  max-width: 920px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.tev-pd-loading {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #64748b;
}

.tev-pd-loading__spin {
  width: 36px;
  height: 36px;
  margin: 0 auto 0.85rem;
  border: 3px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: tevPdSpin 0.8s linear infinite;
}

@keyframes tevPdSpin {
  to {
    transform: rotate(360deg);
  }
}

.tev-pd-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.tev-detail-split {
  display: grid;
  grid-template-columns: minmax(240px, 42%) 1fr;
  gap: 0;
  align-items: stretch;
}

.tev-detail-split__media {
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-right: 1px solid #e2e8f0;
  padding: 1rem;
}

.tev-detail-hero {
  width: 100%;
  max-height: min(42vh, 340px);
  min-height: 180px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  display: block;
  border: 1px solid #e2e8f0;
}

.tev-detail-gallery {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.65rem;
}

.tev-detail-gallery img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.tev-detail-gallery img:hover {
  transform: translateY(-1px);
}

.tev-detail-gallery img.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.tev-detail-split__info {
  min-width: 0;
  padding: 1rem 1.15rem 1.15rem;
}

.tev-pd-breadcrumb {
  font-size: 0.74rem;
  color: #64748b;
  margin: 0 0 0.5rem;
}

.tev-pd-breadcrumb a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

.tev-pd-breadcrumb a:hover {
  text-decoration: underline;
}

.tev-pd-title {
  margin: 0 0 0.45rem;
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  line-height: 1.25;
  color: #0f172a;
  font-weight: 800;
}

.tev-pd-meta-line {
  margin: 0 0 0.45rem;
  color: #475569;
  font-size: 0.84rem;
  line-height: 1.55;
}

.tev-pd-meta-line strong {
  color: #334155;
}

.tev-pd-cert-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.4;
}

.tev-pd-cert-line__label {
  font-weight: 700;
  color: #166534;
  flex-shrink: 0;
}

.tev-pd-cert-line .tev-cert-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0;
}

.tev-pd-cert-line .tev-cert-badge {
  font-size: 0.62rem;
  padding: 0.16rem 0.45rem;
}

.tev-pd-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.5rem 0 0.65rem;
}

.tev-pd-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.tev-pd-chip--brand {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.tev-pd-chip--stock {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.tev-pd-desc {
  color: #475569;
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0 0 0.75rem;
}

.tev-pd-price-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  margin: 0.65rem 0 0.75rem;
}

.tev-pd-price-card .tev-detail-pricing {
  margin: 0;
}

.tev-pd-price-main {
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  font-weight: 800;
  color: #047857;
  margin: 0;
  line-height: 1.1;
}

.tev-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
}

.tev-detail-actions .tev-mp-btn-cart,
.tev-detail-actions .tev-mp-btn-primary,
.tev-detail-actions .tev-pd-checkout-btn {
  min-height: 40px;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  border: none;
}

.tev-detail-actions .tev-mp-btn-primary,
.tev-detail-actions .tev-pd-checkout-btn {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 42%, #1d4ed8 100%);
  color: #fff;
  box-shadow:
    0 4px 16px rgba(29, 78, 216, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.tev-detail-actions .tev-mp-btn-primary:hover,
.tev-detail-actions .tev-pd-checkout-btn:hover {
  filter: brightness(1.05);
  box-shadow:
    0 6px 18px rgba(29, 78, 216, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.tev-pd-section {
  padding: 1rem 1.15rem 1.15rem;
  border-top: 1px solid #e2e8f0;
}

.tev-pd-section h2 {
  margin: 0 0 0.65rem;
  font-size: 0.98rem;
  font-weight: 800;
  color: #1e3a8a;
}

.tev-product-detail-page .tev-spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  display: table;
  table-layout: fixed;
}

.tev-product-detail-page .tev-spec-table tbody {
  display: table-row-group;
}

.tev-product-detail-page .tev-spec-table tr {
  display: table-row;
}

.tev-product-detail-page .tev-spec-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.tev-product-detail-page .tev-spec-table td:first-child {
  font-weight: 700;
  color: #475569;
  width: 38%;
  background: #f8fafc;
}

.tev-detail-features ul,
.tev-features-list {
  margin: 0;
  padding-left: 1.1rem;
  color: #334155;
  font-size: 0.86rem;
  line-height: 1.5;
}

.tev-detail-features--cols ul {
  columns: 2;
  column-gap: 1.25rem;
}

.tev-detail-features--cols li {
  break-inside: avoid;
  margin-bottom: 0.35rem;
}

.tev-detail-docs a,
.tev-doc-list a,
.tev-pd-spec-dl {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.3rem 0.45rem 0 0;
  padding: 0.4rem 0.75rem;
  background: #f1f5f9;
  border-radius: 8px;
  text-decoration: none;
  color: #1e40af;
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

.tev-pd-spec-dl:hover {
  background: #e2e8f0;
}

.tev-pd-spec-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tev-detail-actions .tev-pd-buy-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
}

.tev-datasheet-section {
  margin: 0;
}

.tev-pd-spec-section h2 {
  margin-bottom: 0.75rem;
}

.tev-pd-spec-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem;
}

.tev-pd-pdf-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  width: 88px;
  min-height: 96px;
  padding: 0.55rem 0.45rem;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #fef2f2 100%);
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  font-family: inherit;
}

.tev-pd-pdf-thumb:hover {
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.18);
  transform: translateY(-1px);
}

.tev-pd-pdf-thumb__label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #b91c1c;
}

.tev-pd-pdf-viewer {
  flex: 1 1 280px;
  min-width: min(100%, 280px);
  height: min(52vh, 360px);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
}

.tev-pd-pdf-viewer iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.tev-pd-pdf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  padding: 0.55rem 0.95rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #475569, #64748b);
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(71, 85, 105, 0.2);
  white-space: nowrap;
}

.tev-pd-pdf-btn--dl:hover {
  filter: brightness(1.06);
}

.tev-pd-register-note {
  margin: 0.65rem 0 0;
  font-size: 0.76rem;
  color: #64748b;
}

.tev-pd-register-note a {
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}

.tev-pd-register-note a:hover {
  text-decoration: underline;
}

.tev-ai-brief {
  background: linear-gradient(180deg, #f0f9ff 0%, #fff 100%);
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 1rem 1.05rem;
}

.tev-ai-brief__badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0369a1;
  background: #e0f2fe;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.45rem;
}

.tev-ai-brief h3 {
  margin: 0 0 0.4rem;
  color: #0f172a;
  font-size: 1rem;
}

.tev-ai-disclaimer {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.75rem;
  font-style: italic;
}

.tev-detail-pricing {
  margin: 0;
}

.tev-detail-pricing__line,
.tev-detail-pricing__savings {
  font-size: 0.84rem;
  color: #475569;
  margin: 0.15rem 0;
}

.badge-quote {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 0.8rem;
}

.tev-cart-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%) translateY(120%);
  z-index: 12000;
  max-width: min(92vw, 360px);
  padding: 0.65rem 1rem;
  border-radius: 10px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.28);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}

.tev-cart-toast--show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 768px) {
  .tev-detail-split {
    grid-template-columns: 1fr;
  }

  .tev-detail-split__media {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }

  .tev-detail-split__info,
  .tev-pd-section {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .tev-detail-features--cols ul {
    columns: 1;
  }

  .tev-detail-actions .tev-mp-btn-cart,
  .tev-detail-actions .tev-pd-checkout-btn {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 130px;
  }

  .tev-pd-spec-row {
    flex-direction: column;
    align-items: stretch;
  }

  .tev-pd-pdf-viewer {
    min-width: 100%;
    height: min(45vh, 300px);
  }

  .tev-pd-pdf-btn {
    align-self: flex-start;
  }
}
