/* ============================================
   PRODUCTS GRID STYLING
   ============================================ */

:root {
  --accent: #f97316;
  --accent2: #1d6fa8;
  --ink: #1c1b18;
  --muted: #6a6965;
  --surf: #ffffff;
  --surf2: #f4f2ee;
  --bdr: rgba(0, 0, 0, 0.09);
  --bdr2: rgba(0, 0, 0, 0.16);
  --radius: 12px;
}

.products-section {
  padding: 2rem 1rem 4rem;
  max-width: 1380px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .products-section {
    padding: 2.25rem 3.25rem 4.25rem;
  }
}

.section-eyebrow {
  font-family: "Syne", sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(315px, 1fr));
  gap: 1rem;
}

/* CARD */
.p-card {
  background: var(--surf);
  border: 0.5px solid var(--bdr);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    box-shadow 0.22s,
    transform 0.22s;
}

.p-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

.p-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px 12px;
}

.badge {
  background: var(--accent);
  color: #fff;
  font-family: "Syne", sans-serif;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 5px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.badge.b2 {
  background: var(--accent2);
}

.p-card-title {
  font-family: "Syne", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

.p-card-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.p-diagram {
  background: var(--surf2);
  border-top: 0.5px solid var(--bdr);
  border-bottom: 0.5px solid var(--bdr);
  height: 148px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
}

.p-diagram svg {
  width: 100%;
  height: 100%;
}

.p-desc {
  padding: 14px 18px 18px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.75;
  flex: 1;
}

.p-desc .hl {
  color: var(--ink);
  font-weight: 500;
}

.use-cases {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 0.5px solid var(--bdr);
}

.use-tag {
  font-size: 11px;
  padding: 3px 9px;
  background: var(--surf2);
  border: 0.5px solid var(--bdr2);
  border-radius: 20px;
  color: var(--muted);
}

/* CTA STRIP */
.cta-strip {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 2rem 1.25rem;
  margin-top: 2rem;
}

.cta-strip p {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 6px;
}

.cta-strip h3 {
  font-family: "Syne", sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* ============================================
   PREMIUM PRODUCT SHOWCASE STYLES
   ============================================ */

.premium-showcase {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* ---- Navigation Bar ---- */
.showcase-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #1a1a1a;
  border-radius: 0.5rem;
  padding: 1.25rem 2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-item {
  color: #fff;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
  cursor: pointer;
  padding: 0.5rem 0;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #f97316;
  transition: width 0.3s ease;
}

.nav-item:hover {
  color: #f97316;
}

.nav-item:hover::after {
  width: 100%;
}

.nav-item.active {
  color: #f97316;
}

.nav-item.active::after {
  width: 100%;
}

/* ---- Category Row ---- */
.category-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
  justify-content: center;
}

.category-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  border-color: #f97316;
}

.category-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-icon svg {
  width: 100%;
  height: 100%;
}

.category-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  letter-spacing: 0.3px;
}

/* ---- Main Showcase ---- */
.showcase-main {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem;
  background: #f9fafb;
  border-radius: 1rem;
}

.showcase-title {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 1.5rem 0;
  letter-spacing: -0.5px;
  transition: opacity 0.3s ease;
}

.showcase-desc {
  font-size: 1rem;
  line-height: 1.75;
  color: #4b5563;
  max-width: 700px;
  margin: 0 auto;
  letter-spacing: 0.3px;
  transition: opacity 0.3s ease;
}

/* ---- Thumbnail Carousel ---- */
.thumbnail-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
  overflow-x: auto;
  padding: 1rem 0;
}

.carousel-container {
  flex: 1;
  max-width: 700px;
  overflow: hidden;
  border-radius: 0.75rem;
}

.carousel-track {
  display: flex;
  gap: 1rem;
  transition: transform 0.4s ease;
}

.thumbnail {
  min-width: 140px;
  height: 110px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.thumbnail:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #f97316;
}

.thumbnail svg {
  width: 100%;
  height: 100%;
}

.carousel-arrow {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #1f2937;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.carousel-arrow:hover {
  background: #f97316;
  color: #fff;
  border-color: #f97316;
}

.carousel-arrow svg {
  width: 20px;
  height: 20px;
}

/* ---- Product List Section ---- */
.product-list-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.list-heading {
  font-size: 1.375rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 1.75rem 0;
  letter-spacing: -0.3px;
}

.product-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.product-list li {
  font-size: 1rem;
  color: #374151;
  line-height: 1.6;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #f9fafb;
  border-left: 3px solid #f97316;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
}

.product-list li:hover {
  background: #f3f4f6;
  transform: translateX(4px);
}

.list-number {
  font-weight: 700;
  color: #f97316;
  min-width: 24px;
}

/* ---- Footnote ---- */
.footnote {
  text-align: center;
  padding: 1.5rem;
  background: #f0f9ff;
  border: 1px solid #bfdbfe;
  border-radius: 0.75rem;
  margin-top: 2rem;
}

.footnote p {
  font-size: 0.95rem;
  color: #1e40af;
  margin: 0;
  font-style: italic;
  letter-spacing: 0.2px;
}

/* ---- Responsive Design ---- */
@media (max-width: 768px) {
  .premium-showcase {
    padding: 1.5rem 0.75rem;
  }

  .showcase-nav {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
  }

  .nav-item {
    font-size: 0.8rem;
  }

  .category-row {
    grid-template-columns: repeat(auto-fit, minmax(85px, 1fr));
    gap: 1rem;
  }

  .showcase-main {
    padding: 1.5rem 1rem;
    margin-bottom: 2rem;
  }

  .showcase-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .showcase-desc {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .thumbnail-carousel {
    gap: 0.75rem;
    flex-direction: column;
  }

  .carousel-arrow {
    width: 40px;
    height: 40px;
  }

  .product-list-section {
    padding: 1.5rem 1rem;
  }

  .list-heading {
    font-size: 1.125rem;
    margin-bottom: 1rem;
  }

  .product-list {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .product-list li {
    font-size: 0.9rem;
    padding: 0.625rem 0.875rem;
  }
}

@media (max-width: 480px) {
  .premium-showcase {
    padding: 1rem 0.5rem;
  }

  .showcase-nav {
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .nav-item {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
  }

  .category-row {
    grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));
    gap: 0.75rem;
  }

  .category-card {
    padding: 1rem 0.75rem;
  }

  .showcase-title {
    font-size: 1.25rem;
  }

  .showcase-desc {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .thumbnail {
    min-width: 120px;
    height: 95px;
  }

  .carousel-arrow {
    width: 36px;
    height: 36px;
  }

  .product-list li {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
  }

  .list-number {
    min-width: 20px;
  }
}

/* Carousel animation for smooth scrolling */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.thumbnail {
  animation: slideIn 0.3s ease-out;
}

.cta-btn {
  display: inline-block;
  background: #fff;
  color: var(--accent);
  font-family: "Syne", sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 30px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.cta-btn:hover {
  opacity: 0.88;
}

@media (max-width: 640px) {
  .products-section {
    padding: 1.25rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   DYNAMIC PRODUCT SHOWCASE WITH TABS
   ============================================ */

.product-showcase-dynamic {
  width: 100%;
}

/* Product Tabs Container */
.product-tabs-container {
  width: 100%;
  margin-bottom: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.product-tabs-scroll {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-start;
  padding: 0.5rem 0;
  min-width: min-content;
  flex-wrap: wrap;
}

.product-tab {
  padding: 0.75rem 1.25rem;
  border: 2px solid #e5e7eb;
  background: #fff;
  color: #4b5563;
  font-size: 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.product-tab:hover {
  border-color: #f97316;
  color: #f97316;
  transform: translateY(-2px);
}

.product-tab.active {
  background: #f97316;
  color: #000000;
  border-color: #f97316;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* Product Content Wrapper */
.product-content-wrapper {
  animation: fadeIn 0.4s ease;
}

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

/* Product Content */
/* .product-content {
  background: #f9fafb;
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  border: 1px solid #e5e7eb;
} */

.product-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 1rem 0;
  letter-spacing: -0.3px;
  text-align: center;
}

.product-description {
  font-size: 1rem;
  line-height: 1.75;
  color: #4b5563;
  letter-spacing: 0.3px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 2rem;
  text-align: center;
}

/* Product Image Carousel */
.product-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.carousel-nav-button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #1f2937;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.carousel-nav-button:hover {
  background: #f97316;
  color: #fff;
  border-color: #f97316;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.carousel-nav-button svg {
  width: 20px;
  height: 20px;
}

.carousel-content {
  flex: 1;
  max-width: 700px;
  overflow: hidden;
}

.carousel-images {
  display: flex;
  gap: 1rem;
  transition: transform 0.4s ease-out;
  width: 100%;
}

.carousel-image-item {
  min-width: 100%;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #fff;
  border: 2px solid #d1d5db;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.carousel-image-item:hover {
  border-color: #f97316;
}

.carousel-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder for images */
.image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #9ca3af;
  text-align: center;
  padding: 2rem;
  flex-direction: column;
  gap: 0.5rem;
}

.image-placeholder-icon {
  font-size: 2rem;
  opacity: 0.5;
}

.image-placeholder-text {
  font-weight: 600;
  font-size: 0.85rem;
}

/* Image Thumbnails */
.carousel-thumbnails {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    height: 10vw;
    width: inherit;
    justify-content: center;
}
.carousel-thumbnails > * {
    flex: 1 1 0;
}

.thumbnail-thumb {
  width: fit-content;
  border: 2px solid #d1d5db;
  border-radius: 0.75rem;
  background: #fff;
  cursor: pointer;
  display: block;
  transition: all 0.3s ease;
  overflow: hidden;
  padding: 1rem;
  position: relative;
  text-align: left;
  max-width: 200px;
}

.thumbnail-thumb:hover {
  border-color: #f97316;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 31, 61, 0.12);
}

.thumbnail-thumb.active {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.thumbnail-thumb img {
  width: 100%;
  height: 100%;
  object-fit:contain;
  display: block;
  aspect-ratio: 4 / 3;
  transition: transform 0.35s ease;
}

.thumbnail-thumb:hover img,
.thumbnail-thumb:focus-visible img {
  transform: scale(1.04);
}

.product-image-card-label {
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.85rem;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.3;
  padding: 0.55rem 0.7rem;
  border-radius: 0.45rem;
  background: rgba(10, 22, 40, 0.78);
}

.product-image-card:focus-visible {
  outline: 3px solid rgba(249, 115, 22, 0.28);
  outline-offset: 4px;
}

/* Responsive Design for Dynamic Product Showcase */
@media (max-width: 768px) {
  .product-tabs-scroll {
    gap: 0.35rem;
  }

  .product-tab {
    padding: 0.625rem 1rem;
    font-size: 0.85rem;
  }

  .product-content {
    padding: 2rem 1.5rem;
  }

  .product-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }

  .product-description {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
  }

  .product-carousel {
    gap: 1rem;
  }

  .carousel-nav-button {
    width: 40px;
    height: 40px;
  }

  .carousel-thumbnails {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
  }

  .thumbnail-thumb {
    min-height: 165px;
  }
}

@media (max-width: 480px) {
  .product-tabs-scroll {
    gap: 0.25rem;
  }

  .product-tab {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }

  .product-content {
    padding: 1.5rem 1rem;
  }

  .product-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }

  .product-description {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1rem;
  }

  .carousel-nav-button {
    width: 36px;
    height: 36px;
  }

  .carousel-nav-button svg {
    width: 18px;
    height: 18px;
  }

  .carousel-content {
    max-width: 100%;
  }

  .carousel-image-item {
    border-radius: 0.5rem;
  }

  .carousel-thumbnails {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .thumbnail-thumb {
    min-height: 180px;
  }
}
