/*==================================================
TESTED OK ELECTRONICS
SINGLE PRODUCT PAGE
==================================================*/

/*==================================================
MAIN PRODUCT WRAPPER
==================================================*/

.tok-single-product {
    width: 100%;
    margin: 0;
    padding: 0 0 90px;
    background: #ffffff !important;
    color: #071A33;
}

.tok-single-product * {
    box-sizing: border-box;
}

.tok-product-container {
    width: min(1200px, calc(100% - 48px));
    max-width: 1200px;
    margin: 0 auto;
}


/*==================================================
HIDE BLOCKSY BREADCRUMB
==================================================*/

/*
 * Our own product breadcrumb is used instead.
 */

.ct-breadcrumbs,
.ct-breadcrumbs-container,
.ct-header-breadcrumbs {
    display: none !important;
}


/*==================================================
BREADCRUMB
==================================================*/

.tok-product-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;

    padding: 25px 0 30px;

    margin: 0;

    color: #7A8490;

    font-size: 13px;
    line-height: 1.5;
}

.tok-product-breadcrumb a {
    color: #0D47A1 !important;
    text-decoration: none !important;
}

.tok-product-breadcrumb a:hover {
    color: #E31E24 !important;
}

.tok-breadcrumb-separator {
    color: #B5BCC5;
}

.tok-breadcrumb-current {
    color: #7A8490;
}


/*==================================================
MAIN PRODUCT AREA
==================================================*/

.tok-product-main {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 0.82fr);

    gap: 60px;

    align-items: start;
}


/*==================================================
PRODUCT GALLERY
==================================================*/

.tok-product-gallery {
    width: 100%;
    min-width: 0;
}

.tok-product-gallery .woocommerce-product-gallery {
    width: 100% !important;

    float: none !important;

    margin: 0 !important;
}

.tok-product-gallery
.woocommerce-product-gallery__wrapper {
    margin: 0 !important;
}

.tok-product-gallery
.woocommerce-product-gallery__image {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;

    min-height: 520px;

    background: #F7F9FC;

    border: 1px solid #E6EBF1;

    border-radius: 18px;

    overflow: hidden;
}

.tok-product-gallery
.woocommerce-product-gallery__image img {
    display: block;

    width: 100%;
    height: auto;

    max-height: 620px;

    object-fit: contain;
}


/*==================================================
GALLERY THUMBNAILS
==================================================*/

.tok-product-gallery
.flex-control-thumbs {

    display: flex !important;

    align-items: center;

    gap: 12px;

    margin: 15px 0 0 !important;

    padding: 0 !important;

    list-style: none !important;
}

.tok-product-gallery
.flex-control-thumbs li {

    float: none !important;

    flex: 0 0 78px;

    width: 78px !important;

    margin: 0 !important;
}

.tok-product-gallery
.flex-control-thumbs li img {

    display: block;

    width: 78px;
    height: 78px;

    padding: 4px;

    object-fit: cover;

    background: #ffffff;

    border: 1px solid #E0E6ED;

    border-radius: 10px;

    opacity: .65;

    transition: all .3s ease;
}

.tok-product-gallery
.flex-control-thumbs li img:hover,

.tok-product-gallery
.flex-control-thumbs li img.flex-active {

    opacity: 1;

    border-color: #0D47A1;
}


/*==================================================
PRODUCT SUMMARY
==================================================*/

.tok-product-summary {

    width: 100%;

    min-width: 0;

    padding: 8px 0 0;
}


/*==================================================
BRAND
==================================================*/

.tok-product-brand {

    display: inline-flex;

    align-items: center;

    margin: 0 0 13px;

    color: #0D47A1;

    font-size: 13px;

    font-weight: 800;

    line-height: 1;

    letter-spacing: .8px;

    text-transform: uppercase;
}


/*==================================================
PRODUCT TITLE
==================================================*/

.tok-product-title-wrap {
    width: 100%;
    margin: 0 0 18px;
    padding: 0;
}

.tok-product-title-wrap .product_title,
.tok-product-title-wrap .tok-product-title {

    display: block !important;

    width: 100% !important;

    max-width: 100% !important;

    margin: 0 !important;

    padding: 0 !important;

    color: #071A33 !important;

    font-size: 40px !important;

    line-height: 1.12 !important;

    font-weight: 800 !important;

    letter-spacing: -0.7px;

    text-align: left !important;
}

/*==================================================
RATING
==================================================*/

.tok-product-summary
.woocommerce-product-rating {

    display: flex;

    align-items: center;

    gap: 9px;

    margin: 0 0 18px !important;
}

.tok-product-summary
.star-rating {

    color: #F4B400 !important;
}


/*==================================================
PRICE
==================================================*/

.tok-product-summary
p.price,

.tok-product-summary
span.price {

    display: block;

    margin: 0 0 20px !important;

    color: #071A33 !important;

    font-size: 30px !important;

    line-height: 1.2 !important;

    font-weight: 800 !important;
}

.tok-product-summary
p.price del {

    margin-right: 8px;

    color: #9AA2AD !important;

    font-size: 16px !important;

    font-weight: 500;
}

.tok-product-summary
p.price ins {

    color: #E31E24 !important;

    text-decoration: none !important;
}


/*==================================================
SHORT DESCRIPTION
==================================================*/

.tok-product-summary
.woocommerce-product-details__short-description {

    margin: 0 0 20px !important;

    color: #626D79 !important;

    font-size: 15px;

    line-height: 1.8;
}

.tok-product-summary
.woocommerce-product-details__short-description p:last-child {

    margin-bottom: 0;
}


/*==================================================
STOCK
==================================================*/

.tok-product-stock {

    display: flex;

    align-items: center;

    gap: 8px;

    margin: 0 0 21px;

    color: #168344;

    font-size: 13px;

    font-weight: 700;
}

.tok-product-stock i {

    color: #168344;

    font-size: 12px;
}


/*==================================================
CART
==================================================*/

.tok-product-cart {

    margin: 0 0 21px;
}

.tok-product-summary
form.cart {

    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 12px;

    margin: 0 !important;
}

.tok-product-summary
form.cart .quantity {

    margin: 0 !important;
}

.tok-product-summary
form.cart .quantity input.qty {

    width: 76px;

    height: 52px;

    padding: 0;

    border: 1px solid #DCE3EB;

    border-radius: 10px;

    background: #FFFFFF;

    color: #071A33;

    text-align: center;

    font-weight: 700;
}

.tok-product-summary
form.cart
.single_add_to_cart_button {

    min-width: 250px;

    min-height: 52px;

    padding: 0 28px !important;

    border: 0 !important;

    border-radius: 10px !important;

    background: #E31E24 !important;

    color: #FFFFFF !important;

    font-size: 15px !important;

    font-weight: 800 !important;

    transition: all .3s ease;
}

.tok-product-summary
form.cart
.single_add_to_cart_button:hover {

    background: #071A33 !important;

    color: #FFFFFF !important;

    transform: translateY(-2px);
}


/*==================================================
VARIABLE PRODUCTS
==================================================*/

.tok-product-summary
.variations {

    width: 100%;

    margin: 0 0 18px !important;

    border: 0 !important;
}

.tok-product-summary
.variations tr,

.tok-product-summary
.variations td,

.tok-product-summary
.variations th {

    border: 0 !important;
}

.tok-product-summary
.variations td,

.tok-product-summary
.variations th {

    padding: 7px 0 !important;
}

.tok-product-summary
.variations label {

    color: #071A33;

    font-weight: 700;
}

.tok-product-summary
.variations select {

    width: 100%;

    min-height: 48px;

    padding: 0 14px;

    border: 1px solid #DCE3EB;

    border-radius: 9px;

    background: #FFFFFF;
}

.tok-product-summary
.reset_variations {

    color: #E31E24;

    font-size: 12px;
}


/*==================================================
PRODUCT META
==================================================*/

.tok-product-meta {

    padding: 0 0 21px;

    border-bottom: 1px solid #E8EDF2;
}

.tok-product-meta
.product_meta {

    display: flex;

    flex-direction: column;

    gap: 7px;

    margin: 0 !important;

    padding: 0 !important;

    border: 0 !important;

    color: #77818D;

    font-size: 12px;

    line-height: 1.5;
}

.tok-product-meta
.product_meta a {

    color: #0D47A1 !important;

    text-decoration: none !important;
}

.tok-product-meta
.product_meta a:hover {

    color: #E31E24 !important;
}


/*==================================================
TRUST BLOCK
==================================================*/

.tok-product-trust {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 12px;

    margin-top: 22px;
}

.tok-product-trust-item {

    display: flex;

    align-items: flex-start;

    gap: 11px;

    padding: 14px;

    border: 1px solid #E3E9F0;

    border-radius: 12px;

    background: #F8FAFC;
}

.tok-product-trust-item i {

    flex: 0 0 20px;

    margin-top: 2px;

    color: #E31E24;

    font-size: 14px;
}

.tok-product-trust-item strong {

    display: block;

    margin-bottom: 4px;

    color: #071A33;

    font-size: 12px;

    font-weight: 800;
}

.tok-product-trust-item span {

    display: block;

    color: #78828E;

    font-size: 10px;

    line-height: 1.45;
}


/*==================================================
PRODUCT DETAILS / TABS
==================================================*/

.tok-product-details {

    width: 100%;

    margin-top: 78px;
}

.tok-product-tabs {

    border-top: 1px solid #E5EAF0;
}

.tok-product-tab-buttons {

    display: flex;

    align-items: center;

    gap: 36px;

    border-bottom: 1px solid #E5EAF0;
}

.tok-product-tab-button {

    position: relative;

    padding: 19px 0;

    border: 0 !important;

    background: transparent !important;

    color: #77818D !important;

    font-size: 14px !important;

    font-weight: 700 !important;

    cursor: pointer;
}

.tok-product-tab-button:after {

    content: "";

    position: absolute;

    left: 0;

    right: 0;

    bottom: -1px;

    height: 3px;

    background: #E31E24;

    opacity: 0;

    transition: .3s;
}

.tok-product-tab-button.is-active {

    color: #071A33 !important;
}

.tok-product-tab-button.is-active:after {

    opacity: 1;
}

.tok-product-tab-content {

    display: none;

    padding: 32px 0;

    color: #626D79;

    font-size: 15px;

    line-height: 1.9;
}

.tok-product-tab-content.is-active {

    display: block;
}

.tok-product-tab-content h2,

.tok-product-tab-content h3,

.tok-product-tab-content h4 {

    color: #071A33;
}


/*==================================================
SPECIFICATIONS
==================================================*/

.tok-spec-table {

    width: 100%;

    max-width: 900px;

    overflow: hidden;

    border: 1px solid #E4E9EF;

    border-radius: 14px;
}

.tok-spec-row {

    display: grid;

    grid-template-columns: 240px 1fr;

    border-bottom: 1px solid #E8EDF2;
}

.tok-spec-row:last-child {

    border-bottom: 0;
}

.tok-spec-name {

    padding: 15px 18px;

    background: #F6F8FA;

    color: #071A33;

    font-weight: 700;
}

.tok-spec-value {

    padding: 15px 18px;

    color: #68727E;
}


/*==================================================
RELATED PRODUCTS
==================================================*/

.related.products {

    width: min(1200px, calc(100% - 48px)) !important;

    max-width: 1200px !important;

    margin: 70px auto 0 !important;

    padding: 0 0 80px !important;
}

.related.products > h2 {

    margin: 0 0 25px !important;

    color: #071A33 !important;

    font-size: 28px !important;

    font-weight: 800 !important;
}


/*==================================================
RESPONSIVE
==================================================*/

@media (max-width: 991px) {

    .tok-product-container {

        width: calc(100% - 32px);
    }

    .tok-product-main {

        grid-template-columns: 1fr;

        gap: 42px;
    }

    .tok-product-summary {

        padding-top: 0;
    }

    .tok-product-summary
    .tok-product-title {

        font-size: 34px !important;
    }

    .tok-product-gallery
    .woocommerce-product-gallery__image {

        min-height: 400px;
    }
}


@media (max-width: 767px) {

    .tok-product-container {

        width: calc(100% - 24px);
    }

    .tok-product-breadcrumb {

        padding: 20px 0 22px;

        flex-wrap: nowrap;

        white-space: nowrap;

        overflow: hidden;
    }

    .tok-product-main {

        gap: 32px;
    }

    .tok-product-gallery
    .woocommerce-product-gallery__image {

        min-height: 320px;

        border-radius: 14px;
    }

    .tok-product-gallery
    .flex-control-thumbs {

        overflow-x: auto;

        scrollbar-width: none;
    }

    .tok-product-gallery
    .flex-control-thumbs::-webkit-scrollbar {

        display: none;
    }

    .tok-product-gallery
    .flex-control-thumbs li {

        flex: 0 0 66px;

        width: 66px !important;
    }

    .tok-product-gallery
    .flex-control-thumbs li img {

        width: 66px;

        height: 66px;
    }

    .tok-product-summary
    .tok-product-title {

        font-size: 29px !important;
    }

    .tok-product-summary
    p.price,

    .tok-product-summary
    span.price {

        font-size: 27px !important;
    }

    .tok-product-trust {

        grid-template-columns: 1fr;
    }

    .tok-product-tab-buttons {

        gap: 25px;

        overflow-x: auto;

        white-space: nowrap;

        scrollbar-width: none;
    }

    .tok-product-tab-buttons::-webkit-scrollbar {

        display: none;
    }

    .tok-product-tab-button {

        flex: 0 0 auto;
    }

    .tok-product-tab-content {

        padding: 25px 0;
    }

    .tok-spec-row {

        grid-template-columns: 1fr;
    }

    .tok-spec-name {

        padding-bottom: 7px;
    }

    .tok-spec-value {

        padding-top: 7px;
    }
}


@media (max-width: 480px) {

    .tok-product-container {

        width: calc(100% - 20px);
    }

    .tok-product-summary
    .tok-product-title {

        font-size: 26px !important;
    }

    .tok-product-summary
    form.cart {

        display: grid;

        grid-template-columns: 82px minmax(0, 1fr);
    }

    .tok-product-summary
    form.cart
    .quantity input.qty {

        width: 82px;
    }

    .tok-product-summary
    form.cart
    .single_add_to_cart_button {

        width: 100%;

        min-width: 0;

        padding: 0 12px !important;
    }
}
'''

(base / "assets/css/tok-single-product.css").write_text(css, encoding="utf-8")

zip_path = Path("/mnt/data/testedok-product-fix-v4.zip")
with zipfile.ZipFile(zip_path, "w", zipfile.ZIP_DEFLATED) as z:
    z.write(base / "assets/css/tok-single-product.css", "assets/css/tok-single-product.css")
print(zip_path)
print("functions snippet ready")
print("""function tok_disable_blocksy_product_layers() {
    add_filter(
        'blocksy:woocommerce:product-single:layout',
        function ( $layers ) {
            if ( ! is_array( $layers ) ) {
                return $layers;
            }
            foreach ( $layers as &$layer ) {
                if ( isset( $layer['enabled'] ) ) {
                    $layer['enabled'] = false;
                }
            }
            unset( $layer );
            return $layers;
        },
        100
    );
}
add_action( 'wp', 'tok_disable_blocksy_product_layers' );""")
 ar久久热



/*==================================================
FORCE CUSTOM PRODUCT TITLE TO DISPLAY
==================================================*/

.tok-single-product .tok-product-summary h1.tok-product-title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;

    position: relative !important;

    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    margin: 0 0 18px !important;
    padding: 0 !important;

    overflow: visible !important;

    color: #071A33 !important;

    background: transparent !important;

    font-family: inherit !important;
    font-size: 40px !important;
    line-height: 1.15 !important;
    font-weight: 800 !important;

    text-align: left !important;
    letter-spacing: -0.7px !important;

    transform: none !important;
}







@media (max-width: 767px) {

    .tok-single-product .tok-product-summary h1.tok-product-title {

        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;

        font-size: 29px !important;
        line-height: 1.15 !important;

    }

}

@media (max-width: 480px) {

    .tok-single-product .tok-product-summary h1.tok-product-title {

        font-size: 26px !important;

    }

}



/*==================================================
CUSTOM PRODUCT TITLE
==================================================*/

.tok-product-title-wrap {
    display: block !important;
    width: 100% !important;
    margin: 0 0 18px !important;
    padding: 0 !important;
}

.tok-product-title-wrap .tok-product-title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;

    width: 100% !important;
    max-width: 100% !important;

    height: auto !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #071A33 !important;
    background: transparent !important;

    font-family: inherit !important;
    font-size: 40px !important;
    line-height: 1.15 !important;
    font-weight: 800 !important;

    text-align: left !important;
    letter-spacing: -0.7px !important;

    position: static !important;
    transform: none !important;
}



@media (max-width: 767px) {

    .tok-product-title-wrap .tok-product-title {
        font-size: 29px !important;
        line-height: 1.15 !important;
    }

}

@media (max-width: 480px) {

    .tok-product-title-wrap .tok-product-title {
        font-size: 26px !important;
    }

}






/*==================================================
TESTED OK - FORCE PRODUCT TITLE VISIBILITY
==================================================*/

.tok-single-product .tok-custom-product-title {
    display: block !important;

    visibility: visible !important;
    opacity: 1 !important;

    width: 100% !important;
    height: auto !important;
    min-height: 45px !important;

    margin: 0 0 18px !important;
    padding: 0 !important;

    overflow: visible !important;

    background: transparent !important;

    color: #071A33 !important;

    font-family: "Space Grotesk", Arial, sans-serif !important;

    font-size: 40px !important;
    font-weight: 800 !important;

    line-height: 1.15 !important;

    letter-spacing: -0.7px !important;

    text-align: left !important;

    text-indent: 0 !important;

    text-transform: none !important;

    -webkit-text-fill-color: #071A33 !important;

    text-shadow: none !important;

    clip: auto !important;
    clip-path: none !important;

    transform: none !important;

    position: static !important;
}


/*
|--------------------------------------------------------------------------
| Make sure Blocksy cannot hide the title
|--------------------------------------------------------------------------
*/

.tok-single-product .tok-product-summary
.tok-custom-product-title::before,

.tok-single-product .tok-product-summary
.tok-custom-product-title::after {

    display: none !important;

    content: none !important;
}


/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 767px) {

    .tok-single-product .tok-custom-product-title {

        font-size: 29px !important;

        line-height: 1.15 !important;

        min-height: 34px !important;

    }

}


@media (max-width: 480px) {

    .tok-single-product .tok-custom-product-title {

        font-size: 26px !important;

        min-height: 30px !important;

    }

}







