/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Add your custom styles here */

table.dp-category-product-tb tbody tr th {
    background-color: #ff9302;
    color: #FFF;
}

.dlp-accordion-title {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    padding: 10px 0;
}

.dlp-accordion-icon {
    font-size: 16px;
    transition: transform 0.2s ease;
	margin-right: .8em;
}

.dlp-accordion-title {
	justify-content: flex-start;
    color: #FFF;
    background: #000;
    padding: 1em;
    text-transform: capitalize;
	cursor: pointer;
}

.dlp-accordion-content {
    padding: 1em;
}

.dlp-accordion-content ul li {
    margin-bottom: .6em;
}

.dlp-accordion-item {
    margin-bottom: 1em;
    border: 1px solid #ececec;
}

a.dlp-active-subcategory {
    font-weight: 500;
}
<?php
$args = array(
    'orderby' => 'term_order', // 👈 this is the key line
    'order' => 'ASC',
    'hide_empty' => false
);

$categories = get_categories($args);

foreach ($categories as $category) :
?>
    <div class="dlp-accordion-item">
        <div class="dlp-accordion-title">
            <span class="dlp-accordion-icon">+</span>
            <?php echo esc_html($category->name); ?>
        </div>
        <div class="dlp-accordion-content">
            <!-- Optional: insert post or subcategory list here -->
        </div>
    </div>
<?php endforeach; ?>
