/* ═══════════════════════════════════════════════════════════════════════════
   BlueRobotAI — Product Center Page
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --px: clamp(1.5rem, 5.56vw, 5rem);
  --blue: #1677ff;
  --blue-hover: #1565e8;
  --dark: #101419;
  --dark2: #151b23;
  --text: #111820;
  --muted: #667085;
  --border: #e5e5e5;
  --border2: #e0e0e0;
  --bg-light: #f7f9fb;
  --font: 'Inter', sans-serif;
  --nav-h: 64px;
}

/* ─── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  overflow-x: clip;
  scrollbar-width: none;
  font-family: 'Inter', sans-serif;
  color: var(--dark);
  background: #fff;
}
html::-webkit-scrollbar { display: none; }
body { overflow-x: clip; }
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }
ul, ol { list-style: none; }

/* ─── Scroll reveal ─────────────────────────────────────────────────────── */
/* ─── Spotlight ───────────────────────────────────────────────────────────── */
.spotlight { position: relative; overflow: hidden; }
.spotlight::before {
  content: '';
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle 200px at var(--s-x, 50%) var(--s-y, 50%), rgba(22,119,255,.09), transparent 70%);
  opacity: 0; transition: opacity .3s;
}
.spotlight:hover::before { opacity: 1; }
.spotlight > * { position: relative; z-index: 2; }

/* ─── Shimmer ─────────────────────────────────────────────────────────────── */
@keyframes shimmer {
  from { transform: translateX(-100%) skewX(-12deg); }
  to   { transform: translateX(250%)  skewX(-12deg); }
}
.shimmer-btn { position: relative; overflow: hidden; }
.shimmer-btn::after {
  content: ''; position: absolute; top: 0; left: 0;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  transform: translateX(-100%) skewX(-12deg); pointer-events: none;
}
.shimmer-btn:hover::after { animation: shimmer .55s ease forwards; }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .65s cubic-bezier(.16,1,.3,1), transform .65s cubic-bezier(.16,1,.3,1);
}
.reveal.visible { opacity: 1; transform: none; }

@media (min-width: 1200px) {
}

/* ─── Page Hero ──────────────────────────────────────────────────────────── */
.page-hero {
  position: relative;
  width: 100%;
  height: clamp(280px, 35vw, 500px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #eef2f7;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,14,20,.18), rgba(10,14,20,.42));
  pointer-events: none;
}

.page-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  padding-inline: var(--px);
  max-width: 800px;
}

.page-hero-content h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0;
  text-shadow: 0 1px 3px rgba(10,14,20,.45);
  line-height: 1.1;
  white-space: normal;
}

.page-hero-content p {
  font-size: clamp(.875rem, 1.5vw, 1rem);
  color: rgba(255,255,255,.92);
  line-height: 1.5;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(10,14,20,.4);
}

@media (max-width: 767px) {
  .page-hero-content h1 { white-space: normal; }
  .page-hero-content p { white-space: nowrap; font-size: 12px; }
}

/* ─── Products Section ───────────────────────────────────────────────────── */
.products-section {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  padding: 96px var(--px);
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
}

/* ─── Sidebar ────────────────────────────────────────────────────────────── */
.products-sidebar {
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 88px;
}

.sidebar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.category-item {
  width: 100%;
  height: 56px;
  display: flex;
  align-items: center;
  padding-inline: 20px;
  border-radius: 8px;
  border: 1px solid var(--border2);
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  text-align: left;
  background: #fff;
  transition: border-color .15s, color .15s;
}
.category-item:hover { border-color: var(--blue); color: var(--blue); }
.category-item.active {
  padding-left: 16px;
  border-color: var(--blue);
  border-left-width: 4px;
  color: var(--blue);
  font-weight: 700;
}

/* ─── Right area ─────────────────────────────────────────────────────────── */
.products-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ─── Results bar ────────────────────────────────────────────────────────── */
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.results-count { font-size: 14px; color: var(--muted); }
.sort-dropdown { display: flex; align-items: center; gap: 8px; }
.sort-label { font-size: 14px; color: var(--muted); }
.sort-selector {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}

/* ─── Product grid ───────────────────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
}

.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 420px;
  transition: box-shadow .2s, transform .2s;
}
.product-card:hover {
  box-shadow: 0 8px 24px rgba(17,24,32,.08);
  transform: translateY(-2px);
}

.product-card-img-link {
  display: block;
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
  background: var(--bg-light);
  flex-shrink: 0;
}
.product-card-img-link:hover .product-card-img {
  transform: scale(1.04);
  transition: transform .3s var(--ease-out, ease);
}
.product-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  flex-shrink: 0;
  background: var(--bg-light);
  transition: transform .3s var(--ease-out, ease);
}

.product-card-body {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
}

.product-card-text { display: flex; flex-direction: column; gap: 6px; }

.product-card-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  min-height: 2.6em;
}

.product-card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-card-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  white-space: normal;
  transition: color .15s;
}
.product-card-link:hover { color: var(--blue); }

/* ─── Pagination ─────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 16px;
}

.page-btn {
  width: 40px;
  height: 40px;
  border-radius: 100px;
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: background .15s, border-color .15s, color .15s;
}
.page-btn:hover:not(.active):not(:disabled) { border-color: var(--blue); color: var(--blue); }
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.page-btn.num { color: var(--dark); }
.page-btn.active { background: var(--dark); color: #fff; border-color: var(--dark); font-weight: 600; }

/* ─── Tablet (768px – 1023px) ────────────────────────────────────────────── */
@media (max-width: 1199px) {
  /* Layout */
  .products-section { flex-direction: column; gap: 24px; padding-block: 3.5rem; }
  .products-sidebar { flex: none; width: 100%; position: static; }

  /* Category: 2-column grid — all options visible, no scroll needed */
  .category-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .category-item {
    width: 100%;
    height: 44px;
    padding-inline: 12px;
    border-radius: 10px;
    font-size: 13px;
    text-align: center;
    justify-content: center;
  }
  .category-item.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
    border-left-width: 1px;
    padding-left: 12px;
    font-weight: 600;
  }

  /* Product grid: 2 columns on tablet */
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .product-card { height: auto; }
  .product-card-img-link { height: 220px; } .product-card-img { height: 100%; }
}

/* ─── Mobile (≤ 767px) ───────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .products-section { padding-block: 2.5rem; gap: 20px; }
  .sidebar-title { font-size: 15px; }

  /* Results bar: wrap on small screens */
  .results-bar { flex-wrap: wrap; gap: 8px; }

  /* Grid and cards */
  .products-grid { gap: 12px; }
  .product-card-img { height: 170px; }

  /* Pagination: tighter gap */
  .pagination { gap: 6px; }
  .page-btn { width: 44px; height: 44px; font-size: 13px; }

  /* FAQ */
  .faq-inner { padding-block: 3rem; gap: 2rem; }
  .faq-question { padding: 16px; font-size: 15px; }
  .faq-answer { padding: 0 16px 16px; }

  /* CTA */
  .cta-inner { padding-top: 3rem; padding-bottom: 2rem; }
}

/* ─── Small mobile (≤ 479px) ────────────────────────────────────────────── */
@media (max-width: 479px) {
  .products-grid { grid-template-columns: 1fr; }
  .product-card-img { height: 220px; }
  .results-bar { align-items: stretch; }
  .sort-dropdown { width: 100%; justify-content: space-between; }
  .sort-selector { min-width: 0; flex: 1; }
}

/* ─── FAQ Section ────────────────────────────────────────────────────────── */
.section-faq { width: 100%; background: var(--bg-light); }

.faq-inner {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding: 96px var(--px);
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.faq-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}

.faq-eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.faq-header h2 {
  font-size: clamp(1.5rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--dark);
}

.faq-accordion {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.faq-item { background: #fff; border-top: 1px solid #ddd; }
.faq-item:last-child { border-bottom: 1px solid #ddd; }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  text-align: left;
  gap: 16px;
  background: #fff;
  transition: color .15s;
}
.faq-question:hover { color: var(--blue); }

.faq-toggle {
  font-size: 18px;
  color: var(--muted);
  flex-shrink: 0;
  line-height: 1;
  font-weight: 400;
}

.faq-answer {
  padding: 0 24px 20px;
}
.faq-answer p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* ─── CTA Section ────────────────────────────────────────────────────────── */
.section-cta {
  position: relative;
  background: var(--dark);
  width: 100%;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding: 5rem var(--px) 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-card {
  position: relative;
  width: 100%;
  background-color: var(--dark2);
  background-image: url("/assets/images/cta-bg.webp");
  background-size: cover;
  background-position: center;
  border-radius: 20px;
  padding: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  overflow: hidden;
}

.cta-card-glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.eyebrow-blue {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 1.56px;
  text-transform: uppercase;
}

.cta-card h2 {
  font-size: clamp(1.5rem, 3vw, 1.75rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  letter-spacing: 0;
  text-align: center;
}

.cta-card p {
  font-size: 1rem;
  color: rgba(255, 255, 255, .72);
  line-height: 1.6;
  text-align: center;
  white-space: normal;
}

@media (max-width: 767px) {
  .cta-card { padding: 2rem; gap: 1.5rem; border-radius: 16px; }
  .cta-card p { white-space: normal; }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  background: var(--blue);
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: #0f66e8; transform: translateY(-1px); }

@media (max-width: 1199px) {
}

@media (max-width: 639px) {
}

.sort-selector {
  min-height: 44px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--dark);
  background: #fff;
  font: inherit;
  cursor: pointer;
}

