
/* ============================================================
   TPD V2 — SINGLE PRODUCT
   ============================================================ */

.single-product .tpd-container {
    max-width: 1360px;
    margin: 0 auto;
    padding-left: 28px;
    padding-right: 28px;
}

.tpd-v2-product-page {
    width: 100%;
}


/* ------------------------------------------------------------
   PRIMARY PRODUCT AREA
   ------------------------------------------------------------ */

.tpd-product-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(480px, 1fr);
    gap: 52px;
    align-items: start;
    padding: 30px 0 52px;
    border-bottom: 1px solid #e4e7eb;
}


/* ------------------------------------------------------------
   PRODUCT IMAGE
   ------------------------------------------------------------ */

.tpd-product-media {
    min-width: 0;
}

.tpd-product-media .woocommerce-product-gallery,
.tpd-product-media .woocommerce-product-gallery__wrapper {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

.tpd-product-media .woocommerce-product-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 24px;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 14px;
}

.tpd-product-media img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 560px;
    height: auto !important;
    margin: 0 auto;
    object-fit: contain;
}


/* ------------------------------------------------------------
   PURCHASE COLUMN
   ------------------------------------------------------------ */

.tpd-product-purchase,
.tpd-product-purchase .summary {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

.tpd-product-oem-kicker {
    margin-bottom: 10px;
    color: #7d1526;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.tpd-product-purchase .product_title {
    margin: 0 0 16px !important;
    color: #17212b;
    font-size: clamp(30px, 3vw, 44px);
    line-height: 1.08;
    letter-spacing: -.025em;
}

.tpd-product-purchase .price {
    margin: 18px 0 !important;
    color: #17212b !important;
    font-size: 32px !important;
    font-weight: 800;
}

.tpd-product-purchase .woocommerce-product-details__short-description {
    margin: 18px 0 22px;
    color: #4d5966;
    font-size: 16px;
    line-height: 1.65;
}


/* ------------------------------------------------------------
   FITMENT
   ------------------------------------------------------------ */

.tpd-product-purchase .tpd-fitment-checker {
    margin: 24px 0 !important;
    padding: 22px !important;
    background: #f7f3f4;
    border: 1px solid #dcc8cd;
    border-radius: 12px;
}

.tpd-fitment-kicker {
    margin-bottom: 5px;
    color: #7d1526;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
}

.tpd-fitment-checker h2 {
    margin: 0 0 8px;
    color: #19222c;
    font-size: 21px;
}

.tpd-fitment-checker p {
    margin: 0 0 14px;
    color: #5c6570;
}

.tpd-fitment-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.tpd-fitment-form input {
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid #b7bec6;
    border-radius: 7px;
    background: #fff;
    font-size: 16px;
}

.tpd-fitment-form button {
    min-height: 48px;
    padding: 0 20px;
    border: 0;
    border-radius: 7px;
    background: #7d1526;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
}


/* ------------------------------------------------------------
   CART
   ------------------------------------------------------------ */

.tpd-product-purchase form.cart {
    margin: 22px 0 !important;
}

.tpd-product-purchase form.cart .quantity {
    margin-right: 10px !important;
}

.tpd-product-purchase form.cart .qty {
    min-height: 50px;
}

.tpd-product-purchase .single_add_to_cart_button {
    min-height: 50px !important;
    padding: 0 30px !important;
    border-radius: 7px !important;
    background: #7d1526 !important;
    font-size: 16px !important;
    font-weight: 800 !important;
}


/* ------------------------------------------------------------
   EXPRESS PAYMENT — KEEP FUNCTIONAL, STOP IT TAKING OVER PAGE
   ------------------------------------------------------------ */

.tpd-product-purchase .ppc-button-wrapper,
.tpd-product-purchase .paypal-buttons,
.tpd-product-purchase .wcpay-payment-request-wrapper,
.tpd-product-purchase .wc-stripe-payment-request-wrapper,
.tpd-product-purchase .wc-block-components-express-payment,
.tpd-product-purchase [class*="express-payment"] {
    width: 100% !important;
    max-width: 480px !important;
    margin-left: 0 !important;
    margin-right: auto !important;
}

.tpd-product-purchase iframe {
    max-width: 480px;
}


/* ------------------------------------------------------------
   META
   ------------------------------------------------------------ */

.tpd-product-purchase .product_meta {
    margin: 24px 0 0 !important;
    padding: 18px 0 0;
    border-top: 1px solid #e2e5e8;
    color: #626d78;
    font-size: 14px;
    line-height: 1.8;
}

.tpd-product-purchase .product_meta > span {
    display: block;
}


/* ------------------------------------------------------------
   TRUST STRIP
   ------------------------------------------------------------ */

.tpd-product-trust {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin-top: 26px;
    overflow: hidden;
    border: 1px solid #e1e5e8;
    border-radius: 10px;
    background: #e1e5e8;
}

.tpd-product-trust > div {
    padding: 16px 14px;
    background: #fff;
}

.tpd-product-trust strong,
.tpd-product-trust span {
    display: block;
}

.tpd-product-trust strong {
    margin-bottom: 3px;
    color: #202a34;
    font-size: 13px;
}

.tpd-product-trust span {
    color: #707982;
    font-size: 12px;
    line-height: 1.4;
}


/* ------------------------------------------------------------
   LOWER PAGE
   ------------------------------------------------------------ */

.tpd-product-lower {
    width: 100%;
    clear: both;
    padding-top: 48px;
}

.tpd-product-lower > *,
.tpd-product-lower .woocommerce-tabs,
.tpd-product-lower .related,
.tpd-product-lower .upsells {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    clear: both !important;
}


/* ------------------------------------------------------------
   COMPATIBLE MODELS
   ------------------------------------------------------------ */

.tpd-product-lower .tpd-compatible-models-aeo {
    margin: 0 0 42px !important;
    padding: 30px !important;
    border: 1px solid #dfe3e7 !important;
    border-radius: 12px !important;
    background: #fff !important;
}

.tpd-compatible-models-aeo h2 {
    margin: 0 0 8px;
    color: #17212b;
    font-size: 28px;
}

.tpd-compatible-models-aeo h3 {
    margin-top: 28px;
    color: #17212b;
}

.tpd-compatible-models-aeo .tpd-model-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}

.tpd-compatible-models-aeo .tpd-model-chip-list a {
    margin: 0 !important;
    padding: 8px 12px !important;
    background: #f5f6f7 !important;
    border: 1px solid #d7dce0 !important;
    border-radius: 999px !important;
    color: #303942 !important;
    font-size: 13px;
    font-weight: 700;
}


/* ------------------------------------------------------------
   DESCRIPTION / AEO CONTENT
   ------------------------------------------------------------ */

.tpd-product-lower .woocommerce-tabs {
    margin: 0 0 50px !important;
}

.tpd-product-lower .woocommerce-tabs ul.tabs {
    margin: 0 0 28px !important;
    padding: 0 !important;
    border-bottom: 1px solid #dfe3e7;
}

.tpd-product-lower .woocommerce-tabs ul.tabs::before {
    display: none !important;
}

.tpd-product-lower .woocommerce-tabs ul.tabs li {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.tpd-product-lower .woocommerce-tabs ul.tabs li a {
    padding: 14px 4px !important;
    color: #17212b !important;
    font-size: 18px;
    font-weight: 800 !important;
}

.tpd-product-lower .woocommerce-Tabs-panel {
    margin: 0 !important;
    padding: 0 !important;
}

.tpd-product-lower .tpd-aeo-content {
    max-width: 1080px;
}

.tpd-product-lower .tpd-aeo-content h2 {
    margin: 38px 0 12px;
    color: #17212b;
    font-size: 27px;
    line-height: 1.2;
}

.tpd-product-lower .tpd-aeo-content h3 {
    margin: 24px 0 8px;
    color: #26313c;
    font-size: 19px;
}

.tpd-product-lower .tpd-aeo-content p,
.tpd-product-lower .tpd-aeo-content li {
    color: #4e5965;
    font-size: 16px;
    line-height: 1.7;
}

.tpd-product-lower .tpd-aeo-answer-block {
    padding: 24px 26px;
    border-left: 4px solid #7d1526;
    border-radius: 7px;
    background: #f7f7f7;
}

.tpd-product-lower .tpd-aeo-answer-block h2 {
    margin-top: 0;
}


/* ------------------------------------------------------------
   RELATED / UPSELL PRODUCTS
   ------------------------------------------------------------ */

.tpd-product-lower .related,
.tpd-product-lower .upsells {
    margin-top: 54px !important;
    padding-top: 38px;
    border-top: 1px solid #e2e5e8;
}

.tpd-product-lower .related > h2,
.tpd-product-lower .upsells > h2 {
    margin-bottom: 26px;
    color: #17212b;
    font-size: 28px;
}

.tpd-product-lower ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.tpd-product-lower ul.products::before,
.tpd-product-lower ul.products::after {
    display: none !important;
}

.tpd-product-lower ul.products li.product {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
}


/* ------------------------------------------------------------
   REMOVE OLD FLOAT BEHAVIOR
   ------------------------------------------------------------ */

.single-product div.product div.images,
.single-product div.product div.summary {
    float: none !important;
}


/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */

@media (max-width: 980px) {

    .tpd-product-main {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .tpd-product-media .woocommerce-product-gallery {
        min-height: 420px;
    }

    .tpd-product-lower ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tpd-product-trust {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 620px) {

    .single-product .tpd-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .tpd-product-main {
        padding-top: 18px;
    }

    .tpd-product-media .woocommerce-product-gallery {
        min-height: 300px;
        padding: 20px;
    }

    .tpd-product-purchase .product_title {
        font-size: 29px;
    }

    .tpd-fitment-form {
        grid-template-columns: 1fr;
    }

    .tpd-product-lower ul.products {
        grid-template-columns: 1fr;
    }

}


/* TPD V2 PRODUCT ZOOM POSITION */
.tpd-product-media .woocommerce-product-gallery__trigger {
    top: 14px !important;
    right: 14px !important;
    left: auto !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

/* ============================================================
   TPD R2 STATIC PRODUCT IMAGE
   Do not allow Woo gallery JS to control sizing.
   ============================================================ */

.tpd-product-media .tpd-r2-product-gallery {
    width: 100%;
    padding: 24px;
    margin: 0;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 14px;
    box-sizing: border-box;
}

.tpd-product-media .tpd-r2-product-image-link {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: center;
}

.tpd-product-media .tpd-r2-single-product-image {
    display: block;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 520px !important;
    margin: 0 auto !important;
    object-fit: contain;
}

/* ============================================================
   TPD R2 PRODUCT IMAGE — FINAL DESKTOP PROPORTIONS
   ============================================================ */

.tpd-product-media .tpd-r2-product-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0 !important;
    height: auto !important;
    padding: 28px !important;
    box-sizing: border-box;
}

.tpd-product-media .tpd-r2-product-image-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    height: auto !important;
}

.tpd-product-media .tpd-r2-single-product-image {
    display: block !important;

    width: auto !important;
    height: auto !important;

    max-width: 92% !important;
    max-height: 440px !important;

    margin: 0 auto !important;
    object-fit: contain !important;
}


/* Large desktop */
@media (min-width: 1200px) {

    .tpd-product-media .tpd-r2-single-product-image {
        max-height: 440px !important;
    }

}


/* Tablet */
@media (max-width: 980px) {

    .tpd-product-media .tpd-r2-single-product-image {
        max-width: 100% !important;
        max-height: 420px !important;
    }

}


/* Mobile */
@media (max-width: 620px) {

    .tpd-product-media .tpd-r2-product-gallery {
        padding: 18px !important;
    }

    .tpd-product-media .tpd-r2-single-product-image {
        max-height: 340px !important;
    }

}

/* ============================================================
   TPD V2 PRODUCT MEDIA PANEL — COMPACT FINAL LAYOUT
   ============================================================ */

.tpd-product-main {
    align-items: start !important;
}

.tpd-product-media {
    align-self: start !important;
    min-height: 0 !important;
    height: auto !important;
}

.tpd-product-media .tpd-r2-product-gallery {
    display: block !important;

    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;

    padding: 18px !important;
    margin: 0 !important;

    background: #fff !important;
    border: 1px solid #dfe3e7 !important;
    border-radius: 12px !important;
}

.tpd-product-media .tpd-r2-product-image-link {
    display: block !important;

    width: 100% !important;
    height: auto !important;

    padding: 0 !important;
    margin: 0 !important;
}

.tpd-product-media .tpd-r2-single-product-image {
    display: block !important;

    width: auto !important;
    height: auto !important;

    max-width: 100% !important;
    max-height: 390px !important;

    margin: 0 auto !important;
    padding: 0 !important;

    object-fit: contain !important;
}


/* Remove any leftover Woo/product-image trigger visuals */
.tpd-product-media .woocommerce-product-gallery__trigger,
.tpd-product-media .woocommerce-product-gallery__trigger::before,
.tpd-product-media .woocommerce-product-gallery__trigger::after {
    display: none !important;
}


/* Tighten excessive top spacing */
.single-product .tpd-section {
    padding-top: 24px !important;
}

.tpd-product-main {
    padding-top: 18px !important;
    gap: 42px !important;
}


/* Slightly favor product information column */
@media (min-width: 1100px) {
    .tpd-product-main {
        grid-template-columns:
            minmax(0, .9fr)
            minmax(500px, 1.1fr) !important;
    }
}

/* ============================================================
   TPD V2 PRODUCT IMAGE — CLEAN FINAL PANEL
   ============================================================ */

.tpd-product-media {
    min-height: 0 !important;
    height: auto !important;
}

.tpd-product-media .tpd-r2-product-gallery {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;

    padding: 16px !important;
    margin: 0 !important;

    background: #fff !important;
    border: 1px solid #dfe3e7 !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
}

.tpd-product-media .tpd-r2-single-product-image {
    display: block !important;

    width: auto !important;
    height: auto !important;

    max-width: 100% !important;
    max-height: 380px !important;

    margin: 0 auto !important;
    padding: 0 !important;

    object-fit: contain !important;
}

/* Remove every possible gallery/zoom decoration */
.tpd-product-media a,
.tpd-product-media .woocommerce-product-gallery__trigger,
.tpd-product-media .zoomImg,
.tpd-product-media::before,
.tpd-product-media::after,
.tpd-r2-product-gallery::before,
.tpd-r2-product-gallery::after {
    box-shadow: none !important;
}

.tpd-product-media .woocommerce-product-gallery__trigger,
.tpd-product-media .zoomImg {
    display: none !important;
}

/* Better desktop proportion */
@media (min-width: 1100px) {
    .tpd-product-main {
        grid-template-columns:
            minmax(0, .82fr)
            minmax(520px, 1.18fr) !important;
        gap: 38px !important;
    }

    .tpd-product-media .tpd-r2-single-product-image {
        max-height: 380px !important;
    }
}

@media (max-width: 980px) {
    .tpd-product-media .tpd-r2-single-product-image {
        max-height: 360px !important;
    }
}

@media (max-width: 620px) {
    .tpd-product-media .tpd-r2-single-product-image {
        max-height: 300px !important;
    }
}

/* ============================================================
   TPD V2 PRODUCT HERO — COMPACT OEM CATALOG PROPORTIONS
   ============================================================ */

@media (min-width: 1100px) {

    .tpd-product-main {
        grid-template-columns:
            minmax(360px, .72fr)
            minmax(560px, 1.28fr) !important;

        gap: 42px !important;
        align-items: start !important;
    }

    .tpd-product-media {
        width: 100% !important;
        max-width: 520px !important;
        justify-self: end !important;
    }

    .tpd-product-media .tpd-r2-product-gallery {
        width: 100% !important;
        padding: 16px !important;
        min-height: 0 !important;
        height: auto !important;
    }

    .tpd-product-media .tpd-r2-single-product-image {
        width: auto !important;
        height: auto !important;

        max-width: 100% !important;
        max-height: 300px !important;

        margin: 0 auto !important;
        object-fit: contain !important;
    }

    .tpd-product-purchase {
        min-width: 0 !important;
        padding-top: 2px !important;
    }
}
