/* Custom CSS for WooCustom Toolkit plugin */

/* Wishlist Button Styles */
.woocustom-wishlist-btn {
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.woocustom-wishlist-btn:hover {
    transform: scale(1.1);
}

.woocustom-wishlist-btn.woocustom-disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.woocustom-wishlist-container {
    position: relative;
}

/* Styles for Notyf */
.notyf__message {
    font-size: 14px !important;
}

/* Product Grid Styles */
.woocommerce ul.products li.product {
    position: relative;
}

/* Wishlist Page Styles */
.woocustom-wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
/* Features Boxes (from product-features-boxes) */
.custom-feature-boxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.feature-box {
    background-color: oklch(0.967 0.003 264.542);
    border-radius: 10px;
    padding: 12px 16px;
    text-align: right;
    font-weight: 500;
    flex: 1 1 30%;
    color: oklch(0.37 0.013 285.805);
    font-size: 14px;
}
@media (max-width: 768px) {
	.feature-box {
    flex: 1 1 48%;
}
}
/* Product Gallery Customizations (from product-gallery-custom) */
/* Custom product gallery navigation */
ul.flex-direction-nav {
    position: absolute;
    top: 35%;
    width: 100%;
    left: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    transform: translateY(-50%);
}

li.flex-nav-prev {
    position: absolute;
    left: -20px;
}

li.flex-nav-next {
    position: absolute;
    right: 10px;
    margin-top: -20px;
}

a.flex-next, a.flex-prev {
    visibility: hidden;
}

a.flex-next::after, a.flex-prev::before {
    visibility: visible;
    content: "";
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: var(--e-global-color-primary);
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    transition: all 0.2s ease-in-out;
}

/* جایگزینی فلش با SVG */
a.flex-next::after {
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
}

a.flex-prev::before {
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
}

a.flex-next:hover::after, a.flex-prev:hover::before {
    background-color: var(--e-global-color-accent);
    transform: scale(1.1);
}

/* Custom thumbnails for Elementor WooCommerce product images */
.elementor-widget-woocommerce-product-images .flex-control-thumbs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 10px;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    justify-content: flex-start;
    padding-bottom: 10px;
    max-width: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.elementor-widget-woocommerce-product-images .flex-control-thumbs::-webkit-scrollbar {
    height: 6px;
}

.elementor-widget-woocommerce-product-images .flex-control-thumbs::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
}

.elementor-widget-woocommerce-product-images .flex-control-thumbs img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
}
/* fix cart price elementor */
.elementor-menu-cart__product-price.product-price {
                    display: block !important; /* نمایش اجباری عنوان قیمت */
                    visibility: visible !important;
                }
                .elementor-menu-cart__product-price .quantity {
                    display: flex;
                    align-items: center;
                    gap: 5px;
                }
/* Custom NotyF styles (for notifications) */

.notyf__message {
    font-family: inherit;
}

/* Product Countdown Styles */
.woocustom-product-countdown {
    text-align: center;
    margin: 10px 0;
}

.countdown-timer {
    font-size: 16px;
    font-weight: bold;
    color: #ef394e; /* قرمز برای جذابیت */
    font-family: monospace; /* برای خوانایی اعداد */
}

/* ================================================
   WooCustom Toolkit - Savings Display - v2.0
   ================================================ */

/* --- Reset tr --- */
.woocustom-savings-tr {
    background: transparent !important;
    border: none !important;
}

.woocustom-savings-tr td {
    padding: 12px 0 4px !important;
    border: none !important;
    background: transparent !important;
}

/* ================================================
   Wrapper اصلی
   ================================================ */
.woocustom-savings-wrapper {
    position: relative;
    margin: 12px 0;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #0d6e3c 0%, #1a9e55 40%, #22c55e 100%);
    box-shadow:
        0 4px 20px rgba(22, 163, 74, 0.35),
        0 1px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    animation: woocustom-slideDown 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    direction: rtl;
}

/* --- خط درخشان بالا --- */
.woocustom-savings-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255,255,255,0.8) 30%,
        #a3f0c0 60%,
        transparent 100%
    );
    z-index: 2;
}

/* --- پترن نقطه‌ای پس‌زمینه --- */
.woocustom-savings-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(
        circle,
        rgba(255,255,255,0.08) 1px,
        transparent 1px
    );
    background-size: 20px 20px;
    z-index: 0;
    pointer-events: none;
}

/* ================================================
   Inner - محتوا
   ================================================ */
.woocustom-savings-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}

/* ================================================
   Badge - آیکون
   ================================================ */
.woocustom-savings-badge {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(4px);
    animation: woocustom-pulse 2.5s ease-in-out infinite;
}

/* --- هاله درخشنده --- */
.woocustom-savings-badge-glow {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.25) 0%, transparent 70%);
    animation: woocustom-glow 2.5s ease-in-out infinite alternate;
}

.woocustom-savings-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.2));
}

.woocustom-savings-icon svg {
    display: block;
    stroke: #ffffff;
}

/* ================================================
   Content - متن
   ================================================ */
.woocustom-savings-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.woocustom-savings-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
    white-space: nowrap;
}

.woocustom-savings-subtitle {
    display: block;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ================================================
   Amount - مقدار
   ================================================ */
.woocustom-savings-amount-wrapper {
    flex-shrink: 0;
}

.woocustom-savings-amount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    color: #0d6e3c;
    font-weight: 900;
    font-size: 1rem;
    padding: 6px 14px;
    border-radius: 50px;
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255,255,255,1);
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: woocustom-bounceAmount 0.6s 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.woocustom-savings-amount:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.woocustom-savings-amount .woocommerce-Price-amount {
    color: #0d6e3c !important;
    font-weight: 900 !important;
}

.woocustom-savings-amount .woocommerce-Price-currencySymbol {
    color: #1a9e55 !important;
    font-size: 0.8em;
    margin-right: 2px;
}

/* ================================================
   Confetti - تزیین
   ================================================ */
.woocustom-savings-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.woocustom-savings-confetti span {
    position: absolute;
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    opacity: 0.25;
    animation: woocustom-float 4s ease-in-out infinite;
}

.woocustom-savings-confetti span:nth-child(1) {
    background: #ffffff;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 3.5s;
}
.woocustom-savings-confetti span:nth-child(2) {
    background: #a3f0c0;
    top: 60%;
    left: 25%;
    animation-delay: 0.5s;
    animation-duration: 4s;
    width: 4px;
    height: 4px;
}
.woocustom-savings-confetti span:nth-child(3) {
    background: #ffffff;
    top: 30%;
    left: 50%;
    animation-delay: 1s;
    animation-duration: 4.5s;
    width: 8px;
    height: 8px;
}
.woocustom-savings-confetti span:nth-child(4) {
    background: #bbf7d0;
    top: 70%;
    left: 65%;
    animation-delay: 1.5s;
    animation-duration: 3s;
    width: 5px;
    height: 5px;
}
.woocustom-savings-confetti span:nth-child(5) {
    background: #ffffff;
    top: 15%;
    left: 80%;
    animation-delay: 0.8s;
    animation-duration: 5s;
    width: 4px;
    height: 4px;
}
.woocustom-savings-confetti span:nth-child(6) {
    background: #a3f0c0;
    top: 55%;
    left: 90%;
    animation-delay: 2s;
    animation-duration: 3.8s;
    width: 7px;
    height: 7px;
}

/* ================================================
   Standalone (برای المنتور)
   ================================================ */
.woocustom-savings-standalone {
    margin: 16px 0;
    width: 100%;
}

/* ================================================
   انیمیشن‌ها
   ================================================ */
@keyframes woocustom-slideDown {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes woocustom-bounceAmount {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes woocustom-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }
}

@keyframes woocustom-glow {
    from {
        opacity: 0.5;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1.1);
    }
}

@keyframes woocustom-float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.2;
    }
    33% {
        transform: translateY(-8px) rotate(120deg);
        opacity: 0.35;
    }
    66% {
        transform: translateY(4px) rotate(240deg);
        opacity: 0.15;
    }
}

/* ================================================
   موبایل
   ================================================ */
@media (max-width: 480px) {
    .woocustom-savings-inner {
        padding: 12px;
        gap: 8px;
    }

    .woocustom-savings-badge {
        width: 38px;
        height: 38px;
    }

    .woocustom-savings-badge svg {
        width: 18px;
        height: 18px;
    }

    .woocustom-savings-title {
        font-size: 0.82rem;
    }

    .woocustom-savings-subtitle {
        display: none;
    }

    .woocustom-savings-amount {
        font-size: 0.88rem;
        padding: 5px 10px;
    }
}

/* ================================================
   RTL
   ================================================ */
[dir="ltr"] .woocustom-savings-wrapper,
.ltr .woocustom-savings-wrapper {
    direction: ltr;
}

/* Wishlist Styles */
:is(.woocustom-wishlist-icon, .woocustom-wishlist-remove) {
    cursor: pointer;
}
.woocustom-wishlist-remove-btn {
    background: var(--e-global-color-primary);
}
.woocustom-wishlist-remove {
    display: none;
}

/* Styles in wishlist page */
.wishlist-container .woocustom-wishlist-remove {
    display: flex;
}

.wishlist-container .woocustom-wishlist-icon {
    display: none;
}

.e-loop-nothing-found-message__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Styles in single product page */
.woocustom-wishlist-icon {
    cursor: pointer;
}

/* NotyF Custom Styles */
.woocustom-notyf {
    max-width: initial !important;
    font-family: inherit;
    border-radius: 7px;
}

.woocustom-notyf .notyf__wrapper {
    padding: 15px !important;
    gap: 5px;
}

.woocustom-notyf .notyf__icon {
    margin: 0;
}



/* Product Sorting Tabs */
.woocustom-sorting-wrapper {
    overflow: auto;
}
#sort-tab {
    list-style: none;
	display: flex;
	padding: 0;
	gap: 10px;
}
li.nav-item {
    margin-left: 5px;
}
li.d-inline-flex.woocustom-filter-list-title {
    display: flex;
    align-items: center;
    gap: 3px;
}

.nav-link.lts-05 {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 14px;
    background: #f8f9fa;
	color: #1C1C25;
}

.nav-link.lts-05:hover {
    background-color: #1C1C25;
    transform: translateY(-2px);
}

.nav-link.lts-05.active {
    background-color: var(--e-global-color-accent);
    color: #fff !important;
    border-color: var(--e-global-color-accent);
}

.filter-list-title {
    font-weight: 500;
    font-size: 14px;
}

/* share modal */
#simpleShareModal{
    display: none; /* مخفی کردن پیش‌فرض مودال */
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    background: rgb(0 0 0 / 60%);
    z-index: 9999;
    backdrop-filter: blur(5px);
}
.header-share {
    font-weight: 700;
    font-size: 22px;
}
button#closeModal {
    background: #e8e8e8 !important;
    border-radius: 8px;
    line-height: 1;
    color: #1c1c1c;
    border: none;
    font-size: 24px;
}
#productUrl{
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    direction: ltr;
    word-break: break-all;
    font-size:16px;
}
button#simpleCopyBtn{
    background: var(--e-global-color-primary);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
}
button#simpleCloseBtn{
        background: #6c757d;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    margin-left: 10px;
}
.sharemodal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    padding: 20px;
}

@media (max-width: 768px) {
    #sort-tab {
        min-width: 100% !important;
		flex-wrap: nowrap;
		gap:0px !important;
		overflow-x: scroll;
		display: inline-flex;
    }
	li.d-inline-flex.woocustom-filter-list-title {
    font-size: 12px;
    color: #1C1C25;
	width: max-content;
}
	li.d-inline-flex.woocustom-filter-list-title svg {
		width:18px;
}
	li.nav-item {
    margin: 4px;
	margin-top: 10px;
}
    .nav-link.lts-05 {
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* WooCustom Product Subcategories */
.woocustom-category-section {
    margin: 24px 0;
}

.woocustom-categories {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 15px;
    align-items: stretch;
}

.woocustom-category-card {
    position: relative;
    height: 155px;
    text-align: center;
    cursor: pointer;
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.woocustom-category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px color-mix(in srgb, var(--e-global-color-accent) 20%, transparent);
}

.woocustom-category-card-image img {
    border-radius: 50%;
    max-width: 85px;
    max-height: 85px;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.woocustom-category-card-title {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    line-height: 1.6;
}

.woocustom-hidden {
    display: none;
}

@media (max-width: 1280px) {
    .woocustom-categories {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .woocustom-categories {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 950px) {
    .woocustom-categories {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 15px;
        padding-bottom: 4px;
        scroll-snap-type: x proximity;
    }

    .woocustom-category-card {
        flex: 0 0 calc(100% / 4);
        max-width: calc(100% / 4);
        scroll-snap-align: center;
    }

    .woocustom-categories::-webkit-scrollbar {
        height: 8px;
    }

    .woocustom-categories::-webkit-scrollbar-thumb {
        background-color: rgba(0, 0, 0, 0.25);
        border-radius: 4px;
    }

    .woocustom-categories::-webkit-scrollbar-track {
        background-color: rgba(0, 0, 0, 0.05);
    }
}

@media (max-width: 768px) {
    .woocustom-category-card {
        flex: 0 0 calc(100% / 3);
        max-width: calc(100% / 3);
    }
}

@media (max-width: 576px) {
    .woocustom-category-card {
        flex: 0 0 calc(100% / 2);
        max-width: calc(100% / 2);
    }
}

@media (max-width: 420px) {
    .woocustom-category-card {
        flex: 0 0 calc(100% / 1.5);
        max-width: calc(100% / 1.5);
    }

    .woocustom-category-card-title {
        font-size: 12px;
    }
}
