/* ============================================
   ADJ | AI DJ — Products Page Styles
   Dark Tech · Pioneer DJ Layout Replica
   ============================================ */

/* --- CSS Variables (mirror style.css) --- */
:root {
  --bg-primary: #050508;
  --bg-secondary: #0a0a10;
  --bg-card: rgba(255, 255, 255, 0.02);
  --bg-card-hover: rgba(255, 255, 255, 0.05);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(0, 229, 255, 0.3);

  --accent-primary: #00e5ff;
  --accent-secondary: #7c3aed;
  --accent-tertiary: #f43f5e;
  --accent-glow: rgba(0, 229, 255, 0.5);

  --text-primary: #f1f1f3;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-tertiary: rgba(255, 255, 255, 0.35);

  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-tech: 'Rajdhani', monospace;

  --nav-height: 72px;
  --container-max: 1280px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  background: var(--bg-primary);
  color: var(--text-primary);
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  background: var(--bg-primary);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

::selection { background: rgba(0, 229, 255, 0.3); color: var(--text-primary); }

/* ============================================
   NAVIGATION (reuse from index.html style)
   ============================================ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 2rem;
}

.nav-inner {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
}

.nav-brand img { height: 32px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.2s;
  padding: 0.5rem 0;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text-primary); }

.nav-lang-switch {
  margin-left: 1rem;
  border: 1px solid var(--border-medium);
  border-radius: 2rem;
  overflow: hidden;
  display: flex;
}

.nav-lang-switch button {
  padding: 0.35rem 0.85rem;
  font-size: 0.7rem;
  font-family: var(--font-body);
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.05em;
}

.nav-lang-switch button.active {
  background: var(--accent-primary);
  color: #000;
}

/* ============================================
   LAYOUT: Product Page Wrapper
   ============================================ */
.products-page {
  display: flex;
  min-height: 100vh;
  padding-top: var(--nav-height);
  max-width: 1400px;
  margin: 0 auto;
}

/* --- Sidebar --- */
.products-sidebar {
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  background: rgba(10, 10, 16, 0.6);
  border-right: 1px solid var(--border-subtle);
  padding: 2rem 1.5rem;
  flex-shrink: 0;
  width: 240px;
}

.products-sidebar::-webkit-scrollbar {
  width: 4px;
}

.products-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.products-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.products-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Firefox */
.products-sidebar {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.sidebar-title {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 1.25rem;
}

.sidebar-categories {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-categories a,
.sidebar-categories button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-family: var(--font-body);
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}

.sidebar-categories a img,
.sidebar-categories button img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.45;
  transition: opacity 0.15s;
  filter: brightness(0) invert(1);
}

.sidebar-categories button.active img,
.sidebar-categories a.active img {
  opacity: 1;
  filter: brightness(0) invert(1);
}

.sidebar-categories a:hover,
.sidebar-categories button:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.sidebar-categories button.active,
.sidebar-categories a.active {
  background: rgba(0, 229, 255, 0.08);
  color: var(--accent-primary);
  font-weight: 600;
}

.sidebar-categories .count {
  float: right;
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  font-family: var(--font-tech);
}

/* --- Main Content --- */
.products-main {
  padding: 2rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* --- Page Header --- */
.products-header {
  margin-bottom: 2rem;
}

.products-breadcrumb {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
}

.products-breadcrumb a { color: var(--text-secondary); }
.products-breadcrumb a:hover { color: var(--accent-primary); }
.products-breadcrumb span { margin: 0 0.25rem; }

.products-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.products-count {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-family: var(--font-tech);
}

/* --- Toolbar: Search + Sort --- */
.products-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.search-box {
  width: 100%;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  transition: border-color 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.search-box svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}

.sort-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.sort-pills button {
  padding: 0.4rem 0.9rem;
  border-radius: 2rem;
  border: 1px solid var(--border-medium);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.sort-pills button:hover {
  color: var(--text-primary);
  border-color: var(--text-tertiary);
}

.sort-pills button.active {
  background: var(--accent-primary);
  color: #000;
  border-color: var(--accent-primary);
}

/* --- Mobile Category Scroll --- */
.mobile-categories {
  display: none;
  overflow-x: auto;
  white-space: nowrap;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.mobile-categories::-webkit-scrollbar { display: none; }

.mobile-categories button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  margin-right: 0.5rem;
  border-radius: 2rem;
  border: 1px solid var(--border-medium);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.mobile-categories button.active {
  background: var(--accent-primary);
  color: #000;
  border-color: var(--accent-primary);
}

.mobile-categories button img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
}

.mobile-categories button.active img {
  filter: brightness(0);
}

/* ============================================
   PRODUCT GRID
   ============================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* --- Product Card --- */
.product-card-item {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1));
}

.product-card-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.product-card-image {
  position: relative;
  aspect-ratio: 4/3;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card-image img {
  width: 85%;
  height: 85%;
  object-fit: contain;
  transition: transform 0.4s;
}

.product-card-item:hover .product-card-image img {
  transform: scale(1.05);
}

.product-card-placeholder {
  width: 60%;
  height: 60%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  color: var(--text-tertiary);
  font-family: var(--font-tech);
  font-size: 1.5rem;
  font-weight: 700;
}

.product-card-badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.badge-new {
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--accent-primary);
  color: #000;
}

.badge-hot {
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--accent-tertiary);
  color: #fff;
}

.badge-legacy {
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.product-card-info {
  padding: 1rem 1.15rem 1.15rem;
}

.product-card-brand {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.25rem;
}

.product-card-name {
  font-family: var(--font-tech);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
}

.product-card-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.product-card-tags span {
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  font-size: 0.625rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-tertiary);
  border: 1px solid var(--border-subtle);
}

.product-card-tags span.tag-highlight {
  background: rgba(0, 229, 255, 0.08);
  color: var(--accent-primary);
  border-color: rgba(0, 229, 255, 0.15);
}

/* --- No Results --- */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
}

.no-results h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.no-results p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* --- CTA Block --- */
.products-cta {
  margin-top: 4rem;
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.05), rgba(124, 58, 237, 0.05));
  border: 1px solid var(--border-medium);
  border-radius: 16px;
}

.products-cta h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.products-cta p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  max-width: 500px;
  margin: 0 auto 1.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent-primary);
  color: #000;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #00d0ea;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 229, 255, 0.3);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2rem;
  text-align: center;
}

.site-footer p {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.site-footer a { color: var(--text-secondary); }
.site-footer a:hover { color: var(--accent-primary); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .products-page {
    grid-template-columns: 1fr;
  }

  .products-sidebar { display: none; }

  .mobile-categories { display: flex; }

  .products-main {
    padding: 1.25rem 1rem 3rem;
  }

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

  .product-card-info { padding: 0.75rem; }
  .product-card-name { font-size: 0.9375rem; }
  .product-card-tags { display: none; }

  .products-toolbar { flex-direction: column; }

  .site-nav { padding: 0 1rem; }
  .nav-links { display: none; }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}
