/* ==========================================================================
   Product Catalog Section, Filter Pills & Product Cards
   ========================================================================== */

/* 1. Generic Product Card */
.product-card {
  display: flex;
  flex-direction: column;
  background-color: var(--epna-dark-surface);
  border: 1px solid var(--epna-slate-border);
  border-radius: var(--epna-radius-md);
  overflow: hidden;
  transition: all var(--epna-transition-normal);
}

.product-card:hover {
  border-color: var(--epna-cyan);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 20px var(--epna-cyan-glow);
  transform: translateY(-4px);
}

.product-card__thumb {
  position: relative;
  height: 220px;
  background-color: #0c1424;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--epna-transition-slow);
}

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

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

.product-card__title {
  font-size: 1.15rem;
  margin-block-end: var(--epna-space-sm);
}

.product-card__title a {
  color: var(--epna-white);
}

.product-card__title a:hover {
  color: var(--epna-cyan);
}

/* 2. Catalog Section & Interactive Filter */
.epna-products-section {
  background-color: var(--epna-white);
  padding-block: 5.5rem;
}

.catalog-category-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--epna-space-sm);
  margin-block-end: var(--epna-space-2xl);
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-inline: 1.25rem;
  padding-block: 0.5rem;
  border-radius: var(--epna-radius-full);
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  outline: none;
  transition: all var(--epna-transition-fast);
}

.cat-pill:hover,
.cat-pill:focus-visible,
.cat-pill.is-active {
  background-color: #0284c7;
  color: var(--epna-white);
  border-color: #0284c7;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
}

.cat-pill .pill-svg-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.cat-pill .pill-svg-icon svg {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  display: block;
}

.cat-pill.is-active .pill-svg-icon svg path,
.cat-pill.is-active .pill-svg-icon svg rect,
.cat-pill.is-active .pill-svg-icon svg line,
.cat-pill.is-active .pill-svg-icon svg polygon {
  stroke: var(--epna-white) !important;
}

/* 3. Catalog Grid Gallery & Loader */
.catalog-grid-wrapper,
.products-grid-gallery {
  position: relative;
  min-height: 380px;
}

.industrial-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--epna-space-xl);
  margin-block-end: var(--epna-space-2xl);
  transition: opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1), transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.industrial-products-grid.is-loading {
  opacity: 0.35;
  pointer-events: none;
  transform: scale(0.995);
}

.catalog-grid-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.catalog-grid-wrapper.is-loading .catalog-grid-loader,
.products-grid-gallery.is-loading .catalog-grid-loader {
  display: flex;
}

.catalog-spinner {
  width: 44px;
  height: 44px;
  border: 3.5px solid rgba(2, 132, 199, 0.18);
  border-top-color: #0284c7;
  border-radius: 50%;
  animation: epnaCatalogSpin 0.7s linear infinite;
  background-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

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

@keyframes epnaCardIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.industrial-products-grid .industrial-product-card {
  animation: epnaCardIn 0.35s ease backwards;
}

.industrial-products-grid .industrial-product-card:nth-child(1) { animation-delay: 0.04s; }
.industrial-products-grid .industrial-product-card:nth-child(2) { animation-delay: 0.08s; }
.industrial-products-grid .industrial-product-card:nth-child(3) { animation-delay: 0.12s; }
.industrial-products-grid .industrial-product-card:nth-child(4) { animation-delay: 0.16s; }
.industrial-products-grid .industrial-product-card:nth-child(5) { animation-delay: 0.20s; }
.industrial-products-grid .industrial-product-card:nth-child(6) { animation-delay: 0.24s; }

/* 4. Industrial Showcase Product Card */
.industrial-product-card {
  background-color: var(--epna-white);
  border: 1px solid #e2e8f0;
  border-radius: var(--epna-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: transform var(--epna-transition-normal),
              box-shadow var(--epna-transition-normal),
              border-color var(--epna-transition-normal);
}

.industrial-product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 32px -4px rgba(0, 0, 0, 0.1);
  border-color: #38bdf8;
}

.product-card-thumb-wrap {
  position: relative;
  height: 230px;
  background-color: #f8fafc;
  border-block-end: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--epna-space-lg);
  overflow: hidden;
}

.product-card-thumb-wrap img,
.product-card-img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  width: auto;
  height: auto;
  transition: transform var(--epna-transition-normal);
}

.industrial-product-card:hover .product-card-thumb-wrap img {
  transform: scale(1.05);
}

.product-card-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #0284c7;
}

.product-card-thumb-placeholder svg {
  width: 64px;
  height: 64px;
}

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

.product-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--epna-dark);
  margin-block-end: var(--epna-space-sm);
}

.product-card-title a {
  color: var(--epna-dark);
  text-decoration: none;
  transition: color var(--epna-transition-fast);
}

.product-card-title a:hover {
  color: #0284c7;
}

.product-card-excerpt {
  color: var(--epna-gray);
  font-size: 0.875rem;
  line-height: 1.7;
  flex: 1;
  margin-block-end: var(--epna-space-lg);
}

.product-card-footer {
  margin-block-start: auto;
}

.product-card-footer .btn {
  background-color: #0f172a;
  color: var(--epna-white);
  border: 1px solid #0f172a;
  border-radius: var(--epna-radius-md);
  font-weight: 600;
  font-size: 0.8125rem;
  width: 100%;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  transition: all var(--epna-transition-fast);
}

.product-card-footer .btn:hover {
  background-color: #0284c7;
  border-color: #0284c7;
  color: var(--epna-white);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.25);
  transform: translateY(-2px);
}

/* 5. Bottom Catalog CTA */
.catalog-bottom-cta {
  margin-block-start: var(--epna-space-xl);
  text-align: center;
}

.catalog-bottom-cta .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #0f172a;
  color: var(--epna-white);
  border: 2px solid #0f172a;
  font-weight: 700;
  font-size: 0.95rem;
  padding-inline: 2.25rem;
  padding-block: 0.85rem;
  border-radius: var(--epna-radius-md);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
  transition: all var(--epna-transition-normal);
  text-decoration: none;
}

.catalog-bottom-cta .btn:hover {
  background-color: #0284c7;
  border-color: #0284c7;
  color: var(--epna-white);
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.35);
  transform: translateY(-2px);
}

/* Responsive Grid Adaptations */
@media (max-width: 1024px) {
  .industrial-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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