/* ==========================================================================
   Technomot — Temel katman
   Reset, tipografi, yerleşim kabı ve genel yardımcı sınıflar.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--tm-header-h) + var(--tm-space-4));
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--tm-bg);
  color: var(--tm-text);
  font-family: var(--tm-font-sans);
  font-size: var(--tm-fs-base);
  line-height: var(--tm-lh-normal);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

/* [hidden], display:flex/grid taşıyan bileşenlerde de gizlemeli. */
[hidden] {
  display: none !important;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--tm-link);
  text-decoration: none;
  transition: color var(--tm-transition-fast);
}

a:hover {
  color: var(--tm-link-hover);
}

:focus-visible {
  outline: none;
  box-shadow: var(--tm-focus-ring);
  border-radius: var(--tm-radius-xs);
}

hr {
  border: 0;
  border-top: 1px solid var(--tm-border);
  margin: var(--tm-space-6) 0;
}

/* --- Başlıklar ----------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 var(--tm-space-3);
  font-weight: var(--tm-fw-bold);
  line-height: var(--tm-lh-tight);
  letter-spacing: var(--tm-ls-tight);
  color: var(--tm-ink-800);
}

h1 {
  font-size: var(--tm-fs-2xl);
}
h2 {
  font-size: var(--tm-fs-xl);
}
h3 {
  font-size: var(--tm-fs-lg);
}
h4 {
  font-size: var(--tm-fs-md);
}
h5,
h6 {
  font-size: var(--tm-fs-base);
}

p {
  margin: 0 0 var(--tm-space-4);
}

p:last-child {
  margin-bottom: 0;
}

small {
  font-size: var(--tm-fs-xs);
}

strong,
b {
  font-weight: var(--tm-fw-semibold);
}

ul,
ol {
  margin: 0 0 var(--tm-space-4);
  padding-left: var(--tm-space-5);
}

li + li {
  margin-top: var(--tm-space-1);
}

/* Serbest metin blokları (kurumsal ve sözleşme sayfaları) */
.tm-prose {
  max-width: 72ch;
  line-height: var(--tm-lh-relaxed);
  color: var(--tm-gray-700);
}

.tm-prose h2 {
  margin-top: var(--tm-space-8);
  font-size: var(--tm-fs-lg);
}

.tm-prose h3 {
  margin-top: var(--tm-space-6);
  font-size: var(--tm-fs-md);
}

.tm-prose > :first-child {
  margin-top: 0;
}

/* --- Kap ve ızgara ------------------------------------------------------- */

.tm-container {
  width: 100%;
  max-width: var(--tm-container);
  margin-inline: auto;
  padding-inline: var(--tm-gutter);
}

.tm-container--narrow {
  max-width: var(--tm-container-narrow);
}

.tm-section {
  padding-block: var(--tm-space-8);
}

.tm-section--tight {
  padding-block: var(--tm-space-6);
}

.tm-section--flush {
  padding-block: 0 var(--tm-space-8);
}

.tm-grid {
  display: grid;
  gap: var(--tm-space-4);
}

.tm-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tm-grid--3 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tm-grid--4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .tm-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tm-grid--4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .tm-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* İçerik + yan sütun düzeni (kategori, hesabım, ürün detay) */
.tm-layout {
  display: grid;
  gap: var(--tm-space-6);
  align-items: start;
}

@media (min-width: 1024px) {
  .tm-layout--sidebar-left {
    grid-template-columns: 264px minmax(0, 1fr);
  }
  .tm-layout--sidebar-right {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

.tm-stack {
  display: flex;
  flex-direction: column;
  gap: var(--tm-space-4);
}

.tm-row {
  display: flex;
  align-items: center;
  gap: var(--tm-space-3);
}

.tm-row--between {
  justify-content: space-between;
}

.tm-row--wrap {
  flex-wrap: wrap;
}

/* --- Bölüm başlığı ------------------------------------------------------- */

.tm-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--tm-space-4);
  margin-bottom: var(--tm-space-5);
}

.tm-section-title {
  position: relative;
  margin: 0;
  padding-left: var(--tm-space-4);
  font-size: var(--tm-fs-lg);
  font-weight: var(--tm-fw-bold);
  letter-spacing: var(--tm-ls-wide);
  text-transform: uppercase;
  color: var(--tm-ink-800);
}

.tm-section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 1.15em;
  border-radius: var(--tm-radius-pill);
  background: var(--tm-accent-500);
}

.tm-section-title small {
  display: block;
  margin-top: var(--tm-space-1);
  font-size: var(--tm-fs-xs);
  font-weight: var(--tm-fw-regular);
  letter-spacing: 0;
  text-transform: none;
  color: var(--tm-text-muted);
}

.tm-section-link {
  flex: none;
  font-size: var(--tm-fs-sm);
  font-weight: var(--tm-fw-semibold);
  color: var(--tm-accent-800);
  white-space: nowrap;
}

/* --- Yardımcı sınıflar --------------------------------------------------- */

.tm-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.tm-skip-link {
  position: absolute;
  top: -60px;
  left: var(--tm-space-4);
  z-index: var(--tm-z-toast);
  padding: var(--tm-space-2) var(--tm-space-4);
  border-radius: var(--tm-radius-sm);
  background: var(--tm-accent-500);
  color: var(--tm-on-accent);
  font-weight: var(--tm-fw-semibold);
  transition: top var(--tm-transition);
}

.tm-skip-link:focus {
  top: var(--tm-space-3);
  color: var(--tm-on-accent);
}

.tm-muted {
  color: var(--tm-text-muted);
}
.tm-center {
  text-align: center;
}
.tm-right {
  text-align: right;
}
.tm-nowrap {
  white-space: nowrap;
}
.tm-mt-0 {
  margin-top: 0;
}
.tm-mb-0 {
  margin-bottom: 0;
}
.tm-mt-4 {
  margin-top: var(--tm-space-4);
}
.tm-mt-6 {
  margin-top: var(--tm-space-6);
}
.tm-mt-8 {
  margin-top: var(--tm-space-8);
}
.tm-full {
  width: 100%;
}

.tm-hide-sm {
  display: none;
}

@media (min-width: 768px) {
  .tm-hide-sm {
    display: initial;
  }
  .tm-only-sm {
    display: none !important;
  }
}

/* Yatay taşan içerikler (tablo, karusel) daima kendi içinde kaysın */
.tm-scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
