/* ============================================================
   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;
    margin-top: -21px;
}

/* ============================================================
   SIDEBAR HEADER (.sidebar_content_top)
   ============================================================ */
.sidebar_content_top {
    padding: 16px 20px 12px;
    cursor: pointer;
    transition: background var(--dir-transition);
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    border-radius: 0;
}

.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;
    position: relative;
}

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

/* Suppress hover bg on already-active items so it doesn't fight the tinted surface */
.sidebar-menu.generic-category-menu li.active > a:hover,
.sidebar-menu.generic-category-menu li.active-ancestor > a:hover {
    background: inherit;
}

/* Active state (selected leaf) — clear "you are here" emphasis */
.sidebar-menu.generic-category-menu li.active > a,
.sidebar-menu.generic-category-menu .subbar-menu li.active > a,
.sidebar-menu.generic-category-menu .subbar-menu .subbar-menu li.active > a,
.sidebar-menu.generic-category-menu .subbar-menu .subbar-menu .subbar-menu li.active > a {
    background: rgba(242,97,34,0.12) !important;
    color: var(--menu-primary) !important;
    font-weight: 600 !important;
    border-left: 3px solid #e8590c !important;
    border-radius: 0 6px 6px 0 !important;
}

/* 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,
.sidebar-menu.generic-category-menu .subbar-menu li.active > a i,
.sidebar-menu.generic-category-menu .subbar-menu .subbar-menu li.active > a i {
    color: #d97706 !important;
}

.sidebar-menu.generic-category-menu li.active > a span,
.sidebar-menu.generic-category-menu .subbar-menu li.active > a span {
    color: var(--menu-primary) !important;
}

.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);
}

/* Active ancestor state — parent/grandparent in the path (subordinate to leaf) */
.sidebar-menu.generic-category-menu li.active-ancestor > a,
.sidebar-menu.generic-category-menu .subbar-menu li.active-ancestor > a {
    background: rgba(242,97,34,0.04) !important;
    color: #c2410c !important;
    font-weight: 450 !important;
    border-left: 2px solid rgba(242,97,34,0.2) !important;
    border-radius: 0 6px 6px 0 !important;
}

.sidebar-menu.generic-category-menu li.active-ancestor > a .cat-icon,
.sidebar-menu.generic-category-menu li.active-ancestor > a .fa-layer-group,
.sidebar-menu.generic-category-menu li.active-ancestor > a .fa-folder-open,
.sidebar-menu.generic-category-menu li.active-ancestor > a .fa-circle {
    color: rgba(242,97,34,0.5) !important;
}

.sidebar-menu.generic-category-menu li.active-ancestor > a .chevron-icon {
    color: var(--dir-accent) !important;
}

/* Override style.css expanded-parent gradient — ancestor uses ancestor values, not leaf */
.sidebar-menu.generic-category-menu > li.active-ancestor.has-menu > a,
.sidebar-menu.generic-category-menu > li.has-menu.active-ancestor:has(> .subbar-menu[style*="block"]) > a {
    border-left: 2px solid rgba(242,97,34,0.2) !important;
    background: rgba(242,97,34,0.04) !important;
}
.sidebar-menu.generic-category-menu > li.active.has-menu > a,
.sidebar-menu.generic-category-menu > li.has-menu.active:has(> .subbar-menu[style*="block"]) > a {
    border-left: 3px solid #e8590c !important;
    background: rgba(242,97,34,0.12) !important;
}

/* Active leaf count badge */
.sidebar-menu.generic-category-menu li.active > a .category-count {
    background: var(--dir-accent) !important;
    color: #fff !important;
    font-weight: 600 !important;
}

/* Active ancestor count badge — muted */
.sidebar-menu.generic-category-menu li.active-ancestor > a .category-count {
    background: rgba(var(--dir-accent-rgb), 0.15) !important;
    color: var(--dir-accent) !important;
}

/* 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.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease !important;
    margin-left: 4px;
    flex-shrink: 0;
}

.chevron-icon.chevron-up {
    transform: rotate(-180deg);
    color: rgba(242,97,34,0.5) !important;
}

/* ============================================================
   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.12) !important;
    color: var(--menu-primary, #7c3aed) !important;
    border-left: 4px solid var(--menu-primary, #7c3aed) !important;
}

.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) !important;
}

/* ============================================================
   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: 10px 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--dir-text-muted);
    flex-wrap: wrap;
    background: rgba(var(--dir-accent-rgb), 0.015);
    border-bottom: 1px solid rgba(var(--dir-accent-rgb), 0.06);
}

.sidebar-breadcrumb a {
    color: var(--dir-text-muted);
    text-decoration: none;
    cursor: pointer;
    font-weight: 450;
    transition: color var(--dir-transition);
}

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

/* Current (last) breadcrumb item — warm accent emphasis */
.sidebar-breadcrumb span:last-child a {
    color: var(--menu-primary);
    font-weight: 600;
}

.sidebar-breadcrumb .bc-sep {
    font-size: 10px;
    color: rgba(var(--dir-accent-rgb), 0.3);
}

/* ============================================================
   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) — Premium polish
   ============================================================ */
.dictry_search_meta_container {
    margin-bottom: 10px;
}

/* --- Unified search toolbar --- */
.dictry_search .search_area {
    position: relative;
    border: 1px solid #e2e0dc !important;
    border-radius: 12px !important;
    background: #faf9f7 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 2px 8px rgba(242,97,34,0.04) !important;
    height: 44px !important;
    overflow: visible !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dictry_search .search_area:focus-within {
    border-color: rgba(242,97,34,0.4) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 2px 12px rgba(242,97,34,0.1) !important;
}

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

.dictry_search .search-container {
    display: flex;
    align-items: center;
    border-bottom: none !important;
}

/* --- Icons --- */
.dictry_search .search-icon,
.dictry_search .search-location-dir {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9c9488 !important;
    font-size: 15px !important;
    z-index: 1;
    pointer-events: none;
    transition: color 0.2s;
}

/* Icon warms up when its input is focused */
.dictry_search .search-container:focus-within .search-icon,
.dictry_search .location-container:focus-within .search-location-dir {
    color: var(--org) !important;
}

/* --- Inputs --- */
.dictry_search .search-input,
.dictry_search .city_search {
    width: 100% !important;
    padding: 0 14px 0 40px !important;
    font-size: 14px !important;
    font-family: "DM Sans", sans-serif !important;
    font-weight: 400 !important;
    letter-spacing: 0.2px !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #1e1b18 !important;
    height: 42px !important;
    line-height: 42px !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: none !important;
}

.dictry_search .search-input::placeholder,
.dictry_search .city_search::placeholder {
    color: #a8a29e !important;
    font-weight: 400 !important;
    font-size: 13.5px !important;
}

/* Remove per-input focus glow (toolbar border handles it) */
.dictry_search .search-input:focus,
.dictry_search .city_search:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

/* --- Divider between keyword and location --- */
.dictry_search .search_area .location-container {
    border-left: 1px solid #e2e0dc !important;
}

/* --- Search toolbar layout (overrides style.css custom_mobile_search) --- */
.dictry_search .custom_mobile_search {
    display: flex !important;
    gap: 0 !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
}

.dictry_search .custom_mobile_search .search-container {
    flex: 1 1 46% !important;
    min-width: 120px;
    border-radius: 12px 0 0 12px !important;
    overflow: hidden !important;
}

.dictry_search .custom_mobile_search .location-container {
    flex: 1 1 34% !important;
    min-width: 100px;
    overflow: hidden !important;
}

/* --- Search button — premium CTA --- */
.dictry_search .search_area .directory_search,
.search_area.custom_mobile_search .directory_search,
.dictry_search .search_area.custom_mobile_search .directory_search,
.dictry_content .search_area.custom_mobile_search .directory_search {
    flex: 0 0 auto !important;
    min-width: 96px !important;
    padding: 0 20px !important;
    height: 44px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    font-family: "DM Sans", sans-serif !important;
    letter-spacing: 0.4px !important;
    color: #fff !important;
    background: linear-gradient(135deg, #f26122 0%, #e8590c 100%) !important;
    border: none !important;
    border-radius: 0 12px 12px 0 !important;
    cursor: pointer !important;
    position: static !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    transition: background 0.2s, box-shadow 0.2s !important;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,0.08) !important;
}

.dictry_search .search_area .directory_search:hover,
.search_area.custom_mobile_search .directory_search:hover,
.dictry_search .search_area.custom_mobile_search .directory_search:hover,
.dictry_content .search_area.custom_mobile_search .directory_search:hover {
    background: linear-gradient(135deg, #e8590c 0%, #d4550a 100%) !important;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,0.08), 0 2px 8px rgba(242,97,34,0.25) !important;
}

.dictry_search .search_area .directory_search:active,
.search_area.custom_mobile_search .directory_search:active {
    background: #d4550a !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.15) !important;
    transform: translateY(0);
}

.dictry_search .search_area .directory_search:focus-visible,
.search_area.custom_mobile_search .directory_search:focus-visible {
    outline: 2px solid var(--org) !important;
    outline-offset: 2px !important;
}

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

.dictry_search .dropdown.CustomDrop li {
    padding: 10px 14px;
    font-size: 13px;
    font-family: "DM Sans", sans-serif;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s;
    color: #44403c;
}

.dictry_search .dropdown.CustomDrop li:hover {
    background: rgba(242,97,34,0.06);
    color: #1e1b18;
}

/* ============================================================
   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;
    margin-right: 6px;
}

.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: var(--dir-accent);
    background: rgba(242,97,34,0.06);
    color: var(--dir-accent);
}

.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;
}

/* Flex wrap utility (used on mobile filter row) */
.flex-wrap-property {
    flex-wrap: wrap;
}

/* ============================================================
   LISTING AREA
   ============================================================ */
.listing_wrap {
    display: flex;
    gap: 16px;
    margin-top: 0;
    align-items: flex-start;
}

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

/* Legacy .listing_ad — kept for backward compat, prefer .ad-rail */
.listing_ad {
    flex: 0 0 180px;
    width: 180px;
}

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

/* ============================================================
   AD RAIL — Reusable vertical ad column
   3 states: live (uploaded), demo (sample), empty (CSS placeholder)
   Standard slot sizes:
     Stacked: 200×300 each (two per rail, IAB half-page inspired)
     Tall:    200×600 single (IAB wide skyscraper)
   ============================================================ */
.ad-rail {
    flex: 0 0 180px;
    width: 180px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 90px;
    align-self: flex-start;
}

/* --- Slot container (shared) --- */
.ad-rail__slot {
    position: relative;
    border-radius: var(--dir-radius);
    overflow: hidden;
    transition: box-shadow var(--dir-transition), transform var(--dir-transition);
}

/* Stacked layout: each slot is ~200×200 (1:1 compact) */
.ad-rail--stacked .ad-rail__slot {
    aspect-ratio: 1 / 1;
}

/* Tall layout: single slot is 200×400 (1:2 ratio) */
.ad-rail--tall .ad-rail__slot {
    aspect-ratio: 1 / 2;
}

/* --- Live ad state --- */
.ad-rail__slot--live {
    background: var(--dir-bg-subtle);
    border: 1px solid var(--dir-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.ad-rail__slot--live:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.ad-rail__link {
    display: block;
    width: 100%;
    height: 100%;
}

.ad-rail__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ad-rail__badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--dir-text-muted);
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 2px 7px;
    border-radius: 4px;
    line-height: 1.4;
    z-index: 2;
}

/* --- Empty/placeholder state --- */
.ad-rail__slot--empty {
    background: linear-gradient(175deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1.5px dashed var(--dir-border);
}

.ad-rail__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 16px 12px;
    text-align: center;
    gap: 5px;
}

.ad-rail__placeholder-icon {
    color: #cbd5e1;
    opacity: 0.7;
    margin-bottom: 4px;
}

.ad-rail__placeholder-text {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.01em;
}

.ad-rail__placeholder-sub {
    font-size: 11px;
    color: #cbd5e1;
    line-height: 1.3;
}

/* Subtle shimmer on empty slot — feels alive, not dead space */
.ad-rail__slot--empty::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        transparent 30%,
        rgba(255,255,255,0.4) 50%,
        transparent 70%
    );
    background-size: 200% 100%;
    animation: ad-rail-shimmer 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes ad-rail-shimmer {
    0%, 100% { background-position: 200% 0; }
    50% { background-position: -200% 0; }
}

/* --- Demo ad state (same as live but with demo overlay) --- */
.ad-rail__slot--demo {
    background: var(--dir-bg-subtle);
    border: 1px solid var(--dir-border);
    opacity: 0.85;
}

.ad-rail__slot--demo::before {
    content: 'SAMPLE';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: rgba(100,116,139,0.2);
    z-index: 2;
    pointer-events: none;
}

/* ============================================================
   EMPTY STATE — "No listings found" card
   Compact, intentional, balanced with ad rail height
   ============================================================ */
.dir-empty-state {
    padding: 0;
}

.dir-empty-state__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px 20px 18px;
    min-height: 0;
    background: #f9fafb;
    border: 1px solid var(--dir-border);
    border-radius: var(--dir-radius);
    gap: 4px;
}

.dir-empty-state__icon {
    color: #c1c9d4;
    margin-bottom: 2px;
    line-height: 1;
}

.dir-empty-state__icon svg {
    width: 24px;
    height: 24px;
}

.dir-empty-state__title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    letter-spacing: 0.01em;
}

.dir-empty-state__text {
    margin: 0;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
}

/* --- Load More button --- */
.dir-load-more {
    text-align: center;
    padding: 16px 0 4px;
}

.dir-load-more__btn {
    padding: 9px 32px;
    border-radius: 8px;
    border: 1px solid var(--dir-border);
    background: var(--dir-bg);
    color: #475569;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: border-color var(--dir-transition), box-shadow var(--dir-transition), color var(--dir-transition);
}

.dir-load-more__btn:hover {
    border-color: #cbd5e1;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    color: var(--dir-text);
}

/* --- Stage-to-content spacing tighten when empty --- */
.page-directory .listing_slider + .dir-empty-state {
    padding-top: 0;
}

/* --- Mobile empty state --- */
@media (max-width: 768px) {
    .dir-empty-state__card {
        padding: 16px 14px 14px;
        min-height: 0;
    }

    .dir-empty-state__title {
        font-size: 13px;
    }

    .dir-empty-state__text {
        font-size: 11px;
    }
}

/* ==========================================================
   AD STAGE — Premium media frame
   Hosts: img, video, iframe, future slider/carousel
   Scoped to .page-directory .listing_slider
   ========================================================== */

/* ==========================================================
   DIR STAGE — Carousel + Featured Vendor side-by-side
   ========================================================== */
.page-directory .dir-stage {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    align-items: stretch;
}

.page-directory .dir-stage .listing_slider {
    margin-bottom: 0; /* stage owns the margin now */
}

/* ==========================================================
   FEATURED VENDOR CARD — Premium Spotlight / Fallback CTA
   Sits beside carousel in .dir-stage
   ========================================================== */
.fv-card {
    flex: 0 0 180px;
    width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    padding: 14px 10px;
    border-radius: var(--dir-radius, 14px);
    background: #fffffe;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow:
        0 1px 2px rgba(0,0,0,0.03),
        0 4px 16px rgba(0,0,0,0.04),
        0 12px 32px rgba(0,0,0,0.02);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Warm corner glow — top-right accent wash */
.fv-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 90px;
    height: 90px;
    background: radial-gradient(circle, rgba(249,115,22,0.07) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Subtle bottom sheen line */
.fv-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(249,115,22,0.15) 50%, transparent 100%);
    border-radius: 1px;
    pointer-events: none;
}

.fv-card:hover {
    box-shadow:
        0 2px 4px rgba(0,0,0,0.04),
        0 8px 24px rgba(0,0,0,0.06),
        0 16px 40px rgba(0,0,0,0.03);
    transform: translateY(-2px);
}

/* --- Header badge --- */
.fv-card__header {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
}

.fv-card__badge {
    display: inline-block;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #c2410c;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    padding: 2.5px 8px;
    border-radius: 20px;
    line-height: 1.5;
    border: 1px solid rgba(194,65,12,0.08);
}

.fv-card__badge--cta {
    color: #6d28d9;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-color: rgba(109,40,217,0.08);
}

/* --- Avatar --- */
.fv-card__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2.5px solid #fff;
    box-shadow:
        0 1px 3px rgba(0,0,0,0.06),
        0 4px 8px rgba(0,0,0,0.04),
        0 0 0 1px rgba(0,0,0,0.03);
    position: relative;
    z-index: 1;
}

.fv-card__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fv-card__avatar-initial {
    font-size: 19px;
    font-weight: 800;
    color: #ea580c;
    line-height: 1;
    letter-spacing: -0.01em;
}

.fv-card__avatar-icon {
    color: #94a3b8;
}

/* --- Content --- */
.fv-card__name {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.25;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
}

.fv-card__tier {
    font-size: 9.5px;
    font-weight: 700;
    color: #c2410c;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    padding: 2px 9px;
    border-radius: 20px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    border: 1px solid rgba(194,65,12,0.06);
}

.fv-card__stat {
    font-size: 11px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
    font-weight: 500;
}

.fv-card__stat svg {
    opacity: 0.5;
}

.fv-card__desc {
    font-size: 11px;
    color: #64748b;
    line-height: 1.45;
    margin: 0;
    padding: 0 6px;
    font-weight: 450;
}

/* --- Button --- */
.fv-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(140deg, #f97316 0%, #ea580c 60%, #dc2626 140%);
    padding: 5px 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.25s ease;
    margin-top: 2px;
    line-height: 1.3;
    letter-spacing: 0.01em;
    box-shadow:
        0 1px 3px rgba(234,88,12,0.2),
        0 4px 8px rgba(234,88,12,0.1);
    position: relative;
    z-index: 1;
}

.fv-card__btn:hover {
    background: linear-gradient(140deg, #ea580c 0%, #dc2626 60%, #b91c1c 140%);
    transform: translateY(-1.5px);
    color: #fff;
    text-decoration: none;
    box-shadow:
        0 2px 6px rgba(234,88,12,0.25),
        0 8px 16px rgba(234,88,12,0.12);
}

.fv-card__btn:focus-visible {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

.fv-card__btn--cta {
    background: linear-gradient(140deg, #7c3aed 0%, #6d28d9 60%, #5b21b6 140%);
    box-shadow:
        0 1px 3px rgba(109,40,217,0.2),
        0 4px 8px rgba(109,40,217,0.1);
}

.fv-card__btn--cta:hover {
    background: linear-gradient(140deg, #6d28d9 0%, #5b21b6 60%, #4c1d95 140%);
    box-shadow:
        0 2px 6px rgba(109,40,217,0.25),
        0 8px 16px rgba(109,40,217,0.12);
}

.fv-card__btn--cta:focus-visible {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .fv-card {
        flex: 0 0 160px;
        width: 160px;
    }
}

@media (max-width: 768px) {
    .page-directory .dir-stage {
        flex-direction: column;
    }
    .fv-card {
        flex: none;
        width: 100%;
        flex-direction: row;
        padding: 10px 14px;
        gap: 10px;
        text-align: left;
        justify-content: flex-start;
        border-radius: var(--dir-radius, 14px);
    }
    .fv-card::before {
        display: none;
    }
    .fv-card::after {
        display: none;
    }
    .fv-card__header {
        position: absolute;
        top: 6px;
        right: 8px;
        left: auto;
    }
    .fv-card__avatar {
        width: 40px;
        height: 40px;
    }
    .fv-card__name {
        font-size: 13px;
        white-space: normal;
    }
    .fv-card__desc,
    .fv-card__tier,
    .fv-card__stat {
        display: none;
    }
}

@media (max-width: 480px) {
    .fv-card {
        padding: 8px 12px;
    }
}

/* --- Outer stage frame --- */
.page-directory .listing_slider {
    flex: 1;
    min-width: 0;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(160deg, #2c2926 0%, #1a1816 100%);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow:
        0 1px 2px rgba(0,0,0,0.06),
        0 4px 12px rgba(0,0,0,0.06);
    aspect-ratio: 4 / 1;
    min-height: 100px;
    max-height: 180px;
}

/* --- Media track (scroll container for slides) --- */
.page-directory .listing_slider_wrap {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    height: 100%;
}

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

/* --- Individual slide --- */
.page-directory .listing_slider .slide_item {
    position: relative;
    flex: 0 0 100%;
    scroll-snap-align: start;
    height: 100%;
}

/* --- Link wrapper (must be block to pass height to img) --- */
.page-directory .listing_slider .slide_item a {
    display: block;
    width: 100%;
    height: 100%;
}

/* --- Media layer: img --- */
.page-directory .listing_slider .slide_item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

/* --- Media layer: video --- */
.page-directory .listing_slider .slide_item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- Media layer: iframe (YouTube / embed) --- */
.page-directory .listing_slider .slide_item iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* --- Overlay gradient (bottom, for future text/CTA) --- */
.page-directory .listing_slider .ad-stage-overlay {
    position: absolute;
    inset: auto 0 0 0;
    height: 40%;
    background: linear-gradient(to top, rgba(26,24,22,0.55) 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
    border-radius: 0 0 20px 20px;
}

/* --- Sponsored badge (future) --- */
.page-directory .listing_slider .ad-stage-badge {
    position: absolute;
    top: 12px;
    left: 14px;
    z-index: 3;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    font-family: "DM Sans", sans-serif;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.9);
    background: rgba(30,27,24,0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    line-height: 1;
}

/* --- Dot indicators (future carousel) --- */
.page-directory .listing_slider .ad-stage-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 6px;
    padding: 4px 8px;
    background: rgba(30,27,24,0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 10px;
}

.page-directory .listing_slider .ad-stage-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.page-directory .listing_slider .ad-stage-dot.active,
.page-directory .listing_slider .ad-stage-dot:hover {
    background: rgba(255,255,255,0.92);
    transform: scale(1.2);
}

/* --- Arrow buttons (future carousel) --- */
.page-directory .listing_slider .ad-stage-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30,27,24,0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: rgba(255,255,255,0.88);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    opacity: 0;
    transition: opacity 0.25s, background 0.2s;
}

.page-directory .listing_slider:hover .ad-stage-arrow {
    opacity: 1;
}

.page-directory .listing_slider .ad-stage-arrow:hover {
    background: rgba(30,27,24,0.65);
}

.page-directory .listing_slider .ad-stage-arrow--prev {
    left: 12px;
}

.page-directory .listing_slider .ad-stage-arrow--next {
    right: 12px;
}

/* --- Subtle inner highlight (top edge) --- */
.page-directory .listing_slider::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 10%, rgba(255,255,255,0.08) 50%, transparent 90%);
    z-index: 4;
    pointer-events: none;
}

/* ==========================================================
   AD STAGE — Responsive
   ========================================================== */

@media (max-width: 1024px) {
    .page-directory .listing_slider {
        aspect-ratio: 4 / 1;
        max-height: 160px;
        border-radius: 14px;
    }
    .page-directory .listing_slider .ad-stage-overlay {
        border-radius: 0 0 14px 14px;
    }
}

@media (max-width: 768px) {
    .page-directory .listing_slider {
        aspect-ratio: 3 / 1;
        max-height: 140px;
        border-radius: 12px;
        margin-bottom: 10px;
    }
    .page-directory .listing_slider .ad-stage-overlay {
        border-radius: 0 0 12px 12px;
    }
    .page-directory .listing_slider .ad-stage-arrow {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
    .page-directory .listing_slider .ad-stage-badge {
        font-size: 10px;
        top: 8px;
        left: 10px;
    }
}

@media (max-width: 480px) {
    .page-directory .listing_slider {
        aspect-ratio: 3 / 1;
        max-height: 120px;
        border-radius: 10px;
    }
    .page-directory .listing_slider .ad-stage-overlay {
        border-radius: 0 0 10px 10px;
    }
    .page-directory .listing_slider .ad-stage-dots {
        bottom: 6px;
        gap: 4px;
    }
    .page-directory .listing_slider .ad-stage-arrow {
        display: none;
    }
}

/* ============================================================
   GRID VIEW (.griding_data)
   ============================================================ */
   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
   Z-index scheme:
     1040 = backdrop
     1050 = sidebar (.d_sidebar.open) and category bar (.dictry_cate.open)
     Site header/nav should be ≤ 1030 to stay below these
   ============================================================ */
.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;
    -webkit-tap-highlight-color: transparent;
}

.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;
    }


    .listing_ad,
    .ad-rail {
        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 — horizontal scroll on mobile */
    .dictry_cate {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .dictry_cate .sideCloseIcon {
        display: none;
    }

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

    /* Category bar slide-in (matches sidebar pattern) */
    .dictry_cate.open {
        position: fixed;
        top: 0;
        left: 0;
        width: 300px;
        height: 100vh;
        z-index: 1050;
        background: var(--dir-bg);
        border: none;
        border-radius: 0;
        padding: 16px 12px;
        overflow-y: auto;
        overflow-x: hidden;
        white-space: normal;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
        margin-bottom: 0;
    }

    .dictry_cate.open .sideCloseIcon {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 8px;
    }

    .dictry_cate.open .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;
    }

    .dictry_cate.open > ul > li {
        flex-wrap: wrap;
        gap: 6px;
    }

    .dictry_cate.open > ul > li > a {
        flex: 1 0 calc(50% - 4px);
        justify-content: center;
        padding: 10px 12px;
    }

    /* 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 */


    /* Ad column hidden */
    .listing_ad,
    .ad-rail {
        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;
    }
}
