/* =========================================================
   GOparts.mn — Сэлбэг хуудас (categories.html)
   Хамааралтай: style.css, pages.css, shop.css
   ========================================================= */

/* ---------- Хайлтын мөр ---------- */
.finder { margin-top: clamp(24px, 3vw, 36px); padding-bottom: clamp(32px, 4vw, 48px); }
.finder-bar {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 10px 10px 10px 20px; border: 2px solid var(--black); border-radius: var(--radius);
  background: var(--white); text-align: left; cursor: pointer;
  box-shadow: 0 10px 30px rgba(23, 21, 15, .08);
  transition: border-color .2s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.finder-bar > svg { width: 24px; height: 24px; flex: none; color: var(--gray-600); }
.finder-ph { flex: 1; min-width: 0; font-size: 17px; color: var(--gray-400); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finder-btn { flex: none; pointer-events: none; }
.finder-bar:hover { border-color: var(--yellow-dark); box-shadow: 0 14px 36px rgba(255, 194, 14, .28); transform: translateY(-2px); }
.finder-bar:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.finder-brands { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; font-size: 14px; color: var(--gray-600); }
.finder-brands button {
  display: grid; place-items: center; height: 46px; padding: 6px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
  transition: border-color .2s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.finder-brands img { height: 26px; width: auto; filter: grayscale(1); opacity: .7; transition: filter .25s var(--ease), opacity .25s var(--ease); }
.finder-brands button:hover { border-color: var(--yellow); transform: translateY(-2px); box-shadow: var(--shadow); }
.finder-brands button:hover img { filter: none; opacity: 1; }

/* ---------- Сэлбэгийн төрөл ---------- */
.types { padding-block: var(--section-y); background: var(--gray-100); }
.types-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: 28px; }
.types-filter { position: relative; display: block; width: min(360px, 100%); }
.types-filter svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--gray-400); }
.types-filter input {
  width: 100%; min-height: 48px; padding: 12px 14px 12px 42px; border: 1px solid var(--gray-200); border-radius: var(--radius);
  background: var(--white); font: inherit; font-size: 15px;
}
.types-filter input:focus { outline: none; border-color: var(--black); box-shadow: 0 0 0 3px rgba(255, 194, 14, .45); }

.types-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
.types-index { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; scrollbar-width: thin; }
.types-index ul { display: flex; flex-direction: column; gap: 2px; }
.types-index li[hidden] { display: none; }
.types-index a {
  display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: var(--radius);
  font-size: 14px; color: var(--gray-700); transition: background .2s var(--ease), color .2s var(--ease);
}
.types-index a em { font-style: normal; font-size: 12px; color: var(--gray-400); }
.types-index a:hover { background: var(--white); color: var(--black); }
.types-index a.is-active { background: var(--black); color: var(--white); font-weight: 600; }
.types-index a.is-active em { color: var(--yellow); }

.types-groups { display: flex; flex-direction: column; gap: 20px; }
.tg { padding: 22px 24px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); scroll-margin-top: calc(var(--header-h) + 20px); }
.tg[hidden] { display: none; }
.tg.is-flash { animation: tgFlash 1.6s var(--ease); }
@keyframes tgFlash { 0%, 40% { box-shadow: 0 0 0 4px var(--yellow); } 100% { box-shadow: 0 0 0 0 rgba(255, 194, 14, 0); } }
.tg-head { display: flex; align-items: center; gap: 16px; padding-bottom: 14px; margin-bottom: 6px; border-bottom: 3px solid var(--yellow); }
.tg-img { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: var(--radius); background: var(--gray-100); overflow: hidden; }
.tg-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform .5s var(--ease); }
.tg:hover .tg-img img { transform: scale(1.08) rotate(-3deg); }
.tg-title { font-family: var(--font-display); font-weight: 800; font-size: 24px; text-transform: uppercase; line-height: 1.1; }
.tg-en { font-size: 13px; color: var(--gray-600); }
.tg-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.tg-list li[hidden] { display: none; }
.tg-list a {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  padding: 10px 6px; border-bottom: 1px solid var(--line); transition: background .2s var(--ease);
}
.ti-mn { grid-column: 1; font-size: 15px; font-weight: 500; color: var(--black); line-height: 1.35; }
.ti-en { grid-column: 1; grid-row: 2; font-size: 12px; color: var(--gray-600); }
.ti-br { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 4px; }
.ti-br { align-items: center; gap: 8px; }
.tb { display: block; width: auto; height: 15px; object-fit: contain; opacity: .9; transition: opacity .2s var(--ease), transform .25s var(--ease); }
.tb-kom { height: 11px; }
.tb-jd { height: 19px; }
.ti-arrow { grid-column: 3; grid-row: 1 / span 2; width: 16px; height: 16px; color: var(--gray-400); transition: transform .25s var(--ease), color .2s var(--ease); }
.tg-list a:hover { background: var(--yellow-soft); }
.tg-list a:hover .ti-arrow { color: var(--black); transform: translateX(3px); }
.tg-list a:hover .tb { opacity: 1; transform: scale(1.08); }
.types-empty { margin-top: 20px; padding: 32px; border: 1px dashed var(--gray-200); border-radius: var(--radius); text-align: center; color: var(--gray-600); background: var(--white); }
.types-empty button, .types-empty a { font-weight: 600; color: var(--black); text-decoration: underline; text-decoration-color: var(--yellow); text-underline-offset: 3px; }

/* ---------- ITR тос ---------- */
.page-parts .itr-banner { scroll-margin-top: var(--header-h); }
.oils { padding-block: var(--section-y); }
.oils-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 48px; align-items: end; margin-bottom: 28px; }
.oils-lead { margin-top: 12px; max-width: 68ch; color: var(--gray-700); line-height: 1.65; }
.oils-note { margin-top: 10px; max-width: 68ch; font-size: 14px; color: var(--gray-600); line-height: 1.6; }
.oils-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.origin { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.flag { width: 20px; height: 20px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.flag-it { background: linear-gradient(90deg, #009246 33.3%, #fff 33.3% 66.6%, #CE2B37 66.6%); }
.flag-ae { background: linear-gradient(90deg, #EF3340 30%, transparent 30%), linear-gradient(180deg, #009739 33.3%, #fff 33.3% 66.6%, #000 66.6%); }
.oils-meta .link-more { margin-top: 6px; }
.oils-meta .link-more svg { width: 16px; height: 16px; }

.itr-bens { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 40px; }
.itr-ben { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.itr-ben span { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 12px; border-radius: 50%; background: #FDECEC; color: #D7282F; }
.itr-ben svg { width: 22px; height: 22px; }
.itr-ben h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.itr-ben p { font-size: 13.5px; line-height: 1.55; color: var(--gray-600); }

/* Бүтээгдэхүүний tab */
.itr-range { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.itr-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--black); }
.itr-tab {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 18px 20px; text-align: left; color: rgba(255,255,255,.7);
  border-right: 1px solid rgba(255,255,255,.08); transition: background .25s var(--ease), color .25s var(--ease);
}
.itr-tab:last-child { border-right: 0; }
.itr-tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #D7282F; transform: scaleX(0); transition: transform .35s var(--ease); }
.itr-tab:hover { color: var(--white); background: rgba(255,255,255,.05); }
.itr-tab[aria-selected="true"] { color: var(--white); background: #26231D; }
.itr-tab[aria-selected="true"]::after { transform: scaleX(1); }
.itr-tab-ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08); transition: background .25s var(--ease), color .25s var(--ease); }
.itr-tab[aria-selected="true"] .itr-tab-ico { background: #D7282F; color: var(--white); }
.itr-tab-ico svg { width: 20px; height: 20px; }
.itr-tab-txt { display: flex; flex-direction: column; min-width: 0; }
.itr-tab-txt b { font-size: 15px; font-weight: 700; line-height: 1.25; }
.itr-tab-txt small { font-size: 12px; color: var(--yellow); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.itr-tab:focus-visible { outline: 3px solid var(--yellow); outline-offset: -3px; }

.itr-panel { display: grid; grid-template-columns: 240px minmax(0, 1fr) 300px; gap: 32px; padding: clamp(24px, 3vw, 36px); background: var(--white); outline: none; }
.itr-panel[hidden] { display: none; }
.itr-panel.is-entering { animation: itrIn .45s var(--ease) both; }
@keyframes itrIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.itr-panel.is-entering .itr-fig img { animation: itrImg .7s cubic-bezier(.34, 1.4, .64, 1) both; }
@keyframes itrImg { from { opacity: 0; transform: translateY(24px) scale(.94); } to { opacity: 1; transform: none; } }
.itr-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.itr-fig img { width: 100%; max-width: 240px; height: auto; }
.itr-fig figcaption { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; font-size: 12px; color: var(--gray-600); }
.itr-fig figcaption span { flex-basis: 100%; text-align: center; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.itr-fig figcaption b { padding: 3px 10px; border-radius: 999px; background: var(--gray-100); color: var(--black); font-size: 13px; }
.itr-kind { font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #D7282F; }
.itr-name { margin: 4px 0 14px; font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.02; }
.itr-name span { display: block; color: #D7282F; font-size: .72em; }
.itr-desc { margin-bottom: 10px; color: var(--gray-700); line-height: 1.65; font-size: 15px; }
.itr-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 28px; margin-top: 20px; }
.itr-cols h4, .itr-std h4 { margin-bottom: 10px; padding-bottom: 6px; border-bottom: 2px solid #D7282F; display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
/* №72: зөвхөн тосны tab доторх жагсаалт (баннерын .itr-list-д нөлөөлөхгүй) */ .itr-cols .itr-list { display: grid; gap: 8px; align-content: start; }
.itr-cols .itr-list li { position: relative; padding-left: 16px; font-size: 14px; line-height: 1.5; color: var(--gray-700); }
.itr-cols .itr-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--black); }
.itr-cols .itr-list--adv li::before { background: #D7282F; }
.itr-side { display: flex; flex-direction: column; gap: 18px; }
.itr-std { padding: 18px; border-radius: var(--radius); background: var(--gray-100); }
.itr-std ul { display: grid; gap: 6px; }
.itr-std li { display: flex; gap: 8px; font-size: 14px; font-weight: 500; }
.itr-std svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: #D7282F; }
.itr-spec { width: 100%; border-collapse: collapse; font-size: 13px; }
.itr-spec caption { text-align: left; margin-bottom: 8px; font-size: 13px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.itr-spec thead th { background: var(--black); color: var(--white); padding: 8px 10px; text-align: left; font-weight: 700; }
.itr-spec thead th + th { text-align: center; background: #D7282F; }
.itr-spec thead th + th + th { background: var(--yellow); color: var(--black); }
.itr-spec tbody th { text-align: left; font-weight: 500; padding: 7px 10px; border-bottom: 1px solid var(--line); color: var(--gray-700); }
.itr-spec td { text-align: center; padding: 7px 10px; border-bottom: 1px solid var(--line); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.itr-cta { align-self: flex-start; }
.itr-cta svg { width: 18px; height: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .itr-panel { grid-template-columns: 200px minmax(0, 1fr); }
  .itr-side { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .itr-cta { grid-column: 1 / -1; }
}
@media (max-width: 991px) {
  .types-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .types-index { position: sticky; top: var(--header-h); z-index: 5; max-height: none; overflow-x: auto; overflow-y: hidden; margin-inline: calc(var(--gutter) * -1); padding: 10px var(--gutter); background: rgba(244, 243, 239, .96); backdrop-filter: blur(6px); scrollbar-width: none; }
  .types-index::-webkit-scrollbar { display: none; }
  .types-index ul { flex-direction: row; gap: 6px; }
  .types-index a { white-space: nowrap; background: var(--white); border: 1px solid var(--line); }
  .tg { scroll-margin-top: calc(var(--header-h) + 70px); }
  .itr-bens { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .itr-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oils-head { grid-template-columns: minmax(0, 1fr); }
  .oils-meta { flex-direction: row; flex-wrap: wrap; align-items: center; }
}
@media (max-width: 600px) {
  .finder-ph { font-size: 15px; }
  .finder-btn { display: none; }
  .tg { padding: 18px 16px 12px; }
  .tg-list { grid-template-columns: minmax(0, 1fr); }
  .itr-bens { grid-template-columns: minmax(0, 1fr); }
  .itr-tab { padding: 14px; gap: 10px; }
  .itr-tab-ico { width: 34px; height: 34px; }
  .itr-tab-txt b { font-size: 13.5px; }
  .itr-panel { grid-template-columns: minmax(0, 1fr); }
  .itr-fig img { max-width: 180px; }
  .itr-cols, .itr-side { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .tg.is-flash, .itr-panel.is-entering, .itr-panel.is-entering .itr-fig img { animation: none; }
}
.finder-brands img[src*="john-deere"] { height: 38px; }
.finder-brands img[src*="komatsu"] { height: 18px; }

/* ITR тос гарчиг: ITR лого + брошурын "ТОС" бичиг, гарчгаас 2 дахин том (№55) */
.oils-title { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; line-height: 1; }
.oils-title img { display: block; width: auto; }
.oils-title-itr { height: 62px; }
.oils-title-toc { height: 54px; }
@media (max-width: 600px) {
  .oils-title-itr { height: 48px; }
  .oils-title-toc { height: 42px; }
}

/* ITR тосны "Хэрэглээ / Давуу талууд" жагсаалт: нүүр хуудасны ITR баннерын .itr-list (хэвтээ багана, flex)
   дүрэм энд нөлөөлж байсан тул бүх өргөнд дээрээс доош энгийн жагсаалт болгоно (№70) */
.itr-cols .itr-list { grid-column: auto; grid-template-columns: minmax(0, 1fr); gap: 8px; padding-bottom: 0; text-align: left; }
.itr-cols .itr-list li { display: block; padding: 0 0 0 16px; border-bottom: 0; font-size: 14px; line-height: 1.5; color: var(--gray-700); }

/* ITR тосны tab (№71): 1-р багана = Хэрэглээ + Давуу талууд (дээрээс доош),
   2-р багана = Стандартууд (+ үзүүлэлт) + Үнийн санал авах */
.itr-cols { grid-template-columns: minmax(0, 1fr); gap: 22px; }
@media (max-width: 1199px) {
  .itr-panel { grid-template-columns: 200px minmax(0, 1fr) minmax(0, 260px); gap: 24px; }
  .itr-side { grid-column: auto; display: flex; flex-direction: column; }
  .itr-cta { grid-column: auto; }
}
@media (max-width: 991px) {
  .itr-panel { grid-template-columns: 180px minmax(0, 1fr); }
  .itr-side { grid-column: 2; }
}
@media (max-width: 600px) {
  .itr-panel { grid-template-columns: minmax(0, 1fr); }
  .itr-side { grid-column: auto; }
}
