/* استایل هدر ویجت */
.my-products-widget-header {
  background: #fff;
  border-left: 4px solid #0073AA; /* نوار رنگی کناری */
  padding: 10px;
  position: relative;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15); /* سایه‌ی ملایم زیر هدر */
}

.my-products-widget-header h2 {
  margin: 0;
  font-size: 1.4rem;
font-family: iranyekan;
  color: #333;
  display: inline-block;
}

.my-products-widget-header a.my-product-all-link {
  float: right;
  color: #0073AA;
  text-decoration: none;
  font-weight: 500;
  padding: 6px 12px;
  border: 1px solid #0073AA;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  margin-top: -3px; /* کمی تنظیم جای دکمه */
}

.my-products-widget-header a.my-product-all-link:hover {
  background: #0073AA;
  color: #fff;
}

/* استایل برای گالری Justified */
/* المان A که کتابخانه کنترل می‌کند را بدون position: relative نگه دارید */
.my-products-justified-gallery .my-product-item {
  /* به کتابخانه اجازه بدهید موقعیت‌دهی کند */
  /* اگر جایی position: relative; داده بودید، پاکش کنید */
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

/* کانتینر واسط برای Overlay */
.my-products-justified-gallery .my-product-item .my-product-wrapper {
  position: relative; /* اینجاست که برای Overlay لازم داریم */
  display: block;     /* تا عرض ۱۰۰% والد را بگیرد */
  overflow: hidden;
  width: 100%;
}

.my-products-justified-gallery .my-product-item .my-product-wrapper img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px !important;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 2;
}

/* لایه‌ی عنوان روی عکس */
.my-products-justified-gallery .my-product-item .my-product-overlay-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  font-size: 11px;
  text-align: center;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
  opacity: 0;               /* در حالت عادی نامرئی باشد */
  transform: translateY(100%); 
  transition: all 0.3s ease;
  z-index: 30; /* بالاتر از تصویر (z-index: 20) */
}

/* با هاور روی والد، Overlay دیده شود */
.my-products-justified-gallery .my-product-item:hover .my-product-overlay-title {
  opacity: 1;
  transform: translateY(0);
}


.my-pagination {
    text-align: center;
    margin-top: 20px;
}

.my-pagination a, .my-pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
}

.my-pagination .current {
    background-color: #e5aa08;
    color: white;
}
.my-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 2px solid #f1f1f1;
}

.header-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #E3AA23;
    color: white;
    font-size: 16px;
    border-radius: 6px;
    margin-right: 10px;
}

.widget-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
	margin: 0px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-separator {
    flex-grow: 1;
    height: 1px;
    background: repeating-linear-gradient(
        to right,
        #ccc,
        #ccc 5px,
        transparent 5px,
        transparent 10px
    );
    margin: 0 10px;
}

/* دکمه نمایش همه */
.view-all-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #fff;
    color: #333333;
    border: dashed 1px #ccc;
    font-size: 16px;
    font-weight: bold;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.3sease-in-out;
}

.view-all-button i {
    font-size: 16px;
}

.view-all-button .button-text {
    font-size: 14px;
}

.view-all-button:hover {
    background: #d39e00;
}

/* واکنش‌گرا برای موبایل */
@media (max-width: 600px) {
    .widget-title {
        font-size: 16px;
    }
    
    .view-all-button {
        font-size: 14px;
        padding: 6px 12px;
    }

    .view-all-button i {
        font-size: 14px;
    }

    .header-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}
.product-filter {
    display: flex;
    align-items: center;
    gap: 10px;
	padding: 0px 10px;
    border-radius: 8px;
}


.product-filter label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.product-filter select {
    font-size: 11px;
    border: dashed 1px #ccc;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
	width: max-content !important;
}


@media (max-width: 768px) {
    .product-filter {
    }

    .product-filter select {
        width: 60%;
    }
}
.my-products-justified-gallery {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* فقط وقتی هم صفحه لود شده هم گالری آماده شده نمایان شود */
body.loaded .my-products-justified-gallery.jg-initialized {
    visibility: visible;
    opacity: 1;
}

/* بهینه‌سازی عملکرد - استفاده از GPU */
.my-products-justified-gallery {
    will-change: transform;
    transform: translateZ(0);
}

.my-products-justified-gallery .my-product-item {
    will-change: transform;
    backface-visibility: hidden;
}
/* ✅ کانتینر کلی که تخفیف و ویژگی‌ها داخل آن قرار دارند */
.discount-features-container {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    z-index: 30; /* بالاتر از تصویر (z-index: 20) */
}

/* ✅ موقعیت داینامیک برای کادر */
.discount-features-container.top-left {
    top: 0;
    left: 5px;
}
.discount-features-container.top-right {
    top: 0;
    right: 5px;
}
.discount-features-container.bottom-left {
    bottom: 0;
    left: 5px;
}
.discount-features-container.bottom-right {
    bottom: 0;
    right: 5px;
}

/* ✅ استایل آیکن تخفیف */
.discount-badge {
    background: #ff4d4d;
    padding: 1px 5px;
    font-size: 14px;
    color: white;
    border-radius: 5px;
	margin-bottom: 5px;
}

/* ✅ ویژگی‌های محصول */
.product-features-container {
	display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

/* ✅ ویژگی‌ها بدون پس‌زمینه در یک لیست زیر هم */
.product-feature-box {
	background: #e5aa08;
    border-radius: 4px;
    color: #000000;
    padding: 1px 5px;
	transition: all 1s ease-out;
}
/* ✅ نمایش با انیمیشن هنگام هاور */
.my-product-wrapper:hover .discount-features-container {
    opacity: 1;
    transform: translateY(10px);
}
.my-products-filters {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    justify-content: flex-end;
}
.filter-dropdown select {
    font-size: 11px;
    border: dashed 1px #ccc;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.2sease-in-out;
    width: max-content !important;
}
.no-products-found {
    text-align: center;
    padding: 90px;
    border-radius: 10px;
    animation: fadeIn 0.5s ease-in-out;
}

.no-products-found i {
    font-size: 50px;
    color: #e5aa08;
    display: block;
    margin-bottom: 10px;
    animation: bounce 1s infinite;
}

.no-products-found p {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

.no-products-found .back-to-shop {
    display: inline-block;
    background: #e5aa08;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s ease-in-out;
}

.no-products-found .back-to-shop:hover {
    background: #d39e00;
}

/* 🔥 انیمیشن محو شدن برای ورود زیبا */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 🔥 انیمیشن جهش آیکن */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}


/* 📌 استایل کلی برچسب‌ها */
.product-badge-container {
	position: absolute;
    top: 11px;
    right: 5px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 30; /* بالاتر از تصویر (z-index: 20) */
}

.product-badge {
	display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 12px;
    padding: 2px 5px;
    border-radius: 13px;
    backdrop-filter: blur(10px);
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3sease-in-out;
    opacity: 0.9;
}

.product-badge i {
    font-size: 12px;
    margin-left: 4px;
}

/* 🎁 برچسب رایگان */
.free-product {
    background: #ff0007;
    color: white;
}

/* 👑 برچسب ویژه */
.featured-product {
    background: linear-gradient(135deg, #ffcc33, #ff8800);
    color: #000000;
}

/* ✨ افکت هاور */
.product-badge:hover {
    transform: translateY(-3px);
    opacity: 1;
}
@media (max-width: 768px) {
    .product-filter {
    }

    .product-filter select {
        width: 60%;
    }
}
@media (max-width: 768px) {
	.my-products-filters{
	flex-direction: row;
    flex-wrap: wrap;
	justify-content: center;
}
}
/* قیمت محصول */
.my-product-price-overlay {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    color: #fff;
    padding: 6px 20px;
    border-radius: 25px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 30; /* بالاتر از تصویر (z-index: 20) */
    white-space: nowrap;
    text-align: center;
    width: max-content;
    max-width: 90%;
}

/* دکمه سبد خرید */
.my-add-to-cart {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 30; /* بالاتر از تصویر (z-index: 20) */
    border: none;	
}

/* دکمه علاقه‌مندی */
.my-wishlist-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 30; /* بالاتر از تصویر (z-index: 20) */
    border: none;
}

/* افکت هاور روی محصول */
.my-product-item:hover .my-add-to-cart,
.my-product-item:hover .my-wishlist-btn {
    opacity: 1;
    transform: translateY(0);
}
.my-product-item:hover .my-product-price-overlay {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
/* تاخیر در انیمیشن */
.my-product-item:hover .my-add-to-cart { transition-delay: 0.1s; }
.my-product-item:hover .my-wishlist-btn { transition-delay: 0.2s; }

/* آیکون‌ها */
.my-add-to-cart i,
.my-wishlist-btn i {
    font-size: 19px;
    color: white;
}

/* هاور روی دکمه‌ها */
.my-add-to-cart:hover {

}
.my-add-to-cart:hover i {
    color: white;
}

.my-wishlist-btn:hover {

}
.my-wishlist-btn:hover i {
    color: white;
}

/* Skeleton Loader برای تصاویر - از ابتدا نمایش داده می‌شود (طبق نکات Stack Overflow) */
.my-product-image-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        #e0e0e0 0%,
        #f5f5f5 20%,
        #e8e8e8 60%,
        #f5f5f5 80%,
        #e0e0e0 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 10px;
    z-index: 10;
    pointer-events: none;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* برای نمایش skeleton - wrapper باید ارتفاع داشته باشد */
.my-product-wrapper {
    position: relative;
    min-height: 200px;
}

/* Skeleton از ابتدا نمایش داده می‌شود - فقط وقتی hidden کلاس دارد پنهان می‌شود */
.my-product-image-skeleton.hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* انیمیشن Shimmer (سایه رد می‌شه) */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* استایل تصویر واقعی - ابتدا مخفی است تا skeleton نمایش داده شود */
.my-product-wrapper img.my-product-image {
    position: relative;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    width: 100%;
    height: auto;
    display: block;
}

/* وقتی تصویر لود شد و زمان مناسب رسید، نمایش داده می‌شود */
.my-product-wrapper img.my-product-image.loaded {
    opacity: 1;
    visibility: visible;
}

/* کلاس برای شروع لود تصاویر بعد از 1 ثانیه */
.my-products-justified-gallery.images-ready img.my-product-image {
    visibility: visible;
}