/* ============================================
   components.css — Reusable UI components
   ============================================ */

/* ── BUTTONS ── */

/* Primary: blue, for main CTAs */
.btn-primary {
  background: var(--accent-blue);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 9px 22px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s, transform 0.15s;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--accent-blue-hover); transform: translateY(-1px); }

/* Dark: black, for accessories / secondary CTAs */
.btn-dark {
  display: inline-block;
  padding: 10px 26px;
  background: var(--text-primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}
.btn-dark:hover { background: #3a3a3c; transform: translateY(-1px); }

/* Card blue: min-width, inside product cards */
.btn-card-blue {
  display: inline-block;
  align-self: center; /* center in the flex column without stretching */
  padding: 9px 22px;
  background: var(--accent-blue);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}
.btn-card-blue:hover { background: var(--accent-blue-hover); transform: translateY(-1px); }

/* ── IMAGE PLACEHOLDER ── */
.img-placeholder {
  width: 100%;
  background: #e8e8ed;
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-placeholder svg { opacity: 0.25; }

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(245,245,247,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 0 48px;
}

/* Top row: logos — 40px tall total, 8px padding top, images ~26px */
.nav-logo-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  height: 40px;
  padding-top: 8px;
}
.nav-logo-img { display: block; width: auto; }
.nav-logo-row a:first-child .nav-logo-img { height: 23px; }
.nav-logo-row a:last-child .nav-logo-img  { height: 26px; }

/* Bottom row: links */
.nav-links-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 29px;
  padding-bottom: 5px;
}
/* Contact info — left side of nav links row */
.nav-contacts { display: flex; align-items: center; list-style: none; }
.nav-contacts li {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-secondary);
}
.nav-contacts li + li::before {
  content: '|';
  color: var(--border);
  padding: 0 8px;
}
.nav-contacts svg { flex-shrink: 0; }
.nav-contacts a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-contacts a:hover { color: var(--text-primary); }

/* Quick links — right side of nav links row */
.nav-quicklinks { display: flex; align-items: center; list-style: none; }
.nav-quicklinks li { display: flex; align-items: center; }
/* | separator between items */
.nav-quicklinks li + li::before {
  content: '|';
  color: var(--border);
  padding: 0 8px;
}
.nav-quicklinks a {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-quicklinks a:hover  { color: var(--text-primary); }
.nav-quicklinks a.active { color: var(--text-primary); font-weight: 600; }

/* Hide quick links when both sides start crowding each other */
@media (max-width: 850px) {
  .nav-quicklinks { display: none; }
}

/* Breadcrumb row — darker third row below contacts/quicklinks */
.nav-breadcrumb {
  background: rgba(0,0,0,0.04);
  /* Bleed to the full nav width, bypassing the parent's 48px padding */
  margin: 0 -48px;
  padding: 0 48px;
  height: 27px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Share buttons — right side of breadcrumb row */
.breadcrumb-share {
  display: flex;
  align-items: center;
  gap: 2px;
}
.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.share-btn--linkedin:hover { color: #0077B5; }
.share-btn--facebook:hover { color: #1877F2; }
.share-btn--whatsapp:hover { color: #25D366; }
.share-btn--email:hover    { color: var(--accent-blue); }
.breadcrumb {
  display: flex;
  align-items: center;
  list-style: none;
}
.breadcrumb li {
  display: flex;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
/* Chevron separator between items */
.breadcrumb li + li::before {
  content: '›';
  padding: 0 7px;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
}
.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}
.breadcrumb a:hover { color: var(--text-primary); }
/* Current page — non-link, slightly emphasized */
.breadcrumb li[aria-current="page"] {
  color: var(--text-primary);
  font-weight: 500;
}

@media (max-width: 768px) {
  nav { padding: 3px 10px 0 10px; }
  /* Match breadcrumb bleed to the reduced nav padding */
  .nav-breadcrumb { margin: 0 -10px; padding: 0 10px; }
  .card-image { margin-bottom: 0; }
  /* Vertical alignment tweak for mobile nav padding */
  .nav-logo-row a:first-child .nav-logo-img { padding-top: 2px; }
  /* Filter tabs: tighter pill padding on narrow screens */
  .filter-tab { padding: 7px 8px; }
  /* btn-primary goes full-width on mobile, except where overridden below */
  .btn-primary { width: 100%; text-align: center; }
  /* "Válassz" button: auto width, pinned right */
  .filter-row .btn-primary { width: auto; margin-left: auto; }
  /* CTA buttons: auto width */
  .cta-content .btn-primary { width: auto; }
  /* Specs filter row button: never stretch */
  .specs-filter-row .btn-primary { width: auto; }
  /* Selector search button: never stretch */
  .filter-actions .btn-primary { width: auto; }
  /* Stack glyph above content on mobile */
  .cta-body { flex-direction: column; }
  .cta-glyph { width: 100%; padding: 28px 0; }
  .cta-glyph svg { width: 48px; height: 48px; }
}


/* Reduce logo sizes only when the viewport is too narrow to fit them */
@media (max-width: 400px) {
  .nav-logo-row a:first-child .nav-logo-img { height: 19px; }
  .nav-logo-row a:last-child .nav-logo-img  { height: 22px; }
  .nav-contacts li { font-size: 0.8rem; }
}
@media (max-width: 360px) {
  .nav-contacts li { font-size: 0.75rem; }
  .nav-contacts li + li::before { padding: 0 3px; }
}

/* ── FOOTER — sitemap layout ── */
footer {
  background: var(--bg-light);
  border-top: 1px solid var(--border);
  padding: 0;
  font-size: 1rem;
  color: var(--text-muted);
}
.footer-sitemap {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0 24px;
}
.footer-col { padding: 0 8px; }
.footer-col__heading {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  margin-top: 24px;
  display: block;
}
.footer-col__heading:first-child { margin-top: 0; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { line-height: 1; }
.footer-col a {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-decoration: none;
  display: block;
  padding: 5px 0;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--accent-blue); }
.footer-bottom { padding: 18px 0; }
.footer-bottom__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom__copy { font-size: 0.75rem; color: var(--text-muted); }
.footer-bottom__links { display: flex; gap: 20px; list-style: none; }
.footer-bottom__links a {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-bottom__links a:hover { color: var(--text-primary); }
@media (max-width: 768px) {
  .nav-contacts svg { display: none; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom__inner { flex-direction: column; align-items: flex-start; }
  .cta-glyph { display: none !important; }
}

/* ── SECTION HEADER ── */
.section-header { margin-bottom: 44px; }
@media (max-width: 1024px) { .section-header { margin-bottom: 18px; } }
/* Inline variant: title + action link side by side */
.section-header--inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  column-gap: 24px;
  row-gap: 8px;
  flex-wrap: wrap;
}
.section-header--inline h2 { margin-bottom: 0; }
.section-header h2 {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.section-header p {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-primary);
}

/* ── FILTER ROW ── */
.filter-row {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 40px; gap: 12px;
  flex-wrap: wrap;
}
.filter-tabs {
  display: flex; gap: 2px;
  background: #e0e0e5; border-radius: 999px; padding: 3px;
  flex-wrap: wrap;
}
.filter-tab {
  padding: 7px 14px; border-radius: 999px; border: none;
  background: transparent; font-family: 'Inter', sans-serif;
  font-size: 0.8125rem; font-weight: 500;
  color: var(--text-secondary); cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.filter-tab:hover  { color: var(--text-primary); }
.filter-tab.active { background: var(--text-primary); color: #fff; font-weight: 600; }

/* Arrow nav buttons injected by JS — hidden on desktop */
.filter-arrow { display: none; }

/* Carousel wrapper injected by JS — invisible on desktop (children keep their normal layout) */
.filter-carousel-wrap { display: contents; }

/* ── SLIDESHOW IMAGE ────────────────────────────────────────────────────
   object-fit options:
     cover   → fills frame, may crop edges        ← recommended
     contain → full image visible, may letterbox  ← use for white-bg images

   Aspect ratio (on .card-image in components.css):
     4/3   current (classic)
     3/2   slightly wider
     16/9  cinematic
     1/1   square                                                          */
.slideshow-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain; /* options: cover or contain*/
  border-radius: 12px;
  opacity: 0; /* JS fades this to 1 after src is assigned */
}

/* ── PRODUCT CARD ── */
.product-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.product-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
}
.card-image {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
}
.card-image .img-placeholder { height: 100%; border-radius: 12px; background: #f0f0f5; }
.card-badge-new {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-orange);
  margin-bottom: 5px;
}
.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.card-type-tag {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  z-index: 1;
}
.tag-scara  { background: var(--tag-scara-bg);  color: var(--tag-scara-color); }
.tag-6axis  { background: var(--tag-6axis-bg);  color: var(--tag-6axis-color); }
.tag-collab { background: var(--tag-collab-bg); color: var(--tag-collab-color); }
.card-models-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
.card-models-label {
  font-size: 1rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.card-models {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-start;
}
.model-pill {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: #fafafa;
  text-decoration: none; /* safe for both <span> and <a> */
}

/* Model pill colors follow the product category — fine-tune per category here */
.product-card[data-category="scara"] .model-pill {
  background: var(--tag-scara-bg);
  color: var(--tag-scara-color);
  border-color: var(--tag-scara-bg);
}
.product-card[data-category="6axis"] .model-pill {
  background: var(--tag-6axis-bg);
  color: var(--tag-6axis-color);
  border-color: var(--tag-6axis-bg);
}
.product-card[data-category="collaborative"] .model-pill {
  background: var(--tag-collab-bg);
  color: var(--tag-collab-color);
  border-color: var(--tag-collab-bg);
}

/* "Elérhető modellek" label color follows the product category */
.product-card[data-category="scara"]         .card-models-label { color: var(--tag-scara-color); }
.product-card[data-category="6axis"]         .card-models-label { color: var(--tag-6axis-color); }
.product-card[data-category="collaborative"] .card-models-label { color: var(--tag-collab-color); }
.card-desc {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.55;
  margin-bottom: 18px;
}
/* Highlighted keyword inside card descriptions — color follows category */
.card-highlight { font-weight: 600; }
.product-card[data-category="scara"]         .card-highlight { color: var(--tag-scara-color); }
.product-card[data-category="6axis"]         .card-highlight { color: var(--tag-6axis-color); }
.product-card[data-category="collaborative"] .card-highlight { color: var(--tag-collab-color); }
/* Push the button to the bottom while keeping desc + modellek together */
.product-card .btn-card-blue { margin-top: auto; }

/* ── SPECS RIBBON ── */
.card-specs {
  display: flex;
  align-items: stretch;
  background: var(--bg-light);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}
.card-spec {
  flex: 1;
  text-align: center;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}
/* 1px vertical divider between the two spec areas */
.card-spec + .card-spec {
  border-left: 1px solid var(--border);
}

/* ── ACCESSORY CARD ── */
.acc-card {
  background: #f5f5f7;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 22px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.acc-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
}
.acc-image { width: 100%; aspect-ratio: 4/3; margin-bottom: 18px; }
.acc-image .img-placeholder { height: 100%; background: #e8e8ed; }
.acc-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  text-align: center;
  padding: 0 16px;
}
.acc-desc {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.5;
  padding: 0 16px;
  margin-bottom: 18px;
  flex: 1;
}

/* ── OPTION LIST CARD ── */
.option-card {
  background: #f5f5f7;
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.option-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
}
.option-card .acc-title {
  margin-bottom: 16px;
  text-align: left;
  padding: 0;
}
.option-list { list-style: none; flex: 1; margin-bottom: 24px; }
.option-list li {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-primary);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.option-list li:last-child { border-bottom: none; }
.option-list li::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent-blue);
  flex-shrink: 0;
}
.option-card .btn-card-blue { align-self: center; }

/* ── CTA CARD ── */
.cta-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.cta-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
}
.cta-body {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  flex: 1;
}
.cta-glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 130px;
  background: var(--bg-light);
  color: var(--text-secondary);
}
.cta-glyph svg {
  width: 56px;
  height: 56px;
}
.cta-content {
  flex: 1;
  padding: 28px;
  display: flex;
  flex-direction: column;
}
.cta-content .acc-title {
  margin-bottom: 8px;
  text-align: left;
  padding: 0;
}
.cta-content p {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}
.cta-content .btn-primary { align-self: flex-start; }

/* ── SHOWCASE BANNER ─────────────────────────────────────────────────────── */
.showcase {
  position: relative;
  width: 100%;
  height: 72vh;
  min-height: 460px;
  overflow: hidden;
  background: var(--text-primary); /* fallback while media loads */
}

/* Sliding track — JS sets transform: translateX(-N*100%) */
.showcase-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.showcase-slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Images and video fill the slide */
.showcase-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
}

/* Gradient overlay — text sits above it */
.showcase-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.25) 45%, transparent 100%);
  display: flex;
  align-items: flex-end;
  padding: 52px 64px;
  pointer-events: none; /* lets YouTube iframe receive clicks */
}

.showcase-text { max-width: 660px; color: #fff; }

.showcase-title {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.showcase-body {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.6;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

/* Navigation arrows */
.showcase-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background 0.15s;
}
.showcase-arrow:hover { background: rgba(255,255,255,0.3); }
.showcase-arrow--prev { left: 20px; }
.showcase-arrow--next { right: 20px; }

/* Navigation dots */
.showcase-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.showcase-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  padding: 0;
  transition: background 0.15s, transform 0.15s;
}
.showcase-dot.active {
  background: #fff;
  border-color: #fff;
  transform: scale(1.35);
}

@media (max-width: 768px) {
  .showcase { height: 58vh; min-height: 320px; }
  .showcase-overlay { padding: 28px 20px; }
  .showcase-arrow { width: 36px; height: 36px; }
  .showcase-arrow--prev { left: 10px; }
  .showcase-arrow--next { right: 10px; }
  .showcase-body { display: none; } /* hide body text on small screens */
}

/* ── FEATURE CARDS ───────────────────────────────────────────────────────── */
/* Auto-fill grid: fits as many columns as space allows (min 260px each).
   Works cleanly for 3–6 cards without page-specific overrides.             */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--card-shadow);
  border-top: 3px solid var(--accent-blue);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.feature-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
}
/* 6-axis pages use purple top border */
.section-features--6axis .feature-card  { border-top-color: var(--tag-6axis-color); }
/* cobot pages use green top border */
.section-features--collab .feature-card { border-top-color: var(--tag-collab-color); }

/* ── APPLICATIONS SECTION ───────────────────────────────────────────────── */
/* Scannable checklist of use-cases + industry tags */
.applications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0 40px;
  margin: 0 0 36px;
}

.application-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}

/* Blue checkmark circle */
.application-item::before {
  content: '✓';
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #fff;
  background: var(--tag-collab-color);
  border-radius: 50%;
}

.industry-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.industry-row__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.industry-tag {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 5px 16px;
  border-radius: 999px;
  background: var(--bg-white);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* Controller specs sub-section below robot specs */
.specs-controller-section { margin-top: 40px; }

.feature-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.feature-desc {
  font-size: 0.9375rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── SPEC PICTOGRAMS ─────────────────────────────────────────────────────── */
.spec-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

/* Two-row spec pill: label on top, value large below */
.spec-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 18px;
  border-radius: 12px;
  gap: 2px;
}
.spec-label {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1;
  opacity: 0.75;
}
.spec-value {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

/* Single-feature tag pill */
.spec-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Color themes — add --6axis and --collab variants as needed */
.spec-pill--scara,
.spec-tag--scara  { background: var(--tag-scara-bg);  color: var(--tag-scara-color); }

.spec-pill--6axis,
.spec-tag--6axis  { background: var(--tag-6axis-bg);  color: var(--tag-6axis-color); }

.spec-pill--collab,
.spec-tag--collab { background: var(--tag-collab-bg); color: var(--tag-collab-color); }

/* ── GALLERY ─────────────────────────────────────────────────────────────── */
/* Same pill-container style as .filter-tabs on the index page */
/* Row wrapping the filter pills + any inline action (e.g. controller link) */
.specs-filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
/* Button always pushed to the right — works on same row and when wrapped */
.specs-filter-row .btn-primary {
  margin-left: auto;
  width: auto; /* never stretch full-width, even on mobile */
  white-space: nowrap;
}

.gallery-filter,
.specs-filter {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  background: #e0e0e5;
  border-radius: 999px;
  padding: 3px;
  width: fit-content;
}
.gallery-filter { margin-bottom: 24px; }
/* Hide the filter bar on pages with a single image group (no categories) */
.gallery-filter--single { display: none; }

/* ── FILTER CAROUSEL (≤480px) ─────────────────────────────────────────────
   Pill becomes a single-row carousel: active tab centered, edges fade,
   prev/next arrows advance the selection. Injected by main.js.            */
@media (max-width: 480px) {
  /* Wrapper is the positioning context for the arrows and provides
     the pill shape — overflow:hidden clips arrows at rounded corners.
     Background moved here so the pill always fills 100% width even
     when tab content is narrower than the container.                 */
  .filter-carousel-wrap {
    display: block;
    position: relative;
    width: 100%;
    border-radius: 999px;
    overflow: hidden;
    background: #e0e0e5;
  }
  /* Remove margin from the filter itself — wrapper owns it now */
  .filter-carousel-wrap > .gallery-filter { margin-bottom: 0; }

  .filter-tabs,
  .gallery-filter,
  .specs-filter {
    flex-wrap: nowrap;
    overflow: hidden;
    width: 100%;
    border-radius: 999px;
    background: transparent; /* wrapper supplies the pill background */
  }

  /* Edge fades — revealed by JS-toggled .has-prev / .has-next classes.
     Solid for first 45% (covers arrow area), then fades to transparent.  */
  .filter-tabs::before,  .gallery-filter::before,  .specs-filter::before,  #dl-subfilter::before,
  .filter-tabs::after,   .gallery-filter::after,   .specs-filter::after,   #dl-subfilter::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 64px;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
  }
  .filter-tabs::before, .gallery-filter::before, .specs-filter::before, #dl-subfilter::before {
    left: 0;
    background: linear-gradient(to right, #e0e0e5 45%, transparent);
  }
  .filter-tabs::after, .gallery-filter::after, .specs-filter::after, #dl-subfilter::after {
    right: 0;
    background: linear-gradient(to left, #e0e0e5 45%, transparent);
  }
  .filter-tabs.has-prev::before,
  .gallery-filter.has-prev::before,
  .specs-filter.has-prev::before,
  #dl-subfilter.has-prev::before { opacity: 1; }
  .filter-tabs.has-next::after,
  .gallery-filter.has-next::after,
  .specs-filter.has-next::after,
  #dl-subfilter.has-next::after  { opacity: 1; }

  /* Arrow buttons — sit above the fade, z-index: 3 */
  .filter-arrow {
    display: flex;
    position: absolute;
    top: 0; bottom: 0;
    width: 28px;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 3;
    color: var(--text-primary);
    padding: 0;
    transition: opacity 0.15s;
  }
  .filter-arrow--prev { left: 2px; }
  .filter-arrow--next { right: 2px; }
  .filter-arrow[disabled] { opacity: 0; pointer-events: none; }
}

/* Reuse .filter-tab from index page — no extra rules needed here */

/* Uniform thumbnail grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

/* Each thumbnail is a button so it's keyboard-accessible */
.gallery-thumb {
  display: block;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  transition: transform 0.15s, box-shadow 0.15s;
}
.gallery-thumb:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hidden thumbnails (family filter) */
.gallery-thumb[hidden] { display: none; }

@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
}
@media (max-width: 480px) {
  /* Restore spacing between carousel pill and image grid
     (gallery-filter margin-bottom is zeroed when inside .filter-carousel-wrap) */
  .gallery-grid { margin-top: 16px; }
}

/* ── LIGHTBOX ────────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

/* Semi-transparent backdrop */
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
}

/* Centering wrapper — sits above backdrop */
.lightbox-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Fixed-size stage — image content changes but stage never resizes */
.lightbox-stage {
  position: relative;
  width: min(92vw, 1400px);
  height: min(82vh, 900px);
  overflow: hidden;
  border-radius: 12px;
  background: #000;
}

/* Images inside the stage */
.lightbox-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s;
}

/* Slide animation states */
.lightbox-img.entering-right  { transform: translateX(100%); opacity: 0; }
.lightbox-img.entering-left   { transform: translateX(-100%); opacity: 0; }
.lightbox-img.active          { transform: translateX(0);    opacity: 1; }
.lightbox-img.exiting-right   { transform: translateX(100%); opacity: 0; }
.lightbox-img.exiting-left    { transform: translateX(-100%); opacity: 0; }

/* Close button — top-right corner */
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }

/* Navigation arrows — same style as showcase arrows */
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background 0.15s;
}
.lightbox-arrow:hover { background: rgba(255,255,255,0.3); }
.lightbox-arrow--prev { left: 16px; }
.lightbox-arrow--next { right: 16px; }

/* Caption overlay — gradient fade at bottom of stage, only visible when content is set */
.lightbox-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 48px 24px 18px;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.62));
  border-radius: 0 0 12px 12px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.lightbox-caption.has-content { opacity: 1; }

.lightbox-caption-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.01em;
}
.lightbox-caption-text {
  display: block;
  font-size: 0.8125rem;
  font-weight: 400;
  color: rgba(255,255,255,0.7);
  line-height: 1.45;
  margin-top: 2px;
}
/* Hide description line if empty */
.lightbox-caption-text:empty { display: none; }

/* Image counter — bottom center */
.lightbox-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  background: rgba(0,0,0,0.4);
  padding: 4px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .lightbox-arrow { width: 36px; height: 36px; }
  .lightbox-arrow--prev { left: 8px; }
  .lightbox-arrow--next { right: 8px; }
}

/* ── SPECS TABLE ─────────────────────────────────────────────────────────── */

/* Outer wrapper: clips border-radius corners, creates stacking context for fade */
.specs-scroll-outer {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
}

/* Right-edge gradient fade — only visible when content overflows to the right */
.specs-scroll-outer::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 60px;
  background: linear-gradient(to right, transparent, var(--bg-white));
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.2s;
}
.specs-scroll-outer.can-scroll-right::after { opacity: 1; }

/* Actual scroll container */
.specs-scroll-inner {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Table base */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  line-height: 1.4;
  background: var(--bg-white);
}

/* All cells share border */
.specs-table th,
.specs-table td {
  border: 1px solid var(--border);
  padding: 8px 14px;
  vertical-align: middle;
  white-space: nowrap;
}

/* Header: "Model number" spanning label columns */
.specs-th-model {
  background: var(--table-header-bg);
  color: #fff;
  font-weight: 700;
  text-align: center;
  font-size: 0.9375rem;
  position: sticky;
  left: 0;
  z-index: 4;
}

/* Header: axis group label (4-axis / 3-axis) */
.specs-th-axis {
  background: var(--table-header-bg);
  color: #fff;
  font-weight: 700;
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.9;
}
/* Visual divider between axis groups */
.specs-th-axis + .specs-th-axis {
  border-left: 2px solid rgba(255, 255, 255, 0.4);
}

/* Header: individual model name columns */
.specs-th-name {
  background: var(--table-header-bg);
  color: #fff;
  font-weight: 600;
  text-align: center;
  font-size: 0.8125rem;
  min-width: 140px;
}

/* First label column: spec group name — sticky so it stays visible on scroll */
/* Robot name links inside the sticky label column */
.specs-cat a {
  color: var(--blue);
  text-decoration: none;
}
.specs-cat a:hover { text-decoration: underline; }

.specs-cat {
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--text-primary);
  background: var(--bg-light);
  width: 160px;
  min-width: 160px;
  vertical-align: top;
  padding-top: 10px;
  position: sticky;
  left: 0;
  z-index: 2;
}
/* Needs higher specificity than .specs-table td { white-space: nowrap } (0,1,1) */
.specs-table td.specs-cat { white-space: normal; }

/* Second label column: sub-spec name */
.specs-sub {
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  min-width: 110px;
  background: var(--bg-white);
  position: sticky;
  left: 0; /* overridden at runtime by JS to match actual specs-cat width */
  z-index: 2;
}

/* Section header label cell — sticky, contains the section name */
.specs-label {
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--text-primary);
  background: var(--bg-light);
  min-width: 270px; /* = specs-cat + specs-sub combined */
  position: sticky;
  left: 0;
  z-index: 2;
  border-right-color: var(--bg-light); /* hide divider to fill cell */
}
/* Needs higher specificity than .specs-table td { white-space: nowrap } (0,1,1) */
.specs-table td.specs-label { white-space: normal; }

/* Fill cell paired with .specs-label — scrolls freely, visually seamless */
.specs-label-fill {
  background: var(--bg-light);
  border-left-color: var(--bg-light); /* hide divider from sticky label cell */
}

/* Data cells: centered */
.specs-table td:not(.specs-cat):not(.specs-sub):not(.specs-label) {
  text-align: center;
  color: var(--text-primary);
}

/* Allow wrapping in specific data cells — also left-align for readability */
.specs-wrap { white-space: normal; text-align: left; }

/* Footnotes below each table — sits outside the scroll wrapper */
.specs-notes {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.55;
  white-space: normal;
  margin-top: 12px;
}

/* Compact variant — narrow data columns for numeric-only tables (e.g. lens specs) */
.specs-table--compact .specs-th-name { min-width: 62px; }

/* Wrap variant — two-column description table; forces text to wrap, header left-aligned */
.specs-table--wrap { table-layout: fixed; }
.specs-table--wrap th,
.specs-table--wrap td { white-space: normal; vertical-align: top; }
.specs-table--wrap .specs-th-axis  { text-align: left; }
.specs-table--wrap .specs-th-model { text-align: left; position: static; z-index: auto; }
.specs-table--wrap .col-label      { width: 270px; }
.specs-table--wrap .specs-label {
  width: 35%;
  position: static;       /* no sticky needed — table doesn't overflow horizontally */
  z-index: auto;
  border-right-color: var(--border); /* restore hidden border */
}

/* Fixed-layout variant — for tables where columns should wrap (e.g. controller page) */
.specs-table--fixed {
  table-layout: fixed;
  width: 100%;
}
/* Label column width */
.specs-table--fixed .specs-th-model {
  width: 180px;
}
/* Data column widths */
.specs-table--fixed .specs-th-name {
  width: 140px;
}
/* Allow all cells to wrap and align to top */
.specs-table--fixed th,
.specs-table--fixed td {
  white-space: normal;
  vertical-align: top;
}

/* Function comparison variant — fixed layout so description column doesn't take over */
.specs-table--functions { table-layout: fixed; }
.specs-table--functions .specs-th-model { width: 120px; }
.specs-table--functions .specs-th-sub   {
  background: var(--table-header-bg);
  color: #fff;
  font-weight: 600;
  font-size: 0.8125rem;
  text-align: left;
  width: 200px;
}
.specs-table--functions .specs-th-name  { width: 100px; min-width: 0; }
.specs-table--functions .specs-sub      { white-space: normal; }

/* Mobile: remove sticky columns so the full table scrolls freely */
@media (max-width: 768px) {
  .specs-cat,
  .specs-sub,
  .specs-label,
  .specs-th-model {
    position: static;
  }

  /* Functions table: let columns size to content.
     width:auto removes the 100% constraint so the table can grow beyond the
     viewport — the scroll container handles overflow. */
  .specs-table--functions {
    table-layout: auto;
    width: auto;
  }
}
