/* TekPedal responsive layer — shared by the static product surfaces. */
:root {
  --mobile-gutter: clamp(16px, 4.5vw, 24px);
  --mobile-nav-h: 66px;
}

html {
  max-width: 100%;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  max-width: 100%;
}

x-dc,
x-dc > div,
main,
section,
article,
aside,
header,
footer {
  min-width: 0;
}

img,
video,
canvas {
  max-width: 100%;
}

button,
input,
select,
textarea {
  max-width: 100%;
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 1024px) {
  body:not(.page-map) [style*="max-width: 1240px"],
  body:not(.page-map) [style*="max-width: 1320px"] {
    width: 100% !important;
  }

  body:not(.page-map) [style*="grid-template-columns: 1fr 520px"],
  body:not(.page-map) [style*="grid-template-columns: minmax(0, 1fr) 412px"],
  body:not(.page-map) [style*="grid-template-columns: minmax(0, 1fr) 316px"],
  body:not(.page-map) [style*="grid-template-columns: minmax(0, 1fr) 292px"],
  body:not(.page-map) [style*="grid-template-columns: minmax(0, 1fr) 360px"],
  body:not(.page-map) [style*="grid-template-columns: 1fr 400px"],
  body:not(.page-map) [style*="grid-template-columns: 1fr 380px"],
  body:not(.page-map) [style*="grid-template-columns: 1fr 320px"],
  body:not(.page-map) [style*="grid-template-columns: 1fr 300px"],
  body:not(.page-map) [style*="grid-template-columns: 250px minmax(0, 1fr)"],
  body:not(.page-map) [style*="grid-template-columns: 236px minmax(0, 1fr)"],
  body:not(.page-map) [style*="grid-template-columns: 380px 1fr"],
  body:not(.page-map) [style*="grid-template-columns: 1.4fr 1fr 1fr 1fr"],
  body:not(.page-map) [style*="grid-template-columns: 1.25fr 1fr"],
  body:not(.page-map) [style*="grid-template-columns: 1.15fr 1fr"],
  body:not(.page-map) [style*="grid-template-columns: 1.1fr 1fr"],
  body:not(.page-map) [style*="grid-template-columns: 1.1fr .9fr"],
  body:not(.page-map) [style*="grid-template-columns: 1fr 1.4fr"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body:not(.page-map) [style*="grid-template-columns: repeat(4, 1fr)"],
  body:not(.page-map) [style*="grid-template-columns: repeat(4, minmax(0, 1fr))"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body:not(.page-map) [style*="grid-template-columns: repeat(3, 1fr)"],
  body:not(.page-map) [style*="grid-template-columns: repeat(3, minmax(0, 1fr))"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body:not(.page-map) [style*="position: sticky"][style*="top: 9"],
  body:not(.page-map) aside[style*="position: sticky"] {
    position: static !important;
    top: auto !important;
  }

  /* Filters stay quickly reachable instead of forming a long wall above results. */
  .page-parts aside[style*="position: sticky"] {
    display: flex !important;
    gap: 10px !important;
    overflow-x: auto !important;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
    padding: 2px 1px 8px !important;
  }

  .page-parts aside[style*="position: sticky"] > div {
    flex: 0 0 min(78vw, 270px);
    scroll-snap-align: start;
  }

  .page-dashboard aside[style*="position: sticky"] {
    display: flex !important;
    align-items: stretch;
    gap: 10px !important;
    overflow-x: auto !important;
    padding-bottom: 4px;
  }

  .page-dashboard aside[style*="position: sticky"] > nav {
    display: flex !important;
    flex: 0 0 auto;
    gap: 5px !important;
    overflow-x: auto;
  }

  .page-dashboard aside[style*="position: sticky"] > nav button {
    flex: 0 0 auto;
    min-width: 132px;
  }

  .page-dashboard aside[style*="position: sticky"] > div {
    flex: 0 0 220px;
  }
}

@media (max-width: 760px) {
  :root {
    --mobile-nav-h: 64px;
  }

  body:not(.page-map):not(.page-auth) {
    padding-bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom)) !important;
  }

  body:not(.page-map) [style*="max-width: 1240px"],
  body:not(.page-map) [style*="max-width: 1320px"] {
    padding-left: var(--mobile-gutter) !important;
    padding-right: var(--mobile-gutter) !important;
  }

  body:not(.page-map) header > div[style*="max-width"] {
    min-height: 58px !important;
    height: 58px !important;
    gap: 10px !important;
    padding-left: var(--mobile-gutter) !important;
    padding-right: var(--mobile-gutter) !important;
  }

  body:not(.page-map) header > div[style*="max-width"] > nav,
  body:not(.page-map) .topnav-link,
  body:not(.page-map) .header-map-cta {
    display: none !important;
  }

  body:not(.page-map) [style*="position: sticky"][style*="top: 72px"] {
    top: 58px !important;
  }

  body:not(.page-map) header > div[style*="max-width"] > span[style*="flex: 1"] {
    display: block !important;
  }

  body:not(.page-map) header img[src="/logo.svg"] {
    width: auto !important;
    height: 24px !important;
  }

  body:not(.page-map) h1[style*="font-size: 60px"],
  body:not(.page-map) h1[style*="font-size: 56px"] {
    font-size: clamp(38px, 11vw, 48px) !important;
    line-height: 1.08 !important;
  }

  body:not(.page-map) h1[style*="font-size: 44px"],
  body:not(.page-map) h1[style*="font-size: 42px"],
  body:not(.page-map) h1[style*="font-size: 40px"] {
    font-size: clamp(32px, 9vw, 40px) !important;
    line-height: 1.12 !important;
  }

  body:not(.page-map) h1[style*="font-size: 34px"] {
    font-size: clamp(28px, 8vw, 34px) !important;
  }

  body:not(.page-map) section[style*="padding: 68px"],
  body:not(.page-map) section[style*="padding: 64px"],
  body:not(.page-map) section[style*="padding: 60px"] {
    padding-top: 42px !important;
  }

  body:not(.page-map) section[style*="padding: 48px"],
  body:not(.page-map) section[style*="padding: 44px"],
  body:not(.page-map) section[style*="padding: 40px"] {
    padding-top: 34px !important;
    padding-bottom: 34px !important;
  }

  body:not(.page-map) [style*="grid-template-columns: repeat(3, 1fr)"],
  body:not(.page-map) [style*="grid-template-columns: repeat(3, minmax(0, 1fr))"],
  body:not(.page-map) [style*="grid-template-columns: repeat(2, 1fr)"],
  body:not(.page-map) [style*="grid-template-columns: repeat(2, minmax(0, 1fr))"],
  body:not(.page-map) [style*="grid-template-columns: 1fr 1fr 1fr"],
  body:not(.page-map) [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body:not(.page-map) [style*="display: flex"][style*="gap: 26px"],
  body:not(.page-map) [style*="display: flex"][style*="gap: 32px"] {
    row-gap: 14px !important;
  }

  body:not(.page-map) button,
  body:not(.page-map) input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
  body:not(.page-map) select,
  body:not(.page-map) textarea,
  body:not(.page-map) a[style*="display: inline-flex"] {
    min-height: 44px;
  }

  body:not(.page-map) input,
  body:not(.page-map) select,
  body:not(.page-map) textarea {
    font-size: 16px !important;
  }

  body:not(.page-map) table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Compact, persistent primary navigation for thumb reach. */
  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1200;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom));
    padding: 5px 6px env(safe-area-inset-bottom);
    border-top: 1px solid rgb(227 226 229 / 0.92);
    background: rgb(255 255 255 / 0.94);
    box-shadow: 0 -12px 30px -24px rgb(2 0 97 / 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .mobile-bottom-nav a {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    border-radius: 11px;
    color: #6c6b75;
    font: 650 10px/1.1 var(--font-sans, ui-sans-serif, system-ui, sans-serif);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-bottom-nav a[aria-current="page"] {
    background: #ebf0fa;
    color: #020061;
  }

  .mobile-bottom-nav svg {
    width: 20px;
    height: 20px;
    max-width: none;
  }

  /* Home */
  .page-home section[style*="grid-template-columns: 1fr 520px"] {
    gap: 26px !important;
  }

  .page-home section[style*="grid-template-columns: 1fr 520px"] > div:first-child > div[style*="display: flex"] > a {
    flex: 1 1 100%;
    justify-content: center;
    width: 100%;
  }

  .page-home [style*="grid-template-columns: repeat(4, auto)"] {
    grid-template-columns: repeat(2, minmax(0, auto)) !important;
    gap: 18px 28px !important;
  }

  .page-home section[style*="grid-template-columns: 1fr 520px"] > div:last-child {
    width: min(100%, 520px);
    height: 450px !important;
    margin-inline: auto;
    transform: scale(0.88);
    transform-origin: top center;
    margin-bottom: -54px;
  }

  /* Blog list rows retain the useful action while secondary metadata wraps away. */
  .page-blog [style*="grid-template-columns: 92px minmax(0, 1fr) 150px 96px 36px"] {
    grid-template-columns: 78px minmax(0, 1fr) 36px !important;
    gap: 10px !important;
    padding: 12px !important;
  }

  .page-blog [style*="grid-template-columns: 92px minmax(0, 1fr) 150px 96px 36px"] > :nth-child(3),
  .page-blog [style*="grid-template-columns: 92px minmax(0, 1fr) 150px 96px 36px"] > :nth-child(4) {
    display: none !important;
  }

  .page-blog [style*="min-width: 260px"][style*="max-width: 380px"] {
    flex: 1 1 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .page-blog [style*="min-width: 260px"][style*="max-width: 380px"] + div[style*="flex-wrap: wrap"] {
    width: 100%;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  /* Comparison matrix scrolls as one coherent table. */
  .page-compare section > div[style*="overflow: hidden"]:has([style*="width: 300px"]) {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .page-compare section > div[style*="overflow: hidden"]:has([style*="width: 300px"]) > div,
  .page-compare section > div[style*="overflow: hidden"]:has([style*="width: 300px"]) > sc-for > div {
    min-width: 760px;
  }

  .page-compare [style*="grid-template-columns: 380px 1fr"] > div:first-child {
    order: 2;
  }

  .page-compare section > div[style*="display: flex"][style*="align-items: stretch"] {
    flex-direction: column !important;
  }

  /* Parts catalogue */
  .page-parts [style*="grid-template-columns: 132px minmax(0, 1fr) 190px"] {
    grid-template-columns: 96px minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  .page-parts [style*="grid-template-columns: 132px minmax(0, 1fr) 190px"] > div:first-child {
    width: 96px !important;
    height: 82px !important;
  }

  .page-parts [style*="grid-template-columns: 132px minmax(0, 1fr) 190px"] > div:last-child {
    grid-column: 1 / -1;
    text-align: left !important;
  }

  .page-parts [style*="grid-template-columns: 132px minmax(0, 1fr) 190px"] > div:last-child [style*="justify-content: flex-end"] {
    justify-content: flex-start !important;
  }

  .page-parts [style*="width: 396px"][style*="position: fixed"] {
    width: min(100vw, 396px) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
  }

  .page-parts [style*="flex: 1 1 280px"][style*="max-width: 420px"] {
    flex-basis: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .page-parts [style*="flex: 1 1 280px"][style*="max-width: 420px"] ~ select {
    flex: 1 1 180px;
  }

  /* Dense expert and product-detail modules reflow without losing values. */
  .page-inspection [style*="grid-template-columns: repeat(7, 1fr)"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .page-inspection [style*="grid-template-columns: 96px 1fr auto"] {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px 12px !important;
  }

  .page-inspection [style*="grid-template-columns: 96px 1fr auto"] > :nth-child(2) {
    grid-column: 1 / -1;
  }

  .page-product [style*="grid-template-columns: 190px minmax(0, 1fr)"] {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
  }

  /* Member dashboard */
  .page-dashboard [style*="grid-template-columns: minmax(0, 1fr) 110px 96px 130px 88px"] {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 9px 12px !important;
    padding: 14px !important;
  }

  .page-dashboard [style*="grid-template-columns: minmax(0, 1fr) 110px 96px 130px 88px"] > :first-child {
    grid-column: 1 / -1;
  }

  .page-dashboard [style*="grid-template-columns: minmax(0, 1fr) 110px 96px 130px 88px"] > :nth-child(4) {
    grid-column: 1;
  }

  .page-dashboard [style*="grid-template-columns: minmax(0, 1fr) 110px 96px 130px 88px"] > :last-child {
    grid-column: 2;
    grid-row: 2 / span 2;
    align-self: end;
  }

  /* Sign-in/onboarding becomes a focused, single-column flow. */
  .page-auth x-dc > div[style*="grid-template-columns: 480px 1fr"] {
    grid-template-columns: minmax(0, 1fr) !important;
    min-height: 100svh !important;
  }

  .page-auth x-dc > div[style*="grid-template-columns: 480px 1fr"] > div:first-child {
    min-height: 72px;
    padding: 18px var(--mobile-gutter) !important;
  }

  .page-auth x-dc > div[style*="grid-template-columns: 480px 1fr"] > div:first-child > div {
    display: none !important;
  }

  .page-auth x-dc > div[style*="grid-template-columns: 480px 1fr"] > div:last-child {
    padding: 18px var(--mobile-gutter) 42px !important;
    overflow: visible !important;
  }

  .page-auth x-dc > div[style*="grid-template-columns: 480px 1fr"] > div:last-child > div:first-child {
    justify-content: space-between !important;
    gap: 12px !important;
  }

  /* Map keeps its app-shell behavior and gains safer touch targets. */
  .page-map .mode-btn,
  .page-map .mobile-panel-close,
  .page-map .mobile-list-close,
  .page-map .list-nearby,
  .page-map .mini-maps,
  .page-map .btn-icon {
    min-width: 40px !important;
    min-height: 40px !important;
  }

  .page-map .topbar {
    padding-left: max(9px, env(safe-area-inset-left)) !important;
    padding-right: max(9px, env(safe-area-inset-right)) !important;
  }

  .page-map .rail,
  .page-map .listcol,
  .page-map .detail {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .page-map .modal-bg,
  .page-map .gate {
    padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)) !important;
  }

  .page-map .modal {
    max-height: calc(100dvh - 20px) !important;
    border-radius: 16px !important;
  }

  .page-map .gate-card {
    grid-template-columns: minmax(0, 1fr) !important;
    max-height: calc(100dvh - 20px) !important;
    border-radius: 16px !important;
  }

  .page-map .gate-side {
    display: none !important;
  }

  .page-map .gate-form {
    padding: 22px 18px !important;
  }

  .page-map .gate-form .grid2 {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
  }

  .page-map .gate-form .inp {
    min-height: 44px;
    font-size: 16px !important;
  }
}

@media (max-width: 430px) {
  body:not(.page-map) header > div[style*="max-width"] > a[href="/uyelik"]:nth-of-type(2) {
    display: none !important;
  }

  body:not(.page-map) header > div[style*="max-width"] > a[style*="background: linear-gradient"] {
    min-width: 44px;
    width: 44px;
    padding: 0 !important;
    justify-content: center;
  }

  body:not(.page-map) header > div[style*="max-width"] > a[style*="background: linear-gradient"] > span:not(:first-child) {
    display: none !important;
  }

  .page-home section[style*="grid-template-columns: 1fr 520px"] > div:last-child {
    width: 114%;
    margin-left: -7%;
    transform: scale(0.78);
    margin-bottom: -104px;
  }

  .page-blog [style*="grid-template-columns: 92px minmax(0, 1fr) 150px 96px 36px"] {
    grid-template-columns: minmax(0, 1fr) 36px !important;
  }

  .page-blog [style*="grid-template-columns: 92px minmax(0, 1fr) 150px 96px 36px"] > :first-child {
    grid-column: 1;
  }

  .page-blog [style*="grid-template-columns: 92px minmax(0, 1fr) 150px 96px 36px"] > :nth-child(2) {
    grid-column: 1;
  }

  .page-blog [style*="grid-template-columns: 92px minmax(0, 1fr) 150px 96px 36px"] > :last-child {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .page-parts [style*="grid-template-columns: 132px minmax(0, 1fr) 190px"] {
    grid-template-columns: 82px minmax(0, 1fr) !important;
  }

  .page-parts [style*="grid-template-columns: 132px minmax(0, 1fr) 190px"] > div:first-child {
    width: 82px !important;
    height: 76px !important;
  }

  .mobile-bottom-nav a {
    font-size: 9.5px;
  }
}

@media (hover: none) and (pointer: coarse) {
  a,
  button,
  input,
  select,
  textarea {
    -webkit-tap-highlight-color: transparent;
  }

  button:active,
  a:active {
    transform: translateY(1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
