/* ─── Products Section — Azure Style ──────────────────────────── */

.products {
  padding: 80px var(--section-padding-x);
  background: var(--bg-light);
}

@media (max-width: 1200px) {
  .products {
    padding: 60px 40px;
  }
}

@media (max-width: 768px) {
  .products {
    padding: 40px 20px;
  }
}

.products__container {
  max-width: var(--container-max-width);
  margin: 0 auto;
}

/* ─── Header ─────────────────────────────────────────────────── */
.products__header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 2.5rem auto;
  padding-top: 1rem;
}

.products__title {
  font-family: var(--font-heading);
  font-size: var(--font-size-h2);
  font-weight: 600;
  color: var(--charcoal-black);
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
}

.products__subtitle {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  color: var(--gray-muted);
  line-height: 1.6;
  margin: 0 auto;
  max-width: 500px;
}

@media (max-width: 768px) {
  .products__title {
    font-size: 1.75rem;
  }
}

/* ─── Main Layout: Featured + Grid ───────────────────────────── */
.products__layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 10px;
  align-items: stretch;
}

@media (max-width: 1200px) {
  .products__layout {
    grid-template-columns: 280px 1fr;
  }
}

@media (max-width: 992px) {
  .products__layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* ─── Featured Card (Left Side) ───────────────────────────────── */
.products__featured-card {
  display: block;
  border-radius: 3px;
  overflow: hidden;
  text-decoration: none;
  position: relative;
  min-height: 480px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.products__featured-card:hover {
  transform: translateY(-2px);
}

.featured-card__image {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 480px;
  background: url("../../assets/Building.svg") center/cover no-repeat;
  display: flex;
  align-items: flex-end;
}

.featured-card__gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.5) 100%
  );
}

.featured-card__content {
  position: relative;
  z-index: 2;
  padding: 32px;
  color: white;
}

.featured-card__title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: white;
}

.featured-card__desc {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 20px 0;
  color: rgba(255, 255, 255, 0.85);
}

.featured-card__link {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  background: var(--primary);
  padding: 10px 20px;
  border-radius: 3px;
  transition: background 0.2s ease;
}

.featured-card__link::after {
  content: "→";
  margin-left: 6px;
  transition: transform 0.2s ease;
}

.products__featured-card:hover .featured-card__link::after {
  transform: translateX(4px);
}

@media (max-width: 992px) {
  .products__featured-card,
  .featured-card__image {
    min-height: 300px;
  }
}

/* ─── Product Grid (Right Side) ──────────────────────────────── */
.products__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 10px;
}

@media (max-width: 1200px) {
  .products__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .products__grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
}

/* ─── Product Card ───────────────────────────────────────────── */
.product-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: white;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  min-height: 220px;
}

.product-card:hover {
  transform: translateY(-2px);
}

.product-card__top {
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
  flex-grow: 1;
}

.product-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--primary-gradient);
  color: white;
  transition: opacity 0.3s ease;
}

.product-card__icon svg {
  width: 28px;
  height: 28px;
}

.product-card__name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--charcoal-black);
  margin: 0;
  line-height: 1.3;
}

.product-card__desc {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--gray-muted);
  line-height: 1.5;
  margin: 0;
  transition: opacity 0.3s ease;
}

/* ─── Hover Content (Reveals on hover) ───────────────────────── */
.product-card__hover-content {
  position: absolute;
  top: 24px;
  left: 24px;
  right: 24px;
  bottom: 60px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: white;
  pointer-events: none;
  z-index: 5;
}

.product-card__hover-content .product-card__icon {
  opacity: 1 !important;
  flex-shrink: 0;
}

.product-card:hover .product-card__hover-content {
  opacity: 1;
  pointer-events: auto;
}

.product-card:hover .product-card__desc,
.product-card:hover > .product-card__top > .product-card__icon {
  opacity: 0;
}

.product-card__subdesc {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--charcoal-black);
  line-height: 1.6;
  margin: 0;
}

/* ─── Link (always visible at bottom) ────────────────────────── */
.product-card__link {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: auto;
  padding-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
  z-index: 10;
}

.product-card__link::after {
  content: "→";
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.product-card:hover .product-card__link::after {
  transform: translateX(4px);
}

/* ─── Empty State ────────────────────────────────────────────── */
.products__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  font-size: var(--font-size-body);
  color: var(--gray-muted);
  font-family: var(--font-body);
}

/* ─── All Products Overlay (Gallery Style) ──────────────────── */
#all-products-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-light);
  z-index: 2000;
  overflow-y: auto;
  display: none;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}

#all-products-overlay.visible {
  display: block;
  opacity: 1;
}

.article-close-row {
  position: fixed;
  top: 30px;
  right: 40px;
  z-index: 2100;
}

.article-close-btn {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--charcoal-black);
  font-size: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
}

.article-close-btn:hover {
  transform: rotate(90deg);
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ─── Hero Header ────────────────────────────────────────────── */
.products-hero {
  position: relative;
  height: 500px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  padding-bottom: 40px;
}

.products-hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("../../assets/Building.svg") center/cover no-repeat;
}

.products-hero__gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.7) 60%,
    rgba(0, 0, 0, 0.95) 100%
  );
}

.products-hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  max-width: 700px;
  padding: 0 24px;
  margin: 0 auto;
}

.products-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3rem);
  font-weight: 600;
  color: white;
  margin: 0 0 20px 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.products-hero__desc {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  margin: 0;
}

.article-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
  position: relative;
}

.article-content {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: 1.8;
  color: var(--charcoal-black);
  font-weight: 400;
}

/* Products grid for overlay */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .article-container {
    padding: 60px 20px;
  }
  .article-close-row {
    top: 20px;
    right: 20px;
  }
  .products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .products-hero__content {
    padding: 0 24px;
  }
  .products-hero__title {
    font-size: 2rem;
  }
  .products-hero__desc {
    font-size: 1rem;
  }
}

/* Explore button styles */
#explore-products-btn {
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

#explore-products-btn:hover {
  transform: translateY(-2px);
}

/* Product cards in overlay - same size as main */
#all-products-overlay .product-card {
  min-height: 220px;
  border-radius: 3px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
  transition:
    box-shadow 0.35s ease,
    transform 0.35s ease;
}

#all-products-overlay .product-card:hover {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
  transform: translateY(-5px);
}

#all-products-overlay .product-card__hover-content {
  top: 24px;
  left: 24px;
  right: 24px;
  bottom: 60px;
}

/* Category sections */
.category-section {
  margin-bottom: 50px;
}

.category-section:last-child {
  margin-bottom: 0;
}

.category-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--charcoal-black);
  margin: 0 0 20px 0;
}

/* Product icon image */
.product-icon-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 3px;
}

/* UlapBAI icon styling */
.icon-bai {
  background: var(--primary-gradient) !important;
}
