.template6-product-page {
  background: #f3f4f7;
  color: #45576f;
}

.template6-product-shell {
  width: min(1200px, calc(100% - 56px));
  margin: 0 auto;
}

.template6-product-hero {
  padding: 170px 0 84px;
}

.template6-product-layout {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.template6-product-gallery {
  min-width: 0;
}

.template6-product-gallery__main,
.template6-product-gallery__thumb {
  border-radius: 26px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 22px rgba(78, 100, 128, 0.18);
}

.template6-product-gallery__main {
  margin: 0;
  aspect-ratio: 1.3 / 1;
  position: relative;
  cursor: zoom-in;
}

.template6-product-gallery__main img,
.template6-product-gallery__thumb,
.template6-related-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.template6-related-card__media img {
  object-fit: cover;
}

.template6-product-gallery__main img {
  background: #fff;
  transform-origin: var(--product-zoom-x, 50%) var(--product-zoom-y, 50%);
  transition: transform 0.2s ease;
  will-change: transform;
}

.template6-product-gallery__main.is-zooming img {
  transform: scale(1.7);
}

.template6-product-gallery__carousel {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 14px;
}

.template6-product-gallery__carousel.single-thumbnail {
  grid-template-columns: minmax(0, 1fr);
}

.template6-product-gallery__thumbs {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(29, 79, 147, 0.34) transparent;
}

.template6-product-gallery__thumbs::-webkit-scrollbar {
  height: 6px;
}

.template6-product-gallery__thumbs::-webkit-scrollbar-track {
  background: transparent;
}

.template6-product-gallery__thumbs::-webkit-scrollbar-thumb {
  background: rgba(29, 79, 147, 0.34);
  border-radius: 999px;
}

.template6-product-gallery__thumb {
  flex: 0 0 82px;
  width: 82px;
  height: 82px;
  min-width: 82px;
  margin: 0;
  padding: 0;
  border: 2px solid transparent;
  cursor: pointer;
  scroll-snap-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, outline-color 0.2s ease;
}

.template6-product-gallery__thumb:hover,
.template6-product-gallery__thumb:focus-visible,
.template6-product-gallery__thumb.active {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(29, 79, 147, 0.22);
}

.template6-product-gallery__thumb.active {
  border-color: rgba(29, 79, 147, 0.72);
}

.template6-product-gallery__thumb:focus-visible {
  outline: 3px solid rgba(29, 79, 147, 0.28);
  outline-offset: 2px;
}

.template6-product-gallery__nav {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(29, 79, 147, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #1d4f93;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(78, 100, 128, 0.14);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.template6-product-gallery__nav:hover:not(:disabled),
.template6-product-gallery__nav:focus-visible:not(:disabled) {
  background: #1d4f93;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(29, 79, 147, 0.24);
}

.template6-product-gallery__nav:disabled {
  opacity: 0.32;
  cursor: default;
  box-shadow: none;
}

.template6-product-gallery__carousel.single-thumbnail .template6-product-gallery__nav,
.template6-product-gallery__carousel:not(.has-thumbnail-overflow) .template6-product-gallery__nav {
  display: none;
}

.template6-product-gallery__carousel:not(.has-thumbnail-overflow) {
  grid-template-columns: minmax(0, 1fr);
}

.template6-product-gallery__carousel:not(.has-thumbnail-overflow) .template6-product-gallery__thumbs {
  overflow: visible;
}

.template6-product-gallery__carousel.single-thumbnail .template6-product-gallery__thumbs {
  justify-content: start;
  overflow: visible;
  padding-bottom: 0;
}

body.product-lightbox-open {
  overflow: hidden;
}

.product-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  grid-template-columns: minmax(42px, 6vw) minmax(0, 1fr) minmax(42px, 6vw);
  align-items: center;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 2rem);
  background: rgba(10, 19, 34, 0.9);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.product-lightbox.is-open {
  opacity: 1;
}

.product-lightbox-figure {
  grid-column: 2;
  margin: 0;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 0.85rem;
}

.product-lightbox-figure img {
  max-width: min(100%, 1180px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.product-lightbox-counter {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
}

.product-lightbox-close,
.product-lightbox-nav {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.product-lightbox-close:hover,
.product-lightbox-close:focus-visible,
.product-lightbox-nav:hover,
.product-lightbox-nav:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
  outline: none;
}

.product-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.7rem;
  line-height: 1;
}

.product-lightbox-nav {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
}

.product-lightbox-prev {
  grid-column: 1;
  justify-self: center;
}

.product-lightbox-next {
  grid-column: 3;
  justify-self: center;
}

.template6-product-content h1 {
  position: relative;
  margin: 0 0 18px;
  font-size: clamp(1.1rem, 2.7vw, 1.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.template6-product-content h1 span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.5rem 1.1rem 0.5rem;
  background: linear-gradient(135deg, #1d4f93 0%, #2a69b6 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(29, 79, 147, 0.18);
  border-radius:20px;
}

.template6-product-content h1 span::after {
  content: "";
  display: inline-block;
  width: 38px;
  height: 1px;
  margin-left: 0.7rem;
  background: rgba(255, 255, 255, 0.68);
}

.template6-product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.template6-product-meta span {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(29, 79, 147, 0.1);
  color: #1d4f93;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.template6-product-summary {
  margin: 0 0 22px;
  font-size: 1rem;
  line-height: 1.5;
  color: #495b72;
}

.template6-product-summary--rich > *:last-child {
  margin-bottom: 0;
}

.template6-product-bullets {
  margin: 0 0 28px;
  padding-left: 1.2rem;
  font-size: 0.98rem;
  line-height: 1.7;
}

.template6-product-bullets li + li {
  margin-top: 0.18rem;
}

.template6-product-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin: 0 0 32px;
}

.template6-product-specs div {
  padding: 14px 16px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 20px rgba(78, 100, 128, 0.1);
}

.template6-product-specs dt {
  margin: 0 0 6px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1d4f93;
}

.template6-product-specs dd {
  margin: 0;
  font-size: 0.96rem;
  color: #4d5b6d;
}

.template6-product-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.template6-product-cta,
.template6-product-backlink {
  text-decoration: none;
}

.template6-product-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.9rem 1.55rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #1d4f93 0%, #275da5 48%, #173f78 100%);
  box-shadow: 0 16px 28px rgba(29, 79, 147, 0.22);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.template6-product-cta::after {
  content: "\2192";
  margin-left: 0.8rem;
  font-size: 1.05rem;
  line-height: 1;
}

.template6-product-cta:hover,
.template6-product-cta:focus-visible {
  background: linear-gradient(135deg, #173f78 0%, #23518f 55%, #102f5d 100%);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 20px 34px rgba(23, 63, 120, 0.28);
}

.template6-product-backlink {
  color: #1d4f93;
  font-size: 0.92rem;
  font-weight: 600;
}

.template6-product-backlink:hover,
.template6-product-backlink:focus-visible {
  color: #173f78;
}

.template6-related-products {
  padding: 56px 0 86px;
  background: #fff;
}

.template6-related-products__header {
  margin-bottom: 34px;
  text-align: center;
}

.template6-related-products__header h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 500;
  text-transform: uppercase;
  color: #1d4f93;
}

.template6-related-products__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.template6-related-card {
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 22px rgba(78, 100, 128, 0.16);
}

.template6-related-card__link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.template6-related-card__link:focus-visible {
  outline: 3px solid rgba(29, 79, 147, 0.25);
  outline-offset: -3px;
}

.template6-related-card__media {
  height: 270px;
  background: #d8dfe7;
}

.template6-related-card__body {
  min-height: 152px;
  padding: 20px 18px 24px;
  text-align: center;
}

.template6-related-card__body h3 {
  margin: 0 0 10px;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.3;
  text-transform: uppercase;
  color: #55657c;
}

.template6-related-card__body p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #67768a;
}

@media (max-width: 991.98px) {
  .template6-product-shell {
    width: min(100% - 32px, 1200px);
  }

  .template6-product-hero {
    padding-top: 138px;
  }

  .template6-product-layout,
  .template6-related-products__grid {
    grid-template-columns: 1fr;
  }

  .template6-related-card__media {
    height: 240px;
  }
}

@media (max-width: 640px) {
  .template6-product-shell {
    width: calc(100% - 24px);
  }

  .template6-product-hero {
    padding: 122px 0 54px;
  }

  .template6-product-layout {
    gap: 24px;
  }

  .template6-product-specs {
    grid-template-columns: 1fr;
  }

  .template6-product-gallery__carousel {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 8px;
  }

  .template6-product-gallery__thumb {
    flex-basis: 70px;
    width: 70px;
    height: 70px;
    min-width: 70px;
    border-radius: 20px;
  }

  .template6-product-gallery__nav {
    width: 34px;
    height: 34px;
    font-size: 1.35rem;
  }

  .product-lightbox {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .product-lightbox-figure,
  .product-lightbox-prev,
  .product-lightbox-next {
    grid-column: 1;
  }

  .product-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
  }

  .product-lightbox-nav:hover,
  .product-lightbox-nav:focus-visible {
    transform: translateY(calc(-50% - 1px));
  }

  .product-lightbox-prev {
    left: 0.75rem;
  }

  .product-lightbox-next {
    right: 0.75rem;
  }

  .template6-product-content h1 span {
    width: 100%;
    justify-content: space-between;
  }

  .template6-product-actions {
    align-items: stretch;
  }

  .template6-product-cta {
    width: 100%;
  }

  .template6-related-products {
    padding: 44px 0 60px;
  }
}
