/** Single **/

ul.dt-sc-fancy-list.aligncenter li:before {
    position: static;
    margin-right: 8px;
}

ul.dt-sc-fancy-list.aligncenter li {
    padding-left: 0;
}

.dt-custom-separator-width-40px.vc_sep_width_10 {
    width: 40px;
}

.woocommerce-tabs .panel .wpb_content_element:last-child, .woocommerce-tabs .panel .vc_row>.wpb_column:last-child, .dt-sc-tabs-vertical-frame-content .wpb_content_element:last-child, .dt-sc-tabs-vertical-frame-content .vc_row>.wpb_column:last-child {
    margin-bottom: 0;
}

.woocommerce .product .summary.bg-with-shadow {
    padding-left: 20px !important;
    padding-right: 20px !important;
}

.woocommerce ul.products.dt-icon-after-bg li.product .product-buttons-wrapper.product-icons .wc_inline_buttons>.wc_btn_inline a, .woocommerce ul.products.dt-icon-after-bg li.product .product-buttons-wrapper.product-icons .wc_inline_buttons>.wc_btn_inline a.button, .woocommerce ul.products.dt-icon-after-bg li.product .product-buttons-wrapper.product-icons .wc_inline_buttons>.wc_btn_inline button, .woocommerce ul.products.dt-icon-after-bg li.product .product-buttons-wrapper.product-icons .wc_inline_buttons>.wc_btn_inline button.button, .woocommerce ul.products.dt-icon-after-bg li.product .product-buttons-wrapper.product-icons .wc_inline_buttons>.wc_btn_inline .button {
    background-color: transparent !important;
}

.woocommerce ul.products.dt-icon-after-bg li.product .product-buttons-wrapper.product-icons .wc_inline_buttons>.wc_btn_inline a:after, .woocommerce ul.products.dt-icon-after-bg li.product .product-buttons-wrapper.product-icons .wc_inline_buttons>.wc_btn_inline a.button:after, .woocommerce ul.products.dt-icon-after-bg li.product .product-buttons-wrapper.product-icons .wc_inline_buttons>.wc_btn_inline button:after, .woocommerce ul.products.dt-icon-after-bg li.product .product-buttons-wrapper.product-icons .wc_inline_buttons>.wc_btn_inline button.button:after, .woocommerce ul.products.dt-icon-after-bg li.product .product-buttons-wrapper.product-icons .wc_inline_buttons>.wc_btn_inline .button:after {
    content: "";
    height: auto;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    width: auto;
    z-index: -1;
    -webkit-border-radius: inherit;
    border-radius: inherit;
    -webkit-transition: inherit;
    transition: inherit;
}

.woocommerce ul.products.dt-chronodial-layout.product-content-iconsgroup-style-simple li.product .product-details .product-buttons-wrapper.product-icons .wc_inline_buttons {
    background-color: transparent;
    -webkit-box-shadow: none;
    box-shadow: none;
}

.woocommerce ul.products.dt-caravan-layout.product-border-type-default.product-border-position-bottom-right li.product .product-wrapper, .woocommerce ul.products.dt-caravan-layout.product-border-type-thumb.product-border-position-bottom-right li.product .product-thumb {
    -webkit-box-shadow: 1px 1px 2px #E6E6E6;
    box-shadow: 1px 1px 2px #E6E6E6;
}

/*** Custom CSS added in Product Pages ***/

.ult-carousel-wrapper.no-space .slick-slide {
    margin: 0 !important;
}

.woocommerce div.product div.summary.margin-0 {
    margin-bottom: 0;
}

.woocommerce .product .summary.bg-with-shadow {
    background: #fff;
    padding: 30px 35px 15px 35px;
    box-shadow: 0 0 5px rgba(0, 0, 0, .1);
    margin-top: 5px;
}

.woocommerce div.product .bg-white .dt-sc-product-tabs .woocommerce-tabs:after {
    position: absolute;
    content: "";
    left: 50%;
    top: 0;
    height: 100%;
    width: calc(100vw);
    width: -webkit-calc(100vw);
    width: -moz-calc(100vw);
    background: #fff;
    z-index: -1;
    transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    -moz-transform: translateX(-50%);
}

.dt-sc-curvy-bg.top:before {
    background-color: #fff;
    bottom: 0;
    content: "";
    display: block;
    height: 200px;
    right: 0;
    position: absolute;
    width: 100%;
    z-index: 9;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: cover;
    mask-size: cover;
    -webkit-mask-image: url(images/curvy-bg-main-1.png);
    mask-image: url(images/curvy-bg-main-1.png);
    -webkit-mask-position: left top;
    mask-position: left top;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.dt-sc-curvy-bg.bottom:after {
    background-color: #fff;
    top: -1px;
    content: "";
    display: block;
    height: 200px;
    right: 0;
    position: absolute;
    width: 100%;
    z-index: 9;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: cover;
    mask-size: cover;
    -webkit-mask-image: url(images/curvy-bg-main-2.png);
    mask-image: url(images/curvy-bg-main-2.png);
    -webkit-mask-position: left top;
    mask-position: left top;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/*** Product category / archive grid compatibility ***/

/*
 * WooCommerce marks this archive as a four-column loop, while older Medik
 * templates can still output a three-column .dt-col wrapper.  Flex the real
 * product list and let the loop's columns-* class be the single source of
 * truth, otherwise WooCommerce's first/last clearing leaves orphaned cards.
 */
#main #primary > div[id^="post-"] > .woocommerce > ul.products:not(.swiper-wrapper) {
    display: flex !important;
    flex-wrap: wrap;
    align-items: stretch;
    margin-left: -15px;
    margin-right: -15px;
}

#main #primary > div[id^="post-"] > .woocommerce > ul.products:not(.swiper-wrapper) > li.product {
    clear: none !important;
    display: flex !important;
    float: none !important;
    margin: 0 !important;
    min-width: 0;
}

#main #primary > div[id^="post-"] > .woocommerce > ul.products.columns-2 > li.product {
    width: 50% !important;
}

#main #primary > div[id^="post-"] > .woocommerce > ul.products.columns-3 > li.product {
    width: 33.333333% !important;
}

#main #primary > div[id^="post-"] > .woocommerce > ul.products.columns-4 > li.product {
    width: 25% !important;
}

#main #primary > div[id^="post-"] > .woocommerce > ul.products.columns-5 > li.product {
    width: 20% !important;
}

#main #primary > div[id^="post-"] > .woocommerce > ul.products.columns-6 > li.product {
    width: 16.666667% !important;
}

#main #primary > div[id^="post-"] > .woocommerce > ul.products:not(.swiper-wrapper) > li.product > .dt-col {
    clear: none !important;
    display: flex !important;
    float: none !important;
    padding-left: 15px;
    padding-right: 15px;
    width: 100% !important;
}

#main #primary > div[id^="post-"] > .woocommerce > ul.products:not(.swiper-wrapper) > li.product .product-wrapper {
    display: flex;
    flex-direction: column;
    float: none;
    height: auto;
    min-width: 0;
    overflow: hidden;
    width: 100%;
}

/* Keep every archive thumbnail square and show the full product image. */
#main #primary > div[id^="post-"] > .woocommerce > ul.products:not(.swiper-wrapper) > li.product .product-thumb:before {
    padding-top: 100% !important;
}

#main #primary > div[id^="post-"] > .woocommerce > ul.products:not(.swiper-wrapper) > li.product .product-thumb:after {
    padding-bottom: 0 !important;
}

#main #primary > div[id^="post-"] > .woocommerce > ul.products:not(.swiper-wrapper) > li.product .product-thumb .image .primary-image,
#main #primary > div[id^="post-"] > .woocommerce > ul.products:not(.swiper-wrapper) > li.product .product-thumb .image .secondary-image {
    background-color: #fff;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

/* Equal-height content; keep price and rating stable instead of swapping them. */
#main #primary > div[id^="post-"] > .woocommerce > ul.products:not(.swiper-wrapper) > li.product .product-details {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding-bottom: 18px;
}

#main #primary > div[id^="post-"] > .woocommerce > ul.products:not(.swiper-wrapper) > li.product .product-details > div {
    clear: none;
    float: none;
}

#main #primary > div[id^="post-"] > .woocommerce > ul.products:not(.swiper-wrapper) > li.product .product-title h5 a {
    align-items: center;
    display: flex;
    justify-content: center;
    line-height: 1.35;
    min-height: 64px;
    overflow-wrap: anywhere;
}

#main #primary > div[id^="post-"] > .woocommerce > ul.products.default-template:not(.swiper-wrapper) > li.product .product-details > .product-price,
#main #primary > div[id^="post-"] > .woocommerce > ul.products.default-template:not(.swiper-wrapper) > li.product:hover .product-details > .product-price {
    opacity: 1;
    visibility: visible;
}

#main #primary > div[id^="post-"] > .woocommerce > ul.products.default-template:not(.swiper-wrapper) > li.product .product-details > .product-rating-wrapper {
    bottom: auto;
    left: auto;
    margin-top: auto;
    opacity: 1;
    position: static;
    right: auto;
    visibility: visible;
}

/* New YITH Quick View also injects a second direct-child button. */
#main #primary > div[id^="post-"] > .woocommerce > ul.products:not(.swiper-wrapper) > li.product > a.yith-wcqv-button {
    display: none !important;
}

@media only screen and (max-width: 1199px) {
    #main #primary > div[id^="post-"] > .woocommerce > ul.products:not(.swiper-wrapper) > li.product {
        width: 50% !important;
    }
}

@media only screen and (max-width: 767px) {
    #main #primary > div[id^="post-"] > .woocommerce > ul.products:not(.swiper-wrapper) > li.product {
        width: 100% !important;
    }

    #main #primary > div[id^="post-"] > .woocommerce > ul.products:not(.swiper-wrapper) > li.product .product-title h5 a {
        min-height: 0;
    }
}

/*** Single-product wishlist compatibility (YITH Wishlist 4.x) ***/

/*
 * Medik already draws the heart through :before.  Current YITH versions also
 * inject an SVG into the link, which otherwise produces two heart icons.
 */
body.single-product .product .summary .yith-wcwl-add-to-wishlist .yith-wcwl-icon-svg {
    display: none !important;
}

/*
 * YITH replaces the inner wrapper after an item is added.  Normalize the
 * add/added/existing states so the replacement link stays at the same left
 * edge instead of being centred across the full summary column.
 */
body.single-product .product .summary .yith-wcwl-add-to-wishlist {
    clear: both;
    display: block !important;
    float: none !important;
    margin: 8px 0 !important;
    text-align: left !important;
    width: 100% !important;
}

body.single-product .product .summary .yith-wcwl-add-to-wishlist .yith-wcwl-add-button,
body.single-product .product .summary .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistaddedbrowse,
body.single-product .product .summary .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistexistsbrowse {
    display: inline-block !important;
    float: none !important;
    margin: 0 !important;
    position: relative;
    text-align: left !important;
    width: auto !important;
}

body.single-product .product .summary .yith-wcwl-add-to-wishlist a {
    align-items: center;
    box-sizing: border-box;
    display: inline-flex !important;
    float: none !important;
    gap: 7px;
    justify-content: center;
    margin: 0 !important;
    min-height: 46px;
    text-align: center;
    width: auto !important;
}

body.single-product .product .summary .yith-wcwl-add-to-wishlist a:before {
    display: inline-block;
    flex: 0 0 auto;
    line-height: 1;
    margin-right: 0 !important;
}

/* Keep the following Compare action aligned with the wishlist action. */
body.single-product .product .summary .yith-wcwl-add-to-wishlist + .compare,
body.single-product .product .summary .yith-wcwl-add-to-wishlist ~ .compare {
    clear: both;
    float: none !important;
    margin-left: 0 !important;
}

/*** Single-product sidebar list compatibility ***/

/*
 * The Best Sellers widget uses the list/right-thumbnail product template.
 * Long imported names contain very few natural wrapping points, so reserve a
 * fixed thumbnail column and allow the title to break inside its own column.
 */
body.single-product #secondary-left .widget_text .dt-sc-products-container ul.products {
    display: block !important;
    margin: 0 !important;
    width: 100% !important;
}

body.single-product #secondary-left .widget_text .dt-sc-products-container ul.products > li.product-list-view {
    clear: both !important;
    display: block !important;
    float: none !important;
    margin: 0 !important;
    width: 100% !important;
}

body.single-product #secondary-left .widget_text .dt-sc-products-container ul.products > li.product-list-view > .dt-col {
    float: none !important;
    padding: 0 !important;
    width: 100% !important;
}

body.single-product #secondary-left .widget_text .dt-sc-products-container li.product-list-view.product-list-right-thumb .product-wrapper {
    align-items: center;
    display: flex !important;
    flex-direction: row-reverse !important;
    gap: 12px;
    min-width: 0;
    overflow: hidden;
    width: 100%;
}

body.single-product #secondary-left .widget_text .dt-sc-products-container li.product-list-view .product-wrapper .product-thumb {
    flex: 0 0 72px;
    min-width: 72px;
    width: 72px !important;
}

body.single-product #secondary-left .widget_text .dt-sc-products-container li.product-list-view .product-wrapper .product-thumb:before {
    padding-top: 100% !important;
}

body.single-product #secondary-left .widget_text .dt-sc-products-container li.product-list-view .product-wrapper .product-thumb .primary-image,
body.single-product #secondary-left .widget_text .dt-sc-products-container li.product-list-view .product-wrapper .product-thumb .secondary-image {
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

body.single-product #secondary-left .widget_text .dt-sc-products-container li.product-list-view .product-wrapper .product-details {
    align-items: flex-start;
    flex: 1 1 auto;
    min-width: 0;
    padding: 12px 0 !important;
    text-align: left !important;
    width: auto !important;
}

body.single-product #secondary-left .widget_text .dt-sc-products-container li.product-list-view .product-details .product-title,
body.single-product #secondary-left .widget_text .dt-sc-products-container li.product-list-view .product-details .product-title h5,
body.single-product #secondary-left .widget_text .dt-sc-products-container li.product-list-view .product-details .product-title h5 a {
    max-width: 100%;
    min-width: 0;
    white-space: normal !important;
}

body.single-product #secondary-left .widget_text .dt-sc-products-container li.product-list-view .product-details .product-title h5 a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

body.single-product #secondary-left .widget_text .dt-sc-products-container li.product-list-view .product-wrapper > .yith-wcqv-button {
    display: none !important;
}

/*** YITH Compare 3.x preview-bar compatibility ***/

/*
 * Medik's legacy WooCommerce compare stylesheet replaces YITH's current
 * compare.css, so the 3.x sticky preview-bar rules never reach the page.
 */
#yith-woocompare-preview-bar {
    background: rgba(0, 0, 0, .84);
    bottom: 0;
    box-sizing: border-box;
    color: #fff;
    display: none !important;
    height: auto !important;
    left: 0;
    margin: 0 !important;
    padding: 18px 20px;
    position: fixed !important;
    right: 0;
    top: auto !important;
    width: 100% !important;
    z-index: 9999;
}

#yith-woocompare-preview-bar.shown {
    display: block !important;
}

#yith-woocompare-preview-bar .container {
    align-items: center;
    clear: none !important;
    display: flex !important;
    gap: 30px;
    justify-content: center;
    margin: 0 auto !important;
    max-width: 1200px;
    min-height: 0;
    padding: 0 !important;
}

#yith-woocompare-preview-bar header,
#yith-woocompare-preview-bar footer,
#yith-woocompare-preview-bar .content {
    float: none !important;
    margin: 0 !important;
    width: auto;
}

#yith-woocompare-preview-bar header p {
    color: #fff;
    line-height: 1.45;
    margin: 0;
}

#yith-woocompare-preview-bar .compare-list {
    align-items: center;
    display: flex !important;
    gap: 30px;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

#yith-woocompare-preview-bar .compare-list li {
    align-self: stretch;
    float: none !important;
    list-style: none !important;
    margin: 0 !important;
    width: 80px;
}

#yith-woocompare-preview-bar .compare-list li:before,
#yith-woocompare-preview-bar .compare-list li:after {
    content: none !important;
}

#yith-woocompare-preview-bar .compare-list li.product-placeholder {
    align-items: center;
    border: 1px dashed rgba(255, 255, 255, .75);
    display: flex;
    justify-content: center;
    padding-inline: 15px;
}

#yith-woocompare-preview-bar .compare-list .image-wrap {
    position: relative;
}

#yith-woocompare-preview-bar .compare-list .image-wrap > a {
    display: block;
    font-size: 0;
}

#yith-woocompare-preview-bar .compare-list .image-wrap img {
    display: block;
    height: auto;
    max-width: 100%;
}

#yith-woocompare-preview-bar .compare-list .image-wrap .remove a {
    background: #fff;
    border-radius: 50%;
    color: #000;
    cursor: pointer;
    display: block;
    font-size: 0;
    height: 25px;
    line-height: 25px;
    margin: 0;
    position: absolute;
    right: -10px;
    text-align: center;
    text-decoration: none;
    top: -10px;
    width: 25px;
}

#yith-woocompare-preview-bar .compare-list .image-wrap .remove a:hover {
    background: #eee;
}

#yith-woocompare-preview-bar .compare-list .image-wrap .remove a:after {
    content: "\00D7";
    font-size: 25px;
}

#yith-woocompare-preview-bar footer .yith-woocompare-open {
    color: #fff !important;
    margin: 0 !important;
    white-space: nowrap;
}

@media only screen and (max-width: 1200px) {
    #yith-woocompare-preview-bar header {
        display: none;
    }
}

@media only screen and (max-width: 768px) {
    #yith-woocompare-preview-bar {
        padding: 12px 15px;
    }

    #yith-woocompare-preview-bar .container,
    #yith-woocompare-preview-bar .compare-list {
        gap: 15px;
    }

    #yith-woocompare-preview-bar .content {
        min-width: 0;
        overflow-x: auto;
    }

    #yith-woocompare-preview-bar .compare-list li,
    #yith-woocompare-preview-bar .compare-list li.product-placeholder {
        flex: 0 0 50px;
        padding-inline: 0;
        text-align: center;
        width: 50px;
    }
}

@media only screen and (max-width: 480px) {
    #yith-woocompare-preview-bar .compare-list li,
    #yith-woocompare-preview-bar .compare-list li.product-placeholder {
        display: none;
    }

    #yith-woocompare-preview-bar .compare-list li:first-of-type,
    #yith-woocompare-preview-bar .compare-list li:nth-of-type(2),
    #yith-woocompare-preview-bar .compare-list li:nth-of-type(3) {
        display: block;
    }

    #yith-woocompare-preview-bar .compare-list li.product-placeholder span {
        display: none;
    }
}

/*** YITH Compare 3.x result-popup compatibility ***/

/*
 * The theme ships a legacy compare.css file. YITH Compare 3.x renders its
 * result table inside this overlay, but the legacy file has no overlay rules,
 * leaving the result as a several-thousand-pixel static block below the page.
 */
.yith-woocompare-popup-container {
    background: rgba(255, 255, 255, .96) !important;
    bottom: 0 !important;
    box-sizing: border-box;
    height: 100% !important;
    left: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    position: fixed !important;
    right: 0 !important;
    top: 0 !important;
    width: 100% !important;
    z-index: 10000 !important;
}

body.yith-woocompare-popup-open {
    overflow: hidden !important;
}

.yith-woocompare-popup-container > .yith-woocompare-popup-close,
a.yith-woocompare-popup-close {
    background: rgba(255, 255, 255, .9);
    color: #434343 !important;
    display: block;
    font-size: 40px !important;
    height: 40px;
    line-height: 34px !important;
    position: absolute !important;
    right: 20px !important;
    text-align: center;
    text-decoration: none !important;
    top: 20px !important;
    width: 40px;
    z-index: 3;
}

.yith-woocompare-popup-container .yith-woocompare-table-wrapper {
    box-sizing: border-box;
    height: 100%;
    margin: 0 !important;
    max-height: 100% !important;
    max-width: 100%;
    overflow: auto !important;
    width: 100%;
}

.yith-woocompare-popup-container .yith-woocompare-table-scroll-wrapper {
    box-sizing: border-box;
    min-height: 100%;
    padding: 5%;
    position: relative;
}

.yith-woocompare-popup-container #yith-woocompare {
    box-sizing: border-box;
    max-width: 100%;
}

@media only screen and (max-width: 768px) {
    .yith-woocompare-popup-container > .yith-woocompare-popup-close,
    a.yith-woocompare-popup-close {
        right: 8px !important;
        top: 8px !important;
    }

    .yith-woocompare-popup-container .yith-woocompare-table-scroll-wrapper {
        padding: 55px 15px 20px;
    }
}
