/* T18 Sinus — integrated gallery and technical dock */
.t18-product-module {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "media" "thumbs" "dock";
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid #334155;
  border-radius: 1rem;
  background: #111827;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
}

.t18-gallery-shell { display: contents; }

.t18-main-media {
  grid-area: media;
  height: clamp(20rem, 66vw, 34rem);
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  aspect-ratio: auto;
}

.t18-main-media > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.t18-thumbnails {
  grid-area: thumbs;
  display: flex;
  gap: .55rem;
  padding: .65rem;
  overflow-x: auto;
  background: #080f1c;
  scrollbar-width: thin;
  scrollbar-color: #64748b transparent;
}

.t18-thumbnails > div {
  flex: 0 0 4.25rem;
  width: 4.25rem;
  height: 4.25rem;
  aspect-ratio: 1;
  border-color: #334155;
  background: #fff;
}

.t18-technical-dock {
  grid-area: dock;
  min-height: 0;
  padding: 1.4rem 1.25rem 0;
  color: #fff;
  background: linear-gradient(155deg, #334155 0%, #1e293b 42%, #111827 100%);
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.t18-eyebrow {
  margin: 0 0 .35rem;
  color: #f59e0b;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.t18-title {
  margin: 0 0 .55rem;
  color: #fff;
  font-family: Montserrat, Arial, sans-serif;
  font-size: clamp(1.75rem, 7vw, 2.3rem);
  font-weight: 900;
  line-height: 1.08;
}

.t18-description {
  display: -webkit-box;
  margin: 0 0 1rem;
  overflow: hidden;
  color: #cbd5e1;
  font-size: .9rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.t18-spec-card {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.t18-spec-card > div {
  margin-bottom: .65rem;
  padding-bottom: .55rem;
  border-color: rgba(255, 255, 255, .16);
}

.t18-spec-card h3 { color: #fff; font-size: 1rem; }
.t18-spec-card ul { display: grid; gap: 0; }

.t18-spec-card li {
  min-height: 2.1rem;
  padding: .38rem 0;
  border-color: rgba(255, 255, 255, .12);
  font-size: .84rem;
}

.t18-spec-card li span:first-child { color: #aebdce; }
.t18-spec-card li span:last-child { color: #fff; text-align: right; }

.t18-profile-diagram {
  display: block;
  margin-top: .85rem;
  padding: .55rem .65rem .45rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: .65rem;
  background: #fff;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease;
}

.t18-profile-diagram:hover { transform: translateY(-1px); border-color: #f59e0b; }
.t18-profile-diagram img { display: block; max-height: 6.25rem; margin: auto; }

.t18-profile-diagram span {
  display: block;
  margin-top: .25rem;
  color: #475569;
  font-size: .66rem;
  font-weight: 700;
  text-align: center;
}

.t18-cta-dock {
  display: grid;
  grid-template-columns: 1fr;
  gap: .65rem;
  margin: 1.1rem -1.25rem 0;
  padding: 1rem 1.25rem;
  background: rgba(3, 7, 18, .5);
  border-top: 1px solid rgba(255, 255, 255, .12);
}

.t18-cta-dock > button {
  min-height: 3rem;
  padding: .75rem 1rem;
  border-radius: .4rem;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.t18-cta-dock > button:first-child {
  background: #e9292f;
  color: #fff;
  box-shadow: 0 8px 22px rgba(233, 41, 47, .24);
}

.t18-cta-dock > button:first-child:hover { background: #c91f25; }

.t18-price-button {
  border: 1px solid #64748b;
  background: rgba(255, 255, 255, .05);
  color: #fff;
}

.t18-price-button:hover {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, .1);
  color: #fbbf24;
}

@media (min-width: 640px) and (max-width: 1023px) {
  .t18-cta-dock { grid-template-columns: 1.15fr 1fr; }
  .t18-title { font-size: 2.2rem; }
}

@media (min-width: 1024px) {
  .t18-product-module {
    grid-template-columns: 5rem minmax(0, 1fr) 24.5rem;
    grid-template-rows: 41.25rem;
    grid-template-areas: "thumbs media dock";
  }

  .t18-main-media { height: 100%; }

  .t18-thumbnails {
    flex-direction: column;
    gap: .55rem;
    padding: .75rem .55rem;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .t18-thumbnails > div { flex: 0 0 3.85rem; width: 100%; height: 3.85rem; }

  .t18-technical-dock {
    height: 100%;
    padding: 1.45rem 1.35rem 0;
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, .1);
  }

  .t18-title { font-size: 2.05rem; }
  .t18-description { font-size: .82rem; -webkit-line-clamp: 2; }
  .t18-spec-card li { min-height: 1.95rem; padding: .3rem 0; font-size: .8rem; }
  .t18-profile-diagram { margin-top: .7rem; }
  .t18-profile-diagram img { max-height: 5.7rem; }

  .t18-cta-dock {
    grid-template-columns: 1.15fr 1fr;
    gap: .6rem;
    margin: auto -1.35rem 0;
    padding: .9rem 1.35rem 1.05rem;
  }

  .t18-cta-dock > button { padding: .65rem .7rem; font-size: .72rem; }
}

@media (max-width: 639px) {
  .t18-product-module { border-radius: .8rem; }
  .t18-technical-dock { padding: 1.2rem 1rem 0; }
  .t18-title { font-size: 1.8rem; }
  .t18-description { -webkit-line-clamp: 4; }
  .t18-cta-dock { margin: 1rem -1rem 0; padding: 1rem; }
  .t18-profile-diagram img { max-height: 5.5rem; }
}

/* Product gallery lightbox — full image with cursor-position zoom */
.product-lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 4rem 5.5rem;
  overflow: hidden;
  user-select: none;
}

.product-lightbox-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  object-fit: contain;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
  transition: transform .2s ease-out;
  will-change: transform;
  pointer-events: none;
}

.product-lightbox-image.is-zoomed {
  transform: scale(2.5);
  transition-duration: .12s;
}

.product-lightbox-hint {
  position: absolute;
  bottom: 4.25rem;
  left: 50%;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1rem;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, .62);
  font-size: .8rem;
  font-weight: 700;
  transform: translateX(-50%);
  pointer-events: none;
  white-space: nowrap;
}

@media (max-width: 639px) {
  .product-lightbox-stage { padding: 4.5rem 1rem 6rem; }
  .product-lightbox-image { max-height: calc(100vh - 10.5rem); }
  .product-lightbox-image.is-zoomed { transform: scale(2); }
  .product-lightbox-hint { bottom: 4.75rem; font-size: .7rem; }
}

/* Animated fullscreen viewer with a cursor-following optical lens */
.product-lightbox-overlay {
  animation: product-lightbox-fade .24s ease-out both;
}

.product-lightbox-overlay .product-lightbox-image {
  animation: product-lightbox-image-in .38s cubic-bezier(.2, .75, .25, 1) both;
}

.product-magnifier-lens {
  position: absolute;
  z-index: 20;
  width: 190px;
  height: 190px;
  overflow: visible;
  border: 4px solid rgba(255, 255, 255, .96);
  border-radius: 50%;
  background-color: #fff;
  background-repeat: no-repeat;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(15, 23, 42, .22);
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity .12s ease;
  pointer-events: none;
}

.product-magnifier-lens::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -34px;
  width: 16px;
  height: 58px;
  border: 3px solid rgba(255, 255, 255, .96);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: #1e293b;
  transform: rotate(-42deg);
  transform-origin: top center;
}

.sinus-price-phone {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 3rem;
  padding: .7rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: .6rem;
  color: #111827;
  background: #f9fafb;
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}

.sinus-price-phone:hover {
  border-color: #e9292f;
  color: #e9292f;
  background: #fff;
}

@keyframes product-lightbox-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes product-lightbox-image-in {
  from { opacity: 0; transform: scale(.88); }
  to { opacity: 1; transform: scale(1); }
}

@media (hover: hover) and (pointer: fine) {
  .product-lightbox-stage { cursor: none; }
}

@media (hover: none), (pointer: coarse) {
  .product-magnifier-lens { display: none; }
  .product-lightbox-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .product-lightbox-overlay,
  .product-lightbox-overlay .product-lightbox-image { animation: none; }
}

/* On phones/tablets, keep the product details immediately after the gallery. */
@media (max-width: 1023px) {
  .mobile-product-gallery { display: contents; }
  .mobile-product-details { order: 1; }
  .product-seo-below-gallery { order: 2; }
  .product-technical-diagram { order: 3; }
}

/* Compact, scroll-safe mobile price sheet for T18 Sinus. */
.sinus-price-overlay {
  padding: .5rem;
  padding-bottom: max(.5rem, env(safe-area-inset-bottom));
  animation: sinus-price-backdrop-in .2s ease-out both;
}

.sinus-price-modal {
  width: min(calc(100vw - 1rem), 28rem);
  max-height: min(86dvh, 44rem);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 1.15rem;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .34);
  animation: sinus-price-sheet-in .36s cubic-bezier(.2, .82, .25, 1) both;
}

.sinus-price-modal-header {
  flex: 0 0 auto;
  border-radius: 1.1rem 1.1rem 0 0;
}

.sinus-price-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

@keyframes sinus-price-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes sinus-price-sheet-in {
  from { opacity: 0; transform: translateY(2.75rem) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (min-width: 640px) {
  .sinus-price-overlay { padding: 1rem; }
  .sinus-price-modal { max-height: min(90vh, 44rem); }
}

@media (max-height: 680px) {
  .sinus-price-modal { max-height: calc(100dvh - 1rem); }
  .sinus-price-modal-body { font-size: .92rem; }
  .sinus-price-phone { min-height: 2.65rem; padding-block: .55rem; }
}

@media (prefers-reduced-motion: reduce) {
  .sinus-price-overlay,
  .sinus-price-modal { animation: none; }
}

/* Shared compact price modal used by every priced product. */
.product-price-overlay {
  padding: .5rem;
  padding-bottom: max(.5rem, env(safe-area-inset-bottom));
  animation: product-price-backdrop-in .2s ease-out both;
}

.product-price-modal {
  --price-modal-width: 32rem;
  width: min(calc(100vw - 1rem), var(--price-modal-width));
  max-height: min(86dvh, 44rem);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 1.15rem;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .34);
  animation: product-price-sheet-in .36s cubic-bezier(.2, .82, .25, 1) both;
}

.product-price-modal.price-modal-sm { --price-modal-width: 24rem; }
.product-price-modal.price-modal-md { --price-modal-width: 28rem; }
.product-price-modal.price-modal-lg { --price-modal-width: 32rem; }
.product-price-modal.price-modal-xl { --price-modal-width: 42rem; }

.product-price-modal-header {
  flex: 0 0 auto;
  border-radius: 1.1rem 1.1rem 0 0;
}

.product-price-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

@keyframes product-price-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes product-price-sheet-in {
  from { opacity: 0; transform: translateY(2.75rem) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (min-width: 640px) {
  .product-price-overlay { padding: 1rem; }
  .product-price-modal { max-height: min(90vh, 50rem); }
}

@media (max-height: 680px) {
  .product-price-modal { max-height: calc(100dvh - 1rem); }
  .product-price-modal-body { font-size: .92rem; }
}

@media (prefers-reduced-motion: reduce) {
  .product-price-overlay,
  .product-price-modal { animation: none; }
}
