/* ============================================
   IndusFlow Instruments — Products catalog page
   Uses the same design tokens as home.css
   ============================================ */

.page-banner {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  padding: 40px 24px;
  text-align: center;
}
.page-banner .eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-dim);
  font-weight: 700;
  margin-bottom: 10px;
}
.page-banner h1 {
  font-family: var(--font-head);
  color: var(--navy);
  font-size: 1.9rem;
  margin: 0;
}

.catalog-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 50px 24px 90px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 36px;
  align-items: start;
}

/* ===== Category sidebar ===== */
.category-sidebar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  position: sticky;
  top: 90px;
}
.category-sidebar h3 {
  font-family: var(--font-head);
  color: var(--navy);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 8px 10px 10px;
}
.category-sidebar a {
  display: block;
  padding: 11px 12px;
  border-radius: 5px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 2px;
  transition: background 0.15s, color 0.15s;
}
.category-sidebar a:hover { background: var(--bg-alt); color: var(--orange-dim); }
.category-sidebar a.active {
  background: var(--navy);
  color: #fff;
}

/* ===== Catalog main column ===== */
.catalog-main { min-width: 0; }

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}
.catalog-toolbar .count {
  font-size: 0.9rem;
  color: var(--muted);
}
.view-toggle {
  display: flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px;
  background: #fff;
}
.view-toggle button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 30px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.view-toggle button svg { width: 17px; height: 17px; }
.view-toggle button:hover { color: var(--ink); }
.view-toggle button.active {
  background: var(--navy);
  color: #fff;
}

/* ===== Filter chips ===== */
.filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.chip {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--orange-dim); color: var(--ink); }
.chip.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* ===== Product grid ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* List view — one per row, horizontal card */
.product-grid.list-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.product-grid.list-view .product-card {
  display: grid;
  grid-template-columns: 200px 1fr;
}
.product-grid.list-view .thumb {
  height: 100%;
  min-height: 140px;
  border-bottom: none;
  border-right: 1px solid var(--line);
}
.product-grid.list-view .body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.product-grid.list-view:hover .product-card,
.product-grid.list-view .product-card:hover {
  transform: none;
}

.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: block;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.product-card:hover {
  border-color: var(--orange-dim);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(11,42,74,0.08);
}

.product-card .thumb {
  height: 180px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-card .thumb img {
  width: 100%; height: 100%; object-fit: contain;
}
.product-card .thumb .placeholder-icon {
  width: 64px; height: 64px;
  color: var(--navy);
  opacity: 0.35;
}

.product-card .body { padding: 18px 20px 22px; }

.product-card .cat {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-dim);
  background: rgba(232,93,37,0.08);
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 10px;
}
.product-card p.price {
  color: var(--navy);
  font-weight: 700;
  font-size: 1rem;
  margin: 8px 0 6px;
}
.product-card h3 {
  font-family: var(--font-head);
  color: var(--navy);
  font-size: 1.05rem;
  margin: 0 0 8px;
  line-height: 1.3;
}

.product-card p {
  color: var(--muted);
  font-size: 0.86rem;
  margin: 0;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 0.95rem;
  grid-column: 1 / -1;
}

/* ===== Product detail page ===== */
.product-detail {
  max-width: 1100px;
  margin: 0 auto;
  padding: 50px 24px 90px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 50px;
}

.back-link {
  display: inline-block;
  font-size: 0.88rem;
  color: var(--muted);
  margin: 30px 24px 0;
  max-width: 1100px;
}
.back-link:hover { color: var(--orange-dim); }

.product-detail .image-panel-wrap {
  position: sticky;
  top: 90px;
  align-self: start;
}

.product-detail .image-panel {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.product-detail .image-panel img { width: 100%; height: 100%; object-fit: contain; }
.product-detail .image-panel .placeholder-icon {
  width: 100px; height: 100px;
  color: var(--navy);
  opacity: 0.3;
}

.img-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.9);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(11,42,74,0.12);
}
.img-nav:hover { background: #fff; box-shadow: 0 4px 14px rgba(11,42,74,0.2); }
.img-nav svg { width: 20px; height: 20px; }
.img-nav.prev { left: 14px; }
.img-nav.next { right: 14px; }

@media (max-width: 560px) {
  .img-nav { width: 34px; height: 34px; }
  .img-nav svg { width: 16px; height: 16px; }
  .img-nav.prev { left: 8px; }
  .img-nav.next { right: 8px; }
}

.thumb-strip {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.thumb-strip button {
  width: 64px; height: 64px;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-alt);
  cursor: pointer;
  transition: border-color 0.15s;
}
.thumb-strip button.active { border-color: var(--orange); }
.thumb-strip button img { width: 100%; height: 100%; object-fit: contain; }

.product-detail .image-panel img.zoomable {
  cursor: zoom-in;
  transition: opacity 0.15s;
}
.product-detail .image-panel img.zoomable:hover { opacity: 0.92; }

/* ===== Lightbox ===== */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8,20,35,0.92);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  cursor: zoom-out;
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }

@media (max-width: 560px) {
  .lightbox-overlay { padding: 16px; }
  .lightbox-close { top: 12px; right: 12px; width: 38px; height: 38px; }
}

.product-detail .cat-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange-dim);
  background: rgba(232,93,37,0.08);
  padding: 5px 12px;
  border-radius: 3px;
  margin-bottom: 14px;
}

.product-detail .brand-tag {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.product-detail .brand-tag strong { color: var(--navy); }

.product-detail h1 {
  font-family: var(--font-head);
  color: var(--navy);
  font-size: 1.9rem;
  margin: 6px 0 16px;
  line-height: 1.15;
}

.product-detail .desc {
  color: var(--muted);
  margin-bottom: 30px;
  max-width: 60ch;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 34px;
  font-size: 0.92rem;
}
.spec-table tr { border-bottom: 1px solid var(--line); }
.spec-table tr:first-child { border-top: 1px solid var(--line); }
.spec-table td { padding: 13px 4px; }
.spec-table td:first-child { color: var(--muted); width: 42%; }
.spec-table td:last-child { color: var(--ink); font-weight: 500; text-align: right; }

.features-block {
  margin-bottom: 30px;
}
.features-block h3 {
  font-family: var(--font-head);
  color: var(--navy);
  font-size: 1.1rem;
  margin: 0 0 14px;
}
.features-list {
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.8;
}
.features-list li { margin-bottom: 4px; }

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25d366;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 15px 26px;
  border-radius: 4px;
  transition: background 0.15s;
}
.whatsapp-btn:hover { background: #1fb659; }
.whatsapp-btn svg { width: 20px; height: 20px; }

@media (max-width: 860px) {
  .catalog-wrap { grid-template-columns: 1fr; }
  .category-sidebar { position: static; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid.list-view .product-card { grid-template-columns: 120px 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  .product-detail .image-panel-wrap { position: static; }
}
@media (max-width: 560px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-grid.list-view .product-card { grid-template-columns: 1fr; }
  .product-grid.list-view .thumb { border-right: none; border-bottom: 1px solid var(--line); }
  .product-card .thumb { height: 120px; }
  .product-card .body { padding: 12px 14px 16px; }
  .product-card h3 { font-size: 0.9rem; }
  .product-card .cat { font-size: 0.6rem; padding: 3px 8px; margin-bottom: 6px; }
  .product-card p.price { font-size: 0.88rem; margin: 4px 0 4px; }
  .product-card p { font-size: 0.78rem; }
}
