/**
 * VECTRO INDUSTRIAL - Products Showcase 3-Layer Architecture Styles
 * Layer 1: Categories | Layer 2: Product Catalog | Layer 3: Comprehensive Product Detail
 */

@import url("./tokens.css");

/* -------------------------------------------------------------
   BREADCRUMB & DRILL-DOWN NAVIGATION
------------------------------------------------------------- */
.showcase-breadcrumb-bar {
  background: var(--bg-page-dark);
  border-bottom: 1px solid var(--border-light);
  padding: 14px 0;
  font-size: 0.875rem;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
}

.breadcrumb-item a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.breadcrumb-item a:hover {
  color: var(--accent-gold);
}

.breadcrumb-item.active {
  color: var(--accent-gold);
  font-weight: 600;
}

.breadcrumb-separator {
  color: var(--border-light);
}

.layer-container {
  display: none;
  animation: fadeInLayer 280ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.layer-container.active-layer {
  display: block;
}

@keyframes fadeInLayer {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -------------------------------------------------------------
   LAYER 1: CATEGORY SELECTION ARCHITECTURE
------------------------------------------------------------- */
.categories-header-block {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-10) auto;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-10);
}

.showcase-grid,
#layer2-products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-6);
}

#layer2-products-grid .product-card {
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}

.category-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-raised);
  position: relative;
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
  cursor: pointer;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-card-hover);
}

.cat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-4);
}

.cat-icon-symbol {
  width: 56px;
  height: 56px;
  background: var(--bg-page-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-primary);
  transition: transform var(--transition-fast);
}

.category-card:hover .cat-icon-symbol {
  transform: scale(1.08);
  border-color: var(--accent-gold-border);
}

.cat-icon-symbol svg {
  width: 32px;
  height: 32px;
}

.cat-icon-symbol i {
  font-size: 1.85rem;
  line-height: 1;
}

.cat-title {
  font-family: var(--font-family-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: var(--space-2);
  word-break: break-word;
}

.cat-tagline {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-3);
  word-break: break-word;
}

.cat-metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  margin-bottom: var(--space-4);
}

.cat-metric-item {
  display: flex;
  flex-direction: column;
}

.cat-metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.cat-metric-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
}

.cat-apps-box {
  margin-bottom: var(--space-5);
}

.cat-apps-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.cat-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cat-chip {
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.cat-card-action-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-page-dark);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--brand-primary);
  transition: all var(--transition-fast);
}

.category-card:hover .cat-card-action-btn {
  background: var(--accent-gold);
  color: #FFFFFF;
  border-color: var(--accent-gold);
}

/* -------------------------------------------------------------
   LAYER 2: PRODUCT LIST (FILTERABLE WITHIN CATEGORY)
------------------------------------------------------------- */
.layer2-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-light);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn-back:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: rgba(247, 192, 45, 0.05);
}

.layer2-active-cat-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.layer2-cat-title {
  font-family: var(--font-family-display);
  font-size: var(--font-size-2xl);
  font-weight: 800;
  line-height: var(--line-height-heading);
  color: var(--text-primary);
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.layer2-cat-desc {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
  max-width: 65ch;
}

.layer2-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-6);
}

.layer2-search-box {
  flex: 1;
  min-width: 280px;
  position: relative;
}

.layer2-search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.layer2-search-input {
  width: 100%;
  height: 44px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0 14px 0 42px;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.layer2-sort-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.layer2-sort-select {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.875rem;
  cursor: pointer;
}

/* -------------------------------------------------------------
   LAYER 3: DEDICATED FULL PRODUCT DETAIL VIEW
------------------------------------------------------------- */
.layer3-header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-light);
}

.detail-hero-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: var(--space-8);
  align-items: start;
  margin-bottom: var(--space-10);
}

.detail-visual-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-raised);
  position: relative;
}

.detail-main-art {
  width: 100%;
  height: 320px;
  background: var(--bg-page-dark);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.detail-main-art svg {
  width: 180px;
  height: 180px;
  color: var(--brand-primary);
  filter: drop-shadow(0 0 15px rgba(49, 92, 76, 0.25));
}

.detail-info-box {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.detail-badges-row {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
}

.detail-product-title {
  font-family: var(--font-family-display);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
}

.detail-product-tagline {
  font-size: 1.125rem;
  color: var(--accent-gold);
  font-weight: 500;
  line-height: 1.5;
}

.detail-product-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.detail-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

/* ROI & Value Highlight Box */
.roi-highlight-box {
  background: linear-gradient(135deg, var(--accent-gold-soft) 0%, var(--bg-surface-elevated) 100%);
  border: 1px solid var(--accent-gold-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin-top: var(--space-2);
}

.roi-highlight-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: var(--space-1);
}

.roi-highlight-text {
  font-size: 0.9375rem;
  color: var(--text-primary);
  line-height: 1.6;
}

/* Deep Technical Specs Table */
.detail-specs-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
  box-shadow: var(--shadow-raised);
}

.detail-section-title {
  font-family: var(--font-family-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
}

.detail-table th,
.detail-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9375rem;
}

.detail-table th {
  background: var(--bg-page-dark);
  color: var(--text-secondary);
  font-weight: 700;
  width: 32%;
}

.detail-table td {
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 500;
}

/* Feature Cards Grid */
.detail-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.feature-pill-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.feature-pill-card svg {
  width: 22px;
  height: 22px;
  color: var(--accent-green-bright);
  flex-shrink: 0;
  margin-top: 2px;
}

.feature-pill-text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Related companion machines */
.related-machines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: var(--space-5);
  margin-top: var(--space-4);
}

/* Direct Sales Engineer Contact Card */
.sales-engineer-banner {
  background: var(--brand-primary);
  border: 1px solid var(--accent-gold-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-10);
  box-shadow: var(--shadow-raised);
  color: #FFFFFF;
}

.sales-rep-info {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.sales-rep-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-gold);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sales-rep-details h4 {
  font-size: 1.125rem;
  color: var(--text-primary);
  font-weight: 700;
}

.sales-rep-details p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* -------------------------------------------------------------
   RESPONSIVENESS (Adaptive 4-col -> 3-col -> 2-col -> 1-col)
------------------------------------------------------------- */
@media (max-width: 1200px) {

  .categories-grid,
  .showcase-grid,
  #layer2-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .detail-hero-layout {
    grid-template-columns: 1fr;
  }

  .detail-product-title {
    font-size: 2rem;
  }
}

@media (max-width: 860px) {

  .categories-grid,
  .showcase-grid,
  #layer2-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
  }
}

@media (max-width: 540px) {

  .categories-grid,
  .showcase-grid,
  #layer2-products-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .layer2-toolbar {
    padding: var(--space-3);
    flex-direction: column;
    align-items: stretch;
  }

  .layer2-search-box {
    min-width: 0;
    width: 100%;
  }

  .layer2-search-input {
    font-size: 1rem;
  }

  .layer2-sort-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .layer2-sort-select {
    flex: 1;
    font-size: 1rem;
    min-height: 42px;
  }

  .layer2-chips-wrapper {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .cat-chip {
    flex-shrink: 0;
    min-height: 40px;
    padding: 8px 14px;
    font-size: 0.8125rem;
  }

  .detail-specs-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .detail-actions-row {
    flex-direction: column;
    width: 100%;
  }

  .detail-actions-row .btn {
    width: 100%;
    min-height: 48px;
  }
}