/* Ürünler sayfası: site.css üzerine eklenen sayfa stilleri.
   Ortak parçalar (üst bar, alt bilgi, .routes, .eyebrow, .ruler) site.css'ten gelir. */

html { scroll-behavior: smooth; }

/* ---------- Sayfa başı: bölüm dizini ---------- */
.page-head { padding-bottom: clamp(40px, 6vw, 80px); }
.toc {
  list-style: none;
  margin: 0; padding: 0;
  max-width: 1040px;
  opacity: 0;
  animation: rise .8s ease .15s forwards;
}
.toc a {
  position: relative;
  display: grid;
  grid-template-columns: clamp(52px, 6vw, 84px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 clamp(12px, 2vw, 28px);
  padding-block: clamp(16px, 2.2vw, 26px);
  border-top: 1px solid var(--line);
  text-decoration: none;
  transition: padding-left .25s ease;
}
.toc li:last-child a { border-bottom: 1px solid var(--line); }
.toc a::before {
  content: "";
  position: absolute; left: 0; top: 14px; bottom: 14px;
  width: 3px; background: var(--red);
  transform: scaleY(0);
  transition: transform .25s ease;
}
.toc a:hover, .toc a:focus-visible { padding-left: 20px; }
.toc a:hover::before, .toc a:focus-visible::before { transform: scaleY(1); }
.toc-no {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1;
  color: var(--red);
}
.toc-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(26px, 3.4vw, 46px);
  line-height: 1.1;
  text-wrap: balance;
}
.toc-arrow { width: 24px; height: 24px; color: var(--graphite); transition: transform .25s ease, color .25s; }
.toc a:hover .toc-arrow, .toc a:focus-visible .toc-arrow { transform: translateY(4px); color: var(--red); }

/* ---------- Ürün bölümleri ---------- */
.group {
  --rule: var(--line);
  padding-block: clamp(56px, 8vw, 112px);
}
.group--steel { --rule: #c3c9ce; background: var(--steel); }
.group--short { padding-block: clamp(48px, 6vw, 88px); }

.g-head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.g-no {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 4.4vw, 56px);
  line-height: 1;
  color: var(--red);
}
.g-title {
  max-width: 17ch;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 3.5vw, 48px);
  line-height: 1.05;
  letter-spacing: -.005em;
}
.g-intro {
  max-width: 62ch;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.6;
}

.facts { margin: clamp(24px, 3vw, 36px) 0 0; border-bottom: 1px solid var(--rule); }
.fact {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 4px 28px;
  padding-block: 18px;
  border-top: 1px solid var(--rule);
}
.fact dt { font: 600 15px/1.5 var(--font-body); color: var(--oxide); }
.fact dd { margin: 0; color: var(--graphite); max-width: 56ch; }

.list-title { margin: clamp(48px, 6vw, 80px) 0 clamp(18px, 2.4vw, 28px); }

/* ---------- Dormer Pramet ürün grupları ---------- */
.cats {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(28px, 5vw, 72px);
}
.cat > a {
  position: relative;
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  gap: 0 clamp(18px, 2.4vw, 32px);
  align-items: center;
  height: 100%;
  padding-block: 20px;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  transition: padding-left .25s ease;
}
.cats .cat:nth-last-child(-n+2) > a { border-bottom: 1px solid var(--rule); }
.cat > a::before {
  content: "";
  position: absolute; left: 0; top: 20px; bottom: 20px;
  width: 3px; background: var(--red);
  transform: scaleY(0);
  transition: transform .25s ease;
}
.cat > a:hover, .cat > a:focus-visible { padding-left: 20px; }
.cat > a:hover::before, .cat > a:focus-visible::before { transform: scaleY(1); }
.cat-fig { margin: 0; width: 144px; height: 144px; background: var(--paper); }
.cat-fig img { width: 100%; height: 100%; object-fit: cover; }
.cat-text { display: grid; gap: 8px; }
.cat-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 2.4vw, 32px);
  line-height: 1.1;
}
.cat-go {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 15px/1.3 var(--font-body);
  color: var(--oxide);
}
.cat-go svg { width: 14px; height: 14px; transition: transform .25s ease; }
a:hover > .cat-go svg, a:hover .cat-go svg, a:focus-visible .cat-go svg { transform: translate(2px, -2px); }

/* son hücre: tüm kategoriler bağlantısı */
.cat-all > a {
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
  padding: 24px clamp(20px, 2.4vw, 32px);
  background: var(--ink);
  border-top-color: var(--ink);
  color: #fff;
}
.cat-all > a::before { display: none; }
.cat-all > a:hover, .cat-all > a:focus-visible { padding-left: clamp(20px, 2.4vw, 32px); background: #1b1b1b; }
.cat-all .cat-name { color: #fff; }
.cat-all .cat-go { color: #ff8a8e; }

/* ---------- Kestirimci bakım ürünleri ---------- */
.prods {
  list-style: none;
  margin: clamp(36px, 4.4vw, 60px) 0 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(20px, 2vw, 28px);
}
.prod { display: flex; }
.prod > a { display: flex; flex-direction: column; width: 100%; text-decoration: none; }
.prod .cat-go { margin-top: auto; }
.prod-fig {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 10;
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color .2s;
}
.prod-fig img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  padding: clamp(4px, .6vw, 8px);
}
.prod a:hover .prod-fig, .prod a:focus-visible .prod-fig { border-color: var(--ink); }
.prod-brand { display: block; margin-top: 16px; font: 600 15px/1.3 var(--font-body); color: var(--oxide); }
.prod-name {
  display: block;
  margin: 4px 0 14px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(23px, 1.95vw, 26px);
  line-height: 1.1;
}

/* ---------- 02 alt bölümleri: Hizmetler, Eğitimler ---------- */
.sub {
  margin-top: clamp(56px, 7vw, 96px);
  padding-top: clamp(36px, 4.4vw, 56px);
  border-top: 1px solid var(--line);
}
.sub-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 3.5vw, 48px);
  line-height: 1.05;
  letter-spacing: -.005em;
}
.sub-note { margin: 14px 0 0; max-width: 62ch; color: var(--graphite); }
.sub .prods { margin-top: clamp(28px, 3.6vw, 44px); }
.prods--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.prod-fig--photo img { object-fit: cover; padding: 0; }
.prod-name:has(+ .prod-desc) { margin-bottom: 8px; }
.prod-desc { display: block; margin: 0 0 16px; color: var(--graphite); font-size: 16px; line-height: 1.5; }

.courses {
  list-style: none;
  margin: clamp(28px, 3.6vw, 44px) 0 0; padding: 0;
  border-bottom: 1px solid var(--line);
}
.course-head, .course a {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr) minmax(0, 22rem) 20px;
  align-items: center;
  gap: 0 clamp(14px, 2vw, 28px);
}
.course-info { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 0 clamp(14px, 2vw, 28px); }
.course-head { padding-bottom: 12px; font: 600 14px/1.3 var(--font-body); color: var(--graphite); }
.course a {
  position: relative;
  padding-block: clamp(14px, 1.6vw, 20px);
  border-top: 1px solid var(--line);
  text-decoration: none;
  transition: padding-left .25s ease;
}
.course a::before {
  content: "";
  position: absolute; left: 0; top: 12px; bottom: 12px;
  width: 3px; background: var(--red);
  transform: scaleY(0);
  transition: transform .25s ease;
}
.course a:hover, .course a:focus-visible { padding-left: 20px; }
.course a:hover::before, .course a:focus-visible::before { transform: scaleY(1); }
.course-level { font: 600 14px/1.3 var(--font-body); color: var(--oxide); }
.course-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(23px, 2.1vw, 28px);
  line-height: 1.15;
}
.course-meta, .course-cert { color: var(--graphite); font-size: 16px; line-height: 1.4; }
.course-k { display: none; }
.course-arrow { width: 16px; height: 16px; color: var(--graphite); transition: transform .25s ease, color .25s; }
.course a:hover .course-arrow, .course a:focus-visible .course-arrow { transform: translate(2px, -2px); color: var(--red); }

/* ---------- 03: kısa bölüm ---------- */
.text-link {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: clamp(20px, 2.6vw, 30px);
  padding-bottom: 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2vw, 26px);
  text-decoration: none;
  border-bottom: 2px solid var(--red);
}
.text-link svg { width: 20px; height: 20px; transition: transform .25s ease; }
.text-link:hover svg, .text-link:focus-visible svg { transform: translateX(4px); }

/* ---------- Duyarlı ---------- */
@media (max-width: 1179px) {
  /* 5 kart: üstte 3, altta 2 (boşluk kalmaz) */
  .prods { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .prod { grid-column: span 2; }
  .prod:nth-child(n+4) { grid-column: span 3; }
  .prod-name { font-size: clamp(24px, 2.6vw, 29px); }
  .prods.prods--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prods--4 .prod, .prods--4 .prod:nth-child(n+4) { grid-column: auto; }
}
@media (max-width: 760px) {
  .prods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prod, .prod:nth-child(n+4) { grid-column: auto; }
}
@media (max-width: 900px) {
  .g-head { grid-template-columns: 1fr; }
  .course-head { display: none; }
  .course a {
    grid-template-columns: minmax(0, 1fr) 16px;
    grid-template-areas: "level arrow" "name arrow" "info info";
    gap: 4px 12px;
  }
  .course-level { grid-area: level; }
  .course-name { grid-area: name; }
  .course-info { grid-area: info; display: flex; flex-wrap: wrap; gap: 2px 20px; margin-top: 4px; }
  .course-k { display: inline; color: var(--ink); font-weight: 500; }
  .course-arrow { grid-area: arrow; align-self: center; }
  .g-title { max-width: 24ch; }
  .cats { grid-template-columns: 1fr; }
  .cats .cat:nth-last-child(-n+2) > a { border-bottom: 0; }
  .cats .cat:last-child > a { border-bottom: 1px solid var(--ink); }
}
@media (max-width: 640px) {
  .fact { grid-template-columns: 1fr; }
  .cat > a { grid-template-columns: 112px minmax(0, 1fr); }
  .cat-fig { width: 112px; height: 112px; }
}
@media (max-width: 520px) {
  .prods, .prods.prods--4 { grid-template-columns: 1fr; }
  .toc a { grid-template-columns: 44px minmax(0, 1fr); }
  .toc-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .toc { opacity: 1; animation: none; }
  .toc a, .toc a::before, .toc-arrow, .cat > a, .cat > a::before, .cat-go svg, .text-link svg, .prod-fig, .course a, .course a::before, .course-arrow { transition: none; }
}
