/* Racing Punk single-product redesign — white / blue / black
 * Scoped to WooCommerce product pages so the rest of the live site is unaffected.
 */

body.single-product {
    --rp-blue: #066bff;
    --rp-blue-dark: #0056d8;
    --rp-black: #0b0b0d;
    --rp-text: #1c1d21;
    --rp-muted: #626872;
    --rp-line: #e4e7ec;
    --rp-soft: #f7f9fc;
    --rp-green: #168a3d;
    --rp-green-bg: #e9f8ee;
    background: #fff;
}

/* Main product shell */
body.single-product .flat-single-product {
    padding: 48px 0 28px;
    background: #fff;
}

body.single-product .tf-main-product > .container,
body.single-product .tab-single-product > .container,
body.single-product .flat-spacing > .container,
body.single-product .flat-spacing > div {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

body.single-product .tf-main-product .row {
    align-items: flex-start;
    margin-left: -16px;
    margin-right: -16px;
}

body.single-product .tf-main-product .left-col,
body.single-product .tf-main-product .right-col {
    padding-left: 16px;
    padding-right: 16px;
}

/* Gallery */
body.single-product .tf-product-media-wrap {
    gap: 14px;
}

body.single-product .tf-product-media-wrap.thumbs-slider.thumbs-left,
body.single-product .tf-product-media-wrap.thumbs-slider:not(.thumbs-bottom) {
    display: flex;
    flex-direction: row !important;
    align-items: flex-start;
}

body.single-product .tf-product-media-wrap.thumbs-slider:not(.thumbs-bottom) .tf-product-media-thumbs {
    width: 82px;
    max-width: 82px;
    flex: 0 0 82px;
    margin: 0;
}

body.single-product .tf-product-media-wrap.thumbs-slider .flat-wrap-media-product {
    min-width: 0;
    flex: 1 1 auto;
}

body.single-product .flat-wrap-media-product .tf-product-media-main,
body.single-product .tf-product-media-wrap.thumbs-slider .flat-wrap-media-product > .swiper {
    border: 1px solid var(--rp-line);
    border-radius: 6px;
    background: #f8fafc;
    overflow: hidden;
}

body.single-product .flat-wrap-media-product .tf-product-media-main .item,
body.single-product .tf-product-media-wrap.thumbs-slider .flat-wrap-media-product .wrapper-gallery .item {
    background: #f8fafc;
}

body.single-product .flat-wrap-media-product .tf-product-media-main .item img,
body.single-product .tf-product-media-wrap.thumbs-slider .flat-wrap-media-product .wrapper-gallery .item img {
    display: block;
    width: 100%;
    object-fit: contain;
}

body.single-product .tf-product-media-thumbs .swiper-slide .item {
    border: 1px solid var(--rp-line);
    border-radius: 5px;
    overflow: hidden;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

body.single-product .tf-product-media-thumbs .swiper-slide.swiper-slide-thumb-active .item,
body.single-product .tf-product-media-thumbs .swiper-slide-thumb-active .item {
    border-color: var(--rp-blue) !important;
    box-shadow: 0 0 0 2px rgba(6, 107, 255, .12);
}

body.single-product .tf-product-media-thumbs .swiper-slide .item::after {
    display: none !important;
}

body.single-product .tf-product-media-thumbs .swiper-slide .item img {
    border-radius: 4px;
}

body.single-product .nav-swiper,
body.single-product .swiper-button-next,
body.single-product .swiper-button-prev {
    background: #fff;
    border: 1px solid var(--rp-line);
    color: var(--rp-black);
    box-shadow: 0 4px 16px rgba(16, 24, 40, .08);
}

/* Product information */
body.single-product .tf-single-product .tf-product-info-wrap {
    margin-top: 0;
    padding: 4px 0 0 20px;
}

body.single-product .tf-product-info-wrap.sticky-top {
    top: 104px;
}

body.single-product .tf-product-info-wrap .tf-product-info-list {
    color: var(--rp-text);
}

body.single-product .tf-product-info-wrap .tf-product-info-heading .category,
body.single-product .tf-product-info-wrap .category {
    margin-bottom: 8px;
    color: var(--rp-blue);
    font-size: 12px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

body.single-product h1.product-info-name {
    margin: 0 0 12px;
    color: var(--rp-black);
    font-size: clamp(34px, 3vw, 48px);
    line-height: 1.06;
    font-weight: 700 !important;
    letter-spacing: -.035em;
}

body.single-product .product-info-price,
body.single-product .tf-product-info-wrap .price,
body.single-product .tf-product-info-wrap .amount {
    color: var(--rp-black);
    font-weight: 700;
}

body.single-product .product-info-price {
    margin-bottom: 10px;
    font-size: 30px;
    line-height: 1.2;
}

body.single-product .stock.in-stock,
body.single-product .product-info-price .in-stock {
    display: inline-flex;
    align-items: center;
    margin-left: 9px;
    padding: 4px 8px;
    border-radius: 3px;
    background: var(--rp-green-bg);
    color: var(--rp-green) !important;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
}

body.single-product .woocommerce-product-details__short-description,
body.single-product .tf-product-info-wrap .description,
body.single-product .tf-product-info-wrap .short-description {
    color: var(--rp-muted);
    font-size: 15px;
    line-height: 1.62;
}

body.single-product .woocommerce-product-details__short-description p:last-child {
    margin-bottom: 0;
}

/* Quantity + primary CTA */
body.single-product form.cart {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--rp-line);
}

body.single-product form.cart .group-btn {
    display: flex;
    align-items: stretch;
    gap: 10px;
    width: 100%;
}

body.single-product form.cart .quantity,
body.single-product form.cart .wg-quantity,
body.single-product form.cart .inner-quantity {
    flex: 0 0 auto;
    border: 1px solid #cfd4dc;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

body.single-product .tf-single-product .inner-quantity .qty_button,
body.single-product .tf-single-product .inner-quantity .qty,
body.single-product form.cart .quantity .qty,
body.single-product form.cart .quantity button {
    min-height: 48px !important;
    color: var(--rp-black);
    background: #fff;
}

body.single-product .single_add_to_cart_button,
body.single-product .tf-main-product .btn-add-to-cart {
    flex: 1 1 auto;
    min-height: 48px;
    border: 1px solid var(--rp-blue) !important;
    border-radius: 4px !important;
    background: var(--rp-blue) !important;
    color: #fff !important;
    font-weight: 700;
    box-shadow: none !important;
}

body.single-product .single_add_to_cart_button:hover,
body.single-product .tf-main-product .btn-add-to-cart:hover {
    border-color: var(--rp-blue-dark) !important;
    background: var(--rp-blue-dark) !important;
    color: #fff !important;
}

body.single-product .tf-buy-now-btn {
    min-height: 46px;
    margin-top: 8px;
    border: 1px solid var(--rp-black) !important;
    border-radius: 4px !important;
    background: var(--rp-black) !important;
    color: #fff !important;
    font-weight: 700;
}

body.single-product .tf-buy-now-btn:hover {
    background: #25262a !important;
    border-color: #25262a !important;
}

body.single-product .tf-product-info-wrap a:not(.tf-btn):not(.button) {
    transition: color .2s ease;
}

body.single-product .tf-product-info-wrap a:not(.tf-btn):not(.button):hover {
    color: var(--rp-blue);
}

/* Wishlist / compare / share / product meta */
body.single-product .tf-product-info-wrap .tf-product-info-extra-link,
body.single-product .tf-product-info-wrap .tf-product-extra-link,
body.single-product .tf-product-info-wrap .extra-link,
body.single-product .tf-product-info-wrap .tf-product-info-meta,
body.single-product .tf-product-info-wrap .product_meta {
    border-color: var(--rp-line);
}

body.single-product .tf-product-info-wrap .product_meta,
body.single-product .tf-product-info-wrap .sku_wrapper,
body.single-product .tf-product-info-wrap .posted_in {
    color: var(--rp-muted);
    font-size: 13px;
}

body.single-product .tf-product-info-wrap .posted_in a,
body.single-product .tf-product-info-wrap .product_meta a {
    color: var(--rp-blue);
    font-weight: 600;
}

/* PayPal / express payment blocks */
body.single-product .tf-product-info-wrap [class*="paypal"],
body.single-product .tf-product-info-wrap [id*="paypal"] {
    max-width: 100%;
}

/* Product tabs */
body.single-product .tab-single-product {
    margin-top: 18px;
    background: #fff;
}

body.single-product .tab-single-product .flat-animate-tab {
    border: 1px solid var(--rp-line);
    border-radius: 5px;
    overflow: hidden;
    background: #fff;
}

body.single-product .tab-single-product .widget-tabs,
body.single-product .tab-single-product .nav-tab,
body.single-product .tab-single-product .nav-tabs {
    border-bottom: 1px solid var(--rp-line);
    background: #fff;
}

body.single-product .tab-single-product .nav-link,
body.single-product .tab-single-product .item-link {
    color: var(--rp-text);
    font-weight: 600;
}

body.single-product .tab-single-product .nav-link.active,
body.single-product .tab-single-product .item-link.active,
body.single-product .tab-single-product .active > a {
    color: var(--rp-black);
    border-color: var(--rp-blue) !important;
}

body.single-product .tab-single-product .tab-pane,
body.single-product .tab-single-product .tab-content {
    color: var(--rp-muted);
    font-size: 14px;
    line-height: 1.65;
}

/* Related / People Also Bought / Recently Viewed */
body.single-product .flat-spacing.pb-0 {
    padding-top: 34px !important;
}

body.single-product .flat-spacing .flat-title {
    margin-bottom: 16px;
    text-align: left;
}

body.single-product .flat-spacing .flat-title .title {
    margin: 0;
    color: var(--rp-black);
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -.025em;
}

body.single-product .flat-spacing .card-product,
body.single-product .flat-spacing .product-card,
body.single-product .flat-spacing li.product {
    height: 100%;
    border: 1px solid var(--rp-line);
    border-radius: 5px;
    background: #fff;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

body.single-product .flat-spacing .card-product:hover,
body.single-product .flat-spacing .product-card:hover,
body.single-product .flat-spacing li.product:hover {
    transform: translateY(-2px);
    border-color: #d3d8e0;
    box-shadow: 0 10px 28px rgba(16, 24, 40, .08);
}

body.single-product .flat-spacing .card-product .tf-btn,
body.single-product .flat-spacing .product-card .tf-btn,
body.single-product .flat-spacing .button {
    border-color: var(--rp-blue) !important;
    background: var(--rp-blue) !important;
    color: #fff !important;
    border-radius: 3px !important;
}

body.single-product .flat-spacing .card-product .tf-btn:hover,
body.single-product .flat-spacing .product-card .tf-btn:hover,
body.single-product .flat-spacing .button:hover {
    border-color: var(--rp-blue-dark) !important;
    background: var(--rp-blue-dark) !important;
}

body.single-product .flat-spacing .price,
body.single-product .flat-spacing .amount {
    font-weight: 700;
}

body.single-product .sw-dot-default .swiper-pagination-bullet-active {
    background: var(--rp-blue) !important;
}

/* Sticky add-to-cart */
body.single-product .tf-sticky-atc-wrapper {
    border-top: 1px solid var(--rp-line);
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 -8px 28px rgba(16, 24, 40, .08);
    backdrop-filter: blur(10px);
}

body.single-product .tf-sticky-atc-wrapper .container {
    max-width: 1320px;
}

body.single-product .tf-sticky-atc-img {
    border: 1px solid var(--rp-line);
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

body.single-product .tf-sticky-atc-title {
    color: var(--rp-black);
    font-weight: 600;
}

body.single-product .tf-sticky-atc-ajax {
    min-height: 44px;
    border-color: var(--rp-blue) !important;
    border-radius: 4px !important;
    background: var(--rp-blue) !important;
    color: #fff !important;
    font-weight: 700;
}

/* Keep footer and lower content visually connected to the new product template */
body.single-product #footer,
body.single-product footer {
    border-top-color: var(--rp-line);
}

/* Tablet */
@media (max-width: 991px) {
    body.single-product .flat-single-product {
        padding-top: 28px;
    }

    body.single-product .tf-main-product > .container,
    body.single-product .tab-single-product > .container,
    body.single-product .flat-spacing > .container,
    body.single-product .flat-spacing > div {
        padding-left: 18px;
        padding-right: 18px;
    }

    body.single-product .tf-single-product .tf-product-info-wrap {
        margin-top: 28px;
        padding-left: 0;
    }

    body.single-product h1.product-info-name {
        font-size: 36px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    body.single-product .flat-single-product {
        padding-top: 18px;
        padding-bottom: 20px;
    }

    body.single-product .tf-main-product > .container,
    body.single-product .tab-single-product > .container,
    body.single-product .flat-spacing > .container,
    body.single-product .flat-spacing > div {
        padding-left: 14px;
        padding-right: 14px;
    }

    body.single-product .tf-product-media-wrap.thumbs-slider.thumbs-left,
    body.single-product .tf-product-media-wrap.thumbs-slider:not(.thumbs-bottom) {
        display: flex;
        flex-direction: column-reverse !important;
        gap: 10px;
    }

    body.single-product .tf-product-media-wrap.thumbs-slider:not(.thumbs-bottom) .tf-product-media-thumbs {
        width: 100%;
        max-width: 100%;
        flex: 0 0 auto;
    }

    body.single-product .tf-product-media-thumbs .swiper-wrapper {
        align-items: stretch;
    }

    body.single-product .tf-product-media-thumbs .swiper-slide .item {
        border-radius: 4px;
    }

    body.single-product .tf-single-product .tf-product-info-wrap {
        margin-top: 20px;
        padding: 0;
    }

    body.single-product h1.product-info-name {
        margin-bottom: 8px;
        font-size: 25px;
        line-height: 1.12;
        letter-spacing: -.02em;
    }

    body.single-product .product-info-price {
        font-size: 25px;
    }

    body.single-product .woocommerce-product-details__short-description,
    body.single-product .tf-product-info-wrap .description,
    body.single-product .tf-product-info-wrap .short-description {
        font-size: 14px;
        line-height: 1.55;
    }

    body.single-product form.cart {
        margin-top: 16px;
        padding-top: 16px;
    }

    body.single-product form.cart .group-btn {
        gap: 8px;
    }

    body.single-product form.cart .quantity,
    body.single-product form.cart .wg-quantity,
    body.single-product form.cart .inner-quantity {
        flex: 0 0 94px;
    }

    body.single-product .single_add_to_cart_button,
    body.single-product .tf-main-product .btn-add-to-cart {
        min-height: 44px;
        font-size: 13px;
    }

    body.single-product .tf-buy-now-btn {
        min-height: 43px;
        font-size: 13px;
    }

    body.single-product .tab-single-product {
        margin-top: 8px;
    }

    body.single-product .tab-single-product .flat-animate-tab {
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    body.single-product .flat-spacing.pb-0 {
        padding-top: 26px !important;
    }

    body.single-product .flat-spacing .flat-title .title {
        font-size: 22px;
    }

    body.single-product .tf-sticky-atc-wrapper .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    body.single-product .tf-sticky-atc-wrapper .tf-sticky-atc-img {
        width: 42px;
        height: 42px;
    }

    body.single-product .tf-sticky-atc-wrapper .tf-sticky-atc-form .quantity {
        display: none;
    }

    body.single-product .tf-sticky-atc-ajax {
        min-width: 128px;
        min-height: 42px;
        padding-left: 18px;
        padding-right: 18px;
    }
}

@media (max-width: 767px) {
    body.single-product .flat-single-product {
        padding-bottom: 12px;
    }

    body.single-product .tf-single-product .tf-product-info-wrap {
        margin-top: 18px;
    }

    body.single-product .product-info-price {
        margin-bottom: 8px;
    }

    body.single-product .woocommerce-product-details__short-description p,
    body.single-product .tf-product-info-wrap .description p,
    body.single-product .tf-product-info-wrap .short-description p {
        margin-bottom: 10px;
    }

    body.single-product form.cart {
        margin-top: 14px;
        padding-top: 14px;
    }

    body.single-product .tf-product-info-wrap .tf-product-info-extra-link,
    body.single-product .tf-product-info-wrap .tf-product-extra-link,
    body.single-product .tf-product-info-wrap .tf-product-info-meta,
    body.single-product .tf-product-info-wrap .product_meta {
        margin-top: 12px;
        padding-top: 12px;
        margin-bottom: 0;
    }

    body.single-product .tf-product-info-wrap [class*="paypal"],
    body.single-product .tf-product-info-wrap [id*="paypal"] {
        margin-top: 10px;
        margin-bottom: 10px;
    }

    body.single-product .tab-single-product {
        margin-top: 2px;
    }

    body.single-product .tab-single-product .widget-tabs,
    body.single-product .tab-single-product .nav-tab,
    body.single-product .tab-single-product .nav-tabs {
        margin-bottom: 0;
    }

    body.single-product .tab-single-product .tab-content,
    body.single-product .tab-single-product .tab-pane {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    body.single-product .flat-spacing,
    body.single-product .flat-spacing.pb-0 {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    body.single-product .flat-spacing .flat-title {
        margin-bottom: 12px;
    }
}

@media (max-width: 767px) {
    body.single-product .rp-product-layout {
        row-gap: 0 !important;
    }

    body.single-product .rp-product-gallery-panel,
    body.single-product .rp-product-details-panel {
        margin: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    body.single-product .flat-wrap-media-product,
    body.single-product .tf-product-media-wrap.thumbs-slider .flat-wrap-media-product {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        margin: 0 !important;
    }

    body.single-product .flat-wrap-media-product .tf-product-media-main,
    body.single-product .flat-wrap-media-product .tf-product-media-main .item,
    body.single-product .tf-product-media-wrap.thumbs-slider .flat-wrap-media-product .wrapper-gallery .item {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    body.single-product .flat-wrap-media-product .tf-product-media-main,
    body.single-product .tf-product-media-wrap.thumbs-slider .flat-wrap-media-product > .swiper {
        aspect-ratio: 1 / 1 !important;
        overflow: hidden !important;
    }

    body.single-product .flat-wrap-media-product .tf-product-media-main .swiper-wrapper,
    body.single-product .flat-wrap-media-product .tf-product-media-main .swiper-slide,
    body.single-product .flat-wrap-media-product .tf-product-media-main .item,
    body.single-product .tf-product-media-wrap.thumbs-slider .flat-wrap-media-product .wrapper-gallery .item {
        height: 100% !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    body.single-product .flat-wrap-media-product .tf-product-media-main .item img,
    body.single-product .tf-product-media-wrap.thumbs-slider .flat-wrap-media-product .wrapper-gallery .item img {
        width: 100% !important;
        height: 100% !important;
        max-height: none !important;
        object-fit: cover !important;
        object-position: center !important;
    }

    body.single-product .tf-product-media-thumbs {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 86px !important;
        margin-top: 8px !important;
        overflow: hidden !important;
    }

    body.single-product .tf-product-info-wrap,
    body.single-product .tf-product-info-wrap .tf-product-info-list {
        gap: 10px !important;
    }

    body.single-product .tf-product-info-wrap .tf-product-heading {
        padding-bottom: 12px !important;
        gap: 8px !important;
    }

    body.single-product .tf-product-info-wrap .tf-product-info-heading .category {
        margin-bottom: 6px !important;
    }

    body.single-product .tf-product-info-wrap .tf-product-info-extra-link,
    body.single-product .tf-product-info-wrap .tf-product-extra-link,
    body.single-product .tf-product-info-wrap .tf-product-info-meta,
    body.single-product .tf-product-info-wrap .product_meta {
        margin-top: 8px !important;
        padding-top: 8px !important;
    }

    body.single-product .rp-product-lower,
    body.single-product .rp-product-recommendations,
    body.single-product .tab-single-product,
    body.single-product .flat-spacing,
    body.single-product .flat-spacing.pb-0 {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    body.single-product .rp-product-recommendations .flat-spacing,
    body.single-product .rp-product-recommendations.flat-spacing,
    body.single-product .flat-spacing,
    body.single-product .flat-spacing.pb-0 {
        padding-top: 16px !important;
        padding-bottom: 16px !important;
    }

    body.single-product .flat-spacing .flat-title {
        margin-bottom: 8px !important;
    }

    body.single-product .tf-buyx-gety-wrapper {
        margin-bottom: 16px !important;
    }
}

@media (max-width: 420px) {
    body.single-product .tf-main-product > .container,
    body.single-product .tab-single-product > .container,
    body.single-product .flat-spacing > .container,
    body.single-product .flat-spacing > div {
        padding-left: 12px;
        padding-right: 12px;
    }

    body.single-product form.cart .quantity,
    body.single-product form.cart .wg-quantity,
    body.single-product form.cart .inner-quantity {
        flex-basis: 88px;
    }

    body.single-product .tf-sticky-atc-ajax {
        min-width: 116px;
        padding-left: 14px;
        padding-right: 14px;
    }
}
