.tdbp {
    --tdbp-blue: #23508f;
    --tdbp-blue-dark: #183b70;
    --tdbp-accent: #23508f;
    --tdbp-text: #1b1b1b;
    --tdbp-muted: #616161;
    --tdbp-border: #d9d9d9;
    --tdbp-bg: #f5f5f5;
    color: var(--tdbp-text);
}

.tdbp-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 16px 56px;
}

.tdbp-breadcrumb,
.tdbp-eyebrow,
.tdbp-product-card__meta {
    color: var(--tdbp-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tdbp-eyebrow a {
    color: var(--tdbp-blue);
    text-decoration: none;
    font-weight: 600;
}

.tdbp-eyebrow a:hover {
    text-decoration: underline;
}

.tdbp-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.tdbp-hero,
.tdbp-archive-layout {
    display: grid;
    gap: 24px;
}

.tdbp-gallery,
.tdbp-summary,
.tdbp-inquiry,
.tdbp-card,
.tdbp-section,
.tdbp-category-hero,
.tdbp-filter {
    background: #fff;
    border: 1px solid var(--tdbp-border);
    border-radius: 2px;
}

.tdbp-gallery,
.tdbp-summary,
.tdbp-inquiry,
.tdbp-section,
.tdbp-category-hero,
.tdbp-filter {
    padding: 20px;
}

.tdbp-gallery__main {
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    background: #fff;
    border-radius: 2px;
    overflow: hidden;
}

.tdbp-product-image {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
    transition: opacity 0.15s ease;
}

.tdbp-product-image--placeholder {
    display: grid;
    place-items: center;
    color: var(--tdbp-muted);
    font-size: 14px;
}

.tdbp-gallery__thumbs {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--tdbp-border) transparent;
}

.tdbp-gallery__thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border: 1px solid var(--tdbp-border);
    border-radius: 2px;
    background: #fff;
    padding: 3px;
    cursor: pointer;
    transition: border-color 0.15s;
}

.tdbp-gallery__thumb:hover,
.tdbp-gallery__thumb[aria-selected="true"] {
    border-color: var(--tdbp-accent);
}

.tdbp-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.tdbp-title {
    margin: 6px 0 14px;
    color: var(--tdbp-text);
    font-size: clamp(22px, 2.2vw, 30px);
    line-height: 1.2;
    font-weight: 600;
}

.tdbp-meta-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
}

.tdbp-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--tdbp-text);
}

.tdbp-meta-link {
    color: var(--tdbp-blue);
    text-decoration: none;
    font-weight: 600;
}

.tdbp-meta-link:hover {
    text-decoration: underline;
}

.tdbp-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin: 0 0 18px;
}

.tdbp-kpi {
    border: 1px solid var(--tdbp-border);
    background: #fafafa;
    border-radius: 2px;
    padding: 10px 12px;
}

.tdbp-kpi__label {
    margin: 0 0 6px;
    color: var(--tdbp-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tdbp-kpi__value {
    margin: 0;
    font-weight: 600;
    color: var(--tdbp-text);
    line-height: 1.35;
}

.tdbp-facts,
.tdbp-buying-info {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
}

.tdbp-facts div,
.tdbp-buying-info div,
.tdbp-inquiry dl div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid #ececec;
    padding-bottom: 10px;
}

.tdbp-facts dt,
.tdbp-buying-info dt,
.tdbp-inquiry dt,
.tdbp-spec-cell--label {
    color: var(--tdbp-muted);
    font-weight: 500;
}

.tdbp-facts dd,
.tdbp-buying-info dd,
.tdbp-inquiry dd {
    margin: 0;
    text-align: right;
    font-weight: 600;
}

.tdbp-buying-info {
    border: 1px solid #e6e9ef;
    background: #f8fafc;
    border-radius: 2px;
    padding: 14px;
}

.tdbp-buying-info div {
    border-color: #e3e7ee;
}

.tdbp-buying-info div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.tdbp-summary__heading {
    margin: 18px 0 8px;
    color: var(--tdbp-text);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tdbp-summary__text {
    margin: 0;
    line-height: 1.7;
    color: #2c2c2c;
}

.tdbp-checklist {
    margin: 18px 0;
    padding: 0;
    list-style: none;
}

.tdbp-checklist li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
}

.tdbp-checklist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 7px;
    height: 7px;
    border-radius: 0;
    background: #2d2d2d;
}

.tdbp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 2px;
    border: 1px solid var(--tdbp-blue);
    background: var(--tdbp-blue);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.01em;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
}

.tdbp-button--secondary {
    background: #fff;
    color: var(--tdbp-blue);
}

.tdbp-button--secondary:hover {
    color: var(--tdbp-blue-dark);
    background: #f4f7fb;
    border-color: var(--tdbp-blue-dark);
}

.tdbp-hero-cta {
    display: grid;
    gap: 10px;
}

.tdbp-button:hover {
    color: #fff;
    background: var(--tdbp-blue-dark);
    border-color: var(--tdbp-blue-dark);
    filter: none;
}

.tdbp-link,
.tdbp-card-link {
    color: #1f3f7a;
    font-weight: 600;
    text-decoration: none;
}

.tdbp-button--mobile {
    width: 100%;
}

.tdbp-inquiry {
    align-self: start;
}

.tdbp-inquiry h2,
.tdbp-section h2,
.tdbp-filter h2 {
    margin-top: 0;
    color: var(--tdbp-text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 16px;
    font-weight: 600;
}

.tdbp-inquiry .tdbp-button {
    display: flex;
    width: 100%;
    margin-bottom: 10px;
}

.tdbp-inquiry--cta .tdbp-button {
    margin-bottom: 10px;
}

.tdbp-inquiry--cta {
    display: block;
    border-color: #d6dfec;
    background: #f8fafc;
    align-self: stretch;
}

.tdbp-inquiry--cta .tdbp-button {
    width: 100%;
    min-width: 0;
}

.tdbp-inquiry__note,
.tdbp-quote-strip p,
.tdbp-section-intro {
    margin: 0;
    color: var(--tdbp-muted);
    font-size: 14px;
    line-height: 1.65;
}

.tdbp-inquiry__price {
    margin: 0 0 8px;
    color: var(--tdbp-text);
    font-size: 15px;
    line-height: 1.5;
}

.tdbp-inquiry .tdbp-link {
    display: block;
    text-align: center;
    margin-top: 4px;
}

.tdbp-inquiry__subhead {
    margin: 14px 0 10px;
    color: var(--tdbp-text);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tdbp-inquiry--features .tdbp-inquiry__subhead {
    margin-top: 0;
}

.tdbp-inquiry--features {
    align-self: stretch;
}

.tdbp-section {
    margin-top: 24px;
}

.tdbp-quote-strip {
    text-align: center;
    border-color: #d6dfec;
    background: #f8fafc;
    padding: 22px;
}

.tdbp-quote-strip .tdbp-button {
    min-width: 280px;
    margin-bottom: 10px;
}

.tdbp-button--quote-strip {
    background: var(--tdbp-blue);
    border-color: var(--tdbp-blue);
}

.tdbp-button--quote-strip:hover {
    background: var(--tdbp-blue-dark);
    border-color: var(--tdbp-blue-dark);
    color: #fff;
}

.tdbp-section-intro {
    margin: -6px 0 16px;
}

.tdbp-spec-table {
    border: 1px solid var(--tdbp-border);
    border-radius: 2px;
    overflow: hidden;
}

.tdbp-spec-row {
    display: grid;
    grid-template-columns: 1fr;
    border-bottom: 1px solid var(--tdbp-border);
}

.tdbp-spec-row:last-child {
    border-bottom: 0;
}

.tdbp-spec-cell {
    padding: 12px 14px;
}

.tdbp-spec-cell--label {
    background: #fafafa;
}

.tdbp-spec-row:nth-child(even) .tdbp-spec-cell {
    background: #fcfcfc;
}

.tdbp-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.tdbp-product-card {
    border: 1px solid var(--tdbp-border);
    border-radius: 2px;
    background: #fff;
    overflow: hidden;
}

.tdbp-product-card__image {
    display: block;
    aspect-ratio: 1 / 1;
    background: var(--tdbp-bg);
}

.tdbp-product-card__body {
    padding: 14px;
}

.tdbp-product-card h3 {
    margin: 6px 0 12px;
    font-size: 17px;
    line-height: 1.35;
}

.tdbp-product-card h3 a {
    color: var(--tdbp-text);
    text-decoration: none;
}

.tdbp-content {
    line-height: 1.75;
    color: #262626;
}

.tdbp-content p:first-child {
    margin-top: 0;
}

.tdbp-downloads {
    display: grid;
    gap: 10px;
}

.tdbp-resources-dropdown {
    border: none;
    border-radius: 8px;
    background: #e9eaec;
}

.tdbp-resources-dropdown__toggle {
    padding: 0;
    cursor: pointer;
    list-style: none;
}

.tdbp-resources-dropdown__toggle::-webkit-details-marker {
    display: none;
}

.tdbp-resources-dropdown__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    font-weight: 600;
    font-size: 16px;
    color: var(--tdbp-text);
}

.tdbp-resources-dropdown__icon::before {
    content: "+";
    font-size: 22px;
    font-weight: 300;
}

.tdbp-resources-dropdown[open] .tdbp-resources-dropdown__icon::before {
    content: "\2212";
}

.tdbp-resources-dropdown__body {
    display: grid;
    gap: 8px;
    padding: 0 20px 16px;
}

.tdbp-download {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--tdbp-border);
    border-radius: 2px;
    color: #1f3f7a;
    text-decoration: none;
    font-weight: 600;
}

.tdbp-download:hover {
    border-color: #9b9b9b;
    color: #1f3f7a;
}

.tdbp-faq details {
    border: 1px solid var(--tdbp-border);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
}

.tdbp-faq summary {
    cursor: pointer;
    font-weight: 700;
}

.tdbp-category-hero {
    margin-bottom: 24px;
}

/* ── Category Grid (Landing Page) ─────────────────────── */
.tdbp-category-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.tdbp-category-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--tdbp-border);
    border-radius: 2px;
    text-decoration: none;
    color: var(--tdbp-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.tdbp-category-card:hover {
    border-color: var(--tdbp-blue);
    box-shadow: 0 2px 12px rgba(35, 80, 143, 0.08);
    color: var(--tdbp-text);
}

.tdbp-category-card__icon {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 2px;
    background: var(--tdbp-bg);
    color: var(--tdbp-blue);
}

.tdbp-category-card__body {
    flex: 1;
    min-width: 0;
}

.tdbp-category-card__title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--tdbp-text);
}

.tdbp-category-card:hover .tdbp-category-card__title {
    color: var(--tdbp-blue);
}

.tdbp-category-card__desc {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--tdbp-muted);
}

.tdbp-category-card__count {
    font-size: 13px;
    color: var(--tdbp-muted);
    font-weight: 500;
}

.tdbp-category-card__arrow {
    flex-shrink: 0;
    font-size: 22px;
    color: var(--tdbp-border);
    transition: color 0.15s, transform 0.15s;
}

.tdbp-category-card:hover .tdbp-category-card__arrow {
    color: var(--tdbp-blue);
    transform: translateX(3px);
}

/* ── Brand Tab Navigation ─────────────────────────────── */
.tdbp-brand-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.tdbp-brand-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: 1.5px solid #b0b7c3;
    border-radius: 22px;
    background: #f8f9fa;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.tdbp-brand-tab:hover {
    border-color: var(--tdbp-blue);
    color: var(--tdbp-blue);
    background: #eef2f7;
}

.tdbp-brand-tab--active {
    border-color: var(--tdbp-blue);
    background: var(--tdbp-blue);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(35, 80, 143, 0.25);
}

.tdbp-brand-tab--active:hover {
    background: var(--tdbp-blue-dark);
    border-color: var(--tdbp-blue-dark);
    color: #fff;
}

.tdbp-brand-tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #e5e7eb;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    color: #6b7280;
}

.tdbp-brand-tab--active .tdbp-brand-tab__count {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.tdbp-brand-tab--empty {
    border-style: dashed;
    opacity: 0.7;
}

.tdbp-brand-tab--empty:hover {
    opacity: 1;
}

.tdbp-brand-empty {
    color: var(--tdbp-muted);
    font-size: 14px;
    font-style: italic;
    padding: 16px 0;
}

/* ── Brand Sections (Category Detail) ─────────────────── */
.tdbp-brand-section {
    margin-bottom: 32px;
}

.tdbp-brand-section--hidden {
    display: none;
}

.tdbp-brand-section .tdbp-product-grid {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--tdbp-border) transparent;
}

.tdbp-brand-section .tdbp-product-card {
    min-width: 260px;
    max-width: 320px;
    flex: 1 0 260px;
}

.tdbp-brand-heading {
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--tdbp-border);
    font-size: 20px;
    font-weight: 600;
    color: var(--tdbp-text);
    text-transform: none;
    letter-spacing: 0;
}

.tdbp-filter ul {
    margin: 0 0 18px;
    padding-left: 18px;
}

.tdbp-pagination {
    margin-top: 24px;
}

/* ── Mobile ────────────────────────────────────────────── */
@media (max-width: 767px) {
    .tdbp-container {
        padding: 16px 12px 40px;
    }

    .tdbp-hero {
        gap: 12px;
    }

    .tdbp-gallery,
    .tdbp-summary,
    .tdbp-inquiry {
        padding: 14px;
    }

    .tdbp-gallery__thumbs {
        gap: 8px;
        margin-top: 10px;
    }

    /* Larger touch targets on mobile */
    .tdbp-gallery__thumb {
        width: 64px;
        height: 64px;
        padding: 3px;
    }

    .tdbp-title {
        font-size: 20px;
    }

    .tdbp-button {
        width: 100%;
        justify-content: center;
    }

    .tdbp-inquiry--cta {
        justify-content: stretch;
    }

    .tdbp-inquiry--cta .tdbp-button {
        min-width: 0;
        width: 100%;
    }

    .tdbp-hero-right {
        gap: 12px;
    }
}

/* ── Mobile Size Tuning (SEO-safe CSS only) ─────────────── */
@media (max-width: 430px) {
    .tdbp-inquiry--cta .tdbp-button {
        min-height: 44px;
        font-size: 19px;
    }

    .tdbp-inquiry--features {
        padding: 18px;
    }

    .tdbp-inquiry--features .tdbp-checklist li {
        margin-bottom: 9px;
    }
}

@media (max-width: 390px) {
    .tdbp-inquiry--cta .tdbp-button {
        min-height: 42px;
        font-size: 18px;
    }

    .tdbp-inquiry--features {
        padding: 16px;
    }

    .tdbp-inquiry__subhead {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .tdbp-inquiry--features .tdbp-checklist li {
        padding-left: 22px;
        margin-bottom: 8px;
    }
}

@media (max-width: 375px) {
    .tdbp-inquiry--cta .tdbp-button {
        min-height: 40px;
        font-size: 17px;
        letter-spacing: 0;
    }

    .tdbp-inquiry--features {
        padding: 14px;
    }

    .tdbp-inquiry__subhead {
        font-size: 12px;
    }

    .tdbp-inquiry--features .tdbp-checklist li {
        padding-left: 20px;
        margin-bottom: 7px;
    }
}

/* ── Tablet (768–1023px) ───────────────────────────────── */
@media (min-width: 768px) and (max-width: 1023px) {
    .tdbp-hero-right {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
}

@media (min-width: 768px) {
    .tdbp-spec-row {
        grid-template-columns: 0.85fr 1.15fr 0.85fr 1.15fr;
    }

    .tdbp-button--mobile {
        display: none;
    }
}

@media (min-width: 768px) {
    .tdbp-category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .tdbp-hero {
        grid-template-columns: minmax(0, 1fr) 460px;
        align-items: start;
    }

    /* Gallery sticks at top so it stays visible while the (potentially longer) right panel scrolls */
    .tdbp-gallery {
        position: sticky;
        top: 24px;
    }

    .tdbp-hero-right {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .tdbp-archive-layout {
        grid-template-columns: 260px minmax(0, 1fr);
        align-items: start;
    }

    .tdbp-category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   Product Details — Variants Table & Description
   ============================================ */

.tdbp-description .tdbp-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--tdbp-navy, #1a365d);
    margin: 32px 0 16px;
}

.tdbp-description .tdbp-content p {
    font-size: 15px;
    color: #374151;
    line-height: 1.7;
    margin-bottom: 16px;
}

.tdbp-variants-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    font-size: 14px;
}

.tdbp-variants-table th {
    background: var(--tdbp-navy, #1a365d);
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tdbp-variants-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

.tdbp-variants-table tbody tr:hover {
    background: #f9fafb;
}

.tdbp-variants-table strong {
    color: var(--tdbp-navy, #1a365d);
    font-weight: 700;
}

@media (max-width: 767px) {
    .tdbp-variants-table {
        font-size: 13px;
    }
    .tdbp-variants-table th,
    .tdbp-variants-table td {
        padding: 8px 10px;
    }
}

/* ============================================
   Part Page — Lightweight Layout
   ============================================ */

/* ── Part Inquiry Card ──────────────────────────────── */
.tdbp-inquiry--part {
    align-self: start;
}

/* Part pages: the inquiry card below already carries the quote CTA,
   so the summary's mobile-only button would render a duplicate button. */
.tdbp-single--part .tdbp-summary .tdbp-button--mobile {
    display: none;
}

/* The child theme clips the whole article with overflow:hidden
   (.single .ast-article-single), which silently disables position:sticky
   for the product gallery. Restore visible overflow on product pages only;
   the rounded card background is still clipped by its own border-radius. */
body.single-b2b_product .ast-article-single {
    overflow: visible;
}

/* ── Compatible Machines Cards (Part) ───────────────── */
.tdbp-compatible-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.tdbp-compatible-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--tdbp-border);
    border-radius: 2px;
    text-decoration: none;
    color: var(--tdbp-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.tdbp-compatible-card:hover {
    border-color: var(--tdbp-blue);
    box-shadow: 0 2px 8px rgba(35, 80, 143, 0.08);
    color: var(--tdbp-text);
}

.tdbp-compatible-card--unlisted {
    cursor: default;
    opacity: 0.7;
}

.tdbp-compatible-card--unlisted:hover {
    border-color: var(--tdbp-border);
    box-shadow: none;
}

.tdbp-compatible-card__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 2px;
    background: var(--tdbp-bg);
    display: grid;
    place-items: center;
    color: var(--tdbp-blue);
    font-size: 20px;
}

.tdbp-compatible-card--unlisted .tdbp-compatible-card__icon {
    color: var(--tdbp-muted);
}

.tdbp-compatible-card__body {
    flex: 1;
    min-width: 0;
}

.tdbp-compatible-card__title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 2px;
}

.tdbp-compatible-card__type {
    font-size: 12px;
    color: var(--tdbp-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ── Product Information Table (Part) ───────────────── */
.tdbp-part-info {
    border: 1px solid var(--tdbp-border);
    border-radius: 2px;
    overflow: hidden;
}

.tdbp-part-info-row {
    display: grid;
    grid-template-columns: 1fr;
    border-bottom: 1px solid var(--tdbp-border);
}

.tdbp-part-info-row:last-child {
    border-bottom: 0;
}

.tdbp-part-info-cell {
    padding: 14px 18px;
    font-size: 15px;
    line-height: 1.5;
}

.tdbp-part-info-cell--label {
    background: #fafafa;
    color: var(--tdbp-muted);
    font-weight: 600;
}

.tdbp-part-info-cell--value {
    color: var(--tdbp-text);
    font-weight: 500;
}

/* ── Related Parts Table (Part) ─────────────────────── */
.tdbp-related-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.tdbp-related-table th {
    text-align: left;
    padding: 12px 18px;
    background: #fafafa;
    color: var(--tdbp-muted);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--tdbp-border);
    white-space: nowrap;
}

.tdbp-related-table td {
    padding: 12px 18px;
    border-bottom: 1px solid var(--tdbp-border);
    color: var(--tdbp-text);
    line-height: 1.6;
}

.tdbp-related-table tr:last-child th,
.tdbp-related-table tr:last-child td {
    border-bottom: 0;
}

.tdbp-related-table a {
    color: var(--tdbp-blue);
    text-decoration: none;
    font-weight: 500;
}

.tdbp-related-table a:hover {
    text-decoration: underline;
}

.tdbp-link-unlisted {
    color: var(--tdbp-muted);
    font-weight: 400;
}

/* ── Part Responsive ────────────────────────────────── */
@media (min-width: 768px) {
    .tdbp-part-info-row {
        grid-template-columns: 0.35fr 0.65fr;
    }

    .tdbp-part-info-cell--label {
        border-right: 1px solid var(--tdbp-border);
    }
}

@media (max-width: 767px) {
    .tdbp-part-info-cell {
        padding: 12px 14px;
        font-size: 14px;
    }

    .tdbp-related-table {
        font-size: 14px;
    }

    .tdbp-related-table th,
    .tdbp-related-table td {
        padding: 10px 12px;
    }
}

/* ── Gallery Arrows & Cursor Hint ─────────────────────── */
.tdbp-gallery__main {
    position: relative;
    cursor: pointer;
}

/* Left / Right arrows — hidden by default, shown on hover (desktop) */
.tdbp-gallery__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, background 0.15s;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.tdbp-gallery__arrow svg {
    display: block;
}

.tdbp-gallery:hover .tdbp-gallery__arrow {
    opacity: 1;
}

.tdbp-gallery__arrow:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tdbp-gallery__arrow--prev { left: 8px; }
.tdbp-gallery__arrow--next { right: 8px; }

/* Cursor hint — follows mouse inside image area (desktop only) */
.tdbp-gallery__cursor-hint {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    display: none;
    place-items: center;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 3;
    transition: opacity 0.15s;
}

.tdbp-gallery__main:hover .tdbp-gallery__cursor-hint {
    display: grid;
}

/* Mobile: always show arrows, hide cursor hint (no hover) */
@media (max-width: 767px) {
    .tdbp-gallery__arrow {
        opacity: 1;
        width: 36px;
        height: 36px;
    }

    .tdbp-gallery__cursor-hint {
        display: none !important;
    }
}

/* ── Lightbox ─────────────────────────────────────────── */
.tdbp-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 16px;
}

.tdbp-lightbox--open {
    display: flex;
}

.tdbp-lightbox__img {
    max-width: 90vw;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 2px;
    user-select: none;
    -webkit-user-drag: none;
}

.tdbp-lightbox__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 3;
    transition: background 0.15s;
}

.tdbp-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.tdbp-lightbox__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
    cursor: pointer;
    z-index: 3;
    transition: background 0.15s;
}

.tdbp-lightbox__arrow svg {
    display: block;
}

.tdbp-lightbox__arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.tdbp-lightbox__arrow--prev { left: 12px; }
.tdbp-lightbox__arrow--next { right: 12px; }

.tdbp-lightbox__thumbs {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    overflow-x: auto;
    max-width: 90vw;
    padding: 4px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.tdbp-lightbox__thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s;
}

.tdbp-lightbox__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.tdbp-lightbox__thumb--active {
    border-color: #fff;
}

.tdbp-lightbox__thumb:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

/* Lightbox mobile tweaks */
@media (max-width: 767px) {
    .tdbp-lightbox__img {
        max-width: 95vw;
        max-height: calc(100vh - 100px);
    }

    .tdbp-lightbox__arrow {
        width: 40px;
        height: 40px;
    }

    .tdbp-lightbox__arrow--prev { left: 6px; }
    .tdbp-lightbox__arrow--next { right: 6px; }

    .tdbp-lightbox__thumb {
        width: 44px;
        height: 44px;
    }
}
