/* تب‌های صفحه محصول — هم‌خوان با رنگ primary سایت (طلایی)، عرض کامل، پدینگ و استایل فعال/غیرفعال */
.product-hero-two-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    border-bottom: 1px solid #e5e7eb;
    gap: 0;
}
.product-hero-two-tab {
    padding: 0.875rem 1rem;
    text-align: center;
    font-size: 0.9375rem;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    background: transparent;
    color: #6b7280;
    font-weight: 500;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.product-hero-two-tab:hover {
    color: #b78806;
    background: #fefbf3;
}
.product-hero-two-tabs [role="tab"][aria-selected="true"] {
    color: #b78806;
    font-weight: 700;
    border-bottom-color: #E5AA08;
    background: #fefbf3;
}
@media (max-width: 640px) {
    .product-hero-two-tabs {
        grid-template-columns: repeat(2, 1fr);
    }
}

.product-hero__preview-img { cursor: pointer; transition: transform 0.2s ease; }
.product-hero__preview-img:hover { transform: scale(1.02); }
.product-hero-lightbox { position: fixed; z-index: 9999; inset: 0; background: rgba(0,0,0,0.9); align-items: center; justify-content: center; cursor: pointer; visibility: hidden; pointer-events: none; }
.product-hero-lightbox.active { visibility: visible; pointer-events: auto; display: flex !important; }
.product-hero-lightbox img { max-width: 90%; max-height: 90%; object-fit: contain; pointer-events: none; }
#product-description-wrap.product-description-expanded { max-height: none !important; }
#product-description-wrap.product-description-expanded #product-description-fade { display: none; }
.product-description-content.prose p { margin-bottom: 0.75em; }
.product-description-content.prose h3 { margin-top: 1em; margin-bottom: 0.5em; }
.product-description-content.prose hr { margin: 1em 0; border-color: #e5e7eb; }

/* Reviews section – stars */
.product-reviews-stars .product-reviews-star { color: #d1d5db; }
.product-reviews-stars .product-reviews-star.filled { color: #f59e0b; }
.product-reviews-form-wrap .product-reviews-star-select,
.product-reviews-list .product-reviews-star { color: #d1d5db; }
.product-reviews-list .product-reviews-star.filled { color: #f59e0b; }
.product-reviews-form-wrap input[type=radio]:checked + .product-reviews-star-select { color: #f59e0b !important; }
.product-reviews-form-wrap .product-reviews-star-select:hover { color: #fbbf24; }

/* نوار شناور CTA — ثابت پایین وسط، ظاهر با اسکرول */
.product-floating-cta {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 1000;
    width: calc(100% - 2rem);
    max-width: 28rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease, visibility 0.35s ease;
}
.product-floating-cta.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.product-floating-cta__inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem 0.5rem 0.5rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.product-floating-cta__thumb {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #f3f4f6;
}
.product-floating-cta__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-floating-cta__info {
    flex: 1;
    min-width: 0;
}
.product-floating-cta__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-floating-cta__price {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.125rem;
}
.product-floating-cta__price--free {
    color: #059669;
    font-weight: 600;
}
.product-floating-cta__action {
    flex-shrink: 0;
}
.product-floating-cta__form {
    margin: 0;
}
.product-floating-cta__btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 700;
    border-radius: 0.5rem;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-floating-cta__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.product-floating-cta__btn--cart,
.product-floating-cta__btn--download {
    background: #059669;
    color: #fff;
}
.product-floating-cta__btn--cart:hover,
.product-floating-cta__btn--download:hover {
    background: #047857;
}
.product-floating-cta__btn--vip {
    background: #d97706;
    color: #fff;
}
.product-floating-cta__btn--vip:hover {
    background: #b45309;
}
@media (max-width: 480px) {
    .product-floating-cta {
        width: calc(100% - 1rem);
        bottom: 0.75rem;
    }
    .product-floating-cta__title { font-size: 0.8125rem; }
    .product-floating-cta__btn { padding: 0.45rem 0.75rem; font-size: 0.75rem; }
}

/* نوتیفیکیشن «کالا به سبد اضافه شد» — استایل مطابق تصویر */
.product-cart-toast-container {
    position: fixed;
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    width: calc(100% - 2rem);
    max-width: 24rem;
    pointer-events: none;
}
.product-cart-toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);
    animation: product-cart-toast-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes product-cart-toast-in {
    from {
        opacity: 0;
        transform: translateY(-1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes product-cart-toast-out {
    to {
        opacity: 0;
        transform: translateY(-0.75rem);
    }
}
.product-cart-toast__close {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #4b5563;
    cursor: pointer;
    border-radius: 0.375rem;
    padding: 0;
    transition: color 0.2s ease, background 0.2s ease;
}
.product-cart-toast__close:hover {
    color: #111827;
    background: #f3f4f6;
}
.product-cart-toast__icon {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    color: #059669;
}
.product-cart-toast__message {
    flex: 1;
    min-width: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #059669;
    margin: 0;
}
.product-cart-toast__link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: color 0.2s ease;
}
.product-cart-toast__link:hover {
    color: #111827;
}

.product-cart-added-link {
    text-decoration: none;
}
.product-floating-cta__action .product-cart-added-link {
    display: inline-flex;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    border-radius: 0.5rem;
}

/* لودینگ روی دکمه افزودن به سبد */
.js-product-add-to-cart-btn.is-loading {
    pointer-events: none;
    cursor: wait;
    opacity: 0.9;
}
.product-cart-btn-spinner {
    display: inline-block;
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: product-cart-btn-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-left: 0.35rem;
}
@keyframes product-cart-btn-spin {
    to { transform: rotate(360deg); }
}

/* باکس مدیر در صفحه محصول (فقط برای نقش admin) */
.product-admin-box .product-admin-download-input {
    font-family: inherit;
}
.product-admin-box .product-admin-copy-btn:focus,
.product-admin-box .product-admin-download-btn:focus {
    outline: none;
}

/* ——— باکس قیمت محصول (عادی / تخفیف / رایگان / VIP) ——— */
.product-price-block {
    direction: rtl;
}
.product-price-card {
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #fafafa 0%, #f9fafb 100%);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.product-price-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
.product-price-card__label {
    display: block;
    font-size: 0.8125rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}
.product-price-card__prices {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 0.75rem;
}
.product-price-card__prices--single {
    gap: 0.35rem;
}
.product-price-card__prices--compact .product-price-card__current {
    font-size: 1.35rem;
}
.product-price-card__old {
    font-size: 1rem;
    color: #9ca3af;
    text-decoration: line-through;
}
.product-price-card__current {
    font-size: 1.75rem;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.02em;
}
.product-price-card__current--single {
    font-size: 1.65rem;
    color: #1f2937;
}
.product-price-card__unit {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #6b7280;
}
/* کارت تخفیف‌دار */
.product-price-card--sale {
    background: linear-gradient(145deg, #f0fdf4 0%, #ecfdf5 50%, #d1fae5 100%);
    border-color: #a7f3d0;
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.12);
}
.product-price-card--sale:hover {
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.15);
}
.product-price-card__sale-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
}
.product-price-card__sale-header--compact {
    margin-bottom: 0.5rem;
}
.product-price-card__discount-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(185, 28, 28, 0.35);
}
.product-price-card__countdown {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    color: #b45309;
    font-weight: 600;
}
.product-price-card__countdown-label {
    color: #92400e;
}
.product-price-card__countdown-value {
    font-variant-numeric: tabular-nums;
    direction: ltr;
    unicode-bidi: embed;
}
.product-price-card__countdown--unlimited {
    color: #059669;
    font-weight: 600;
}
.product-price-card--sale .product-price-card__current {
    color: #047857;
    font-size: 1.85rem;
}
.product-price-card--sale .product-price-card__old {
    font-size: 1.05rem;
}
/* کارت قیمت عادی (بدون تخفیف) */
.product-price-card--normal {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-color: #e2e8f0;
}
.product-price-card--normal:hover {
    border-color: #cbd5e1;
}
/* رایگان / VIP */
.product-price-card--free {
    background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #6ee7b7;
}
.product-price-card--free .product-price-card__badge {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
}
.product-price-card--vip {
    background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fcd34d;
}
.product-price-card__badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}
.product-price-card__badge--vip {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #fff;
}
/* نسخه فشرده (سایدبار) */
.product-price-card--compact {
    padding: 1rem 1.25rem;
}
.product-price-card--compact .product-price-card__current {
    font-size: 1.5rem;
}
.product-price-card--compact .product-price-card__discount-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
}
.product-price-card--compact .product-price-card__countdown {
    font-size: 0.75rem;
}
