/*
#######################################################################
# 🐢  TPL — Products CSS
# File: /assets/css/products.css
# Version: v1.0.2 (TRTL v1.0.1)
# Change: de-sticky + fully responsive accordion grid + better tap UX
#######################################################################
*/

/* ------------------------------------------------------------
   HARD GUARD: prevent inherited sticky/position rules
   ------------------------------------------------------------ */
.products-hero,
.products-accordion,
.tn-accordion,
.tn-acc-btn,
.tn-acc-panel{
  position: static !important;
  inset: auto !important;
  top: auto !important;
  bottom: auto !important;
}

/* ------------------------------------------------------------
   PAGE WRAP
   ------------------------------------------------------------ */
.products-hero{
  max-width:1100px;
  margin:32px auto 10px;
  padding:0 20px;
}
.products-hero h1{
  font-size:clamp(34px,5vw,56px);
  margin:0 0 10px;
  letter-spacing:-.02em;
}
.products-sub{
  margin:0;
  color:var(--t-muted);
  max-width:72ch;
}

.products-accordion{
  max-width:1100px;
  margin:18px auto 64px;
  padding:0 20px;
  display:flex;
  flex-direction:column;
  gap:16px;
}

/* ------------------------------------------------------------
   ACCORDION SHELL
   ------------------------------------------------------------ */
.tn-accordion{
  border:1px solid rgba(0,0,0,.10);
  border-radius:16px;
  background:linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.78));
  box-shadow:0 10px 24px rgba(0,0,0,.06);
  overflow:hidden;
}
html[data-theme="dark"] .tn-accordion{
  border-color:rgba(255,255,255,.10);
  background:linear-gradient(180deg, rgba(20,22,24,.92), rgba(18,19,21,.86));
  box-shadow:0 10px 24px rgba(0,0,0,.45);
}

/* ------------------------------------------------------------
   ACCORDION BUTTON (FULL WIDTH / TAP SAFE)
   ------------------------------------------------------------ */
.tn-acc-btn{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:18px 18px;
  background:transparent;
  border:0;
  cursor:pointer;
  text-align:left;

  /* tap friendliness */
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
.tn-acc-btn:focus{ outline:none; }
.tn-acc-btn:focus-visible{ box-shadow:var(--ring); border-radius:12px; }

.tn-acc-left{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
.tn-acc-title{font-weight:800;color:var(--t-fg)}
.tn-acc-meta{font-size:13px;color:var(--t-muted)}

.tn-acc-caret{
  width:10px;height:10px;
  border-right:2px solid var(--t-muted);
  border-bottom:2px solid var(--t-muted);
  transform:rotate(45deg);
  transition:transform .18s ease;
  flex:0 0 auto;
}
.tn-acc-btn[aria-expanded="true"] .tn-acc-caret{ transform:rotate(-135deg); }

/* ------------------------------------------------------------
   PANEL
   ------------------------------------------------------------ */
.tn-acc-panel{
  padding:0 18px 18px;
}

/* ------------------------------------------------------------
   GRID (RESPONSIVE, NON-STICKY, NO OVERFLOW CLIPS)
   ------------------------------------------------------------ */
.tn-prod-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
  width:100%;
}
@media (max-width:960px){
  .tn-prod-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width:640px){
  .tn-prod-grid{ grid-template-columns:1fr; }
}

/* ------------------------------------------------------------
   PRODUCT TILE
   ------------------------------------------------------------ */
.tn-prod{
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px 14px;
  border-radius:14px;
  border:1px solid rgba(26,143,61,.20);
  background:linear-gradient(135deg, rgba(26,143,61,.06), rgba(26,143,61,.02));
  text-decoration:none;
  color:var(--t-fg);

  min-width:0; /* allow text to shrink */
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tn-prod:hover{
  transform:translateY(-1px);
  border-color:rgba(26,143,61,.35);
  box-shadow:0 10px 22px rgba(26,143,61,.10);
  text-decoration:none;
}
.tn-prod:active{ transform:translateY(0px); }

html[data-theme="dark"] .tn-prod{
  border-color:rgba(26,143,61,.25);
  background:linear-gradient(135deg, rgba(26,143,61,.12), rgba(26,143,61,.04));
}

/* name + CTA */
.tn-prod-name{
  font-weight:750;
  letter-spacing:-.01em;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.tn-prod-cta{
  margin-left:auto;
  color:var(--t-green);
  font-weight:800;
  font-size:13px;
  flex:0 0 auto;
}

/* ------------------------------------------------------------
   ICON PILL + SIMPLE PLACEHOLDER GLYPHS
   (no masks; zero-browser weirdness)
   ------------------------------------------------------------ */
.tn-ico{
  width:40px;height:40px;
  border-radius:12px;
  display:grid;
  place-items:center;
  border:1px solid rgba(26,143,61,.22);
  background:radial-gradient(circle at 30% 30%, rgba(26,143,61,.14), rgba(26,143,61,.06));
  flex:0 0 auto;
}
html[data-theme="dark"] .tn-ico{
  border-color:rgba(26,143,61,.28);
  background:radial-gradient(circle at 30% 30%, rgba(26,143,61,.20), rgba(26,143,61,.10));
}

.tn-ico::before{
  content:"";
  width:16px;height:16px;
  border-radius:4px;
  background:var(--t-green);
  opacity:.95;
}

/* tiny differences per icon (pure CSS, reliable everywhere) */
.tn-ico[data-ico="play"]::before{ clip-path:polygon(28% 20%,82% 50%,28% 80%); border-radius:0; }
.tn-ico[data-ico="mail"]::before{ clip-path:polygon(12% 28%,88% 28%,88% 78%,12% 78%,12% 28%,50% 55%); border-radius:2px; }
.tn-ico[data-ico="tv"]::before{ clip-path:polygon(14% 30%,86% 30%,86% 72%,14% 72%); border-radius:3px; }
.tn-ico[data-ico="drive"]::before{ clip-path:polygon(24% 74%,44% 30%,56% 30%,76% 74%,64% 74%,56% 56%,44% 56%,36% 74%); border-radius:0; }
.tn-ico[data-ico="users"]::before{ clip-path:polygon(36% 34%,46% 26%,54% 26%,64% 34%,64% 46%,36% 46%,26% 68%,74% 68%,74% 78%,26% 78%); border-radius:0; }
.tn-ico[data-ico="cloud"]::before{ clip-path:polygon(28% 62%,22% 56%,22% 46%,30% 40%,40% 42%,46% 34%,58% 34%,66% 42%,76% 48%,76% 58%,70% 62%,28% 62%); border-radius:0; }
.tn-ico[data-ico="doc"]::before{ clip-path:polygon(30% 20%,62% 20%,74% 32%,74% 80%,30% 80%); border-radius:2px; }
.tn-ico[data-ico="map"]::before{ clip-path:polygon(18% 28%,46% 22%,54% 28%,82% 22%,82% 78%,54% 72%,46% 78%,18% 72%); border-radius:0; }
.tn-ico[data-ico="badge"]::before{ clip-path:polygon(50% 18%,72% 28%,72% 50%,50% 60%,28% 50%,28% 28%); border-radius:0; }
.tn-ico[data-ico="shell"]::before{ clip-path:polygon(50% 18%,72% 32%,78% 52%,66% 74%,50% 82%,34% 74%,22% 52%,28% 32%); border-radius:0; }
.tn-ico[data-ico="brain"]::before{ clip-path:polygon(36% 30%,48% 24%,60% 28%,68% 40%,66% 56%,54% 62%,44% 60%,34% 52%,30% 40%); border-radius:0; }