/* public/css/products.css
   ─────────────────────────────────────────────────────────
   products / BLOG LIST PAGE  (fixed)
   Re-uses design tokens from style.css:
      --glass-bg, --glass-border, --primary, --text-300 …
   ---------------------------------------------------------------- */

/* 1. HERO (full-screen background) */
.products-hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh; /* push cards down a bit */
  background: url("../img/code2.gif") center/cover fixed no-repeat;
  overflow: hidden;
}

.products-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .6); /* dark overlay */
  z-index: 0;
}

.products-hero > * {
  position: relative;
  z-index: 1;
}

/* 2. MAIN GLASS FIELD */
.products-field {
  width: min(1000px, 92%);
  padding: 3rem 3.25rem;
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  background: var(--glass-bg);
  background-image: var(--glass-highlight);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--glass-shadow);
  text-align: center;
}

/* Gradient ring accent */
.products-field::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from 180deg at 50% 50%,
    rgba(89, 220, 225, .9),
    rgba(147, 152, 255, .9),
    rgba(89, 220, 225, .9)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box,  linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: .3;
  transition: opacity .35s ease;
}

.products-field:hover::before {
  opacity: .6;
}

/* 3. HEADING & EMPTY STATE */
.products-field h2 {
  margin: 0 0 2rem;
  font-size: clamp(1.9rem, 1.45rem + 1.3vw, 2.5rem);
  line-height: 1.2;
}

.no-posts {
  margin: 0 0 1.5rem;
}

/* 4. GRID LAYOUT */
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

/* 5. INDIVIDUAL product CARD */
.products-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--glass-border);
  border-radius: 1.25rem;
  padding: 1.5rem;
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.products-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
}

/* Hover outline */
.products-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
  rgba(89, 220, 225, .8),
  rgba(147, 152, 255, .8));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}

.products-card:hover::before {
  opacity: .65;
}



.content-flex{
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  text-align: justify;
  gap: 1.5rem;
}

.subtitle{
  flex:1;
  font-size:1rem;
  alight-height:1.4;
  align-content: ;
}

/* Thumbnail */
.products-card img {
  display: block;
  max-width: 300px;
  max-height: 180px;
  object-fit: contain; /* full picture, scaled down */
  border-radius: 1rem;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  margin-bottom: 1.5rem;
  filter: brightness(1.05);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.products-card img:hover {
  transform: scale(1.05);
  filter: brightness(1.15);
}

/* Card body */
.products-card-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Title */
.products-card-body h3 {
  margin: 0 0 .5rem;
  font-size: 1.35rem;
  text-align: center;
  font-weight: 700;
}

/* Meta */
.meta {
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .9rem;
  color: var(--text-300);
  opacity: .9;
}

.meta::before {
  content: "";
  width: .4rem;
  height: .4rem;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

/* Button */
.btn {
  display: inline-block;
  padding: .75rem 1.5rem;
  border-radius: .75rem;
  background: var(--primary);
  color: #000;
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .02em;
  box-shadow: 0 4px 14px rgba(89, 220, 225, 0.4);
  transition: transform .2s ease, box-shadow .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(89, 220, 225, 0.6);
}

/* 6. STACK UTILITIES */
.stack-sm > * + * {
  margin-top: 1rem;
}

.stack-md > * + * {
  margin-top: 1.5rem;
}

.stack-lg > * + * {
  margin-top: 2rem;
}

/* 7. RESPONSIVE TWEAKS */
@media (max-width: 900px) {
  .products-field {
    padding: 2.5rem 2rem;
  }
}

@media (max-width: 600px) {
  .products-field {
    padding: 2rem 1.5rem;
  }

  .products-card {
    padding: 1.5rem;
  }
}
