/* ========================================================
   1. Generic and responsive codes (isolated)
======================================================== */
.fc-hide-mobile { display: block; }
.fc-hide-desktop { display: none; }

@media (max-width: 768px) { 
    .fc-hide-mobile { display: none !important; } 
    .fc-hide-desktop { display: block !important; }
}

/* ========================================================
   2. WooCommerce Archive Subcategories Style (Top of Page)
======================================================== */
.fc-subcats-wrapper { background: #fff; padding: 20px; border-radius: 12px; margin-bottom: 30px; border: 1px solid #e0e0e2; box-sizing: border-box; }
.fc-subcats-title { font-size: 16px; margin-top: 0; margin-bottom: 20px; color: #000; font-weight: 700; }
.fc-subcats-grid { display: flex; flex-wrap: wrap; gap: 20px; }
.fc-subcat-item { display: flex; flex-direction: column; align-items: center; text-decoration: none !important; width: 100px; transition: transform 0.2s ease-in-out; }
.fc-subcat-item:focus { outline: 2px dashed #ef4056; outline-offset: 4px; border-radius: 8px; }
.fc-subcat-img { width: 85px; height: 85px; border-radius: 50%; border: 2px solid #f0f0f1; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; transition: border-color 0.3s; }
.fc-subcat-img img { max-width: 100%; height: auto; object-fit: cover; }
.fc-subcat-name { font-size: 13px; color: #3f4064; margin-top: 10px; text-align: center; line-height: 1.4; }
.fc-subcat-item:hover .fc-subcat-img { border-color: #ef4056; }
.fc-subcat-item:hover { transform: translateY(-3px); }

/* ========================================================
   3. Styling individual product page tags
======================================================== */
.fc-single-product-cats { display: flex; gap: 8px; flex-wrap: wrap; margin: 15px 0; }
.fc-single-cat-tag { background: #f0f0f1; color: #62666d; padding: 6px 16px; border-radius: 20px; font-size: 12px; text-decoration: none !important; font-weight: 500; transition: all 0.3s ease; }
.fc-single-cat-tag:hover, .fc-single-cat-tag:focus { background: #ef4056; color: #fff; outline: none; }

/* ========================================================
   4. Category Tree Widget (Smart Accordion)
======================================================== */
.fc-tree-widget ul { list-style: none !important; padding-right: 0; margin: 0; }
.fc-tree-widget li { position: relative; padding: 6px 25px 6px 0; list-style: none !important; border-bottom: 1px dashed #f0f0f1; }
.fc-tree-widget li:last-child { border-bottom: none; }
.fc-tree-widget a { color: #3f4064; text-decoration: none; font-size: 14px; transition: color 0.2s; display: inline-block; }
.fc-tree-widget a:hover, .fc-tree-widget a:focus { color: #ef4056; outline: none; }

/* برجسته کردن مسیر دسته فعلی */
.fc-tree-widget li.current-cat > a, .fc-tree-widget li.current-cat-parent > a { color: #ef4056; font-weight: bold; }

/* استایل زیردسته‌ها (مخفی در حالت پیش‌فرض) */
.fc-tree-widget ul.children { display: none; margin-right: 15px; border-right: 2px solid #efefef; padding-right: 10px; margin-top: 5px; }
.fc-tree-widget li.fc-open > ul.children { display: block; }

/* دکمه باز و بسته کردن آکاردئون (Toggle) */
.fc-tree-toggle { position: absolute; right: 0; top: 8px; width: 22px; height: 22px; background: #f5f5f5; border-radius: 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 10; transition: 0.3s; }
.fc-tree-toggle::before { content: "+"; font-size: 16px; color: #777; font-weight: bold; line-height: 1; transition: transform 0.3s; }
.fc-tree-toggle:hover, .fc-tree-toggle:focus { background: #efefef; outline: none; }
.fc-tree-toggle.fc-toggled { background: #ef4056; }
.fc-tree-toggle.fc-toggled::before { content: "-"; color: #fff; transform: rotate(180deg); }

/* ========================================================
   5. Related Products Widget (Classic Sidebar)
======================================================== */
.fc-related-product-widget-list { list-style: none !important; padding: 0; margin: 0; }
.fc-related-product-widget-list li { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; border-bottom: 1px solid #f0f0f1; padding-bottom: 12px; transition: background 0.3s; }
.fc-related-product-widget-list li:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.fc-related-product-widget-list img { width: 65px; height: 65px; border-radius: 8px; object-fit: cover; border: 1px solid #efefef; }
.fc-rpw-info { display: flex; flex-direction: column; flex-grow: 1; overflow: hidden; }
.fc-rpw-title { display: block; font-size: 13px; color: #000; text-decoration: none; margin-bottom: 5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.2s; }
.fc-rpw-title:hover { color: #ef4056; }
.fc-rpw-price { font-size: 14px; font-weight: bold; color: #ef4056; }
.fc-rpw-price del { font-size: 12px; color: #a1a3a8; font-weight: normal; margin-left: 5px; }

/* ========================================================
   6. Basic Elementor Element Styles (Categories Widget)
======================================================== */
.fc-elementor-wrapper { display: block; width: 100%; box-sizing: border-box; }
.fc-el-item { text-decoration: none !important; color: #333; display: flex; flex-direction: column; box-sizing: border-box; }
.fc-el-img-wrap { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.fc-el-img-wrap img { max-width: 100%; object-fit: cover; display: block; }
.fc-el-title { display: block; line-height: 1.5; }

/* حالت لیستی المنتور */
.fc-layout-list { display: flex; flex-direction: column; }
.fc-layout-list .fc-el-item { flex-direction: row; align-items: center; transition: 0.3s; border: 1px solid #eee; }
.fc-layout-list .fc-el-img-wrap { flex-shrink: 0; margin-left: 15px; }

/* حالت کارت (گرید) المنتور */
.fc-layout-card { display: grid; }
.fc-layout-card .fc-el-item { text-align: center; transition: all 0.3s ease; border: 1px solid #e0e0e2; }

/* کلاس‌های اسلایدر Swiper (تنظیمات تکمیلی) */
.fc-swiper-wrapper { width: 100%; position: relative; }
.fc-swiper-wrapper .swiper-button-next, .fc-swiper-wrapper .swiper-button-prev { width: 35px; height: 35px; background: #fff; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,0.1); border: 1px solid #eee; }
.fc-swiper-wrapper .swiper-button-next:after, .fc-swiper-wrapper .swiper-button-prev:after { font-size: 14px; font-weight: bold; }
.fc-swiper-wrapper .swiper-pagination-bullet-active { background: #ef4056; }