/* ============================================================
   Kayu & Kov 2025 — Product Catalogue
   Brand: Navy + Orange | System Typography
   UX-focused polish: smooth interactions, refined spacing
   ============================================================ */

:root {
  --navy-dark: #1A2634;
  --navy-light: #2A3A4A;
  --navy-medium: #233344;
  --navy-surface: #1E2D3D;
  --navy-hover: #243648;
  --orange: #E8833A;
  --orange-light: #F59E5E;
  --orange-dark: #D0732F;
  --orange-glow: rgba(232, 131, 58, 0.15);
  --orange-subtle: rgba(232, 131, 58, 0.08);
  --white: #FFFFFF;
  --gray-100: #F5F5F7;
  --gray-200: #E8E8ED;
  --gray-300: #D2D2D7;
  --gray-400: #86868B;
  --gray-500: #6E6E73;
  --gray-600: #1D1D1F;
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.45);

  /* Profile / wood tones */
  --wood-primary: #C4813A;
  --wood-dark: #A66A2E;
  --wood-light: #D49A5A;
  --wood-highlight: #E8B87A;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Shadows — tuned for dark UI */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.25), 0 8px 16px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 1px 4px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.03);
  --shadow-card-hover: 0 12px 36px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.12);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;
}

/* ========== RESET ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
  background: var(--navy-dark);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.47;
  font-weight: 400;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtle noise texture for depth */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ========== HEADER ========== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 38, 52, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background var(--duration-base);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 24px;
}

.logo {
  height: 22px;
  width: auto;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.logo:hover {
  opacity: 0.75;
}

.header-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-left: 28px;
}

/* Page navigation (Catalogue / Gallery) */
.page-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.page-nav a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-tertiary);
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 980px;
  border: 1px solid transparent;
  transition: all var(--duration-base) var(--ease-out);
}
.page-nav a:hover {
  color: var(--text-secondary);
  border-color: rgba(255, 255, 255, 0.1);
}
.page-nav a.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

/* ========== SEARCH ========== */
.search-container {
  position: sticky;
  top: 52px;
  z-index: 90;
  background: rgba(26, 38, 52, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px 24px;
}

.search-wrapper {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-tertiary);
  pointer-events: none;
  transition: color var(--duration-fast);
}

.search-wrapper:focus-within .search-icon {
  color: var(--orange);
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: var(--navy-light);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 16px;
  font-family: inherit;
  font-weight: 400;
  letter-spacing: -0.022em;
  transition: all var(--duration-base) var(--ease-out);
}

.search-input::placeholder {
  color: var(--text-tertiary);
  font-weight: 400;
}

.search-input:focus {
  outline: none;
  border-color: var(--orange);
  background: var(--navy-hover);
  box-shadow: 0 0 0 3px var(--orange-glow), 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ========== CATEGORY NAVIGATION ========== */
.category-nav {
  position: sticky;
  top: 106px;
  z-index: 95;
  background: rgba(26, 38, 52, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 10px 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.category-scroll {
  display: flex;
  gap: 6px;
  padding: 0 24px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* Smooth scroll momentum on iOS */
  -webkit-overflow-scrolling: touch;
}

.category-scroll::-webkit-scrollbar {
  display: none;
}

.category-btn {
  flex-shrink: 0;
  padding: 7px 16px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 980px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.category-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text-primary);
}

.category-btn:active {
  transform: scale(0.96);
}

.category-btn.active {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(232, 131, 58, 0.35);
}

/* ========== PRODUCTS CONTAINER ========== */
.products-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--space-lg) 24px var(--space-3xl);
}

.products-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.products-title {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 34px;
  font-weight: 300;
  letter-spacing: -0.028em;
  line-height: 1.1;
  margin: 0;
}

.products-title-logo {
  height: 34px;
  width: auto;
  display: block;
}

.products-count {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
}

.products-count span {
  color: var(--orange);
  font-weight: 700;
}

/* ========== PRODUCTS GRID ========== */
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 580px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (min-width: 960px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (min-width: 1300px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

/* ========== PRODUCT CARD ========== */
.product-card {
  background: var(--navy-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition:
    transform var(--duration-slow) var(--ease-out),
    box-shadow var(--duration-slow) var(--ease-out),
    border-color var(--duration-slow) var(--ease-out);
  will-change: transform;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(232, 131, 58, 0.12);
}

/* Glow accent on hover */
.product-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out);
}

.product-card:hover::after {
  opacity: 1;
}

/* Card Header */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px 12px;
  cursor: pointer;
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.serial-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  background: var(--orange);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-xs);
  letter-spacing: -0.01em;
  flex-shrink: 0;
  transition: transform var(--duration-base) var(--ease-spring);
}

.product-card:hover .serial-badge {
  transform: scale(1.05);
}

.product-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.022em;
  line-height: 1.2;
  transition: color var(--duration-fast);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card:hover .product-name {
  color: var(--white);
}

.category-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

/* ========== 3D VIEWER — SPECIMEN WELL ========== */
.profile-3d-viewer {
  position: relative;
  aspect-ratio: 3/2;
  background: var(--navy-dark);
  margin: 0 10px 10px;
  border-radius: var(--radius-md);
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  /* Inset depth */
  box-shadow:
    inset 0 1px 4px rgba(0, 0, 0, 0.15),
    inset 0 0 1px rgba(0, 0, 0, 0.2);
}

.profile-3d-viewer:active {
  cursor: grabbing;
}

.profile-3d-viewer canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  border-radius: var(--radius-md);
}

/* Loading Spinner */
.viewer-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--navy-dark);
  z-index: 5;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid rgba(255, 255, 255, 0.06);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.85s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Card 3D drag hint — discreet overlay */
.viewer-drag-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 980px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  pointer-events: none;
  z-index: 6;
  opacity: 1;
  transition: opacity 0.5s ease-out;
  animation: hintFadeIn 0.4s ease-out;
}

.viewer-drag-hint svg {
  opacity: 0.6;
  flex-shrink: 0;
}

@keyframes hintFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Viewer Hint Text */
.viewer-hint {
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-top: 8px;
  margin-bottom: 16px;
  opacity: 0.7;
}

/* Card Footer */
.card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 14px 18px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background var(--duration-base) var(--ease-out);
}

.product-card:hover .card-footer {
  background: rgba(232, 131, 58, 0.04);
}

.product-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.product-dimensions {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.016em;
}

.product-code {
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-tertiary);
  letter-spacing: 0.01em;
}

.product-price {
  text-align: right;
}

.price-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 3px;
}

.price-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: -0.024em;
  line-height: 1;
  transition: color var(--duration-fast);
}

.product-card:hover .price-value {
  color: var(--orange-light);
}

.price-unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-left: 2px;
}

/* ========== FOOTER ========== */
.footer {
  background: var(--navy-medium);
  padding: var(--space-3xl) 24px var(--space-2xl);
  position: relative;
}

/* Top accent line */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 5%, var(--orange) 50%, transparent 95%);
  opacity: 0.6;
}

.footer-inner {
  max-width: 680px;
  margin: 0 auto;
}

.footer-logo {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.footer-brand-logo {
  height: 32px;
  width: auto;
  opacity: 0.9;
  margin-bottom: 8px;
}

.footer-address {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.65;
  text-align: center;
  margin-bottom: var(--space-xl);
}

.footer-contact {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: var(--space-2xl);
}

@media (max-width: 500px) {
  .footer-contact {
    grid-template-columns: 1fr;
  }
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  transition: all var(--duration-base) var(--ease-out);
}

.contact-link:hover {
  background: var(--orange);
  border-color: var(--orange);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(232, 131, 58, 0.3);
}

.contact-link:active {
  transform: translateY(0);
}

.contact-link svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.7;
}

.contact-link:hover svg {
  opacity: 1;
}

.footer-notes {
  padding: 22px 24px;
  background: var(--navy-dark);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--orange);
  margin-bottom: var(--space-xl);
}

.footer-notes p {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--orange);
}

.footer-notes ol {
  padding-left: 20px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.75;
}

.footer-notes li {
  margin-bottom: 2px;
}

.footer-copyright {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-copyright p {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

/* ========== MODAL ========== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: backdropIn 0.25s var(--ease-out);
}

@keyframes backdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  background: var(--navy-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.06);
  animation: modalIn 0.35s var(--ease-out);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all var(--duration-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.modal-close:hover {
  background: var(--orange);
  border-color: var(--orange);
}

.modal-close:active {
  transform: scale(0.92);
}

.modal-close svg {
  width: 16px;
  height: 16px;
  color: var(--white);
}

.modal-body {
  padding: 28px;
  overflow-y: auto;
  max-height: 90vh;
  -webkit-overflow-scrolling: touch;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.modal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  background: var(--orange);
  color: var(--white);
  font-size: 20px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.modal-title-group {
  flex: 1;
  padding-top: 3px;
}

.modal-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.024em;
  line-height: 1.15;
  margin-bottom: 4px;
}

.modal-category {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Modal 3D Viewer */
.modal-3d-viewer {
  aspect-ratio: 4/3;
  background: var(--navy-dark);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  margin-bottom: 8px;
  touch-action: none;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.15);
}

.modal-3d-viewer canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  border-radius: var(--radius-md);
}

.modal-3d-viewer .viewer-loading {
  border-radius: var(--radius-md);
}

.modal-3d-viewer .spinner {
  width: 36px;
  height: 36px;
  border-width: 3px;
}

.modal-body .viewer-hint {
  margin-top: 10px;
  margin-bottom: 22px;
  font-size: 12px;
}

.modal-details {
  display: grid;
  gap: 8px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--navy-dark);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: background var(--duration-fast);
}

.detail-row:hover {
  background: var(--navy-hover);
}

.detail-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-value {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.detail-value.code {
  font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
  font-size: 14px;
  font-weight: 500;
}

.detail-value.price {
  color: var(--orange);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ========== EMPTY STATE ========== */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-tertiary);
}

.empty-state svg {
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
  letter-spacing: -0.022em;
}

.empty-state p {
  font-size: 15px;
  font-weight: 400;
}

/* ========== SCROLL TO TOP ========== */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: var(--orange);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(232, 131, 58, 0.35);
  transition: all var(--duration-base) var(--ease-out);
  opacity: 0;
  visibility: hidden;
  z-index: 50;
  -webkit-tap-highlight-color: transparent;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(232, 131, 58, 0.45);
  background: var(--orange-light);
}

.scroll-top:active {
  transform: translateY(0) scale(0.95);
}

.scroll-top svg {
  width: 22px;
  height: 22px;
  color: var(--white);
}

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

.product-card {
  animation: fadeInUp 0.5s var(--ease-out) forwards;
  opacity: 0;
}

.product-card:nth-child(1) { animation-delay: 0.03s; }
.product-card:nth-child(2) { animation-delay: 0.06s; }
.product-card:nth-child(3) { animation-delay: 0.09s; }
.product-card:nth-child(4) { animation-delay: 0.12s; }
.product-card:nth-child(5) { animation-delay: 0.15s; }
.product-card:nth-child(6) { animation-delay: 0.18s; }
.product-card:nth-child(7) { animation-delay: 0.21s; }
.product-card:nth-child(8) { animation-delay: 0.24s; }
.product-card:nth-child(n+9) { animation-delay: 0.27s; }

/* ========== VERIFIED BADGE ========== */
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: #30D158;
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1;
}

/* ========== 3D VIEWER STATES ========== */
.viewer-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 120px;
  color: var(--text-tertiary);
  text-align: center;
  padding: 16px;
  gap: 8px;
}

.viewer-error svg {
  opacity: 0.5;
  color: var(--orange);
}

.viewer-error span {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.7;
}

.viewer-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 120px;
  background: linear-gradient(145deg, var(--navy-dark) 0%, var(--navy-medium) 100%);
  border-radius: var(--radius-md);
  padding: 16px;
  gap: 6px;
}

.viewer-paused {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 120px;
  background: var(--navy-dark);
  border-radius: var(--radius-md);
}

.viewer-paused span {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  opacity: 0.6;
}

.viewer-snapshot {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: var(--navy-dark);
}

.fallback-icon {
  font-size: 44px;
  line-height: 1;
  opacity: 0.5;
  color: var(--orange);
}

.fallback-text {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.fallback-dims {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Ensure viewer containers have dimensions */
.profile-3d-viewer,
.modal-3d-viewer {
  position: relative;
  min-height: 150px;
}

/* ========== SPEC DRAWING ========== */
.spec-drawing {
  background: var(--navy-dark);
  border-radius: var(--radius-md);
  padding: 16px 20px 20px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.spec-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.spec-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ========== ACTIVE FILTER INDICATOR ========== */
.active-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--orange-subtle);
  border: 1px solid rgba(232, 131, 58, 0.2);
  border-radius: var(--radius-pill);
  color: var(--orange);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.active-filter:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

.active-filter svg {
  opacity: 0.7;
}

.active-filter:hover svg {
  opacity: 1;
}

/* ========== UTILITY ========== */
.orange { color: var(--orange); }
.hidden { display: none !important; }

/* ========== RESPONSIVE ========== */
@media (max-width: 600px) {
  .header-content {
    padding: 12px 16px;
  }

  .logo {
    height: 20px;
  }

  .header-title {
    display: none;
  }

  .page-nav {
    gap: 4px;
    flex-shrink: 0;
  }

  .page-nav a {
    font-size: 11px;
    padding: 3px 8px;
    white-space: nowrap;
  }

  .products-title {
    gap: 10px;
  }

  .products-title-logo {
    height: 28px;
  }

  .search-container {
    padding: 12px 16px;
    top: 49px;
  }

  .category-nav {
    top: 117px;
    padding: 8px 0 12px;
  }

  .category-scroll {
    padding: 0 16px;
    gap: 5px;
  }

  .category-btn {
    padding: 6px 14px;
    font-size: 12px;
  }

  .products-container {
    padding: var(--space-md) 12px var(--space-2xl);
  }

  .products-title {
    font-size: 28px;
  }

  .product-card {
    border-radius: var(--radius-md);
  }

  .card-header {
    padding: 14px 14px 10px;
  }

  .product-name {
    font-size: 15px;
  }

  .profile-3d-viewer {
    margin: 0 8px 8px;
  }

  .card-footer {
    padding: 12px 16px 14px;
  }

  .price-value {
    font-size: 20px;
  }

  .footer {
    padding: var(--space-2xl) 16px var(--space-xl);
  }

  .scroll-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }
}

/* Touch device optimizations */
@media (hover: none) {
  .product-card:hover {
    transform: none;
    box-shadow: var(--shadow-card);
    border-color: rgba(255, 255, 255, 0.04);
  }

  .product-card:hover::after {
    opacity: 0;
  }

  .product-card:active {
    transform: scale(0.98);
    transition-duration: 100ms;
  }

  .product-card:hover .card-footer {
    background: rgba(255, 255, 255, 0.02);
  }

  .product-card:hover .price-value {
    color: var(--orange);
  }

  .product-card:hover .product-name {
    color: var(--text-primary);
  }

  .contact-link:hover {
    transform: none;
    box-shadow: none;
  }

  .scroll-top:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(232, 131, 58, 0.35);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
