/* ================================================
   AYF v2 — Products Page Styles
   ================================================ */

/* --- Category Filter --- */
.cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: var(--space-3xl);
}
.cat-btn {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 24px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(245, 240, 232, 0.12);
  cursor: pointer;
  transition: all var(--transition-normal);
}
.cat-btn:hover {
  border-color: var(--ayf-gold);
  color: var(--ayf-gold);
}
.cat-btn.active {
  background: var(--ayf-gold);
  color: var(--absolute-black);
  border-color: var(--ayf-gold);
}

/* --- Product Grid --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: rgba(245, 240, 232, 0.04);
  margin-bottom: var(--space-3xl);
}
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* --- Product Card --- */
.product-card {
  background: var(--absolute-black);
  overflow: hidden;
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  background: var(--elevated-dark);
}
.product-card.hidden {
  display: none;
}

.product-image {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
  background: rgba(10, 10, 10, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
  transition: transform 0.6s ease;
  opacity: 0.8;
}
.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  background: rgba(0,0,0,0.8);
  border: 1px solid var(--ayf-gold);
  color: var(--ayf-gold);
}

.product-info {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-model {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ayf-gold);
  margin-bottom: var(--space-xs);
  letter-spacing: 0.08em;
}
.product-price {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ayf-gold-light);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

/* --- Tags --- */
.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-md);
}
.product-tag {
  font-size: 0.6rem;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border: 1px solid rgba(224, 192, 128, 0.25);
  color: var(--text-muted);
  cursor: default;
  transition: all var(--transition-fast);
}
.product-tag.ai-tag {
  border-style: dashed;
  border-color: rgba(91, 192, 190, 0.3);
  color: var(--cyan-pulse);
  cursor: default;
}
.product-tag.search-tag {
  border-color: rgba(200, 164, 92, 0.15);
  color: var(--text-dim);
  font-style: italic;
  cursor: default;
}

/* --- Specs Preview --- */
.product-specs {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: auto;
  border-top: 1px solid rgba(245, 240, 232, 0.06);
  padding-top: var(--space-md);
}
.product-specs p {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 2px;
}

/* --- Expanded Specs (toggled) --- */
.product-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.3s ease;
  opacity: 0;
}
.product-details.expanded {
  max-height: 800px;
  opacity: 1;
}
.product-details-inner {
  padding: 0 var(--space-lg) var(--space-lg);
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 24px;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.detail-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(245, 240, 232, 0.04);
}
.detail-label {
  color: var(--text-dim);
  letter-spacing: 0.05em;
}
.detail-value {
  color: var(--text-secondary);
  text-align: right;
}
.expand-btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ayf-gold);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 0;
  margin-top: var(--space-sm);
  transition: color var(--transition-fast);
}
.expand-btn:hover {
  color: var(--ayf-gold-light);
}

/* --- Product Hero --- */
.products-hero {
  position: relative;
  height: 50vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--absolute-black);
}
.products-hero .hero-bg {
  position: absolute; inset: 0;
}
.products-hero .hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover; opacity: 0.3;
}
.products-hero .hero-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.9) 100%);
}
.products-hero .hero-content {
  position: relative; z-index: 2;
  text-align: center; max-width: 700px;
  padding: 0 var(--space-xl);
}

/* --- Back to Home --- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: var(--space-xl);
  transition: color var(--transition-fast);
}
.back-link:hover {
  color: var(--ayf-gold);
}

/* --- Products section wrapper --- */
.products-page {
  padding: var(--space-4xl) 0 var(--space-5xl);
  background: var(--absolute-black);
}

/* --- Page Specific Label --- */
.page-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ayf-gold);
  margin-bottom: var(--space-md);
}

/* --- Result count --- */
.result-count {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: var(--space-xl);
  font-family: var(--font-mono);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .products-hero { height: 40vh; min-height: 300px; }
  .detail-grid { grid-template-columns: 1fr; }
}
