/* 
 * EstekhdamNeshan UX & CRO Engine - Master Stylesheet
 */

/* 1. Reading Progress Bar */
#en-progress-container { position: fixed; top: 0; left: 0; width: 100%; height: 4px; background: transparent; z-index: 999999; }
#en-progress-bar { height: 4px; background: #f97316; width: 0%; transition: width 0.1s; }

/* 2. Top Announcement Bar */
.en-bar-wrap { background: #0f172a; color: #f8fafc; height: 42px; overflow: hidden; position: relative; font-size: 13px; z-index: 99999; direction: rtl; }
.en-bar-container { max-width: 1200px; margin: 0 auto; height: 100%; display: flex; align-items: center; justify-content: center; position: relative; padding: 0 40px; }
.en-bar-slider { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.en-bar-slide { position: absolute; width: 100%; text-align: center; opacity: 0; transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease; pointer-events: none; }
.en-bar-slide.is-active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.en-bar-badge { background: #f97316; color: #fff; padding: 2px 10px; border-radius: 20px; font-weight: 700; font-size: 11.5px; margin-left: 8px; }
.en-bar-link { color: #ffffff !important; text-decoration: none; font-weight: 600; }
.en-bar-link:hover { color: #fdba74 !important; }
.en-bar-close { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); background: transparent; border: none; color: #94a3b8; font-size: 22px; cursor: pointer; line-height: 1; padding: 0; }
.en-bar-close:hover { color: #fff; }

/* 3. Product Live Stats & Badges */
.en-live-stats-badge { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 20px; }
.en-stat-chip { display: inline-flex; align-items: center; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 20px; }

/* 4. Product Add To Cart Button (Emerald Green) */
.woocommerce div.product form.cart .single_add_to_cart_button {
    background: linear-gradient(135deg, #16a34a, #15803d) !important;
    color: #ffffff !important;
    font-size: 16.5px !important;
    font-weight: 900 !important;
    padding: 15px 38px !important;
    border-radius: 12px !important;
    border: none !important;
    box-shadow: 0 10px 25px rgba(22, 163, 74, 0.4) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.woocommerce div.product form.cart .single_add_to_cart_button::before { content: '📥'; font-size: 20px; transition: transform 0.3s; }
.woocommerce div.product form.cart .single_add_to_cart_button:hover {
    background: linear-gradient(135deg, #15803d, #166534) !important;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(22, 163, 74, 0.5) !important;
}
.woocommerce div.product form.cart .single_add_to_cart_button:hover::before { transform: translateY(3px); }
.woocommerce div.product form.cart .single_add_to_cart_button:active { transform: translateY(0) scale(0.98); box-shadow: 0 5px 10px rgba(22, 163, 74, 0.3) !important; }

/* 5. Product InfoGain & FAQs */
.en-infogain-product-box { margin: 40px 0; direction: rtl; }
.en-freshness-meta { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 20px; font-size: 13.5px; color: #334155; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 25px; }
.en-meta-dot { color: #cbd5e1; }
.en-faqs-title { font-size: 19px; font-weight: 900; color: #0f172a; margin-bottom: 18px; }
.en-faq-item { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 18px; margin-bottom: 12px; transition: all 0.2s; }
.en-faq-item[open] { border-color: #16a34a; box-shadow: 0 4px 12px rgba(22,163,74,0.1); }
.en-faq-item summary { font-weight: 800; font-size: 14.5px; color: #1e293b; cursor: pointer; outline: none; }
.en-faq-item p { margin: 12px 0 0; font-size: 13.5px; color: #475569; line-height: 1.8; }

/* 6. Article Information Gain */
.en-post-eeat-card { display: flex; align-items: center; gap: 15px; background: #f8fafc; border: 1px solid #e2e8f0; padding: 16px 20px; border-radius: 12px; margin: 20px 0; direction: rtl; }
.en-eeat-avatar { font-size: 32px; }
.en-eeat-info { display: flex; flex-direction: column; gap: 4px; }
.en-eeat-title { font-size: 14px; color: #0f172a; }
.en-eeat-date { font-size: 12.5px; color: #64748b; }

.en-article-stats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 25px 0; direction: rtl; }
.en-stat-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; transition: all 0.2s; }
.en-stat-card:hover { background: #eff6ff; border-color: #bfdbfe; transform: translateY(-3px); box-shadow: 0 6px 12px rgba(0,0,0,0.05); }
.en-stat-icon { font-size: 20px; }
.en-stat-label { font-size: 10.5px; color: #94a3b8; font-weight: 600; }
.en-stat-value { font-size: 12px; color: #0f172a; font-weight: 800; }
.en-stat-freshness.fresh .en-stat-value { color: #16a34a; }
.en-stat-freshness.recent .en-stat-value { color: #ca8a04; }
.en-stat-freshness.stable .en-stat-value { color: #2563eb; }
@media (max-width: 768px) { .en-article-stats-grid { grid-template-columns: repeat(3, 1fr); } }

.en-tldr-box { background: linear-gradient(135deg, #eff6ff, #dbeafe); border-right: 4px solid #3b82f6; padding: 20px; border-radius: 10px 0 0 10px; margin: 30px 0; direction: rtl; }
.en-tldr-header { font-weight: 900; color: #1e3a8a; font-size: 16px; margin-bottom: 12px; }
.en-tldr-box ul { margin: 0; padding-right: 20px; color: #1e40af; font-size: 14px; line-height: 1.7; }

.en-dynamic-toc { background: #ffffff; border: 1px solid #cbd5e1; border-radius: 10px; padding: 15px 20px; margin: 30px 0; direction: rtl; }
.en-dynamic-toc summary { font-weight: 800; font-size: 15px; color: #0f172a; cursor: pointer; }
.en-dynamic-toc ul { margin: 15px 0 0; padding-right: 20px; font-size: 14px; color: #334155; line-height: 1.8; }
.en-dynamic-toc a { color: #2563eb; text-decoration: none; }
.en-dynamic-toc a:hover { text-decoration: underline; }

.en-article-cat-cta { background: #fffbeb; border: 1px solid #fde68a; border-right: 4px solid #f59e0b; padding: 16px 20px; border-radius: 10px 0 0 10px; margin: 40px 0 20px; direction: rtl; font-size: 14px; color: #78350f; }
.en-article-cat-cta a { color: #d97706; font-weight: 700; text-decoration: none; margin-right: 8px; }
.en-article-cat-cta a:hover { text-decoration: underline; }

/* 7. Centered Stacked Sticky Buy CTA */
.en-sticky-cta-bar { position: fixed; bottom: -200px; left: 50% !important; transform: translateX(-50%) !important; width: auto !important; max-width: 550px !important; min-width: 320px; background: rgba(255,255,255,0.97) !important; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 2px solid #cbd5e1 !important; border-top: 4px solid #16a34a !important; border-radius: 20px !important; box-shadow: 0 20px 50px -5px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.04) !important; padding: 14px 28px 16px !important; z-index: 9999999 !important; transition: bottom 0.4s cubic-bezier(0.16,1,0.3,1) !important; direction: rtl; box-sizing: border-box; text-align: center !important; }
.en-sticky-cta-bar.is-visible { bottom: 24px !important; }
.en-sticky-inner { display: flex; flex-direction: column !important; align-items: center !important; gap: 10px; }
.en-sticky-top-row { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.en-sticky-title { font-weight: 800; font-size: 13.5px; color: #0f172a; max-width: 250px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.en-sticky-sep { color: #cbd5e1; font-size: 16px; }
.en-sticky-price { font-size: 14px; font-weight: 900; color: #16a34a; }
.en-sticky-price del { color: #94a3b8; font-size: 11.5px; margin-left: 4px; }
.en-sticky-price ins { text-decoration: none; }
.en-sticky-btn { display: block; width: 100% !important; background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important; color: #fff !important; font-weight: 900 !important; font-size: 16px !important; border: none !important; padding: 13px 20px !important; border-radius: 14px !important; cursor: pointer !important; box-shadow: 0 6px 20px rgba(22,163,74,0.4) !important; transition: all 0.25s ease !important; text-align: center !important; }
.en-sticky-btn:hover { background: linear-gradient(135deg, #15803d 0%, #166534 100%) !important; transform: scale(1.02) translateY(-1px) !important; box-shadow: 0 8px 25px rgba(22,163,74,0.5) !important; }
@media (max-width: 768px) {
    .en-sticky-cta-bar { left: 0 !important; transform: none !important; width: 100% !important; max-width: 100% !important; min-width: unset; border-radius: 20px 20px 0 0 !important; border-left: none !important; border-right: none !important; border-bottom: none !important; padding: 12px 16px 14px !important; }
    .en-sticky-cta-bar.is-visible { bottom: 0 !important; }
    .en-sticky-title { font-size: 12px; max-width: 180px; }
    .en-sticky-btn { font-size: 15px !important; padding: 12px 16px !important; border-radius: 12px !important; }
}

/* 8. Global Layout Width & Container Styles */
.single-post main > .wp-block-group { max-width: 1140px !important; margin: 0 auto !important; background: #ffffff; padding: 40px !important; border-radius: 20px !important; border: 2px solid #cbd5e1 !important; border-top: 6px solid #f97316 !important; box-shadow: 0 15px 35px -5px rgba(15,23,42,0.08) !important; }
.single-post main > .wp-block-group > * { max-width: 100% !important; }
.single-product .product { max-width: 1140px !important; margin: 0 auto !important; }
.single-product .woocommerce-tabs { max-width: 1140px !important; margin: 40px auto !important; background: #ffffff; padding: 30px !important; border-radius: 20px !important; border: 2px solid #cbd5e1 !important; border-top: 6px solid #16a34a !important; box-shadow: 0 15px 35px -5px rgba(15,23,42,0.08) !important; }
@media (max-width: 768px) {
    .single-post main > .wp-block-group { padding: 20px !important; border-radius: 15px !important; }
    .single-product .woocommerce-tabs { padding: 15px !important; border-radius: 15px !important; }
}
