/* ==========================================================================
   UK Industries - Products Catalog Styles
   Modular stylesheet for product filter tabs, fixed-height cards, and popups
   ========================================================================== */

:root {
  --prod-accent: #dc2626;
  --prod-accent-hover: #b91c1c;
  --prod-accent-light: #fef2f2;
  --prod-text-dark: #0f172a;
  --prod-text-muted: #64748b;
  --prod-border: #e2e8f0;
  --prod-card-bg: #ffffff;
}

/* --------------------------------------------------------------------------
   Product Section Header & Category Filter Selector
   -------------------------------------------------------------------------- */
.products-section {
  padding: 5rem 0 5.5rem;
  background-color: #f8fafc;
  border-top: 1px solid var(--prod-border);
  border-bottom: 1px solid var(--prod-border);
}

/* Expanded Wide Container for Showcase Catalog */
.products-container {
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

@media (min-width: 768px) {
  .products-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (min-width: 1400px) {
  .products-container {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}

.products-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

.products-tag {
  display: inline-block;
  background-color: var(--prod-accent-light);
  border: 1px solid #fee2e2;
  color: var(--prod-accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
}

.products-title {
  font-weight: 800;
  font-size: 2.25rem;
  color: var(--prod-text-dark);
  letter-spacing: -0.5px;
  margin-bottom: 0.65rem;
}

.products-subtitle {
  color: var(--prod-text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Category Filter Selector Buttons */
.category-filter-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 3rem;
}

.category-filter-btn {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.category-filter-btn:hover {
  background-color: var(--prod-accent-light);
  border-color: #fca5a5;
  color: var(--prod-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.12);
}

.category-filter-btn.active {
  background-color: var(--prod-accent);
  border-color: var(--prod-accent);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.25);
}

.category-filter-btn .filter-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background-color: rgba(0, 0, 0, 0.08);
  padding: 0.15rem 0.45rem;
  border-radius: 20px;
  transition: background-color 0.2s ease;
}

.category-filter-btn.active .filter-badge {
  background-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Product Cards - Uniform Fixed-Height Formation (Minimal & Sleek)
   -------------------------------------------------------------------------- */
.product-card {
  background-color: var(--prod-card-bg);
  border: 1px solid var(--prod-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: #cbd5e1;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

/* Product Image Frame (Square 1:1 Aspect Ratio) */
.product-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(110deg, #e2e8f0 8%, #f1f5f9 18%, #e2e8f0 33%);
  background-size: 200% 100%;
  animation: product-img-shimmer 1.4s linear infinite;
  cursor: pointer;
  flex-shrink: 0;
}

.product-card-img-wrap:has(.product-card-img.is-loaded) {
  animation: none;
  background: #0f172a;
}

@keyframes product-img-shimmer {
  to {
    background-position-x: -200%;
  }
}

.product-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.25s ease;
}

.product-card-img.is-loaded {
  opacity: 1;
}

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

/* Image Hover Zoom Overlay */
.product-card-img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.product-card-img-wrap:hover .product-card-img-overlay {
  opacity: 1;
}

.product-expand-badge {
  background: rgba(255, 255, 255, 0.95);
  color: var(--prod-accent);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(4px);
  transition: transform 0.25s ease;
}

.product-card-img-wrap:hover .product-expand-badge {
  transform: translateY(0);
}

/* Category Badge Floating on Image */
.product-category-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  color: var(--prod-accent);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0.22rem 0.6rem;
  border-radius: 50px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

/* Product Card Content Body */
.product-card-body {
  padding: 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Minimal Clickable Link Wrapping Title & Description */
.product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.product-card-link:hover .product-card-title {
  color: var(--prod-accent);
}

.product-card-link:hover .product-card-desc {
  color: #334155;
}

.product-card-content-top {
  display: flex;
  flex-direction: column;
}

.product-card-title {
  font-size: 1.02rem;
  font-weight: 750;
  color: var(--prod-text-dark);
  line-height: 1.35;
  margin-bottom: 0.35rem;
  /* Limit to 1 or 2 lines for uniform alignment */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 2.7em;
  transition: color 0.2s ease;
}

.product-card-desc {
  font-size: 0.84rem;
  color: var(--prod-text-muted);
  line-height: 1.5;
  margin-bottom: 0;
  /* Limit to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 3em;
  transition: color 0.2s ease;
}

/* Card Actions Footer */
.product-card-footer {
  border-top: 1px solid #f1f5f9;
  padding-top: 0.75rem;
  margin-top: auto;
  display: flex;
  align-items: center;
}

.btn-product-details {
  background-color: #fee2e2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  font-size: 0.83rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  transition: all 0.2s ease;
}

.btn-product-details:hover {
  background-color: var(--prod-accent);
  border-color: var(--prod-accent);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Filter Hide / Show Animations */
.product-item-col {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.product-item-col.d-none {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Product Image Expand Modal / Clean Big Image Lightbox
   -------------------------------------------------------------------------- */
.product-modal-dialog {
  max-width: 960px;
}

.product-modal-content {
  border-radius: 14px;
  overflow: hidden;
  background-color: #0f172a;
  border: none;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5);
  position: relative;
}

/* Floating Cross / Close Button */
.modal-close-custom {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #ffffff;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1065;
  padding: 0;
  line-height: 1;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.modal-close-custom:hover {
  background: var(--prod-accent);
  border-color: var(--prod-accent);
  color: #ffffff;
  transform: rotate(90deg) scale(1.08);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.45);
}

.product-modal-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 75vh;
  background-color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-modal-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #0f172a;
}

.product-modal-bar {
  background-color: #0f172a;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.85rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.product-modal-bar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}
