/* Custom Notification Styles */
.custom-notif-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 10000; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.custom-notif-overlay.active { opacity: 1; pointer-events: auto; }
.custom-notif-box { background: #fff; padding: 30px; border-radius: 12px; text-align: center; max-width: 400px; width: 90%; transform: scale(0.8); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.custom-notif-overlay.active .custom-notif-box { transform: scale(1); }
.custom-notif-icon { width: 60px; height: 60px; border: 3px solid #28a745; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; color: #28a745; font-size: 30px; }
.custom-notif-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; color: #333; }
.custom-notif-text { font-size: 0.95rem; color: #666; margin-bottom: 25px; }
.custom-notif-btn { background: #007bff; color: #fff; border: none; padding: 10px 30px; border-radius: 6px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.custom-notif-btn:hover { background: #0056b3; }
.price-stats-section { margin: 32px 0 8px; padding: 0; }
.price-stats-title { margin: 0 0 8px; color: #1f2937; font-size: clamp(1.35rem, 2vw, 1.85rem); line-height: 1.25; font-weight: 800; padding: 0; }
.price-stats-subtitle { margin: 0 0 16px; color: #5b6473; font-size: 0.95rem; line-height: 1.6; padding: 0; }
.table-container.price-stats-table-wrap { width: 100%; margin: 0; overflow: hidden; background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%); border-radius: 16px; border: 1px solid #dbe5f0; box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06); }
.table-container.price-stats-table-wrap table { width: 100%; border-collapse: collapse; margin-bottom: 0; }
.table-container.price-stats-table-wrap caption { padding: 18px 20px 8px; text-align: left; font-weight: 700; color: #334155; caption-side: top; }
.table-container.price-stats-table-wrap th,
.table-container.price-stats-table-wrap td { padding: 14px 18px; text-align: left; border-bottom: 1px solid #e8eef5; vertical-align: middle; }
.table-container.price-stats-table-wrap thead th { background: #f3f7fb; font-weight: 800; color: #475569; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; }
.table-container.price-stats-table-wrap tbody tr:hover { background: #f8fbff; }
.table-container.price-stats-table-wrap tbody tr:last-child td { border-bottom: none; }
.table-container.price-stats-table-wrap td { font-size: 0.95rem; color: #475569; line-height: 1.5; }
.price-type-cell { min-width: 260px; }
.price-type-name { display: block; font-size: 1rem; font-weight: 800; color: #18212f; margin-bottom: 4px; }
.price-type-note { display: block; font-size: 0.84rem; color: #6b7280; }
.price-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 112px; padding: 7px 12px; border-radius: 999px; background: #eef6ff; color: #1d4ed8; font-weight: 700; white-space: nowrap; }
.price-chip.price-chip-range { background: #ecfdf3; color: #15803d; min-width: 170px; }
.price-chip.price-chip-count { background: #fff7ed; color: #c2410c; min-width: 84px; }
.legacy-price-stats { display: none; }
@media (max-width: 768px) {
    .price-stats-section { margin-top: 20px; }
    .price-stats-title { font-size: 1.15rem; }
    .price-stats-subtitle { font-size: 0.8rem; margin-bottom: 12px; }
    .table-container.price-stats-table-wrap caption { display: none; }
}

/* Sidebar List Styles */
.sidebar-sub-list, .sidebar-cat-list {
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    margin: 0;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.sidebar-sub-list::-webkit-scrollbar, .sidebar-cat-list::-webkit-scrollbar {
    width: 4px;
}
.sidebar-sub-list::-webkit-scrollbar-thumb, .sidebar-cat-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.sidebar-sub-list li a, .sidebar-cat-list li a {
    display: flex;
    align-items: center;
    color: #475569;
    text-decoration: none;
    font-size: 0.88rem;
    padding: 8px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.sidebar-sub-list li a:hover, .sidebar-cat-list li a:hover {
    background: #f8fafc;
    color: #3b82f6;
    border-color: #e2e8f0;
    padding-left: 14px;
}
.sidebar-sub-list li a.selected, .sidebar-cat-list li a.selected {
    background: #eff6ff !important;
    color: #2563eb !important;
    font-weight: 700;
    border-color: #dbeafe !important;
    padding-left: 12px;
}
.sidebar-sub-list li a.selected::before {
    content: "•";
    margin-right: 8px;
    color: #2563eb;
}



/* Pagination Styles */
.pagination-rounded .page-link {
    border-radius: 8px !important;
    margin: 0 3px;
    border: 1px solid #dfe5ef;
    color: #475569;
    font-weight: 700;
    padding: 8px 15px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.pagination-rounded .page-item.active .page-link {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
.pagination-rounded .page-link:hover:not(.active) {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}
@media (max-width: 576px) {
    .pagination-rounded .page-link {
        padding: 7px 11px;
        font-size: 0.8rem;
        margin: 0 2px;
    }
}
.deferred-render-block { content-visibility: auto; contain-intrinsic-size: 1px 900px; }
.listing-card.deferred-card { content-visibility: auto; contain-intrinsic-size: 280px 360px; }

.page-content {
    display: block;
    padding: 20px 0 50px;
}

.page-content > .row {
    align-items: flex-start;
}

.sidebar,
.main-content {
    width: auto;
    min-width: 0;
}

.sticky-sidebar {
    position: static !important;
    top: auto !important;
}



.btn-yellow-cat,
.btn-fav-cat,
.sort-select-cat,
.mobile-filter-btn,
.story-chip,
.page-link {
    touch-action: manipulation;
}

.cat-page-title { color: #007bff; font-weight: 700; font-size: 1.5rem; margin-bottom: 10px; }
.cat-desc-card { background: #fff; border: 1px solid #eee; padding: 12px 15px; border-radius: 4px; display: flex; align-items: start; gap: 10px; margin-bottom: 25px; }
.cat-desc-card .info-icon { background: #007bff; color: #fff; width: 18px; height: 18px; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: bold; flex-shrink: 0; margin-top: 3px; }
.cat-desc-card p { margin: 0; color: #666; font-size: 0.88rem; line-height: 1.4; }
.story-rail { margin: 8px 0 18px; }
.story-rail-list { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.story-chip { border: 0; background: transparent; padding: 0; width: 84px; flex: 0 0 auto; text-align: center; cursor: pointer; }
.story-avatar-ring { width: 72px; height: 72px; margin: 0 auto 6px; border-radius: 50%; padding: 2px; background: linear-gradient(45deg,#f97316,#ef4444,#ec4899); }
.story-chip.is-viewed .story-avatar-ring { background: #cbd5e1; }
.story-avatar { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid #fff; }
.story-chip-title { font-size: .75rem; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story-modal-overlay { position: fixed; inset: 0; background: rgba(2,6,23,.82); z-index: 1050; display: none; align-items: center; justify-content: center; padding: 16px; }
.story-modal-overlay.active { display: flex; }
.story-modal-card { width: min(420px, 100%); background: #0f172a; border-radius: 16px; overflow: hidden; position: relative; box-shadow: 0 24px 40px rgba(0,0,0,.35); }
.story-progress { display: flex; gap: 5px; padding: 10px 12px 0; }
.story-progress-bar { height: 3px; flex: 1; background: rgba(255,255,255,.3); border-radius: 999px; overflow: hidden; }
.story-progress-fill { height: 100%; width: 0; background: #fff; }
.story-head { display: flex; align-items: center; justify-content: space-between; color: #fff; padding: 10px 12px; }
.story-head-meta { display: flex; align-items: center; gap: 8px; min-width: 0; }
.story-head-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.story-head-name { font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story-close-btn { border: 0; background: rgba(255,255,255,.22); color: #fff; width: 30px; height: 30px; border-radius: 999px; font-size: 18px; line-height: 1; cursor: pointer; }
.story-stage { position: relative; background: #000; min-height: 60vh; max-height: 72vh; display: flex; align-items: center; justify-content: center; }
.story-stage img { width: 100%; height: 100%; object-fit: contain; }
.story-nav-zone { position: absolute; top: 0; bottom: 0; width: 35%; }
.story-nav-zone.prev { left: 0; }
.story-nav-zone.next { right: 0; }
.story-footer { color: #fff; padding: 12px; background: rgba(15,23,42,.95); }
.story-desc { font-size: .84rem; color: #e2e8f0; min-height: 34px; margin-bottom: 10px; }
.story-footer-actions { display: flex; align-items: center; gap: 8px; }
.story-open-link,.story-call-link { color: #fff; text-decoration: none; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.24); border-radius: 999px; padding: 6px 10px; font-size: .78rem; }
.story-imp { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; color: #cbd5e1; }

.link-block { border: 1px solid #eef0f4; border-radius: 10px; padding: 16px; background: #fff; }
.link-block-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 10px; color: #2b2f38; }
.related-pedi-card, 
.price-stats-section, 
.seo-block { 
    margin-top: 30px; 
    border: none; 
    border-radius: 18px; 
    background: #fff; 
    overflow: hidden; 
    box-shadow: 0 8px 24px rgba(0,0,0,0.06); 
    border: 1px solid #f1f5f9;
    width: 100% !important;
    max-width: 100% !important;
    display: block;
}
.seo-optimized-market-analysis {
    border-radius: 20px;
    background: #fff;
    border: 1px solid #f1f5f9;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    overflow: hidden;
}
.seo-optimized-market-analysis h3 {
    color: #1e293b;
    margin-top: 1.5rem;
}
.market-intro p {
    color: #475569;
    line-height: 1.6;
    font-size: 1.05rem;
}
.market-insights li {
    padding: 8px 0;
    border-bottom: 1px dashed #f1f5f9;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.market-insights li:last-child { border-bottom: 0; }
.bg-primary-subtle { background-color: #eff6ff !important; }
.bg-success-subtle { background-color: #f0fdf4 !important; }
.text-primary { color: #2563eb !important; }
.text-success { color: #16a34a !important; }
.border-primary-subtle { border-color: #dbeafe !important; }
.border-success-subtle { border-color: #dcfce7 !important; }

@media (max-width: 768px) {
    .seo-optimized-market-analysis,
    .related-pedi-card {
        margin-left: -12px !important;
        margin-right: -12px !important;
        border-radius: 0 !important;
        width: calc(100% + 24px) !important;
        border-left: 0;
        border-right: 0;
    }
    .seo-optimized-market-analysis .p-4 {
        padding: 1.5rem !important;
    }
}

.related-pedi-header {
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
}
.related-pedi-card-inner { 
    display: flex; 
    flex-direction: row; 
    gap: 0; 
    padding: 0; 
}
.related-pedi-cover-side {
    width: 220px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 24px;
    position: relative;
    border-right: 1px solid #f1f5f9;
}
.related-pedi-cover { 
    width: 160px; 
    height: 160px; 
    object-fit: cover; 
    border-radius: 20px; 
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.08); 
    transition: transform 0.3s ease;
}
.related-pedi-card:hover .related-pedi-cover {
    transform: scale(1.05);
}
.related-pedi-content { 
    flex: 1;
    padding: 24px; 
}
.related-pedi-footer {
    padding: 20px;
    background: #fff;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}
.related-pedi-eyebrow { 
    display: inline-block;
    padding: 4px 10px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 0.68rem; 
    font-weight: 800; 
    letter-spacing: 0.05em; 
    text-transform: uppercase; 
    border-radius: 6px;
    white-space: nowrap;
}
.related-pedi-title { 
    margin: 0; 
    font-size: 1.45rem; 
    font-weight: 800; 
    color: #0f172a; 
}
.related-pedi-text { 
    margin: 0; 
    color: #64748b; 
    line-height: 1.6; 
    font-size: 0.9rem; 
}
.related-pedi-traits { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px; 
}
.related-pedi-trait { 
    padding: 15px; 
    border-radius: 16px; 
    background: #f8fafc; 
    border: 1px solid #f1f5f9; 
    display: flex;
    align-items: center;
    gap: 12px;
}
.trait-icon-box {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.related-pedi-trait-info {
    flex: 1;
}
.related-pedi-trait-label { 
    display: block; 
    font-size: 0.7rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    color: #94a3b8; 
    margin-bottom: 2px; 
}
.related-pedi-trait-value { 
    display: block; 
    font-size: 0.9rem; 
    font-weight: 700; 
    color: #1e293b; 
}
.related-pedi-btn { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    padding: 10px 22px; 
    border-radius: 10px; 
    background: #4f46e5; 
    color: #fff; 
    text-decoration: none; 
    font-weight: 700; 
    font-size: 0.95rem;
    transition: all 0.2s;
    box-shadow: 0 8px 12px -3px rgba(79, 70, 229, 0.25);
}
.related-pedi-btn:hover { 
    background: #4338ca;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 15px 20px -5px rgba(79, 70, 229, 0.4);
}
.link-chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.link-chip { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; border: 1px solid #dfe5ef; background: #f7f9fc; color: #2d3a5f; font-size: 0.82rem; text-decoration: none; transition: all 0.2s ease; }
.link-chip:hover { background: #eef2ff; color: #1c2d5a; }

.cat-action-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; margin-bottom: 20px; flex-wrap: wrap; overflow: visible; }
.cat-count { font-weight: 600; color: #333; font-size: 0.95rem; margin: 0; white-space: nowrap; flex-shrink: 1; }
.cat-actions { display: flex; align-items: stretch; gap: 8px; flex-shrink: 0; }

.btn-yellow-cat, .btn-fav-cat, .sort-select-cat { height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border-radius: 4px; font-size: 0.82rem; font-weight: 500; white-space: nowrap; border: none; text-decoration: none; transition: all 0.2s; }

.btn-yellow-cat { background: #ffce45; color: #000; }
.btn-yellow-cat:hover { background: #f7bd15; color: #000; }

.btn-fav-cat { background: #e02020; color: #fff; gap: 5px; }
.btn-fav-cat:hover { background: #c01a1a; color: #fff; }
.btn-fav-cat .star { font-size: 0.9rem; }

.sort-select-cat { border: 1px solid #ddd; color: #555; background-color: #fff; padding-right: 5px; appearance: listbox; }

@media screen and (max-width: 992px) {
    .cat-count { font-size: 0.85rem; }
    .btn-yellow-cat, .btn-fav-cat, .sort-select-cat { padding: 0 8px; font-size: 0.78rem; }
}


@media (max-width: 768px) {
    .table-container.price-stats-table-wrap { overflow: visible; border-radius: 12px; border: none; box-shadow: none; background: transparent; }
    .table-container.price-stats-table-wrap thead { display: none; }
    .table-container.price-stats-table-wrap table,
    .table-container.price-stats-table-wrap tbody,
    .table-container.price-stats-table-wrap tr,
    .table-container.price-stats-table-wrap td { display: block; width: 100%; }
    .table-container.price-stats-table-wrap tbody { padding: 0; }
    .table-container.price-stats-table-wrap tr { margin-bottom: 12px; border: 1px solid #e6edf5; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04); }
    .table-container.price-stats-table-wrap td { text-align: left; position: relative; padding: 10px 12px 10px 110px; border-bottom: 1px solid #f1f5f9; min-height: 44px; font-size: 0.85rem; }
    .table-container.price-stats-table-wrap td:last-child { border-bottom: none; }
    .table-container.price-stats-table-wrap td::before { content: attr(data-label); position: absolute; left: 12px; top: 11px; width: 90px; text-align: left; font-weight: 700; color: #64748b; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em; }
    
    /* Make the Type cell a header for the card */
    .table-container.price-stats-table-wrap td.price-type-cell { padding: 12px 14px; background: #f8fafc; border-bottom: 1px solid #edf2f7; }
    .table-container.price-stats-table-wrap td.price-type-cell::before { display: none; }
    .price-type-name { font-size: 0.95rem; margin-bottom: 2px; }
    .price-type-note { font-size: 0.78rem; font-weight: 400; }
    
    .price-chip { padding: 4px 10px; min-width: 80px; font-size: 0.8rem; }
    .price-chip.price-chip-range { min-width: 140px; }
    .price-chip.price-chip-count { min-width: 40px; }
    
    .price-stats-section { padding: 0 12px; }
    .price-stats-title { font-size: 1.25rem; }
    .price-stats-subtitle { font-size: 0.85rem; }
}

/* Mobile Filter Drawer Styles */
.mobile-filter-bar { display: none; margin-bottom: 2px; background: #fff; padding: 12px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); align-items: center; justify-content: space-between; border: 1px solid #eef2f6; }
.mobile-filter-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; background: #f8f9fa; border: 1px solid #eef2f6; padding: 12px; border-radius: 8px; font-weight: 600; color: #333; font-size: 0.95rem; cursor: pointer; transition: background 0.2s; }
.mobile-filter-btn:active { background: #e2e8f0; }

.category-drawer { 
    position: fixed; 
    top: 0; 
    right: -100%; 
    width: 90%; 
    max-width: 420px; 
    height: 100%; 
    background: #fff; 
    z-index: 10001; 
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
    box-shadow: -10px 0 40px rgba(0,0,0,0.1); 
    display: flex; 
    flex-direction: column; 
}
.category-drawer.active { right: 0; }
.drawer-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(15, 23, 42, 0.6); 
    backdrop-filter: blur(4px); 
    z-index: 10000; 
    display: none; 
    opacity: 0; 
    transition: opacity 0.3s; 
}
.drawer-overlay.active { display: block; opacity: 1; }
.drawer-header { 
    padding: 20px 24px; 
    border-bottom: 1px solid #f1f5f9; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: #fff; 
    position: sticky; 
    top: 0; 
    z-index: 10; 
}
.drawer-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.drawer-body { 
    padding: 24px; 
    overflow-y: auto; 
    flex: 1; 
    background: #f8fafc;
}
.drawer-footer {
    padding: 20px 24px;
    background: #fff;
    border-top: 1px solid #f1f5f9;
    position: sticky;
    bottom: 0;
    z-index: 10;
}
.btn-apply-filters {
    width: 100%;
    padding: 14px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.2s;
}
.btn-apply-filters:active { transform: scale(0.98); }

/* Custom adjustments for widgets inside drawer */
.drawer-body .sidebar-widget {
    background: #fff;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px !important;
}
.drawer-body .widget-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}
.drawer-body .sidebar-widget:last-child {
    display: none; /* Hide the desktop filter button in the drawer */
}


@media (max-width: 991px) {
    .page-content {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }

    .mobile-filter-bar { 
        display: flex; 
        position: static;
        top: auto;
        z-index: 99;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        border-radius: 10px;
        box-shadow: none;
    }
    
    /* Make Filter Button Sticky & Prominent */
    .mobile-filter-btn {
        background: #fff;
        border: 1px solid #28a745;
        color: #28a745;
    }
    
    /* Hide Breadcrumbs on Mobile to save space */
    .breadcrumbs {
        display: none;
    }
    
    /* Optimize H1 */
    .cat-page-title {
        font-size: 1.25rem !important;
        color: #333 !important; /* Cleaner look than bright blue */
        margin-top: 10px;
        line-height: 1.3;
    }
    
    /* Action Bar Layout Fix */
    .cat-action-bar {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        border: none;
        padding: 0;
        margin-bottom: 20px;
    }
    
    .cat-count {
        font-size: 0.9rem;
        color: #666;
        order: 1; /* Move text below buttons if needed, or keep top */
        width: 100%;
    }
    
    .cat-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr; /* Two buttons side by side if possible */
        gap: 10px;
        order: 2;
    }
    
    /* Make Post Ad button prominent */
    .btn-yellow-cat {
        width: 100%;
        height: 44px;
        font-size: 0.9rem;
        justify-content: center;
        grid-column: span 2; /* Full width */
    }
    
    .sort-select-cat, .btn-fav-cat {
        height: 44px;
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    
    /* Hide Info Card to save space or compact it */
    .cat-desc-card {
        padding: 10px;
        font-size: 0.8rem;
        background: #f8f9fa;
        border: none;
    }

    .story-rail {
        overflow: hidden;
    }

    .story-rail-list {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px 8px;
        overflow: visible;
        padding-bottom: 0;
    }

    .story-chip {
        width: 100%;
        min-width: 0;
    }

    .story-avatar-ring {
        width: 58px;
        height: 58px;
        margin-bottom: 4px;
    }

    .story-chip-title {
        font-size: 0.7rem;
    }

    .related-pedi-header {
        padding: 15px 15px 0 !important;
        text-align: left;
    }

    .related-pedi-title {
        font-size: 1.15rem;
    }

    .related-pedi-text {
        font-size: 0.85rem;
    }

    .related-pedi-cover-side {
        width: 100%;
        padding: 15px;
        border-right: 0;
        border-bottom: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        background: transparent;
    }

    .related-pedi-cover {
        width: 100px;
        height: 100px;
        border-radius: 16px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }

    .related-pedi-content {
        padding: 0 15px 15px;
    }
    
    .related-pedi-footer {
        padding: 15px;
        border-top: 0;
    }

    .related-pedi-eyebrow {
        margin-bottom: 10px;
        font-size: 0.68rem;
    }

    .related-pedi-title {
        font-size: 1.18rem;
        line-height: 1.3;
        margin-bottom: 10px;
    }

    .related-pedi-text {
        font-size: 0.92rem;
        line-height: 1.6;
        margin-bottom: 18px;
    }

    .related-pedi-traits {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 20px;
    }

    .related-pedi-trait {
        padding: 10px;
        border-radius: 12px;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .trait-icon-box {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        flex: 0 0 32px;
    }

    .related-pedi-trait-label {
        font-size: 0.6rem;
    }

    .related-pedi-trait-value {
        font-size: 0.78rem;
        line-height: 1.25;
    }

    .related-pedi-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 18px;
        font-size: 0.9rem;
    }



    /* Scope mobile grid tweaks only to listing grid */
    .category-listing-grid > .col-6.col-md-3 { 
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
        padding-left: 6px;
        padding-right: 6px;
    } 
    .category-listing-grid {
        display: flex;
        flex-wrap: wrap;
        margin-left: -6px;
        margin-right: -6px;
    }

    .listing-card.card {
        box-shadow: none;
    }
}
