.gallery-section {
  max-width: 1400px;
  margin: 50px;
}

.section-header {
  margin-bottom: 32px;
}

.section-title {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #1a1a1a;
}

/* MS color */
.section-title .title-ms {
  color: #111111;
}

/* Work highlight color */
.section-title .title-work {
  color: #d0373b;
  /* steel / construction accent */
}

/* Right side vertical strip */
.section-title .title-bar {
  display: inline-block;
  width: 5px;
  height: 28px;
  background: linear-gradient(180deg, #d0373b, #a00308);
  border-radius: 3px;
  margin-left: 10px;
  margin-top: 1px;
}

.section-title:hover .title-work {
  color: #b61015;
}

.section-title:hover .title-bar {
  height: 36px;
  transition: all 0.3s ease;
}

@media (max-width: 576px) {
  .section-title {
    font-size: 1.8rem;
  }

  .section-title .title-bar {
    height: 24px;
  }

  .gallery-section {
    max-width: 1400px;
    margin: 10px;
  }
}


/* Gallery Container */
.gallery-container {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
}

.gallery-container::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari/Opera */
}

/* Gallery Grid */
.gallery-grid {
  display: flex;
  gap: 24px;
  padding: 4px;
}

/* Product Card */
.product-card {
  flex: 0 0 auto;
  width: 280px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  overflow: hidden;
}

.product-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

/* Image Container */
.image-container {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  background: #f5f5f5;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

/* Product Title */
.product-title {
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  text-align: left;
}

.product-title {
  display: none;
}

.product-card {
  padding-bottom: 0;
}

.gallery-container {
  scroll-behavior: smooth;
}


/* Mobile: 1-2 cards with snap scroll */
@media (max-width: 767px) {
  .section-title {
    font-size: 1.5rem;
  }

  .gallery-container {
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }

  .product-card {
    scroll-snap-align: start;
    width: 260px;
  }

  .image-container {
    height: 260px;
  }
}

/* Tablet: 2-3 cards */
@media (min-width: 768px) and (max-width: 1023px) {
  .section-title {
    font-size: 1.75rem;
  }

  .gallery-grid {
    gap: 20px;
  }

  .product-card {
    width: 300px;
  }

  .image-container {
    height: 300px;
  }
}

/* Desktop: 5 cards in grid */
@media (min-width: 1024px) {
  .gallery-container {
    overflow-x: visible;
  }

  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
  }

  .product-card {
    width: auto;
  }

  .image-container {
    height: 300px;
  }
}

/* Large Desktop: Larger cards */
@media (min-width: 1400px) {
  .image-container {
    height: 340px;
  }

  .product-title {
    font-size: 1.1rem;
  }
}

/* Loading Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card {
  animation: fadeIn 0.5s ease forwards;
}

.product-card:nth-child(1) {
  animation-delay: 0.1s;
}

.product-card:nth-child(2) {
  animation-delay: 0.2s;
}

.product-card:nth-child(3) {
  animation-delay: 0.3s;
}

.product-card:nth-child(4) {
  animation-delay: 0.4s;
}

.product-card:nth-child(5) {
  animation-delay: 0.5s;
}