/* ============================================================
   DIRECTORY SIDEBAR — Complete Styling
   Loaded on /directory page (pages/directory.php)
   Frontend color: --org (#F26122) — DO NOT use vendor purple
   ============================================================ */

:root {
    --dir-accent: #F26122;
    --dir-accent-rgb: 242, 97, 34;
    --dir-text: #1e293b;
    --dir-text-muted: #64748b;
    --dir-bg: #ffffff;
    --dir-bg-subtle: #f8fafc;
    --dir-border: #e2e8f0;
    --dir-hover-bg: #f1f5f9;
    --dir-active-bg: rgba(242, 97, 34, 0.08);
    --dir-radius: 10px;
    --dir-transition: 0.2s ease;
}

/* ============================================================
   LAYOUT: sidebar + content flex
   ============================================================ */
.dictry_wrap.flex-container {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    min-height: 60vh;
}

/* ============================================================
   MODULE TABS BAR (.dictry_cate)
   ============================================================ */
.dictry_cate {
    position: relative;
    margin-bottom: 16px;
    background: var(--dir-bg);
    border-radius: var(--dir-radius);
    border: 1px solid var(--dir-border);
    padding: 6px;
}

.dictry_cate > ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dictry_cate > ul > li {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.dictry_cate > ul > li > a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dir-text-muted);
    text-decoration: none;
    transition: all var(--dir-transition);
    white-space: nowrap;
}

.dictry_cate > ul > li > a:hover {
    background: var(--dir-hover-bg);
    color: var(--dir-text);
}

.dictry_cate > ul > li > a.active,
.dictry_cate > ul > li > a:active {
    background: var(--dir-active-bg);
    color: var(--dir-accent);
    font-weight: 600;
}

.dictry_cate > ul > li > a i {
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.dictry_cate .sideCloseIcon {
    display: none;
}

/* ============================================================
   SIDEBAR (.d_sidebar)
   ============================================================ */
.d_sidebar {
    flex: 0 0 280px;
    width: 280px;
    min-width: 280px;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    overflow-x: hidden;
    /* Thin scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.d_sidebar::-webkit-scrollbar {
    width: 5px;
}
.d_sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.d_sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.d_sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.sidebar_content {
    background: var(--dir-bg);
    border: 1px solid var(--dir-border);
    border-radius: var(--dir-radius);
    padding: 0;
    overflow: hidden;
}

/* ============================================================
   SIDEBAR HEADER (.sidebar_content_top)
   ============================================================ */
.sidebar_content_top {
    padding: 16px 20px 12px;
    cursor: pointer;
    transition: background var(--dir-transition);
}

.sidebar_content_top:hover {
    background: var(--dir-hover-bg);
}

.sidebar_content_top h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--dir-text);
    letter-spacing: -0.01em;
}

.sidebar_content_top.mt25 {
    margin-top: 0;
    border-top: none;
}

/* ============================================================
   DIVIDER
   ============================================================ */
.sidebar_divide {
    height: 1px;
    background: var(--dir-border);
    margin: 4px 16px;
}

/* ============================================================
   CATEGORY TREE (.sidebar-menu.generic-category-menu)
   ============================================================ */
.sidebar_content_bottom {
    padding: 4px 0;
}

.sidebar-menu.generic-category-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* All menu items */
.sidebar-menu.generic-category-menu li {
    position: relative;
}

.sidebar-menu.generic-category-menu li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    font-size: 13.5px;
    font-weight: 450;
    color: var(--dir-text);
    text-decoration: none;
    transition: all var(--dir-transition);
    cursor: pointer;
    line-height: 1.4;
}

.sidebar-menu.generic-category-menu li > a:hover {
    background: var(--dir-hover-bg);
    color: var(--dir-accent);
}

/* Active state */
.sidebar-menu.generic-category-menu li.active > a {
    background: var(--dir-active-bg);
    color: var(--dir-accent);
    font-weight: 600;
}

.sidebar-menu.generic-category-menu li.active > a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: var(--dir-accent);
    border-radius: 0 3px 3px 0;
}

/* Icons */
.sidebar-menu.generic-category-menu li > a .cat-icon,
.sidebar-menu.generic-category-menu li > a .fa-layer-group,
.sidebar-menu.generic-category-menu li > a .fa-folder-open,
.sidebar-menu.generic-category-menu li > a .fa-circle,
.sidebar-menu.generic-category-menu li > a .fa-check-circle,
.sidebar-menu.generic-category-menu li > a .fa-shopping-bag {
    font-size: 12px;
    width: 18px;
    text-align: center;
    color: var(--dir-text-muted);
    flex-shrink: 0;
    transition: color var(--dir-transition);
}

.sidebar-menu.generic-category-menu li.active > a .cat-icon,
.sidebar-menu.generic-category-menu li.active > a .fa-layer-group,
.sidebar-menu.generic-category-menu li.active > a .fa-folder-open,
.sidebar-menu.generic-category-menu li.active > a .fa-circle,
.sidebar-menu.generic-category-menu li.active > a .fa-check-circle,
.sidebar-menu.generic-category-menu li.active > a .fa-shopping-bag {
    color: var(--dir-accent);
}

.sidebar-menu.generic-category-menu li > a:hover .cat-icon,
.sidebar-menu.generic-category-menu li > a:hover i:first-child {
    color: var(--dir-accent);
}

/* Category count badge */
.category-count {
    font-size: 11px;
    font-weight: 500;
    color: var(--dir-text-muted);
    margin-left: auto;
    white-space: nowrap;
    padding-right: 4px;
}

/* Chevron expand/collapse icon */
.chevron-icon {
    font-size: 11px !important;
    width: auto !important;
    color: var(--dir-text-muted) !important;
    transition: transform 0.25s ease, color var(--dir-transition) !important;
    margin-left: 4px;
    flex-shrink: 0;
}

.chevron-icon.chevron-up {
    transform: rotate(-180deg);
}

/* ============================================================
   NESTED LEVELS (.subbar-menu)
   ============================================================ */
.subbar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* Level 2 indent */
.sidebar-menu.generic-category-menu > li > .subbar-menu > li > a {
    padding-left: 36px;
}

/* Level 3 indent */
.sidebar-menu.generic-category-menu > li > .subbar-menu > li > .subbar-menu > li > a {
    padding-left: 52px;
}

/* Level 4 indent */
.sidebar-menu.generic-category-menu > li > .subbar-menu > li > .subbar-menu > li > .subbar-menu > li > a {
    padding-left: 68px;
}

/* Smaller circles at deeper levels */
.subbar-menu .fa-circle {
    font-size: 6px !important;
    vertical-align: middle;
}

.subbar-menu .subbar-menu .fa-circle {
    font-size: 5px !important;
}

/* ============================================================
   FILTER SECTIONS (.sidebar_content_other)
   ============================================================ */
.sidebar_content_other {
    padding: 12px 20px 16px;
}

/* ============================================================
   RANGE SLIDERS
   ============================================================ */
.range-container {
    margin-bottom: 12px;
}

.range-container label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--dir-text);
    margin-bottom: 10px;
}

.range-container input[type="range"].slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.range-container input[type="range"].slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--dir-accent);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease;
}

.range-container input[type="range"].slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.range-container input[type="range"].slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--dir-accent);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.range-container input[type="range"].slider::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
}

.range_val {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 12px;
    color: var(--dir-text-muted);
    font-weight: 500;
}

/* ============================================================
   CUSTOM FILTER DROPDOWNS (.side_filter)
   ============================================================ */
.side_filter form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.side_filter .custom-select {
    position: relative;
}

.side_filter .custom-select select {
    width: 100%;
    padding: 9px 32px 9px 12px;
    font-size: 13px;
    color: var(--dir-text);
    background: var(--dir-bg-subtle);
    border: 1px solid var(--dir-border);
    border-radius: 8px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color var(--dir-transition);
}

.side_filter .custom-select select:hover {
    border-color: #cbd5e1;
}

.side_filter .custom-select select:focus {
    border-color: var(--dir-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--dir-accent-rgb), 0.12);
}

.side_filter .custom-select .icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--dir-text-muted);
    pointer-events: none;
}

.side_filter .btn-border {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--dir-accent);
    background: transparent;
    border: 1.5px solid var(--dir-accent);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--dir-transition);
    margin-top: 2px;
}

.side_filter .btn-border:hover {
    background: var(--dir-accent);
    color: #fff;
}

/* ============================================================
   AMENITIES (reuses generic-category-menu)
   ============================================================ */
.sidebar_content_bottom .sidebar-menu li > a .fa-check-circle {
    transition: color var(--dir-transition);
}

.sidebar_content_bottom .sidebar-menu li.active > a .fa-check-circle {
    color: var(--dir-accent);
}

/* ============================================================
   SHOP TRAVERSAL — use CSS vars set inline for purple
   (shop_traversal.php sets --menu-primary:#7c3aed)
   ============================================================ */
.sidebar-menu.generic-category-menu[style*="--menu-primary"] li.active > a {
    background: rgba(var(--menu-rgb, 124, 58, 237), 0.08);
    color: var(--menu-primary, #7c3aed);
}

.sidebar-menu.generic-category-menu[style*="--menu-primary"] li.active > a::before {
    background: var(--menu-primary, #7c3aed);
}

.sidebar-menu.generic-category-menu[style*="--menu-primary"] li > a:hover {
    color: var(--menu-primary, #7c3aed);
}

.sidebar-menu.generic-category-menu[style*="--menu-primary"] li.active > a i {
    color: var(--menu-primary, #7c3aed);
}

/* ============================================================
   ACTIVE FILTER CHIPS
   ============================================================ */
.active-filters {
    padding: 8px 16px 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.active-filters:empty {
    display: none;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--dir-active-bg);
    color: var(--dir-accent);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--dir-transition);
    border: 1px solid rgba(var(--dir-accent-rgb), 0.2);
}

.filter-chip:hover {
    background: rgba(var(--dir-accent-rgb), 0.15);
}

.filter-chip .chip-remove {
    font-size: 10px;
    opacity: 0.7;
}

.filter-chip .chip-remove:hover {
    opacity: 1;
}

.clear-all-filters {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--dir-text-muted);
    cursor: pointer;
    border: none;
    background: none;
    transition: color var(--dir-transition);
}

.clear-all-filters:hover {
    color: #ef4444;
}

/* ============================================================
   SIDEBAR SKELETON LOADING
   ============================================================ */
.sidebar-skeleton {
    padding: 16px 20px;
}

.sidebar-skeleton .skel-line {
    height: 14px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skel-shimmer 1.5s ease infinite;
    border-radius: 6px;
    margin-bottom: 12px;
}

.sidebar-skeleton .skel-line:nth-child(1) { width: 60%; }
.sidebar-skeleton .skel-line:nth-child(2) { width: 85%; }
.sidebar-skeleton .skel-line:nth-child(3) { width: 70%; }
.sidebar-skeleton .skel-line:nth-child(4) { width: 90%; }
.sidebar-skeleton .skel-line:nth-child(5) { width: 55%; }
.sidebar-skeleton .skel-line:nth-child(6) { width: 75%; }

@keyframes skel-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
   SIDEBAR BREADCRUMB
   ============================================================ */
.sidebar-breadcrumb {
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--dir-text-muted);
    flex-wrap: wrap;
}

.sidebar-breadcrumb a {
    color: var(--dir-accent);
    text-decoration: none;
    cursor: pointer;
}

.sidebar-breadcrumb a:hover {
    text-decoration: underline;
}

.sidebar-breadcrumb .bc-sep {
    font-size: 10px;
    color: #cbd5e1;
}

/* ============================================================
   SIDEBAR SEARCH (filter within categories)
   ============================================================ */
.sidebar-search {
    padding: 8px 16px 4px;
}

.sidebar-search input {
    width: 100%;
    padding: 7px 12px 7px 32px;
    font-size: 12.5px;
    border: 1px solid var(--dir-border);
    border-radius: 8px;
    background: var(--dir-bg-subtle);
    color: var(--dir-text);
    transition: border-color var(--dir-transition);
}

.sidebar-search input:focus {
    border-color: var(--dir-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--dir-accent-rgb), 0.1);
}

.sidebar-search {
    position: relative;
}

.sidebar-search i {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--dir-text-muted);
    pointer-events: none;
}

/* ============================================================
   MAIN CONTENT AREA (.dictry_content)
   ============================================================ */
.dictry_content {
    flex: 1;
    min-width: 0;
}

/* ============================================================
   SEARCH BAR (.dictry_search)
   ============================================================ */
.dictry_search_meta_container {
    margin-bottom: 16px;
}

.dictry_search .search_area {
    position: relative;
}

.dictry_search .search_area .search-container,
.dictry_search .search_area .location-container {
    position: relative;
}

.dictry_search .search-container {
    display: flex;
    align-items: center;
}

.dictry_search .search-icon,
.dictry_search .search-location-dir {
    position: absolute;
    left: 12px;
    color: var(--dir-text-muted);
    font-size: 14px;
    z-index: 1;
}

.dictry_search .search-input,
.dictry_search .city_search {
    width: 100%;
    padding: 10px 14px 10px 36px;
    font-size: 14px;
    border: 1px solid var(--dir-border);
    border-radius: 8px;
    background: var(--dir-bg);
    color: var(--dir-text);
    transition: border-color var(--dir-transition);
}

.dictry_search .search-input:focus,
.dictry_search .city_search:focus {
    border-color: var(--dir-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--dir-accent-rgb), 0.1);
}

.dictry_search .custom_mobile_search {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dictry_search .custom_mobile_search .search-container {
    flex: 1;
    min-width: 140px;
}

.dictry_search .custom_mobile_search .location-container {
    flex: 1;
    min-width: 140px;
}

.dictry_search .directory_search {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--dir-accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--dir-transition);
    white-space: nowrap;
}

.dictry_search .directory_search:hover {
    background: #d9551b;
}

/* Location dropdown */
.dictry_search .dropdown.CustomDrop {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dir-bg);
    border: 1px solid var(--dir-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    z-index: 100;
    list-style: none;
    padding: 4px;
    margin-top: 4px;
    max-height: 240px;
    overflow-y: auto;
}

.dictry_search .dropdown.CustomDrop li {
    padding: 10px 12px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
    transition: background var(--dir-transition);
}

.dictry_search .dropdown.CustomDrop li:hover {
    background: var(--dir-hover-bg);
}

/* ============================================================
   META BAR (.dictry_meta)
   ============================================================ */
.dictry_meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

.dictry_meta_locat {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.dictry_meta_locat_in {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--dir-text-muted);
    padding: 6px 12px;
    border-radius: 8px;
    transition: all var(--dir-transition);
}

.dictry_meta_locat_in.blacked {
    background: var(--dir-bg-subtle);
    border: 1px solid var(--dir-border);
    cursor: pointer;
}

.dictry_meta_locat_in.blacked:hover {
    background: var(--dir-hover-bg);
    border-color: #cbd5e1;
}

.dictry_meta_locat_in.blacked.active {
    background: var(--dir-active-bg);
    border-color: var(--dir-accent);
    color: var(--dir-accent);
}

.dictry_meta_locat_in i {
    font-size: 13px;
}

/* ============================================================
   CUSTOM SORT DROPDOWN
   ============================================================ */
.custom-dropdown-wrapper {
    position: relative;
}

.custom-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    background: var(--dir-bg);
    border: 1px solid var(--dir-border);
    border-radius: 8px;
    cursor: pointer;
    color: var(--dir-text);
    transition: border-color var(--dir-transition);
    white-space: nowrap;
}

.custom-dropdown-trigger:hover {
    border-color: #cbd5e1;
}

.custom-dropdown-trigger .icon {
    font-size: 11px;
    transition: transform 0.2s ease;
}

.custom-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 180px;
    background: var(--dir-bg);
    border: 1px solid var(--dir-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    z-index: 100;
    padding: 4px;
}

.custom-dropdown-menu.show {
    display: block;
}

.custom-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
    transition: background var(--dir-transition);
    color: var(--dir-text);
}

.custom-dropdown-item:hover {
    background: var(--dir-hover-bg);
}

.custom-dropdown-item.selected {
    color: var(--dir-accent);
    font-weight: 600;
}

.custom-dropdown-item .checkmark {
    color: var(--dir-accent);
    font-weight: 600;
}

/* Filter selection wrapper */
.filter-selection {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================================
   LISTING AREA
   ============================================================ */
.listing_wrap {
    display: flex;
    gap: 20px;
}

.listing_wrap_in {
    flex: 1;
    min-width: 0;
}

.listing_ad {
    flex: 0 0 160px;
    width: 160px;
}

.listing_ad img {
    width: 100%;
    border-radius: var(--dir-radius);
}

/* Listing slider */
.listing_slider {
    margin-bottom: 16px;
    border-radius: var(--dir-radius);
    overflow: hidden;
}

.listing_slider_wrap {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.listing_slider_wrap::-webkit-scrollbar {
    display: none;
}

.listing_slider .slide_item {
    flex: 0 0 100%;
    scroll-snap-align: start;
}

.listing_slider .slide_item img {
    width: 100%;
    border-radius: var(--dir-radius);
    display: block;
}

/* ============================================================
   GRID VIEW (.griding_data)
   ============================================================ */
.griding_data {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.grid_item {
    background: var(--dir-bg);
    border: 1px solid var(--dir-border);
    border-radius: var(--dir-radius);
    overflow: hidden;
    transition: box-shadow var(--dir-transition), transform var(--dir-transition);
}

.grid_item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.grid_item_img {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.grid_item_img > a > img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.grid_item:hover .grid_item_img > a > img {
    transform: scale(1.03);
}

.grid_price {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 6px;
}

.grid_price h4 {
    margin: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.grid_img_user {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    padding: 4px 10px 4px 4px;
    border-radius: 20px;
}

.grid_img_user img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.grid_img_user h4,
.grid_img_user h5 {
    margin: 0;
    color: #fff;
    line-height: 1.2;
}

.grid_img_user h4 {
    font-size: 12px;
    font-weight: 600;
}

.grid_img_user h5 {
    font-size: 10px;
    font-weight: 400;
    opacity: 0.8;
}

.grid_img_category {
    position: absolute;
    top: 12px;
    right: 12px;
}

.grid_img_category span {
    background: var(--dir-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.grid_img_stars {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 2px;
}

.grid_img_stars i {
    color: #fbbf24;
    font-size: 12px;
}

.grid_cont {
    padding: 14px 16px 16px;
}

.grid_cont h3 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--dir-text);
    line-height: 1.4;
}

.grid_cont h3 a {
    color: inherit;
    text-decoration: none;
    transition: color var(--dir-transition);
}

.grid_cont h3 a:hover {
    color: var(--dir-accent);
}

.list_disc {
    margin-bottom: 10px;
}

.list_disc p {
    margin: 0;
    font-size: 13px;
    color: var(--dir-text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta thumbs */
.meta_thumbs {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    overflow-x: auto;
}

.meta_thumbs a img {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--dir-border);
    transition: border-color var(--dir-transition);
}

.meta_thumbs a img:hover {
    border-color: var(--dir-accent);
}

/* Service pills */
.meta_services {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.svc_pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--dir-text-muted);
    background: var(--dir-bg-subtle);
    padding: 3px 8px;
    border-radius: 4px;
}

/* Social bar */
.list_social {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--dir-border);
    margin-top: 4px;
}

.list_social_icon ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 4px;
}

.list_social_icon li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--dir-text-muted);
    transition: all var(--dir-transition);
}

.list_social_icon li a:hover {
    background: var(--dir-hover-bg);
    color: var(--dir-accent);
}

.list_social_button a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--dir-text-muted);
    text-decoration: none;
    transition: color var(--dir-transition);
}

.list_social_button a:hover {
    color: var(--dir-accent);
}

/* ============================================================
   LIST VIEW (.listing_data)
   ============================================================ */
.listing_data .listing_item_list {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--dir-border);
}

.listing_item_list .list_img {
    flex: 0 0 260px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.listing_item_list .list_img img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.listing_item_list .list_cont {
    flex: 1;
    min-width: 0;
}

.list_cont .review_tp {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.list_cont .stars i {
    color: #fbbf24;
    font-size: 12px;
}

.list_cont .list_price span {
    font-size: 12px;
    font-weight: 500;
    color: var(--dir-accent);
    background: var(--dir-active-bg);
    padding: 2px 8px;
    border-radius: 4px;
}

.list_cont h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: var(--dir-text);
}

.list_cont h3 a {
    color: inherit;
    text-decoration: none;
}

.list_cont h3 a:hover {
    color: var(--dir-accent);
}

.list_addr {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--dir-text-muted);
    margin-bottom: 6px;
}

.list_addr h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--dir-text);
}

.list_u_meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.list_user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.list_user img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.list_user h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--dir-text);
}

.list_user h5 {
    margin: 0;
    font-size: 11px;
    color: var(--dir-text-muted);
}

.list_posted h4 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--dir-text);
}

.list_posted h5 {
    margin: 0;
    font-size: 11px;
    color: var(--dir-text-muted);
}

/* ============================================================
   VISIBILITY HELPERS
   ============================================================ */
.only_desktop {
    display: block;
}
.only_mobile {
    display: none;
}
.only_desktop_flex {
    display: flex;
}
.only_mobile_flex {
    display: none;
}
.only_mobile_show {
    display: none;
}
.only_for_desktop_show {
    display: block;
}

/* ============================================================
   MOBILE SIDEBAR OVERLAY + BACKDROP
   ============================================================ */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
    display: block;
    opacity: 1;
}

/* ============================================================
   FOCUS-VISIBLE (accessibility)
   ============================================================ */
.sidebar-menu.generic-category-menu li > a:focus-visible,
.dictry_cate > ul > li > a:focus-visible,
.side_filter select:focus-visible,
.side_filter .btn-border:focus-visible,
.dictry_meta_locat_in.blacked:focus-visible,
.custom-dropdown-trigger:focus-visible,
.sidebar-search input:focus-visible {
    outline: 2px solid var(--dir-accent);
    outline-offset: -2px;
    border-radius: 6px;
}

/* ============================================================
   RESPONSIVE: TABLET (768–1024)
   ============================================================ */
@media (max-width: 1024px) and (min-width: 769px) {
    .d_sidebar {
        flex: 0 0 240px;
        width: 240px;
        min-width: 240px;
    }

    .griding_data {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .listing_ad {
        display: none;
    }
}

/* ============================================================
   RESPONSIVE: MOBILE (< 768px)
   ============================================================ */
@media (max-width: 768px) {
    /* Layout stacks */
    .dictry_wrap.flex-container {
        flex-direction: column;
        gap: 0;
    }

    /* Sidebar becomes slide-in panel */
    .d_sidebar {
        position: fixed;
        top: 0;
        left: -320px;
        width: 300px;
        min-width: 300px;
        height: 100vh;
        max-height: 100vh;
        z-index: 1050;
        background: var(--dir-bg);
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
        overflow-y: auto;
        padding-bottom: 40px;
    }

    .d_sidebar.open {
        left: 0;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    }

    .d_sidebar .sidebar_content {
        border: none;
        border-radius: 0;
    }

    /* Show mobile close button */
    .d_sidebar .sideCloseIcon {
        display: flex;
        justify-content: flex-end;
        padding: 12px 16px 0;
    }

    .d_sidebar .sideCloseIcon a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: var(--dir-bg-subtle);
        color: var(--dir-text);
        font-size: 16px;
        text-decoration: none;
        transition: background var(--dir-transition);
    }

    .d_sidebar .sideCloseIcon a:hover {
        background: var(--dir-hover-bg);
    }

    /* Module tabs — show close, horizontal scroll */
    .dictry_cate {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .dictry_cate .sideCloseIcon {
        display: none;
    }

    .dictry_cate > ul > li {
        flex-wrap: nowrap;
    }

    /* Show mobile buttons */
    .only_mobile {
        display: block;
    }
    .only_desktop {
        display: none;
    }
    .only_mobile_flex {
        display: flex;
    }
    .only_desktop_flex {
        display: none;
    }
    .only_mobile_show {
        display: flex;
    }
    .only_for_desktop_show {
        display: none;
    }

    /* Content area full-width */
    .dictry_content {
        width: 100%;
    }

    /* Search bar stacks */
    .dictry_search .custom_mobile_search {
        flex-direction: column;
    }

    .dictry_search .custom_mobile_search .search-container,
    .dictry_search .custom_mobile_search .location-container {
        min-width: 100%;
    }

    /* Grid smaller */
    .griding_data {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .grid_cont {
        padding: 10px 12px 12px;
    }

    .grid_cont h3 {
        font-size: 13.5px;
    }

    /* List view stacks */
    .listing_data .listing_item_list {
        flex-direction: column;
    }

    .listing_item_list .list_img {
        flex: none;
        width: 100%;
    }

    .listing_item_list .list_img img {
        height: 200px;
        width: 100%;
    }

    /* Ad column hidden */
    .listing_ad {
        display: none;
    }

    /* Mobile filter row */
    .dictry_meta_locat.only_mobile_flex {
        gap: 6px;
        padding: 8px 0;
    }

    .dictry_meta_locat_in.add-flex-grow-property {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }

    .dictry_meta_locat_in.add-flex-grow-property span {
        font-size: 12px;
    }

    /* Mobile location row */
    .mobile_row_3 {
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .mobile_location_fields {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }

    .mobile_right_controls {
        display: flex;
        gap: 6px;
        align-items: center;
    }

    /* Sort dropdown sizing */
    .larger_mobile_screen {
        display: none;
    }

    .smaller_mobile_screen {
        display: block;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .larger_mobile_screen {
        display: none;
    }
    .smaller_mobile_screen {
        display: none;
    }
}

@media (min-width: 460px) and (max-width: 768px) {
    .larger_mobile_screen {
        display: block;
    }
    .smaller_mobile_screen {
        display: none;
    }
}

@media (max-width: 459px) {
    .larger_mobile_screen {
        display: none;
    }
    .smaller_mobile_screen {
        display: block;
    }
}

/* ============================================================
   SKELETON CARDS (already used, ensure styled)
   ============================================================ */
.skelWrap {
    padding: 20px 0;
}

/* Shimmer animation for skeletons */
@keyframes shimmer-dir {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.shimmer,
.shimmerl {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
    background-size: 400% 100%;
    animation: shimmer-dir 1.4s ease infinite;
}

/* Grid skeleton */
.skeleton-card-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.skeleton-card {
    background: var(--dir-bg);
    border: 1px solid var(--dir-border);
    border-radius: var(--dir-radius);
    overflow: hidden;
    padding-bottom: 16px;
}

.skeleton-card-image {
    width: 100%;
    height: 180px;
    border-radius: 0;
}

.skeleton-card-price {
    width: 80px;
    height: 24px;
    margin: 12px 16px 0;
    border-radius: 4px;
}

.skeleton-card-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
}

.skeleton-card-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-card-agent-details {
    flex: 1;
}

.skeleton-card-agent-name {
    width: 80px;
    height: 12px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.skeleton-card-agent-type {
    width: 50px;
    height: 10px;
    border-radius: 4px;
}

.skeleton-card-badge {
    width: 50px;
    height: 20px;
    border-radius: 10px;
}

.skeleton-card-title {
    width: 70%;
    height: 16px;
    margin: 0 16px 8px;
    border-radius: 4px;
}

.skeleton-card-description {
    width: 90%;
    height: 12px;
    margin: 0 16px 6px;
    border-radius: 4px;
}

.skeleton-card-description.short {
    width: 60%;
}

.skeleton-card-attributes {
    display: flex;
    gap: 8px;
    padding: 6px 16px;
}

.skeleton-card-attribute {
    width: 60px;
    height: 14px;
    border-radius: 4px;
}

.skeleton-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px 0;
}

.skeleton-card-icons {
    display: flex;
    gap: 8px;
}

.skeleton-card-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.skeleton-card-share {
    width: 60px;
    height: 24px;
    border-radius: 4px;
}

/* List skeleton */
.card-loader-container {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--dir-border);
}

.card-loader-image {
    width: 260px;
    height: 180px;
    border-radius: 8px;
    flex-shrink: 0;
}

.card-loader-content {
    flex: 1;
}

.card-loader-badge {
    width: 80px;
    height: 20px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.card-loader-title {
    width: 60%;
    height: 18px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.card-loader-location {
    width: 40%;
    height: 14px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.card-loader-text {
    width: 90%;
    height: 12px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.card-loader-text.short {
    width: 60%;
}

.card-loader-icons {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

.card-loader-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.card-loader-button {
    width: 70px;
    height: 28px;
    border-radius: 4px;
    margin-left: auto;
}

/* ============================================================
   PRINT: hide sidebar
   ============================================================ */
@media print {
    .d_sidebar,
    .sidebar-backdrop,
    .dictry_cate {
        display: none !important;
    }
    .dictry_content {
        width: 100% !important;
    }
}
