/* ==========================================================================
   Buxton Parts - Urun detay sayfasi
   site.css degiskenlerini kullanir; yalnizca /urunler/{kod} sayfasinda yuklenir.
   ========================================================================== */

.crumbs {
    background: var(--c-ink-50);
    border-bottom: 1px solid var(--c-ink-200);
}

.crumbs__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 0;
    min-height: 52px;
    padding-block: 12px;
    font-size: 13px;
    color: var(--c-ink-500);
}

.crumbs__list li + li::before {
    content: "/";
    margin-inline: 10px;
    color: var(--c-ink-300);
}

.crumbs__list a:hover {
    color: var(--c-ink-950);
}

.crumbs__list [aria-current] {
    font-weight: 600;
    color: var(--c-ink-900);
}

.pd {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 40px;
    padding-block: 40px 72px;
}

/* --------------------------------------------------------------------------
   Kategori kenar cubugu
   -------------------------------------------------------------------------- */

.pd__sidebar {
    display: grid;
    align-content: start;
    gap: 20px;
}

.side-cats {
    border: 1px solid var(--c-ink-200);
}

.side-cats summary {
    list-style: none;
    cursor: pointer;
}

.side-cats summary::-webkit-details-marker {
    display: none;
}

.side-cats__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--c-ink-800);
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-white);
}

.side-cats__head .icon {
    width: 16px;
    height: 16px;
    color: var(--c-accent);
    transition: transform 0.2s var(--ease);
}

.side-cats[open] > .side-cats__head .icon {
    transform: rotate(180deg);
}

.side-cats__list {
    max-height: 640px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.side-cats__item {
    border-bottom: 1px solid var(--c-ink-100);
}

.side-cats__item:last-child {
    border-bottom: 0;
}

.side-cats__item > a,
.side-cats__item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 16px;
    border-left: 3px solid transparent;
    font-size: 13px;
    font-weight: 600;
    color: var(--c-ink-700);
    transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.side-cats__item > a:hover,
.side-cats__item summary:hover {
    background: var(--c-ink-50);
    color: var(--c-ink-950);
}

.side-cats__item summary .icon {
    width: 14px;
    height: 14px;
    color: var(--c-ink-400);
    transition: transform 0.2s var(--ease);
}

.side-cats__item details[open] > summary .icon {
    transform: rotate(180deg);
}

.side-cats__item.is-current > a,
.side-cats__item.is-current summary {
    border-left-color: var(--c-accent);
    background: var(--c-ink-50);
    color: var(--c-ink-950);
}

.side-cats__sub {
    padding: 4px 0 10px;
    background: var(--c-ink-50);
}

.side-cats__sub a {
    display: block;
    padding: 6px 16px 6px 30px;
    font-size: 13px;
    color: var(--c-ink-600);
}

.side-cats__sub a:hover {
    color: var(--c-accent-ink);
}

/* --------------------------------------------------------------------------
   Ust bolum: galeri ve urun bilgisi
   -------------------------------------------------------------------------- */

.pd__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 40px;
    align-items: start;
}

.gallery {
    position: sticky;
    top: calc(var(--header-h) + 64px);
}

.gallery__stage {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--c-white);
    border: 1px solid var(--c-ink-200);
    cursor: zoom-in;
}

.gallery__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.2s var(--ease);
}

.gallery__stage.is-zooming .gallery__image {
    transform: scale(2);
}

.gallery__zoom {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--c-ink-200);
    border-left: 3px solid var(--c-accent);
    background: var(--c-white);
    font-family: var(--font-head);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-accent-ink);
    transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.gallery__zoom .icon {
    width: 16px;
    height: 16px;
    color: var(--c-accent-ink);
}

.gallery__zoom:hover {
    border-color: var(--c-accent);
    background: linear-gradient(var(--c-accent-soft), var(--c-accent-soft)), var(--c-white);
}

.gallery__code {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 8px;
    border: 1px solid var(--c-ink-200);
    background: var(--c-white);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--c-ink-700);
}

.gallery__thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.gallery__thumb {
    width: 72px;
    height: 72px;
    border: 1px solid var(--c-ink-200);
    background: var(--c-white);
}

.gallery__thumb.is-active {
    border-color: var(--c-accent);
    box-shadow: inset 0 0 0 1px var(--c-accent);
}

.gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pd-info__title {
    font-family: var(--font-head);
    font-size: clamp(26px, 2.6vw, 34px);
    font-weight: 700;
    line-height: 1.15;
    color: var(--c-ink-950);
}

.pd-info__code {
    display: inline-flex;
    align-items: stretch;
    margin-top: 18px;
    border: 1px solid var(--c-ink-200);
    border-left: 3px solid var(--c-accent);
    background: var(--c-white);
}

.pd-info__code-label {
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-right: 1px solid var(--c-ink-200);
    background: var(--c-accent-soft);
    font-family: var(--font-head);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-accent-ink);
}

.pd-info__code-value {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--c-ink-950);
}

.copy-btn {
    display: inline-grid;
    place-items: center;
    width: 40px;
    min-height: 36px;
    border-left: 1px solid var(--c-ink-200);
    color: var(--c-ink-500);
    transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.copy-btn:hover {
    background: var(--c-ink-50);
    color: var(--c-ink-950);
}

.copy-btn .icon {
    width: 16px;
    height: 16px;
}

.is-copied,
.is-copied .icon {
    color: var(--c-accent-ink) !important;
}

/* Marka / Modeller */

.fitment {
    margin-top: 24px;
}

.fitment__title {
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-ink-500);
}

.fitment__list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fitment__item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-right: 10px;
    border: 1px solid var(--c-ink-200);
    font-size: 13px;
    font-weight: 700;
    color: var(--c-ink-900);
    transition: border-color 0.15s var(--ease);
}

.fitment__item > span {
    align-self: stretch;
    display: flex;
    align-items: center;
    padding: 5px 10px;
    background: var(--c-ink-50);
    border-right: 1px solid var(--c-ink-200);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c-ink-500);
}

.fitment__item > .fitment__year {
    margin-right: -10px;
    border-right: 0;
    border-left: 1px solid var(--c-ink-200);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    color: var(--c-ink-700);
}

a.fitment__item:hover {
    border-color: var(--c-ink-700);
}

.pd-info__lead {
    margin-top: 10px;
    font-size: 15px;
    color: var(--c-ink-600);
}

/* Detayli aciklama: panelde metin editoruyle girilen HTML (bkz. RichText) */
.pd-desc {
    margin-bottom: 24px;
    max-width: 100%;
    overflow-x: auto;
    font-size: 15px;
    line-height: 1.7;
    color: var(--c-ink-700);
}

.pd-desc > * + * {
    margin-top: 12px;
}

.pd-desc h2,
.pd-desc h3,
.pd-desc h4,
.pd-desc h5 {
    font-family: var(--font-head);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--c-ink-900);
}

.pd-desc ul,
.pd-desc ol {
    padding-left: 22px;
}

.pd-desc ul {
    list-style: disc;
}

.pd-desc ol {
    list-style: decimal;
}

.pd-desc a {
    color: var(--c-accent-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pd-desc table {
    width: auto;
    min-width: min(100%, 420px);
    border-collapse: collapse;
    font-size: 14px;
}

.pd-desc th,
.pd-desc td {
    padding: 8px 14px;
    border: 1px solid var(--c-ink-200);
    text-align: left;
    vertical-align: top;
}

/* Eski sitedeki tablolarda baslik satiri td ile yazilmistir; ilk satir baslik gibi gosterilir. */
.pd-desc th,
.pd-desc table > :first-child > tr:first-child > td {
    background: var(--c-ink-50);
    font-weight: 700;
    color: var(--c-ink-900);
}

.pd-desc tbody tr:nth-child(even) td {
    background: var(--c-ink-50);
}

/* OEM referans kutusu */

.oem-box {
    margin-top: 28px;
    border: 1px solid var(--c-ink-200);
    border-top: 3px solid var(--c-accent);
}

.oem-box__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 16px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--c-ink-200);
}

.oem-box__title {
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-ink-950);
}

.oem-box__count {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--c-ink-500);
}

.oem-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.oem-table thead th {
    padding: 8px 16px;
    background: var(--c-ink-50);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-align: left;
    text-transform: uppercase;
    color: var(--c-ink-500);
}

.oem-table tbody th,
.oem-table tbody td {
    padding: 10px 16px;
    border-top: 1px solid var(--c-ink-100);
    text-align: left;
    vertical-align: middle;
}

.oem-box__more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 11px 16px;
    border: 0;
    border-top: 1px solid var(--c-ink-200);
    background: var(--c-ink-50);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-ink-800);
    cursor: pointer;
    transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.oem-box__more:hover {
    background: var(--c-ink-100);
    color: var(--c-ink-950);
}

.oem-box__more .icon {
    width: 14px;
    height: 14px;
    transition: transform 0.2s var(--ease);
}

.oem-box__more[aria-expanded="true"] .icon {
    transform: rotate(180deg);
}

.oem-table tbody th.is-muted {
    font-style: italic;
    font-weight: 600;
    color: var(--c-ink-400);
}

.oem-table tbody th {
    width: 38%;
    font-family: var(--font-head);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--c-ink-800);
}

.oem-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.oem-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border: 1px solid var(--c-ink-200);
    background: var(--c-white);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--c-ink-900);
    transition: border-color 0.15s var(--ease);
}

.oem-chip .icon {
    width: 13px;
    height: 13px;
    color: var(--c-ink-300);
}

.oem-chip:hover {
    border-color: var(--c-ink-700);
}

.oem-chip:hover .icon {
    color: var(--c-ink-700);
}

.spec-inline {
    display: flex;
    flex-wrap: wrap;
    margin-top: 20px;
    border: 1px solid var(--c-ink-200);
}

.spec-inline > div {
    flex: 1 1 140px;
    padding: 12px 16px;
}

.spec-inline > div + div {
    border-left: 1px solid var(--c-ink-200);
}

.spec-inline dt {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-ink-500);
}

.spec-inline dd {
    margin-top: 2px;
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
    color: var(--c-ink-950);
}

/* Satin alma kutusu */

.buy-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
    padding: 16px;
    background: var(--c-ink-50);
    border: 1px solid var(--c-ink-200);
}

.buy-box__cart {
    flex: 2 1 170px;
}

.buy-box__quote {
    flex: 1 1 130px;
}

.pd-info__notes {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    margin-top: 14px;
    font-size: 13px;
    color: var(--c-ink-500);
}

.pd-info__notes a {
    color: var(--c-ink-900);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pd-info__notes .pd-info__wa {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    text-decoration: none;
}

.pd-info__wa .icon {
    width: 16px;
    height: 16px;
    color: var(--c-accent-ink);
}

/* --------------------------------------------------------------------------
   Urun Bilesenleri ve Kullanildigi Urunler
   -------------------------------------------------------------------------- */

.pd-block {
    margin-top: 56px;
}

.pd-block__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--c-ink-800);
}

.pd-block__title {
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c-ink-950);
}

.pd-block__count {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--c-ink-500);
}

.parts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.parts-table thead th {
    padding: 10px 12px;
    background: var(--c-ink-50);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-align: left;
    text-transform: uppercase;
    color: var(--c-ink-500);
}

.parts-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--c-ink-200);
    vertical-align: middle;
}

.parts-table tbody tr:hover {
    background: var(--c-ink-50);
}

.parts-table__img {
    width: 76px;
}

.parts-table__img img {
    width: 56px;
    height: 56px;
    border: 1px solid var(--c-ink-200);
    background: var(--c-white);
    object-fit: contain;
}

.parts-table__code a {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--c-accent-ink);
    white-space: nowrap;
}

.parts-table__name a {
    font-weight: 600;
    color: var(--c-ink-950);
}

.parts-table a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.parts-table__qty {
    font-family: var(--font-mono);
    font-weight: 700;
}

.usedin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.usedin__item {
    display: flex;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--c-ink-200);
    background: var(--c-white);
    transition: border-color 0.15s var(--ease);
}

.usedin__item:hover {
    border-color: var(--c-ink-700);
}

.usedin__img {
    flex-shrink: 0;
    width: 88px;
    height: 88px;
    border: 1px solid var(--c-ink-100);
    position: relative;
}

.usedin__img img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--c-white);
    transform-origin: left center;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

/* Gorsel kartin disina tasarak 2 kat buyur; kartin kendisi sabit kalir. */
.usedin__img:hover img {
    z-index: 5;
    transform: scale(2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.usedin__body {
    display: grid;
    align-content: start;
    gap: 8px;
    min-width: 0;
}

.usedin__name {
    font-weight: 700;
    line-height: 1.3;
    color: var(--c-ink-950);
}

.usedin__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    font-size: 12px;
}

.usedin__meta div {
    display: flex;
    gap: 6px;
}

.usedin__meta dt {
    color: var(--c-ink-500);
}

.usedin__meta dd {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--c-ink-900);
}

.usedin__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-accent-ink);
}

.usedin__link .icon {
    width: 14px;
    height: 14px;
}

/* --------------------------------------------------------------------------
   Sekmeler
   -------------------------------------------------------------------------- */

.pd-tabs {
    margin-top: 56px;
    scroll-margin-top: calc(var(--header-h) + 60px);
}

.pd-tabs__nav {
    display: flex;
    overflow-x: auto;
    border-bottom: 2px solid var(--c-ink-800);
    scrollbar-width: none;
}

.pd-tabs__tab {
    flex-shrink: 0;
    padding: 14px 22px;
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-ink-500);
    transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.pd-tabs__tab:hover {
    color: var(--c-ink-950);
}

.pd-tabs__tab.is-active {
    background: var(--c-ink-800);
    color: var(--c-white);
    box-shadow: inset 0 3px 0 var(--c-accent);
}

.pd-tabs__panel {
    padding-top: 24px;
}

.pd-tabs__panel:focus-visible {
    outline-offset: 6px;
}

.spec-table,
.xref__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.spec-table th,
.spec-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--c-ink-200);
    text-align: left;
}

.spec-table th {
    width: 32%;
    background: var(--c-ink-50);
    font-weight: 600;
    color: var(--c-ink-600);
}

.spec-table td {
    font-weight: 600;
    color: var(--c-ink-950);
}

.xref__filter {
    width: 100%;
    max-width: 380px;
    min-height: 44px;
    margin-bottom: 16px;
    padding: 0 14px;
    border: 1px solid var(--c-ink-300);
    border-radius: var(--radius);
}

.xref__filter:focus {
    outline: none;
    border-color: var(--c-accent);
    box-shadow: 0 0 0 3px var(--c-accent-soft);
}

.xref__table thead th {
    padding: 10px 16px;
    background: var(--c-ink-800);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-align: left;
    text-transform: uppercase;
    color: var(--c-ink-200);
}

.xref__table td {
    padding: 8px 16px;
    border-bottom: 1px solid var(--c-ink-200);
}

.xref__table tbody tr:hover {
    background: var(--c-ink-50);
}

.xref__num {
    font-family: var(--font-mono);
    font-weight: 700;
}

.xref__table td:last-child {
    width: 56px;
    padding-block: 0;
}

.xref__table .copy-btn {
    border-left: 0;
}

.xref__empty {
    padding: 16px;
    font-size: 14px;
    color: var(--c-ink-500);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1200px) {
    .pd {
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 28px;
    }

    .pd__top {
        grid-template-columns: minmax(0, 1fr);
    }

    .gallery {
        position: static;
        max-width: 560px;
    }
}

@media (max-width: 1024px) {
    .pd {
        grid-template-columns: minmax(0, 1fr);
        padding-top: 24px;
    }

    .pd__sidebar {
        order: 2;
    }

    /* Kenar cubugu asagi indiginde ana alan genisler; gorsel ve bilgi yeniden yan yana durur. */
    .pd__top {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
        gap: 28px;
    }

    .gallery {
        max-width: none;
    }
}

@media (max-width: 768px) {
    .pd__top {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Tek kolonda gorsel tum genislige yayilmaz; ortalanir ve sinirlanir. */
    .gallery {
        width: 100%;
        max-width: 480px;
        margin-inline: auto;
    }
}

@media (max-width: 560px) {
    .stepper {
        flex: 1 1 100%;
    }

    .stepper__input {
        flex: 1;
    }

    .buy-box .btn {
        padding-inline: 12px;
    }

    .oem-table tbody th,
    .oem-table tbody td {
        padding-inline: 12px;
    }

    .oem-table tbody th {
        width: 36%;
        font-size: 12px;
    }

    .quote-form__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .quote-form__foot .btn {
        width: 100%;
    }

    /* Bilesen tablosu kart gorunumune gecer */
    .parts-table thead {
        display: none;
    }

    .parts-table tr {
        display: grid;
        grid-template-columns: 64px minmax(0, 1fr);
        column-gap: 12px;
        padding: 12px 0;
        border-bottom: 1px solid var(--c-ink-200);
    }

    .parts-table td {
        padding: 0;
        border: 0;
    }

    .parts-table__img {
        grid-row: span 5;
        width: auto;
    }

    .parts-table td[data-label] {
        display: flex;
        gap: 6px;
        font-size: 13px;
    }

    .parts-table td[data-label]::before {
        content: attr(data-label) ":";
        color: var(--c-ink-500);
    }

    .usedin {
        grid-template-columns: minmax(0, 1fr);
    }

    .usedin__img {
        width: 72px;
        height: 72px;
    }
}
