/* ==========================================================================
   Pennine Marketplace - Product landing page
   Loads after style.css and reuses its variables, buttons, slider,
   testimonials, FAQ and footer styles.
   ========================================================================== */

/* Shared bits used only here
   ========================================================================== */

.tag-round {
  border-radius: var(--radius);
}

.tag-small {
  padding: 10px 20px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 17px;
}

.btn-white {
  font-weight: 600;
  color: var(--black);
  background-color: var(--white);
  border: 1px solid var(--white);
}

.btn-white:hover,
.btn-white:focus-visible {
  color: var(--white);
  background-color: var(--black);
  border-color: var(--white);
}

/* Product hero
   ========================================================================== */

.product-hero {
  padding: 80px 0;
  color: var(--white);
  background-color: var(--black);
}

.product-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 629px) minmax(0, 1fr);
  gap: 30px;
  align-items: center;
}

.gallery-main {
  overflow: hidden;
  aspect-ratio: 628 / 353;
  background-color: #111;
}

.gallery-main img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.25s ease;
}

.gallery-main img.is-fading {
  opacity: 0;
}

.gallery-thumbs {
  display: flex;
  gap: 30px;
  margin-top: 30px;
}

.gallery-thumb {
  flex: 0 1 127px;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 127 / 76;
  background: transparent;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  opacity: 0.85;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.gallery-thumb:hover,
.gallery-thumb:focus-visible {
  opacity: 1;
  border-color: var(--white);
}

.gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-summary .tag {
  margin-bottom: 20px;
  line-height: 22px;
}

.product-name {
  margin-bottom: 12px;
  font-size: clamp(36px, 3.6vw, 56px);
  font-weight: 400;
  line-height: 1.14;
}

.product-name strong {
  font-weight: 600;
}

.product-name-accent {
  font-family: var(--font-accent);
}

.product-intro {
  margin-bottom: 20px;
  font-size: 18px;
  line-height: 26px;
}

.price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 24px;
  line-height: 32px;
}

.price-old {
  color: rgba(255, 255, 255, 0.5);
}

.price-new {
  margin-left: -2px;
  font-weight: 600;
}

.discount {
  padding: 2px 8px;
  font-size: 14px;
  line-height: 22px;
  color: var(--black);
  background-color: var(--white);
  border-radius: var(--radius-sm);
}

.live-viewers {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 12px 0 20px;
  font-size: 18px;
  line-height: 26px;
  color: rgba(255, 255, 255, 0.8);
}

.live-dot {
  position: relative;
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
}

.live-dot::after {
  position: absolute;
  inset: 0;
  content: "";
  background-color: inherit;
  border-radius: inherit;
  animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
  from {
    opacity: 0.7;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(2.4);
  }
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 0;
  list-style: none;
  font-size: 18px;
  line-height: 26px;
}

.product-meta li {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* At a glance
   ========================================================================== */

.glance .section-title {
  margin-bottom: 40px;
}

.glance-grid {
  display: grid;
  grid-template-columns: minmax(0, 583fr) minmax(0, 827fr);
  gap: 30px;
}

.glance-card {
  padding: 20px;
  background-color: var(--gray-bg);
  border-radius: var(--radius-lg);
}

.integration-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  grid-column: 2;
  grid-row: 1 / span 2;
}

.feature-card {
  grid-column: 1 / -1;
  padding: 25px 35px;
}

.glance-head {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.icon-box {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background-color: var(--white);
  border-radius: var(--radius);
}

.glance-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 0;
  list-style: none;
}

.chip {
  padding: 6px 20px;
  font-size: 18px;
  font-weight: 500;
  line-height: 26px;
  background-color: var(--white);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
}

.integration-list {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.integration-lines {
  position: absolute;
  top: 15px;
  left: 3.4%;
  width: 86.5%;
  height: 72px;
  pointer-events: none;
}

.integration-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  min-width: 92px;
}

.integration-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  background-color: var(--white);
  border-radius: var(--radius);
  transition: transform 0.2s ease;
}

.integration-logo img {
  width: 70px;
  height: 70px;
  border-radius: 8px;
}

.integration-item:hover .integration-logo {
  transform: translateY(-3px);
}

.integration-name {
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
}

/* Split content rows
   ========================================================================== */

.split {
  display: grid;
  grid-template-columns: minmax(0, 819fr) minmax(0, 589fr);
  gap: 30px;
  align-items: center;
}

.split-media-first {
  grid-template-columns: minmax(0, 589fr) minmax(0, 819fr);
}

.overview .split-media-first {
  grid-template-columns: minmax(0, 628fr) minmax(0, 782fr);
}

.split .section-title {
  margin-bottom: 12px;
  line-height: 48px;
}

.split-text {
  margin-bottom: 20px;
  font-size: 18px;
  line-height: 26px;
}

.overview {
  color: var(--white);
  background-color: var(--black);
}

.overview .section-title {
  margin-bottom: 20px;
}

.overview .split-text:last-of-type {
  margin-bottom: 20px;
}

.video-thumb-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 628 / 353;
}

.video-thumb-link > img:first-child {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumb-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease;
}

.video-thumb-link:hover .video-thumb-play {
  transform: translate(-50%, -50%) scale(1.1);
}

.point-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 22px;
  font-size: 18px;
  line-height: 26px;
}

.point-list-tight {
  line-height: 24px;
}

.point-list li::marker {
  font-size: 12px;
}

.mockup-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  aspect-ratio: 589 / 420;
  background-color: var(--gray-bg);
  border-radius: var(--radius-lg);
}

.mockup-card-white {
  background-color: var(--white);
}

.mockup-card img {
  width: 100%;
  height: auto;
}

/* Steps
   ========================================================================== */

.steps .section-head {
  margin-bottom: 40px;
}

.steps .section-title {
  line-height: 48px;
}

.step-track {
  position: relative;
}

.step-line {
  position: absolute;
  top: 39px;
  right: 8px;
  left: 0;
  height: 3px;
  background-color: #808080;
}

/* end cap at the right of the line */
.step-line::after {
  position: absolute;
  top: -16px;
  right: -2px;
  width: 3px;
  height: 35px;
  content: "";
  background-color: #808080;
}

.step-line-fill {
  display: block;
  width: 0;
  height: 100%;
  background-color: var(--black);
  transition: width 1.2s ease;
}

/* Length comes from the steps marked "completed" (set by landing.js) */
.step-track.is-visible .step-line-fill {
  width: var(--step-fill, 0);
}

/* All steps completed: light up the end cap once the fill reaches it */
.step-track.is-visible.is-complete .step-line::after {
  background-color: var(--black);
  transition: background-color 0.2s ease 1.1s;
}

.is-dark .step-track.is-visible.is-complete .step-line::after {
  background-color: var(--white);
}

/* one column per step, whatever the number of steps */
.step-list {
  position: relative;
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 30px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  background-color: #808080;
  border-radius: var(--radius);
}

.step-item.is-done .step-icon {
  background-color: var(--black);
}

.step-count {
  display: block;
  margin-bottom: 12px;
  font-size: 18px;
  line-height: 26px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.step-title {
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

.step-text {
  font-size: 18px;
  line-height: 26px;
}

/* Testimonials (plain variant)
   ========================================================================== */

.testimonials-plain .testimonial-wrap {
  padding: 0;
  background-color: transparent;
}

.testimonials-plain .testimonial-card {
  background-color: var(--gray-bg);
  border: 1px solid var(--border);
}

.testimonials-plain .avatar {
  background-color: var(--white);
  border-radius: 50%;
}

.testimonials-plain .testimonial-nav {
  margin-top: 30px;
  background-color: transparent;
}

/* CTA + related
   ========================================================================== */

.cta-compact {
  padding: 80px 0;
}

.cta-compact .section-title {
  margin-bottom: 30px;
}

.cta-compact .btn {
  min-width: 177px;
}

.related .section-title {
  margin-bottom: 40px;
}

.related .product-slider {
  margin-bottom: 0;
}

/* Responsive
   ========================================================================== */

@media (max-width: 1199.98px) {
  .glance-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .integration-card,
  .feature-card {
    grid-column: auto;
    grid-row: auto;
  }

  .step-list {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 40px;
  }

  .step-line {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .product-hero {
    padding: 64px 0;
  }

  .product-hero-grid,
  .split,
  .split-media-first,
  .overview .split-media-first {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  /* text first on small screens, image below */
  .split-media-first > :first-child {
    order: 2;
  }

  .split .section-title,
  .steps .section-title {
    line-height: 1.2;
  }
}

@media (max-width: 767.98px) {
  .gallery-thumbs {
    gap: 12px;
    margin-top: 12px;
  }

  .product-intro,
  .live-viewers,
  .product-meta,
  .split-text,
  .point-list,
  .step-text {
    font-size: 16px;
  }

  .live-viewers {
    gap: 12px;
  }

  .glance-card,
  .feature-card {
    padding: 20px;
  }

  .chip-list {
    gap: 10px;
  }

  .chip {
    padding: 4px 14px;
    font-size: 15px;
  }

  .integration-list {
    flex-wrap: wrap;
    justify-content: space-around;
    row-gap: 24px;
  }

  .integration-lines {
    display: none;
  }

  .mockup-card {
    padding: 16px;
  }

  .step-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .step-icon {
    width: 64px;
    height: 64px;
  }

  .step-icon img {
    width: 36px;
    height: 36px;
  }

  .cta-compact {
    padding: 64px 0;
  }
}
