.products-page {
  background: var(--color-bg);
}

main > .section {
  padding-block: clamp(2.75rem, 5vw, 4rem);
}

.products-hero {
  padding-block: var(--space-lg) var(--space-md);
  text-align: center;
  background: linear-gradient(185deg, var(--color-primary-light) -80%, var(--color-bg) 100%);
  border-bottom: 1px solid var(--color-border);
}

.hero-content-box {
  max-width: 980px;
  margin-inline: auto;
  padding-inline: 1rem;
  text-align: center;
}

.hero-content-box h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: var(--color-primary);
  line-height: 1.1;
  margin-block: 0.5rem 1rem;
}

.hero-content-box .lead {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 860px;
  margin-inline: auto;
}

/* Filter Tabs */
.filter-tabs-wrapper {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  overflow-x: auto;
  padding-block: 0.5rem;
  width: 100%;
}

.filter-tabs {
  display: inline-flex;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 0.35rem;
  border-radius: var(--radius-pill);
  gap: 0.25rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.filter-btn {
  background: transparent;
  border: 0;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-pill);
  font-family: "DM Sans", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

.filter-btn:hover {
  color: var(--color-primary);
  background: rgba(45,106,79,0.05);
}

.filter-btn.active {
  background: var(--color-primary);
  color: #fff;
}

/* Catalog Container */
.catalog-container {
  padding-block: clamp(2.75rem, 5vw, 4rem);
}

.collection-section {
  margin-bottom: var(--space-lg);
  scroll-margin-top: 100px;
}

.collection-header {
  margin-bottom: 2rem;
  border-left: 3px solid var(--color-accent);
  padding-left: 1.25rem;
}

.collection-header h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: var(--text-lg);
  color: var(--color-primary);
  line-height: 1.2;
  margin-block: 0.25rem 0.5rem;
}

.collection-subtitle {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  max-width: 80ch;
}

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

@media (min-width: 768px) {
  .products-grid {
    gap: 2rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Product Catalog Card */
.product-catalog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-image-container {
  position: relative;
  height: clamp(150px, 38vw, 280px);
  overflow: hidden;
  background: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border);
}

.product-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-base) var(--ease-out);
}

.product-catalog-card:hover .product-image-container img {
  transform: scale(1.04);
}

.product-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(255,255,255,0.92);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
  letter-spacing: 0.05em;
}

.product-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-id {
  font-family: "DM Sans", sans-serif;
  font-size: 0.75rem;
  color: var(--color-accent);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.product-info h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.45rem;
  color: var(--color-primary);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.product-card-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.product-spec-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  border-top: 1px dashed var(--color-border);
  padding-top: 0.85rem;
  display: grid;
  gap: 0.4rem;
}

.product-spec-list li {
  font-size: 0.85rem;
  color: var(--color-text);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.product-spec-list li strong {
  flex: 0 0 auto;
  font-weight: 500;
  color: var(--color-text-muted);
  text-align: left;
}

.product-spec-value {
  flex: 1 1 auto;
  text-align: right;
}

.product-actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: auto;
}

.product-actions .btn {
  flex: 0 0 auto;
  padding: 0.65rem 0.85rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-md);
}

@media (max-width: 767px) {
  .product-tag {
    top: 0.55rem;
    left: 0.55rem;
    padding: 0.18rem 0.42rem;
    font-size: 0.58rem;
    letter-spacing: 0.03em;
  }

  .product-info {
    padding: 0.75rem;
  }

  .product-id {
    font-size: 0.58rem;
    margin-bottom: 0.18rem;
  }

  .product-info h3 {
    font-size: 1rem;
    line-height: 1.12;
    margin-bottom: 0.35rem;
  }

  .product-card-desc {
    font-size: 0.68rem;
    line-height: 1.35;
    margin-bottom: 0.75rem;
  }

  .product-spec-list {
    gap: 0.25rem;
    margin-bottom: 0.85rem;
    padding-top: 0.6rem;
  }

  .product-spec-list li {
    display: block;
    font-size: 0.64rem;
    line-height: 1.3;
  }

  .product-spec-value {
    display: block;
    text-align: left;
    color: var(--color-primary);
  }

  .product-actions {
    gap: 0.35rem;
  }

  .product-actions .btn {
    padding: 0.42rem 0.46rem;
    font-size: 0.56rem;
    letter-spacing: 0.02em;
  }
}

.btn-outline-dark {
  border: 1px solid var(--color-border-strong);
  color: var(--color-text);
  background: transparent;
  transition: all var(--duration-fast) var(--ease-out);
}

.btn-outline-dark:hover {
  background: var(--color-text);
  color: #fff;
  border-color: var(--color-text);
}

/* OEM Custom Project CTA Section */
.oem-cta-section {
  background: var(--color-surface-alt);
  color: var(--color-text);
  padding-block: clamp(2.75rem, 5vw, 4rem);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.oem-container {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 992px) {
  .oem-container {
    grid-template-columns: 2fr 1fr;
  }
  .oem-action {
    justify-self: end;
  }
}

.oem-text h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  color: #2d6a4f;
  line-height: 1.1;
  margin-block: 0.9rem 1.1rem;
  position: relative;
  display: block;
  width: fit-content;
  animation: oem-title-glow 2.6s ease-in-out infinite;
}

.oem-text h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 100%;
  height: 2px;
  background: #2d6a4f;
  transform-origin: left;
  animation: oem-title-underline 2.6s ease-in-out infinite;
}

.oem-text .badge {
  animation: none;
}

.oem-action .oem-cta-pulse {
  animation: oem-badge-border-pulse 2s ease-out infinite;
}

@keyframes oem-badge-border-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(45, 106, 79, 0.45);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(45, 106, 79, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(45, 106, 79, 0);
  }
}

@keyframes oem-title-glow {
  0%,
  100% {
    text-shadow: 0 0 0 rgba(45, 106, 79, 0);
  }
  50% {
    text-shadow: 0 0 12px rgba(45, 106, 79, 0.28);
  }
}

@keyframes oem-title-underline {
  0%,
  100% {
    transform: scaleX(0.75);
    opacity: 0.55;
  }
  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .oem-text .badge,
  .oem-action .oem-cta-pulse,
  .oem-text h2,
  .oem-text h2::after {
    animation: none;
  }
}

.oem-text p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 72ch;
  text-align: justify;
}

.badge-outline {
  border: 1px solid var(--color-border-strong);
  background: #fff;
  color: var(--color-text);
}

/* Modal Styling */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10090;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 2.2rem;
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal-box {
  transform: translateY(0);
}

.modal-box h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  color: var(--color-primary);
  margin-bottom: 0.8rem;
}

.modal-box p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

/* Tab filter handling */
.collection-section.hide-section {
  display: none !important;
}
