/*
   Theme Name: Kaveh Theme
   Description: Kaveh Theme is undoubtedly the best e-commerce theme produced in the WordPress industry of Iran.
   Theme URI: https://rtl-theme.com/author/moein757
   Version: 4.9.13
   Author: Moein WordPress
   Author URI: https://rtl-theme.com/author/moein757
   Requires at least: 6.2
   Tested up to: 6.4.2
   Requires PHP: 7.4
   License: GNU General Public License v2 or later
   License URI: http://www.gnu.org/licenses/gpl-2.0.html
   Text Domain: kavehTheme
   Tags: responsive, e-commerce, customizable
*/



.boostify-menu .megamenu{
   position: absolute;
   right: -3000px;
   opacity: 0;
   visibility: hidden;
   transition: opacity 0.3s ease, visibility 0.3s ease, right 0s 0.3s;
   pointer-events: none;
}
.boostify-menu .menu-item-has-children:has(> a:hover) .megamenu,
.boostify-menu .menu-item-has-children:has(> .megamenu:hover) .megamenu {
   right: 0;
   opacity: 1;
   visibility: visible;
   transition: opacity 0.3s ease, visibility 0.3s ease, right 0s;
   pointer-events: auto;
}

.boostify-menu .megamenu-two{
   position: absolute;
   right: -3000px;
   opacity: 0;
   visibility: hidden;
   transition: opacity 0.3s ease, visibility 0.3s ease, right 0s 0.3s;
   pointer-events: none;
}

.boostify-menu .menu-item-has-children:has(> a:hover) .megamenu-two,
.boostify-menu .menu-item-has-children:has(> .megamenu-two:hover) .megamenu-two {
   right: 0;
   opacity: 1;
   visibility: visible;
   transition: opacity 0.3s ease, visibility 0.3s ease, right 0s;
   pointer-events: auto;
}


/**/
.custom-menu .megamenu,
.custom-menu .megamenu-two,
.custom-menu .megamenu-three {
   position: absolute;
   right: -3000px;
   opacity: 0;
   visibility: hidden;
   /* Instant open/close — no slide-in that looks broken on refresh/hover */
   transition: opacity 0.12s ease, visibility 0.12s ease;
   pointer-events: none;
}

.custom-menu .menu-item.menu-item-has-children:has(> a:hover) .megamenu,
.custom-menu .menu-item.menu-item-has-children:has(> .custom-menu-child:hover) .megamenu,
.custom-menu .menu-item.menu-item-has-children:has(> .custom-menu-child .megamenu:hover) .megamenu {
   right: 0;
   opacity: 1;
   visibility: visible;
   transition: opacity 0.12s ease, visibility 0.12s ease;
   pointer-events: auto;
}

.custom-menu .menu-item.menu-item-has-children:has(> a:hover) .megamenu-two,
.custom-menu .menu-item.menu-item-has-children:has(> .custom-menu-child:hover) .megamenu-two,
.custom-menu .menu-item.menu-item-has-children:has(> .custom-menu-child .megamenu-two:hover) .megamenu-two {
   right: 0;
   opacity: 1;
   visibility: visible;
   transition: opacity 0.12s ease, visibility 0.12s ease;
   pointer-events: auto;
}

/* Megamenu three: open via .megamenu-three-open (JS). Full-width shell stays
   non-interactive so leaving sideways closes; only the panel gets pointer-events. */
.custom-menu .menu-item.menu-item-has-children.megamenu-three-open .megamenu-three,
.boostify-menu .menu-item-has-children.megamenu-three-open .megamenu-three {
   right: 0;
   opacity: 1;
   visibility: visible;
   transition: opacity 0.12s ease, visibility 0.12s ease;
   pointer-events: none;
}

.custom-menu .megamenu-three .megamenu-three-wrapper,
.boostify-menu .megamenu-three .megamenu-three-wrapper {
   pointer-events: none;
}

.custom-menu .menu-item.menu-item-has-children.megamenu-three-open .megamenu-three .megamenu-three-wrapper,
.boostify-menu .menu-item-has-children.megamenu-three-open .megamenu-three .megamenu-three-wrapper {
   pointer-events: auto;
}


.custom-menu .sub-menu-default{
    position: absolute;
    right: -3000px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, right 0s 0.3s;
    pointer-events: none;
 }

.custom-menu .menu-item.menu-item-has-children:has(> a:hover) .sub-menu-default,
.custom-menu .menu-item.menu-item-has-children:has(> .custom-menu-child:hover) .sub-menu-default,
.custom-menu .menu-item.menu-item-has-children:has(> .custom-menu-child .sub-menu-default:hover) .sub-menu-default {
    right: 0;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease, right 0s;
    pointer-events: auto;
 }







/* =====================================================
   Kaveh Variation Modal - Variable Product Selector
   ===================================================== */

.kaveh-variation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.kaveh-variation-modal.active {
    display: flex;
}

.kaveh-modal-open {
    overflow: hidden;
}

.kaveh-variation-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.kaveh-variation-modal__content {
    position: relative;
    background: #fff;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: kavehModalSlideIn 0.3s ease-out;
}

@keyframes kavehModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kaveh-variation-modal__close {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    z-index: 10;
}

.kaveh-variation-modal__close:hover {
    background: #e0e0e0;
    color: #333;
}

.kaveh-variation-modal__header {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding-top: 20px;
}

.kaveh-variation-modal__image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #f9f9f9;
}

.kaveh-variation-modal__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kaveh-variation-modal__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kaveh-variation-modal__title {
    font-size: 16px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 8px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kaveh-variation-modal__price {
    font-size: 18px;
    font-weight: 800;
    color: #212529;
}

.kaveh-variation-modal__price del {
    color: #9E9E9E;
    font-size: 14px;
    font-weight: 400;
    margin-left: 8px;
}

.kaveh-variation-modal__price ins {
    text-decoration: none;
}

.kaveh-variation-modal__body {
    margin-bottom: 24px;
}

.kaveh-variation-attr {
    margin-bottom: 16px;
}

.kaveh-variation-attr label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.kaveh-variation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.kaveh-variation-option {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kaveh-variation-option:hover {
    border-color: #333;
    color: #333;
}

.kaveh-variation-option.selected {
    border-color: #212529;
    background: #212529;
    color: #fff;
}

/* Color swatch options */
.kaveh-variation-option--color {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    border-width: 3px;
    position: relative;
}

.kaveh-variation-option--color.selected {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #212529;
}

.kaveh-variation-option--color .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Out of stock options */
.kaveh-variation-option.out-of-stock {
    opacity: 0.5;
    position: relative;
}

.kaveh-variation-option.out-of-stock:not(.kaveh-variation-option--color)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #999;
    transform: rotate(-10deg);
}

.kaveh-variation-option--color.out-of-stock::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #fff;
    transform: translate(-50%, -50%) rotate(-45deg);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.3);
}

.kaveh-variation-option.out-of-stock:hover {
    border-color: #999;
    color: #666;
}

.kaveh-variation-modal__quantity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
    border-radius: 16px;
    border: 1px solid #e9ecef;
}

.kaveh-variation-modal__quantity label {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.kaveh-quantity-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    border-radius: 12px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.kaveh-quantity-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kaveh-quantity-btn:hover {
    background: #212529;
    color: #fff;
    transform: scale(1.05);
}

.kaveh-quantity-btn:active {
    transform: scale(0.95);
}

.kaveh-quantity-input {
    width: 50px;
    height: 36px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #212529;
    -moz-appearance: textfield;
}

.kaveh-quantity-input::-webkit-outer-spin-button,
.kaveh-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.kaveh-variation-modal__footer {
    margin-top: 16px;
}

.kaveh-variation-modal__add-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    background: #212529;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.kaveh-variation-modal__add-btn:hover:not(:disabled) {
    background: #000;
}

.kaveh-variation-modal__add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.kaveh-variation-modal__add-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.kaveh-variation-modal__add-btn.loading svg {
    display: none;
}

.kaveh-variation-modal__add-btn.loading::before {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: kavehSpinner 0.8s linear infinite;
}

@keyframes kavehSpinner {
    to {
        transform: rotate(360deg);
    }
}

/* Loading state for modal */
.kaveh-variation-modal.loading .kaveh-variation-modal__content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 10;
    border-radius: 20px;
}

.kaveh-variation-modal.loading .kaveh-variation-modal__content::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #212529;
    border-top-color: transparent;
    border-radius: 50%;
    animation: kavehSpinner 0.8s linear infinite;
    z-index: 11;
}

/* Toast notification */
.kaveh-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #28a745;
    color: #fff;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: all 0.3s ease;
}

.kaveh-toast.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Mobile responsive */
@media screen and (max-width: 480px) {
    .kaveh-variation-modal__content {
        width: 95%;
        padding: 16px;
        max-height: 85vh;
    }
    
    .kaveh-variation-modal__header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .kaveh-variation-modal__image {
        width: 120px;
        height: 120px;
    }
    
    .kaveh-variation-modal__title {
        font-size: 14px;
    }
    
    .kaveh-variation-option {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .kaveh-variation-option--color {
        width: 32px;
        height: 32px;
    }
}

/* Loading state for ajax add to cart buttons */
.ajax_add_to_cart.kaveh-loading,
.kaveh-variation-modal-trigger.kaveh-loading {
    pointer-events: none;
    position: relative;
}

.ajax_add_to_cart.kaveh-loading i,
.kaveh-variation-modal-trigger.kaveh-loading i {
    visibility: hidden;
}

.ajax_add_to_cart.kaveh-loading::after,
.kaveh-variation-modal-trigger.kaveh-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: kavehSpinner 0.8s linear infinite;
}

.boostify-menu .megamenu-three{
   position: absolute;
   right: -3000px;
   opacity: 0;
   visibility: hidden;
   transition: opacity 0.3s ease, visibility 0.3s ease, right 0s 0.3s;
   pointer-events: none;
}


.swiper.swiper-detail-product-four-related{
 overflow: visible !important;
 padding-bottom: 40px;
}

/*
 * Related product cards are nested inside the single-product `.product` wrapper.
 * Without this, hovering one card (or anywhere on the page product shell) matches
 * `.product:hover .product-hover` on the ancestor and lights up every card.
 */
.insingle_pr.product:hover .product .product-hover {
  opacity: 0;
  visibility: hidden;
}
.insingle_pr.product .product:hover .product-hover {
  opacity: 1;
  visibility: visible;
}
.insingle_pr.product:hover .product .kaveh_compare_top {
  opacity: 0;
  transform: translateY(-20px);
}
.insingle_pr.product .product:hover .kaveh_compare_top {
  opacity: 1;
  transform: translateY(0);
}
.insingle_pr.product:hover .product .product-image > a > img {
  -webkit-filter: initial;
  filter: initial;
}
.insingle_pr.product .product:hover .product-image > a > img {
  -webkit-filter: unset;
  filter: unset;
}

.swiper-story-items .swiper-button-next svg, .swiper-story-items .swiper-button-prev svg {
    width: 20px;
    height: 20px;
    transform: rotate(180deg);
}

.col-lg-3 .widget{
    margin: 10px 0;
}

/* Equal spacing for blog/single style-2 sidebars (gap handles distance) */
.latest-articles-nk__sidebar > .widget {
    margin: 0;
    padding: 0;
    width: 100%;
    list-style: none;
}
.latest-articles-nk__sidebar > .widget > .latest-articles-nk__sidebar__box,
.latest-articles-nk__sidebar > .widget > .latest-articles-nk__sidebar__article {
    width: 100%;
    margin: 0;
}
.latest-articles-nk__sidebar__article.hot-articles-nk__item {
    border-radius: 20px;
}

.blog .swiper::after {
 display: none;
}


/*
 * Style 4: stable gallery frame, centered image, aligned thumbs, smooth variation swap.
 */
.detail-product-four .detail-product-four-gallery-origin {
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Shared horizontal inset so main frame + thumb strip share the same edges */
.detail-product-four .detail-product-four-gallery-origin .swiper-detail-product-four-gallery > .swiper-wrapper > .swiper-slide {
  padding: 0 15px;
  box-sizing: border-box;
}

.detail-product-four .detail-product-four-gallery .woocommerce-product-gallery__image,
.detail-product-four .detail-product-four-gallery .woocommerce-product-gallery__image--placeholder,
.detail-product-four .detail-product-four-gallery-origin .swiper-slide > #img-container {
  position: relative;
  aspect-ratio: 451 / 474;
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  box-sizing: border-box;
  border-radius: 15px;
  background: #f7f7f7;
}

.detail-product-four .detail-product-four-gallery .woocommerce-product-gallery__image > a,
.detail-product-four .detail-product-four-gallery .woocommerce-product-gallery__image--placeholder > a,
.detail-product-four .detail-product-four-gallery-origin .swiper-slide > #img-container > a {
  position: absolute;
  inset: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 15px 10px;
  box-sizing: border-box;
}

/* Magnify wraps the img — keep that shell filling + centering too */
.detail-product-four .detail-product-four-gallery .woocommerce-product-gallery__image .magnify,
.detail-product-four .detail-product-four-gallery .woocommerce-product-gallery__image > a > span {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  position: relative;
}

.detail-product-four .detail-product-four-gallery .woocommerce-product-gallery__image img,
.detail-product-four .detail-product-four-gallery .woocommerce-product-gallery__image--placeholder img,
.detail-product-four .detail-product-four-gallery .wp-post-image,
.detail-product-four .detail-product-four-gallery-origin .swiper-slide img,
.detail-product-four .detail-product-four-gallery .magnify > img {
  display: block !important;
  width: auto !important;
  max-width: 80% !important;
  height: auto !important;
  max-height: 100% !important;
  object-fit: contain;
  object-position: center center;
  margin: 0 auto !important;
  float: none !important;
  position: static !important;
  border-radius: 12px;
}

@media only screen and (max-width: 990px) {
  .detail-product-four .detail-product-four-gallery .woocommerce-product-gallery__image img,
  .detail-product-four .detail-product-four-gallery .wp-post-image,
  .detail-product-four .detail-product-four-gallery-origin .swiper-slide img,
  .detail-product-four .detail-product-four-gallery .magnify > img {
    max-width: 100% !important;
  }
}

/* Thumb strip: same width as the padded slide content above */
.detail-product-four .detail-product-four-gallery-items {
  width: 100%;
  max-width: 100%;
  margin: 10px 0 0;
  min-height: 86px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.detail-product-four .woocommerce-product-gallery__wrapper {
  transition: none;
}

.detail-product .woocommerce-product-gallery__wrapper,
.detail-product-two .woocommerce-product-gallery__wrapper,
.detail-product-three .woocommerce-product-gallery__wrapper {
  transition: none;
}

/*
 * Styles 1–3: stable frame + centered main image (same behavior as Style 4).
 * Style 1 shell is `.detail-product-info` (inside `.detail-product`).
 */
.detail-product-info .gallery-image-origin,
.detail-product .gallery-image-origin,
.detail-product-two .origin-image,
.detail-product-three .gallery-origin {
  width: 100%;
}

.detail-product-info .gallery-image-origin .woocommerce-product-gallery__wrapper,
.detail-product .gallery-image-origin .woocommerce-product-gallery__wrapper,
.detail-product-two .origin-image .woocommerce-product-gallery__wrapper,
.detail-product-three .gallery-origin .woocommerce-product-gallery__wrapper {
  width: 100%;
  max-width: 100%;
}

.detail-product-info .gallery-image-origin .woocommerce-product-gallery__image,
.detail-product-info .gallery-image-origin .woocommerce-product-gallery__image--placeholder,
.detail-product .gallery-image-origin .woocommerce-product-gallery__image,
.detail-product .gallery-image-origin .woocommerce-product-gallery__image--placeholder,
.detail-product-two .origin-image .woocommerce-product-gallery__image,
.detail-product-two .origin-image .woocommerce-product-gallery__image--placeholder,
.detail-product-three .gallery-origin .woocommerce-product-gallery__image,
.detail-product-three .gallery-origin .woocommerce-product-gallery__image--placeholder {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  box-sizing: border-box;
  border-radius: 20px;
  background: transparent;
}

/* Style 1 originally used a shorter frame (~235px); keep that feel but stable */
.detail-product-info .gallery-image-origin .woocommerce-product-gallery__image,
.detail-product-info .gallery-image-origin .woocommerce-product-gallery__image--placeholder {
  aspect-ratio: 16 / 10;
  max-height: 280px;
}

/* Style 3: keep main gallery smaller (theme used ~300px max-height) */
.detail-product-three .gallery-origin .woocommerce-product-gallery__image,
.detail-product-three .gallery-origin .woocommerce-product-gallery__image--placeholder {
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 300px;
  max-height: 280px;
  margin-left: auto;
  margin-right: auto;
}

.detail-product-three .gallery-origin .woocommerce-product-gallery__image img,
.detail-product-three .gallery-origin .wp-post-image,
.detail-product-three .gallery-origin .magnify > img {
  max-width: 85% !important;
  max-height: 240px !important;
}

.detail-product-three .swiper-gallery-product-three {
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.detail-product-three .swiper-gallery-product-three .gallery-product-three-item {
  width: 72px;
  height: 72px;
}

.detail-product-three .swiper-gallery-product-three .gallery-product-three-item img {
  height: auto;
  max-height: 52px;
  max-width: 52px;
  object-fit: contain;
}

.detail-product-info .gallery-image-origin .woocommerce-product-gallery__image > a,
.detail-product-info .gallery-image-origin .woocommerce-product-gallery__image--placeholder > a,
.detail-product .gallery-image-origin .woocommerce-product-gallery__image > a,
.detail-product .gallery-image-origin .woocommerce-product-gallery__image--placeholder > a,
.detail-product-two .origin-image .woocommerce-product-gallery__image > a,
.detail-product-two .origin-image .woocommerce-product-gallery__image--placeholder > a,
.detail-product-three .gallery-origin .woocommerce-product-gallery__image > a,
.detail-product-three .gallery-origin .woocommerce-product-gallery__image--placeholder > a {
  position: absolute;
  inset: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.detail-product-info .gallery-image-origin .woocommerce-product-gallery__image .magnify,
.detail-product .gallery-image-origin .woocommerce-product-gallery__image .magnify,
.detail-product-two .origin-image .woocommerce-product-gallery__image .magnify,
.detail-product-three .gallery-origin .woocommerce-product-gallery__image .magnify {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  position: relative;
}

.detail-product-info .gallery-image-origin .woocommerce-product-gallery__image img,
.detail-product-info .gallery-image-origin .wp-post-image,
.detail-product .gallery-image-origin .woocommerce-product-gallery__image img,
.detail-product .gallery-image-origin .wp-post-image,
.detail-product-two .origin-image .woocommerce-product-gallery__image img,
.detail-product-two .origin-image .wp-post-image,
.detail-product-three .gallery-origin .woocommerce-product-gallery__image img,
.detail-product-three .gallery-origin .wp-post-image,
.detail-product-info .gallery-image-origin .magnify > img,
.detail-product .gallery-image-origin .magnify > img,
.detail-product-two .origin-image .magnify > img,
.detail-product-three .gallery-origin .magnify > img {
  display: block !important;
  width: auto !important;
  max-width: 90% !important;
  height: auto !important;
  max-height: 100% !important;
  object-fit: contain;
  object-position: center center;
  margin: 0 auto !important;
  float: none !important;
  position: static !important;
}

/* Style 1: kill bottom dead-space under thumb strip */
.detail-product-info .gallery-image {
  padding: 12px !important;
}

.detail-product-info .gallery-image > .woocommerce-product-gallery,
.detail-product-info .gallery-image .woocommerce-product-gallery.images {
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  width: 100% !important;
}

.detail-product-info .gallery-image-origin {
  margin-bottom: 12px !important;
}

.detail-product-info .gallery-image-items,
.detail-product-info .gallery-image-items.swiper {
  position: relative;
  width: 100%;
  height: 110px !important;
  max-height: 110px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
  overflow: hidden;
}

.detail-product-info .gallery-image-items .swiper-wrapper {
  align-items: stretch;
  height: 110px !important;
}

.detail-product-info .gallery-image-items .swiper-slide {
  height: 110px !important;
  display: flex;
}

.detail-product-info .gallery-image-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 110px !important;
  min-height: 110px !important;
  max-height: 110px !important;
  box-sizing: border-box;
  border-radius: 16px;
  overflow: hidden;
}

.detail-product-info .gallery-image-item img {
  max-width: 100%;
  max-height: 72px;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

/* Keep arrows on the thumb row; never reserve bottom space for them */
.detail-product-info .gallery-image .swiper-button-next,
.detail-product-info .gallery-image .swiper-button-prev,
.detail-product-info .gallery-image .gallery-image-items .swiper-button-next,
.detail-product-info .gallery-image .gallery-image-items .swiper-button-prev {
  position: absolute !important;
  top: 50% !important;
  bottom: auto !important;
  margin: 0 !important;
  margin-top: 0 !important;
  transform: translateY(-50%) !important;
  width: 28px !important;
  height: 44px !important;
  z-index: 3;
}

@media only screen and (max-width: 575px) {
  .detail-product-info .gallery-image .swiper-button-next,
  .detail-product-info .gallery-image .swiper-button-prev,
  .detail-product-info .gallery-image .gallery-image-items .swiper-button-next,
  .detail-product-info .gallery-image .gallery-image-items .swiper-button-prev {
    top: 50% !important;
    bottom: auto !important;
    height: 40px !important;
    width: 24px !important;
  }
}

/* Smooth variation gallery fade (styles 1–5) */
.detail-product .gallery-image.is-gallery-swapping,
.detail-product-two .gallery.is-gallery-swapping,
.detail-product-three .gallery.is-gallery-swapping,
.detail-product-four .detail-product-four-gallery-origin.is-gallery-swapping,
.kav-single-product-root .kav-single-product-image.is-gallery-swapping {
  min-height: var(--kaveh-gallery-swap-h, auto);
}

.insingle_pr .woocommerce-product-gallery.kaveh-gallery-is-fading,
.product .woocommerce-product-gallery.kaveh-gallery-is-fading {
  transition: opacity 0.26s ease;
  will-change: opacity;
}

.insingle_pr .woocommerce-product-gallery.kaveh-gallery-is-fading.is-fading-out,
.product .woocommerce-product-gallery.kaveh-gallery-is-fading.is-fading-out,
.insingle_pr .woocommerce-product-gallery.kaveh-gallery-is-fading.is-fading-in,
.product .woocommerce-product-gallery.kaveh-gallery-is-fading.is-fading-in {
  opacity: 0 !important;
}

.insingle_pr .woocommerce-product-gallery.kaveh-gallery-is-fading.is-fading-in.is-visible,
.product .woocommerce-product-gallery.kaveh-gallery-is-fading.is-fading-in.is-visible {
  opacity: 1 !important;
}

@media only screen and (min-width: 992px) {
  .detail-product-four .detail-product-four-gallery-origin .swiper-detail-product-four-gallery {
    overflow: visible;
  }

  .detail-product-four .detail-product-four-gallery-origin .swiper-detail-product-four-gallery .swiper-wrapper,
  .detail-product-four .detail-product-four-gallery-origin .swiper-detail-product-four-gallery .swiper-slide {
    overflow: visible;
  }
}

/*
 * Single product breadcrumb (styles 1–4): same trail + look as Style 4
 * Home → Shop → category trail (no product title).
 */
.detail-product > .container > .breadcrumb-nk,
.detail-product-two > .container > .breadcrumb-nk,
.detail-product-three > .container > .breadcrumb-nk,
.detail-product-four > .container > .breadcrumb-nk {
  margin: 18px 0 24px;
  padding: 0;
}

.detail-product > .container > .breadcrumb-nk ul,
.detail-product-two > .container > .breadcrumb-nk ul,
.detail-product-three > .container > .breadcrumb-nk ul,
.detail-product-four > .container > .breadcrumb-nk ul {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.detail-product > .container > .breadcrumb-nk ul li,
.detail-product-two > .container > .breadcrumb-nk ul li,
.detail-product-three > .container > .breadcrumb-nk ul li,
.detail-product-four > .container > .breadcrumb-nk ul li {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
  color: #6b7280;
  white-space: nowrap;
}

.detail-product > .container > .breadcrumb-nk ul li a,
.detail-product-two > .container > .breadcrumb-nk ul li a,
.detail-product-three > .container > .breadcrumb-nk ul li a,
.detail-product-four > .container > .breadcrumb-nk ul li a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6b7280;
  text-decoration: none;
}

.detail-product > .container > .breadcrumb-nk ul li a:hover,
.detail-product-two > .container > .breadcrumb-nk ul li a:hover,
.detail-product-three > .container > .breadcrumb-nk ul li a:hover,
.detail-product-four > .container > .breadcrumb-nk ul li a:hover {
  color: #ea5656;
}

.detail-product > .container > .breadcrumb-nk ul li a i,
.detail-product-two > .container > .breadcrumb-nk ul li a i,
.detail-product-three > .container > .breadcrumb-nk ul li a i,
.detail-product-four > .container > .breadcrumb-nk ul li a i {
  font-size: 14px;
  line-height: 1;
  color: #9ca3af;
}

.detail-product > .container > .breadcrumb-nk ul li:not(:last-child)::after,
.detail-product-two > .container > .breadcrumb-nk ul li:not(:last-child)::after,
.detail-product-three > .container > .breadcrumb-nk ul li:not(:last-child)::after,
.detail-product-four > .container > .breadcrumb-nk ul li:not(:last-child)::after {
  content: "/";
  margin: 0 8px;
  color: rgba(0, 0, 0, 0.22);
}

.detail-product > .container > .breadcrumb-nk .breadcrumb-nk__current,
.detail-product-two > .container > .breadcrumb-nk .breadcrumb-nk__current,
.detail-product-three > .container > .breadcrumb-nk .breadcrumb-nk__current,
.detail-product-four > .container > .breadcrumb-nk .breadcrumb-nk__current,
.detail-product > .container > .breadcrumb-nk ul li.is-current,
.detail-product-two > .container > .breadcrumb-nk ul li.is-current,
.detail-product-three > .container > .breadcrumb-nk ul li.is-current,
.detail-product-four > .container > .breadcrumb-nk ul li.is-current {
  color: #1f2937;
  font-weight: 700;
}

@media only screen and (max-width: 991px) {
  .detail-product > .container > .breadcrumb-nk,
  .detail-product-two > .container > .breadcrumb-nk,
  .detail-product-three > .container > .breadcrumb-nk,
  .detail-product-four > .container > .breadcrumb-nk {
    margin: 14px 0 18px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }

  .detail-product > .container > .breadcrumb-nk::-webkit-scrollbar,
  .detail-product-two > .container > .breadcrumb-nk::-webkit-scrollbar,
  .detail-product-three > .container > .breadcrumb-nk::-webkit-scrollbar,
  .detail-product-four > .container > .breadcrumb-nk::-webkit-scrollbar {
    display: none;
    height: 0;
  }

  .detail-product > .container > .breadcrumb-nk ul,
  .detail-product-two > .container > .breadcrumb-nk ul,
  .detail-product-three > .container > .breadcrumb-nk ul,
  .detail-product-four > .container > .breadcrumb-nk ul {
    flex-wrap: nowrap !important;
    width: max-content;
    max-width: none;
    padding: 0 2px;
  }

  .detail-product > .container > .breadcrumb-nk ul li,
  .detail-product-two > .container > .breadcrumb-nk ul li,
  .detail-product-three > .container > .breadcrumb-nk ul li,
  .detail-product-four > .container > .breadcrumb-nk ul li {
    font-size: 12.5px;
  }
}

/* Style-1 gallery modal: keep main preview size stable across official/buyer tabs.
   Buyer tab has a shorter right column, so a flex-growing origin used to expand. */
#modal-gallery.detail-product-four-modal-gallery .detail-product-four-modal-gallery-origin {
	position: relative;
	flex: 0 1 auto;
	width: 100%;
	aspect-ratio: 451 / 474;
	max-height: min(520px, 58vh);
	min-height: 0;
	overflow: hidden;
}

#modal-gallery.detail-product-four-modal-gallery .detail-product-four-modal-gallery-origin .swiper {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important;
	max-height: 100%;
}

#modal-gallery.detail-product-four-modal-gallery .detail-product-four-modal-gallery-origin .swiper-wrapper,
#modal-gallery.detail-product-four-modal-gallery .detail-product-four-modal-gallery-origin .swiper-slide {
	height: 100% !important;
	max-height: 100%;
}

#modal-gallery.detail-product-four-modal-gallery .detail-product-four-modal-gallery-origin .swiper-slide {
	display: flex;
	align-items: center;
	justify-content: center;
}

#modal-gallery.detail-product-four-modal-gallery .detail-product-four-modal-gallery-origin img,
#modal-gallery.detail-product-four-modal-gallery .detail-product-four-modal-gallery-origin video,
#modal-gallery.detail-product-four-modal-gallery .detail-product-four-modal-gallery-origin .kav-buyer-video {
	width: 100% !important;
	height: 100% !important;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	object-position: center;
}

#modal-gallery.detail-product-four-modal-gallery .detail-product-four-modal-gallery-images,
#modal-gallery.detail-product-four-modal-gallery .detail-product-four-modal-gallery-images-users,
#modal-gallery.detail-product-four-modal-gallery .images-users {
	flex: 0 0 auto;
	max-height: 42%;
	overflow: auto;
}

@media (max-width: 991.98px) {
	#modal-gallery.detail-product-four-modal-gallery .detail-product-four-modal-gallery-origin {
		max-height: min(42vh, 360px);
		aspect-ratio: 1 / 1;
		margin-inline: auto;
	}
}
