/* ── Section ── */
.products-section {
  background-color: var(--section-bg);
  color: var(--section-text);
  padding: var(--spacing-2xl) var(--spacing-xl);
}

.products-section .container {
  max-width: 1100px;
  margin: 0 auto;
}

.products-section h2 {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-2xl);
  margin-bottom: var(--spacing-sm);
}

.products-section .section-description {
  font-size: var(--font-size-base);
  opacity: 0.75;
  margin-bottom: var(--spacing-2xl);
  line-height: var(--line-height-relaxed);
}

/* ── Product grid ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--spacing-lg);
}

/* ── Product card ── */
.product-card {
  background-color: rgba(255,255,255,0.06);
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card-header {
  background-color: #1e2235;
  color: #ffffff;
  padding: var(--spacing-xl);
}

.product-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  background-color: rgba(255,255,255,0.15);
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  margin-bottom: var(--spacing-sm);
}

.product-card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--spacing-md);
}

.product-card-header h3 {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-xl);
  color: #ffffff;
  margin: var(--spacing-sm) 0 var(--spacing-xs);
}

.product-partner-logo {
  height: 70px;
  object-fit: contain;
  flex-shrink: 0;
  background-color: rgba(255, 255, 255, 0.1);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 50px;
}

.product-requires {
  font-size: var(--font-size-sm);
  color: rgba(255,255,255,0.5);
  margin: 0;
}

.product-card-body {
  padding: var(--spacing-xl);
  flex: 1;
}

.product-card-body p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--section-text);
  margin-bottom: var(--spacing-lg);
}

.product-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.product-features li {
  font-size: var(--font-size-sm);
  color: var(--section-text);
  padding-left: var(--spacing-md);
  position: relative;
  line-height: var(--line-height-relaxed);
}

.product-features li::before {
  content: '–';
  position: absolute;
  left: 0;
  opacity: 0.4;
}

.product-card-footer {
  padding: var(--spacing-lg) var(--spacing-xl) var(--spacing-xl);
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

/* ── Moodle video modal ── */
.product-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-modal[hidden] {
  display: none;
}

.product-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.product-modal-dialog {
  position: relative;
  width: 90vw;
  max-width: 860px;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.product-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: #fff;
  font-size: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.product-modal-close:hover {
  background: rgba(0, 0, 0, 0.9);
}

.product-modal-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.product-modal-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Packages page banner ── */
.packages-banner {
  background-color: var(--blc-dark-bg);
  color: #ffffff;
  padding: var(--spacing-2xl) var(--spacing-xl);
  border-top: 6px solid #ffffff;
}

.packages-banner h2 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--spacing-sm);
  color: #ffffff;
}

.packages-banner p {
  font-size: var(--font-size-base);
  opacity: 0.75;
  margin: 0;
}

/* ── Coming Soon variant ── */
.product-card--coming-soon {
  opacity: 0.85;
}

.product-tag--coming-soon {
  background-color: rgba(248, 200, 30, 0.2);
  color: #f8c81e;
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}
