/* --- Sticky Cart Message --- */

/* 1. Reset and Force Layout */
body .woocommerce-message {
    position: fixed !important;
    bottom: 25px !important;
    right: 50% !important;
    transform: translateX(50%) !important; /* Center the box horizontally */
    width: 900px !important; /* Fixed elegant width */
    height: 70px !important;
    background: #fff !important;
    border: 1px solid #f0f0f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 15px 45px rgba(0,0,0,0.1) !important;
    padding: 0 20px !important;
    margin: 0 !important;
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    direction: rtl !important;
}

/* 2. Remove default WooCommerce icons and bars */
body .woocommerce-message::before,
body .woocommerce-message::after {
    display: none !important;
}

/* 3. The Action Button (View Cart) - Position: Right */
body .woocommerce-message .button {
    order: 1 !important;
    background-color: #0DA97C !important;
    color: #fff !important;
    padding: 10px 20px !important;
    border-radius: 12px !important;
    font-weight: 800 !important;
    font-size: 12px !important;
    margin: 0 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    float: none !important;
}

/* 4. The Message Content - Position: Center */
body .woocommerce-message {
    font-size: 0 !important; /* Hide stray text nodes */
}

body .woocommerce-message {
    flex: 1 !important;
    order: 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #2d3436 !important;
    font-size: 13px !important;
    margin: 0 15px !important;
    overflow: hidden !important;
}

/* Specific product title ellipsis */
body .woocommerce-message a:not(.button) {
    display: inline-block !important;
    max-width: 200px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: #0DA97C !important;
    font-weight: 800 !important;
    margin-left: 5px !important;
    text-decoration: none !important;
}

/* 5. Close Button (X) - Position: Left */
.close-notification {
    order: 3 !important;
    cursor: pointer !important;
    color: #910d0d !important;
    font-size: 24px !important;
    font-family: inherit !important;
    line-height: 1 !important;
    margin-right: 10px !important;
    transition: 0.2s;
}
.close-notification:hover { color: #ff7675; }

/* 6. Progress Bar Timer */
.msg-progress-bar {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 2px !important;
    background: #0DA97C !important;
    width: 100% !important;
}

/* Mobile Responsive */
@media (max-width: 650px) {
    body .woocommerce-message {
        width: calc(100% - 40px) !important;
        right: 20px !important;
        transform: none !important;
        height: auto !important;
        min-height: 60px !important;
        padding: 10px 15px !important;
    }
    body .woocommerce-message a:not(.button) {
        max-width: 120px !important;
    }
}




/* ================================================================
   FINAL UNIFIED UI - THEME COLOR: #0DA97C
   ================================================================
*/

/* --- 1. CLEAN UP: HIDE UNNECESSARY ELEMENTS --- */
.comment-reply-title, .woocommerce-Reviews-title, 
.comment-reply-title small, .comment-notes,
#reply-title b, .woocommerce-review__dash { 
    display: none !important; 
}

/* --- 2. STICKY ADD-TO-CART MESSAGE (WIDE & CENTERED) --- */
body .woocommerce-message {
    position: fixed !important;
    bottom: 25px !important;
    right: 50% !important;
    transform: translateX(50%) !important;
    width: 1100px !important; /* Base width from your last requirement */
    height: 70px !important;
    background: #fff !important;
    border: 1px solid #f0f0f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 15px 45px rgba(0,0,0,0.1) !important;
    padding: 0 20px !important;
    margin: 0 !important;
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    direction: rtl !important;
    overflow: hidden !important;
}

body .woocommerce-message::before,
body .woocommerce-message::after { display: none !important; }

/* Action Button (Right Side) */
body .woocommerce-message .button {
    order: 1 !important;
    background-color: #0DA97C !important;
    color: #fff !important;
    padding: 10px 20px !important;
    border-radius: 12px !important;
    font-weight: 800 !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

/* Message Content (Center) */
body .woocommerce-message {
    flex: 1 !important;
    order: 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #2d3436 !important;
    font-size: 13px !important;
    margin: 0 15px !important;
    overflow: hidden !important;
}

/* Product Title - Only this gets Ellipsis */
body .woocommerce-message a:not(.button) {
    display: inline-block !important;
    max-width: 200px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: #0DA97C !important;
    font-weight: 800 !important;
    margin-left: 5px !important;
}

/* Close Button (Left Side) */
.close-notification {
    order: 3 !important;
    cursor: pointer !important;
    color: #910d0d !important;
    font-size: 24px !important;
    margin-right: 10px !important;
    flex-shrink: 0 !important;
}

/* Timer Bar */
.msg-progress-bar {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 2px !important;
    background: #0DA97C !important;
    width: 100%; /* Managed by JS */
}

/* --- 3. REVIEW LIST - FILL PARENT CONTAINER --- */
.commentlist { padding: 0 !important; margin: 40px 0 !important; width: 100% !important; }
.commentlist li { list-style: none !important; margin-bottom: 40px !important; }

.comment_container {
    display: flex !important;
    flex-direction: row !important; /* Right: Avatar, Left: Box */
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    align-items: flex-start !important;
    width: 100% !important;
    gap: 20px !important; /* Space between avatar and text box */
}

/* Avatar - Fixed Right */
.woocommerce #reviews #comments ol.commentlist li img.avatar {
    position: static !important;
    display: block !important;
    width: 65px !important;
    height: 65px !important;
    border-radius: 18px !important;
    background: #f8fafc;
    border: 2px solid #eee !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
    flex-shrink: 0 !important;
}

/* Review Box - Fills remaining width */
.comment-text {
    flex: 1 !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 20px !important;
    padding: 25px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02) !important;
    margin: 0 !important;
    min-width: 0;
}

/* Star Colors */
.comment-text .star-rating { float: left !important; color: #0DA97C !important; }
.woocommerce-review__author { font-size: 15px !important; font-weight: 800 !important; color: #1e293b !important; }

/* --- 4. REVIEW FORM & REQUIRED STAR MARKER --- */
#respond {
    width: 100% !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 18px !important;
    padding: 30px !important;
    background: #fff !important;
}

/* Required Star Fix (Red Star instead of X) */
.woocommerce form .form-row .required, #respond .required {
    color: #ff4d4d !important;
    font-size: 0 !important;
    text-decoration: none !important;
}

.woocommerce form .form-row .required::before, #respond .required::before {
    content: "*" !important;
    font-size: 18px !important;
    font-weight: bold !important;
    visibility: visible !important;
}

/* Green Stars in Form */
#respond .stars a, #respond .stars a::before { color: #0DA97C !important; }

#commentform .submit {
    background: #0DA97C !important;
    color: #fff !important;
    border-radius: 12px !important;
    padding: 14px 50px !important;
    border: none !important;
}

/* --- 5. RESPONSIVE --- */
@media (max-width: 1150px) {
    body .woocommerce-message { width: calc(100% - 40px) !important; }
}

@media (max-width: 768px) {
    .comment_container { flex-direction: column !important; align-items: center !important; }
    .comment-text { width: 100% !important; text-align: center !important; }
    .comment-text .star-rating { float: none !important; margin: 0 auto 10px !important; }
}





/* --- Force Fix: Replace WooCommerce Required "X" with Red Star --- */

/* 1. مخفی کردن علامت ضربدر فعلی */
.woocommerce form .form-row .required,
#respond .required,
.comment-form-rating label .required {
    font-size: 0 !important; /* حذف متن یا آیکون متنی */
    text-decoration: none !important;
    color: transparent !important;
    display: inline-block !important;
    position: relative !important;
    width: auto !important;
}

/* 2. تزریق ستاره قرمز جدید */
.woocommerce form .form-row .required::before,
#respond .required::before,
.comment-form-rating label .required::before {
    content: "*" !important;
    font-size: 18px !important;
    color: #ff4d4d !important; /* رنگ قرمز ستاره */
    visibility: visible !important;
    display: inline-block !important;
    margin-right: 4px !important;
    font-family: sans-serif !important; /* اطمینان از نمایش صحیح کاراکتر ستاره */
    font-weight: bold !important;
    line-height: 1 !important;
}

/* 3. اصلاح چیدمان لیبل امتیاز که در عکس مشخص است */
.comment-form-rating {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
}

.comment-form-rating label {
    order: 1 !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
}

.comment-form-rating .stars {
    order: 2 !important;
    margin: 0 !important;
}




.spec-filter .jet-checkboxes-list,
.spec-filter .jet-checkboxes-list-wrapper {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 8px 16px !important;
  align-items: center !important;
}

.spec-filter .jet-checkboxes-list__row,
.spec-filter .jet-checkboxes-list__item {
  display: inline-flex !important;
  width: auto !important;
  max-width: fit-content !important;
  margin: 0 !important;
  align-items: center !important;
}


/* ================================
   Fix JetSmartFilters empty gaps
   Class on each filter widget: spec-filter
================================ */

/* گزینه‌های چک‌باکس خطی و راست‌چین */
.spec-filter .jet-checkboxes-list,
.spec-filter .jet-checkboxes-list-wrapper {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 10px 18px !important;
  direction: rtl !important;
  text-align: right !important;
}

.spec-filter .jet-checkboxes-list__row,
.spec-filter .jet-checkboxes-list__item {
  display: inline-flex !important;
  width: auto !important;
  max-width: fit-content !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: center !important;
  direction: rtl !important;
  text-align: right !important;
}

.spec-filter .jet-checkboxes-list__label {
  text-align: right !important;
  white-space: nowrap !important;
}

/* حذف کامل فیلترهایی که هیچ گزینه‌ای ندارن */
.elementor-widget-jet-smart-filters-checkboxes.spec-filter:not(:has(.jet-checkboxes-list__row)),
.elementor-widget-jet-smart-filters-checkboxes.spec-filter:not(:has(.jet-checkboxes-list__item)) {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* حذف فیلترهایی که گزینه‌هاشون توسط Indexer مخفی شدن */
.elementor-widget-jet-smart-filters-checkboxes.spec-filter:not(:has(.jet-checkboxes-list__row:not([style*="display: none"]))),
.elementor-widget-jet-smart-filters-checkboxes.spec-filter:not(:has(.jet-checkboxes-list__item:not([style*="display: none"]))) {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* حذف Heading قبل از فیلتر خالی */
.elementor-widget-heading:has(+ .elementor-widget-jet-smart-filters-checkboxes.spec-filter:not(:has(.jet-checkboxes-list__row))),
.elementor-widget-heading:has(+ .elementor-widget-jet-smart-filters-checkboxes.spec-filter:not(:has(.jet-checkboxes-list__item))),
.elementor-widget-heading:has(+ .elementor-widget-jet-smart-filters-checkboxes.spec-filter:not(:has(.jet-checkboxes-list__row:not([style*="display: none"])))),
.elementor-widget-heading:has(+ .elementor-widget-jet-smart-filters-checkboxes.spec-filter:not(:has(.jet-checkboxes-list__item:not([style*="display: none"])))) {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* حذف فاصله‌های اضافی المنتور */
.spec-filter,
.spec-filter .elementor-widget-container {
  margin-top: 0 !important;
  padding-top: 0 !important;
  min-height: 0 !important;
}

.spec-filter .elementor-widget-container {
  padding-bottom: 0 !important;
}