/* ============================================================
   JP MACHINERY — Products Page Styles
   Extends base site design language
   ============================================================ */

/* ===================== CONTACT SECTION — frosted deep navy ===================== */
.products-contact-section {
  background:
    radial-gradient(ellipse 80% 60% at 10% 30%,  rgba(27, 79, 216, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse 60% 70% at 90% 80%,  rgba(15, 40, 120, 0.45) 0%, transparent 65%),
    radial-gradient(ellipse 50% 50% at 55% 10%,  rgba(60, 100, 200, 0.18) 0%, transparent 55%),
    #0b1630 !important;
  backdrop-filter: blur(0px);
}

/* Contact section — white "Request a Quote" button */
.cta-button.cta-contact-quote {
  background: #ffffff;
  color: #0d0d0d;
  border: 1.5px solid #ffffff;
  border-radius: 10px;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.cta-button.cta-contact-quote:hover {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
}

/* ===================== PAGE HERO ===================== */
.products-hero {
  padding: 10rem 8vw 6rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.products-hero::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -80px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(27,79,216,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.products-hero-inner {
  max-width: 1350px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}

.products-hero-left {
  max-width: 680px;
}

.products-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.76rem;
  margin-bottom: 1.4rem;
}
.products-breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.products-breadcrumb a:hover { color: var(--accent-blue); }
.products-breadcrumb > span { color: #bbb; font-size: 0.7rem; }
.products-breadcrumb > span:last-child { color: var(--text-primary); font-weight: 500; font-size: 0.76rem; }

.products-hero-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent-blue);
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}

.products-hero-heading {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.6rem;
}

.products-hero-heading .accent-line {
  color: var(--accent-blue);
}

.products-hero-body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 520px;
}

.products-hero-stats {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  padding-bottom: 0.5rem;
}

.ph-stat {
  text-align: right;
}

.ph-stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.ph-stat-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.35rem;
}

/* ===================== FILTER BAR ===================== */
.filter-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 72px;
  z-index: 100;
}

.filter-bar-inner {
  max-width: 1350px;
  margin: 0 auto;
  padding: 0 8vw;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-bar-inner::-webkit-scrollbar { display: none; }

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.1rem 1.4rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
  position: relative;
  bottom: -1px;
}

.filter-btn:hover { color: var(--text-primary); }

.filter-btn.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--accent-blue-light);
  color: var(--accent-blue);
  border-radius: 100px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0;
}

.filter-btn.active .filter-count {
  background: var(--accent-blue);
  color: #fff;
}

/* ===================== PRODUCTS GRID ===================== */
.products-grid-section {
  padding: 5rem 8vw 6rem;
  background: var(--bg);
}

.products-grid-header {
  max-width: 1350px;
  margin: 0 auto 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.products-grid-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.products-grid-count strong {
  color: var(--text-primary);
  font-weight: 600;
}

.products-grid {
  max-width: 1350px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.product-card {
  background: var(--bg);
  border: 1px solid var(--border);
  margin: -1px 0 0 -1px;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
  position: relative;
  overflow: hidden;
}

.product-card[data-category]:not([data-category=""]).hidden {
  display: none;
}

.product-card:hover {
  background: var(--bg-subtle);
  z-index: 2;
  box-shadow: 0 8px 40px rgba(0,0,0,0.08);
}

.product-card-visual {
  aspect-ratio: 4/3;
  background: var(--bg-subtle);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pcv--1, .pcv--2, .pcv--3, .pcv--4, .pcv--5, .pcv--6 { background: #ffffff; }

.product-card-icon {
  width: 64px;
  height: 64px;
  opacity: 0.25;
  transition: opacity 0.3s, transform 0.4s;
}

.product-card:hover .product-card-icon {
  opacity: 0.4;
  transform: scale(1.08);
}

.product-card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  color: var(--text-secondary);
  padding: 0.3rem 0.7rem;
  border-radius: 2px;
}

.product-card-new {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--accent-blue);
  color: #fff;
  padding: 0.3rem 0.65rem;
  border-radius: 2px;
}

.product-card-info {
  padding: 1.6rem 1.8rem 1.8rem;
}

.product-card-model {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--accent-blue);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.product-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 0.8rem;
}

.product-card-desc {
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 1.4rem;
}

.product-card-specs {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}

.pc-spec {
  flex: 1;
}

.pc-spec-val {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.pc-spec-key {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.25rem;
}

.product-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s, gap 0.2s;
}

.product-card-cta svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.product-card:hover .product-card-cta {
  color: var(--accent-blue);
  gap: 0.7rem;
}

.product-card:hover .product-card-cta svg {
  transform: translateX(3px);
}

/* ===================== FEATURED PRODUCT ===================== */
.featured-section {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 7rem 8vw;
}

.featured-inner {
  max-width: 1350px;
  margin: 0 auto;
}

.featured-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.featured-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent-blue);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.featured-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.8vw, 2.8rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.featured-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  letter-spacing: 0.05em;
  font-style: italic;
}

.featured-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.featured-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

/* Image Gallery */
.featured-gallery {
  position: sticky;
  top: 120px;
}

.gallery-main {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #eef2ff 0%, #c7d2fe 100%);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  overflow: hidden;
  position: relative;
}

.gallery-main-icon {
  width: 120px;
  height: 120px;
  opacity: 0.18;
}

/* Prev/next overlaid on the main image, stepping through the same
   photo list the thumb strip holds. */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
  color: var(--text-primary);
  opacity: 0;
  transition: background 0.2s, transform 0.2s, opacity 0.2s;
}

.gallery-main:hover .gallery-arrow,
.gallery-arrow:focus-visible {
  opacity: 1;
}

.gallery-arrow:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-50%) scale(1.08);
}

.gallery-arrow svg {
  width: 18px;
  height: 18px;
}

.gallery-arrow-prev { left: 12px; }
.gallery-arrow-next { right: 12px; }

/* No hover to reveal them on touch, so keep them visible there. */
@media (hover: none) {
  .gallery-arrow {
    opacity: 1;
  }
}

/* Portrait/phone-only variant switch, sitting above the gallery image —
   hidden by default; shown in the <=900px and 901-1024px-portrait
   blocks below. On desktop/landscape the spec-card accordion right
   next to the image already serves this purpose. */
.gallery-variant-toggle {
  display: none;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.gallery-variant-btn {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.65);
  padding: 0.45rem 0.85rem;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.gallery-variant-btn.active {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
}

/* Eight real product shots stay on one row and scroll sideways —
   four fit the gallery width, the rest are swiped/scrolled to. */
.gallery-thumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.6rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 0.4rem;
  cursor: grab;
}

/* Thumbs keep the pointer cursor (they are still clickable), but the
   whole strip reads as grabbed once a drag starts. */
.gallery-thumbs.is-dragging,
.gallery-thumbs.is-dragging .gallery-thumb {
  cursor: grabbing;
}

.gallery-thumbs.is-dragging {
  scroll-behavior: auto;
  user-select: none;
}

/* Snapping only on touch. With a mouse the wheel drives this strip in
   small increments, and snap-back on every tick reads as fighting the
   user rather than helping. */
@media (hover: none) and (pointer: coarse) {
  .gallery-thumbs {
    scroll-snap-type: x proximity;
  }
}

.gallery-thumbs::-webkit-scrollbar {
  height: 5px;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 100px;
}

.gallery-thumbs::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.gallery-thumb {
  flex: 0 0 calc((100% - 3 * 0.6rem) / 4);
  scroll-snap-align: start;
  aspect-ratio: 1;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
  overflow: hidden;
}

.gallery-thumb.active,
.gallery-thumb:hover {
  border-color: var(--accent-blue);
  background: var(--accent-blue-light);
}

.gallery-thumb svg {
  width: 22px;
  height: 22px;
  opacity: 0.25;
}

.gallery-thumb.active svg,
.gallery-thumb:hover svg {
  opacity: 0.55;
}

/* Photo thumbs: white behind so the studio shots' own background
   blends with the tile instead of showing the subtle fill. */
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  display: block;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.gallery-thumb.active img,
.gallery-thumb:hover img {
  opacity: 1;
}

/* Product Details */
.featured-details {}

.featured-desc {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.featured-features {
  margin-bottom: 3rem;
}

.ff-title {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.ff-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  list-style: none;
}

.ff-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  font-size: 0.87rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.ff-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-blue);
  margin-top: 0.45rem;
}

/* Spec Accordions */
.spec-section {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.spec-section-title {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.spec-card {
  border: 1px solid var(--border);
  border-radius: 3px;
  margin-bottom: 0.5rem;
  overflow: hidden;
  transition: border-color 0.2s;
}

.spec-card:hover,
.spec-card.open {
  border-color: rgba(27,79,216,0.3);
}

.spec-card-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: 1rem;
  transition: background 0.2s;
}

.spec-card-trigger:hover,
.spec-card.open .spec-card-trigger {
  background: var(--bg-subtle);
}

.spec-trigger-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.spec-model-name {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}

.spec-model-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.spec-key-stat {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-blue);
  white-space: nowrap;
}

.spec-toggle-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s, background 0.2s, border-color 0.2s;
}

.spec-card.open .spec-toggle-icon {
  transform: rotate(45deg);
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

.spec-toggle-icon svg {
  width: 10px;
  height: 10px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.spec-card.open .spec-toggle-icon svg { color: #fff; }

.spec-card-body {
  display: none;
  padding: 0 1.2rem 1.2rem;
}

.spec-card.open .spec-card-body { display: block; }

.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table tr {
  border-bottom: 1px solid var(--border);
}

.spec-table tr:last-child { border-bottom: none; }

.spec-table td {
  padding: 0.55rem 0;
  font-size: 0.8rem;
  line-height: 1.5;
}

.spec-table td:first-child {
  color: var(--text-muted);
  width: 50%;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.spec-table td:last-child {
  color: var(--text-primary);
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 0.77rem;
}

/* ===================== MORE SYSTEMS — auto-scroll marquee ===================== */
.more-systems-section {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 5rem 0;
  overflow: hidden;
}

.more-systems-header {
  padding: 0 8vw 4rem;
}

.more-systems-header-inner {
  max-width: 1350px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.more-systems-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent-blue);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.more-systems-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.5vw, 2.6rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.more-systems-sub {
  font-size: 0.87rem;
  color: var(--text-muted);
  max-width: 360px;
  line-height: 1.65;
  padding-bottom: 0.25rem;
}

/* Track wrapper — clips overflow and fades edges */
.more-systems-track-wrapper {
  overflow: hidden;
  position: relative;
}

.more-systems-track-wrapper::before,
.more-systems-track-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 6vw;
  z-index: 4;
  pointer-events: none;
}

.more-systems-track-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--bg) 0%, transparent 100%);
}

.more-systems-track-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--bg) 0%, transparent 100%);
}

/* Arrow buttons */
.ms-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.ms-arrow:hover {
  background: var(--bg-subtle);
  border-color: rgba(27,79,216,0.3);
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.ms-arrow-prev {
  left: 1.2rem;
  transform: translateY(-50%);
}

.ms-arrow-next {
  right: 1.2rem;
  transform: translateY(-50%);
}

.ms-arrow svg {
  width: 16px;
  height: 16px;
  color: var(--text-primary);
}

/* Scroll area — touchable, hides scrollbar */
.ms-scroll-area {
  overflow-x: scroll;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  padding: 0.5rem 0 2rem;
}

.ms-scroll-area::-webkit-scrollbar { display: none; }
.ms-scroll-area:active { cursor: grabbing; }

/* Scrolling track */
.more-systems-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  padding: 0 8vw;
}

/* Individual card */
.ms-card {
  flex-shrink: 0;
  width: 320px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  transition: background 0.25s, box-shadow 0.25s, border-color 0.25s;
  cursor: default;
}

.ms-card:hover {
  background: var(--bg-subtle);
  border-color: rgba(27,79,216,0.2);
  box-shadow: 0 6px 32px rgba(0,0,0,0.06);
}

/* Visual block */
.ms-card-visual {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.msv--a { background: linear-gradient(135deg, #eef2ff 0%, #c7d2fe 100%); }
.msv--b { background: linear-gradient(135deg, #f0fdf4 0%, #bbf7d0 100%); }
.msv--c { background: linear-gradient(135deg, #faf5ff 0%, #ddd6fe 100%); }
.msv--d { background: linear-gradient(135deg, #f0f9ff 0%, #bae6fd 100%); }
.msv--e { background: linear-gradient(135deg, #fff1f2 0%, #fecdd3 100%); }
.msv--f { background: linear-gradient(135deg, #fffbeb 0%, #fde68a 100%); }
.msv--g { background: linear-gradient(135deg, #f0fdf4 0%, #a7f3d0 100%); }
.msv--h { background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); }
.msv--i { background: #ffffff; }

.ms-card-icon {
  width: 52px;
  height: 52px;
  opacity: 0.22;
  transition: opacity 0.3s, transform 0.3s;
}

.ms-card:hover .ms-card-icon {
  opacity: 0.38;
  transform: scale(1.06);
}

/* Info block */
.ms-card-info {
  padding: 1.3rem 1.5rem 1.5rem;
}

.ms-card-model {
  display: block;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--accent-blue);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.ms-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 0.65rem;
}

.ms-card-desc {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
}

.ms-card-specs {
  display: flex;
  gap: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-bottom: 1.1rem;
}

.ms-spec { flex: 1; }

.ms-spec-val {
  display: block;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.ms-spec-key {
  display: block;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.2rem;
}

.ms-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s, gap 0.2s;
}

.ms-card-cta svg {
  width: 12px;
  height: 12px;
  transition: transform 0.2s;
}

.ms-card:hover .ms-card-cta {
  color: var(--accent-blue);
  gap: 0.65rem;
}

.ms-card:hover .ms-card-cta svg {
  transform: translateX(3px);
}

/* Responsive */
@media (max-width: 768px) {
  .more-systems-section {
    padding: 4rem 0;
  }

  .more-systems-header {
    padding: 0 5vw 3rem;
  }

  .more-systems-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .more-systems-sub {
    max-width: 100%;
  }

  .ms-card {
    width: 272px;
  }

  .more-systems-track-wrapper::before,
  .more-systems-track-wrapper::after {
    width: 3vw;
  }

  .ms-arrow {
    width: 36px;
    height: 36px;
  }

  .ms-arrow svg {
    width: 14px;
    height: 14px;
  }

  .ms-arrow-prev { left: 0.6rem; }
  .ms-arrow-next { right: 0.6rem; }
  .ms-arrow { display: none; }
}

/* ===================== PRODUCT CTA / FOOTER ===================== */
/* CTA section reuses .process-section from style.css — no extra CSS needed. */
/* Footer reuses .site-footer from style.css — no extra CSS needed. */

/* ===================== ANIMATIONS ===================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp 0.55s cubic-bezier(0.22,1,0.36,1) both;
}

.anim-delay-1 { animation-delay: 0.08s; }
.anim-delay-2 { animation-delay: 0.16s; }
.anim-delay-3 { animation-delay: 0.24s; }
.anim-delay-4 { animation-delay: 0.32s; }

/* ===================== PRODUCT DETAIL MODAL ===================== */
.prod-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  backdrop-filter: blur(4px);
}

.prod-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.prod-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.97);
  width: min(860px, 92vw);
  max-height: 88vh;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow-y: auto;
  z-index: 2001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}

.prod-modal-backdrop.open .prod-modal {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.prod-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 2rem 2rem 1.5rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.prod-modal-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}

.prod-modal-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.prod-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.prod-modal-close:hover {
  background: var(--bg-subtle);
  border-color: rgba(0,0,0,0.15);
}

.prod-modal-close svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.prod-modal-body {
  padding: 2rem;
}

/* ===================== RESPONSIVE ===================== */

/* ── Tablet (≤900px) — aligned with the site-wide mobile/desktop breakpoint
   used by app.js, so iPad landscape (1024-1194px) doesn't fall into a gap
   where some components think they're desktop and others think mobile ── */
@media (max-width: 900px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* The category badge (top:1rem;left:1rem;) sat right on top of the
     product photo with no breathing room at the narrower iPad/phone
     card widths — .product-card-visual's aspect-ratio:4/3 was too
     short there. Taller ratio gives the badge some clear space above
     the image content instead of overlapping it. Desktop (3-column,
     wider cards) is untouched. */
  .product-card-visual {
    aspect-ratio: 4 / 3.6;
  }

  /* single screw extruder new.png / pvc compounding new.png / Extruder
     line new.png are all exactly 1448x1086 (4:3 native) — the taller
     4/3.6 card box above is narrower than that, so object-fit:cover
     (set inline in the markup) was cropping ~8% off each side to fill
     it, cutting into the machines. contain shows the full photo
     instead; !important is needed to beat the inline style. */
  .product-card[data-product="jp-se"] .product-card-visual img,
  .product-card[data-product="jp-bf"] .product-card-visual img,
  .product-card[data-product="jp-wc"] .product-card-visual img {
    object-fit: contain !important;
    background: #ffffff;
  }

  /* The spec-card accordion (where variants are normally switched) is
     stacked far below the image at this width — a quick toggle
     overlaid on the image itself saves the scroll. */
  .gallery-variant-toggle {
    display: flex;
  }

  .featured-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .featured-gallery {
    position: static;
  }

  .featured-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .featured-actions {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ── iPad Pro 12.9" portrait (1024px) — same "gap" every other section on
   this site has needed patching for: a bare max-width:900px rule doesn't
   catch it (900 < 1024), so this width was still getting the desktop
   3-column grid and the un-widened badge spacing above, even though it's
   an iPad in portrait. Same fixes as the <=900px block, scoped to this
   specific range so landscape (1024-1400px) and true desktop windows
   around 1024px are untouched. ── */
@media (min-width: 901px) and (max-width: 1024px) and (orientation: portrait) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-card-visual {
    aspect-ratio: 4 / 3.6;
  }

  .product-card[data-product="jp-se"] .product-card-visual img,
  .product-card[data-product="jp-bf"] .product-card-visual img,
  .product-card[data-product="jp-wc"] .product-card-visual img {
    object-fit: contain !important;
    background: #ffffff;
  }

  .gallery-variant-toggle {
    display: flex;
  }

  .featured-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .featured-actions {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }

  /* Missed carrying this over from the <=900px block when this range
     was added — .featured-layout was still using the desktop 1fr/1fr
     sticky-gallery grid at this width, which looked broken: a
     half-width column is much narrower than an actual desktop window,
     and the short sticky gallery left a large empty gap next to the
     much taller text. Stacking (gallery full-width above, details
     below, same as <=900px) both fixes the broken layout and makes
     the image noticeably bigger since it now spans the full width
     instead of half. */
  .featured-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .featured-gallery {
    position: static;
  }
}

/* ── iPad landscape — Featured section only ─────────────────────
   Reverted from the single-column stack tried first (didn't look
   good) — this keeps the 2-column layout but rebalances what's in
   each column instead. The imbalance was .featured-gallery (short:
   image + one row of thumbnails) sitting sticky next to
   .featured-details, which is much taller (description + features
   list + multi-variant spec accordion) — once the gallery finished
   scrolling within its own track it stuck near the top while details
   kept going, leaving a large empty gap.

   js/... in products.html's own inline script moves .featured-features
   from .featured-details into .featured-gallery (right after the
   thumbnails) for this range specifically, so the left column becomes
   image+features and the right column becomes description+model
   variants — much closer in height, and no CSS grid-row alignment
   trickery needed since it's a real DOM move, so each column still
   flows independently. Gated to touch devices only so real desktop
   browser windows in this width range are untouched. */
@media (min-width: 1024px) and (max-width: 1400px) and (orientation: landscape) {
  html.is-touch-device .featured-gallery {
    position: static;
  }

  /* .featured-features has no margin-top of its own (on desktop it
     always follows .featured-desc, whose margin-bottom already
     separates them) — once moved under the thumbnails here it butted
     right up against them with no gap. */
  html.is-touch-device .featured-gallery .featured-features {
    margin-top: 2rem;
  }
}

/* ── Mobile (≤768px) ── */
@media (max-width: 768px) {
  .products-hero {
    padding: 7rem 6vw 4rem;
  }

  .products-hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }

  .products-hero-stats {
    flex-wrap: nowrap;
    gap: 0;
    justify-content: space-between;
    width: 100%;
  }

  .ph-stat {
    text-align: center;
  }

  .ph-stat-num {
    font-size: 1.5rem;
  }

  .ph-stat-label {
    font-size: 0.6rem;
  }

  .products-grid-section {
    padding: 3.5rem 5vw 4rem;
    overflow-x: hidden;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
  }

  .featured-section {
    padding: 4rem 5vw;
    overflow-x: hidden;
  }

  .featured-header {
    margin-bottom: 3rem;
  }

  .featured-actions {
    flex-direction: column;
    width: 100%;
  }

  .featured-actions .cta-button {
    width: 100%;
    text-align: center;
    justify-content: center;
    display: block;
    box-sizing: border-box;
  }

  .gallery-thumbs {
    gap: 0.4rem;
  }

  /* Half a thumb left peeking so the row reads as scrollable on touch. */
  .gallery-thumb {
    min-width: 0;
    flex-basis: calc((100% - 3 * 0.4rem) / 3.5);
  }

  .spec-section {
    overflow-x: hidden;
  }

  .spec-table {
    table-layout: fixed;
    width: 100%;
  }

  .spec-table td {
    word-break: break-word;
    white-space: normal;
  }

  .spec-table td:first-child {
    width: 45%;
  }

  .products-contact-section {
    padding: 5rem 5vw !important;
  }

  .filter-bar-inner {
    padding: 0 5vw;
  }

  .filter-bar {
    top: 60px;
  }
}

/* ── Small mobile (≤480px) ── */
@media (max-width: 480px) {
  .products-hero-heading {
    font-size: clamp(1.8rem, 8vw, 2.1rem);
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-card-specs {
    gap: 0.8rem;
  }

  .pc-spec-val {
    font-size: 0.88rem;
  }

  .featured-heading {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  .gallery-thumbs {
    gap: 0.3rem;
  }

  .gallery-thumb {
    flex-basis: calc((100% - 3 * 0.3rem) / 3.5);
  }

  .gallery-thumb svg {
    width: 16px;
    height: 16px;
  }

  .spec-model-name {
    font-size: 0.72rem;
  }

  .spec-model-sub {
    font-size: 0.65rem;
  }

  .spec-key-stat {
    font-size: 0.68rem;
  }

  .spec-card-trigger {
    padding: 0.85rem 0.9rem;
  }

  .ff-item {
    font-size: 0.82rem;
  }

  .products-contact-section {
    padding: 4rem 5vw !important;
  }
}

/* ═══════════════════════════════════════════════════
   VIDEO SHOWCASE — horizontal scrolling video row
   ═══════════════════════════════════════════════════ */
.video-section {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 5rem 0;
  overflow: hidden;
}
.video-header { padding: 0 8vw; margin-bottom: 2.4rem; }
.video-header-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.video-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 0.8rem;
}
.video-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.5vw, 2.6rem);
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.1;
}
.video-sub {
  font-size: 0.87rem;
  color: var(--text-muted);
  max-width: 360px;
  line-height: 1.65;
}
.video-track-wrapper { position: relative; padding: 0 8vw; }
.video-arrow {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  z-index: 5;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: background 0.2s ease, color 0.2s ease;
}
.video-arrow svg { width: 22px; height: 22px; }
.video-arrow-prev { left: 3vw; }
.video-arrow-next { right: 3vw; }
.video-arrow:hover { background: var(--accent-blue); color: #fff; }
.video-scroll {
  display: flex;
  gap: 1.4rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.4rem 0 1.4rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.video-scroll::-webkit-scrollbar { display: none; }
.video-card {
  flex: 0 0 auto;
  width: calc((100% - 4.2rem) / 4);
  scroll-snap-align: start;
}
.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #0d0d0d 0%, #26324a 100%);
  cursor: pointer;
}
.video-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.video-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  transition: background 0.3s ease;
}
.video-card:hover .video-thumb::after { background: rgba(0, 0, 0, 0.04); }
.video-thumb iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 3; }
.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 58px;
  height: 58px;
  border: none;
  border-radius: 50%;
  background: #FF0000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.video-play::before {
  content: "";
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
  margin-left: 3px;
}
.video-card:hover .video-play { transform: translate(-50%, -50%) scale(1.08); }
.video-card-title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0.9rem 0 0;
  line-height: 1.35;
}
@media (max-width: 1000px) {
  .video-track-wrapper { padding: 0 6vw; }
  .video-card { width: calc((100% - 1.4rem) / 2); }
}
@media (max-width: 700px) {
  .video-arrow { display: none; }
  .video-track-wrapper { padding: 0 5vw; }
  .video-card { width: 86%; }
  .video-header { padding: 0 5vw; }
}

/* ── Video lightbox (large player overlay) ── */
.video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vw;
  background: rgba(13, 13, 13, 0.9);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.video-lightbox.active { opacity: 1; visibility: visible; pointer-events: auto; }
.video-lightbox-frame {
  position: relative;
  width: 100%;
  max-width: 1080px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  transform: scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.video-lightbox.active .video-lightbox-frame { transform: scale(1); }
.video-lightbox-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.video-lightbox-close:hover { background: rgba(255, 255, 255, 0.24); transform: rotate(90deg); }
.video-lightbox-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.video-lightbox-close svg { width: 22px; height: 22px; }
@media (max-width: 600px) {
  .video-lightbox { padding: 16px; }
  .video-lightbox-close { top: 12px; right: 14px; }
}
