/* Listing Table Header v2 */

.lth-wrap {
    /* background, border, border-radius, box-shadow → set via Elementor Style controls */
    overflow: hidden;
    width: 100%;
}

/* ── header scroll container ── */
.lth-scroll-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.lth-scroll-wrap::-webkit-scrollbar       { height: 4px; }
.lth-scroll-wrap::-webkit-scrollbar-track { background: transparent; }
.lth-scroll-wrap::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }

/* inner */
.lth-inner { min-width: 700px; width: 100%; }

/* ── header row ── */
.lth-header-row {
    background: #f8f9fc;
    border-bottom: 2px solid #e2e8f0;
    display: grid;
    width: 100%;
    /* এখানে আপনার আগের ডায়নামিক বা ডিফল্ট grid-template-columns থাকবে, JS/Inline থেকে যা আসে */
}

.lth-th {
    padding: 11px 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
}

.lth-th-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
}

.lth-sort-icon {
    color: #94a3b8;
    flex-shrink: 0;
    cursor: pointer;
    opacity: .7;
    transition: opacity .15s;
}
.lth-sort-icon:hover { opacity: 1; }

/* ── scroll hint ── */
.lth-scroll-hint {
    display: none;
    text-align: center;
    padding: 5px 12px;
    font-size: 11.5px;
    color: #94a3b8;
    background: #f8fafc;
    border-bottom: 1px solid #e8eaf0;
}
.lth-scroll-hint.lth-visible { display: block; }

/* ══════════════════════════════════════════════════
   Loop Grid scroll wrapper (injected by JS)
   — synced with the header scroll container
   ══════════════════════════════════════════════════ */
.lth-loop-scroll-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar here; user scrolls via the header bar above */
    scrollbar-width: none;
}
.lth-loop-scroll-wrap::-webkit-scrollbar { display: none; }

/* The JetEngine items list fills the scroll container — rows control their own min-width */
.lth-loop-scroll-wrap .jet-listing-grid__items,
.lth-loop-scroll-wrap .elementor-loop-container {
    width: 100%;
    min-width: 100%;
}

/* ── Loop Grid rows — structural helpers ── */

/* Outer wrapper fills the scroll */
.elementor-loop-container[data-lth-connected] {
    display: grid !important; /* subgrid কাজ করার জন্য এটিকে grid হতে হবে */
    gap: 0 !important;
    width: 100%;
    min-width: inherit;
}

/* Each loop item = one row */
.e-loop-item[data-lth-connected] {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: subgrid !important; /* মেইন গ্রিডের কলাম সাইজ হুবহু কপি করবে */
    grid-column: span 20; /* কলাম সংখ্যা যাই হোক যেন পুরোটা কাভার করে */
}

/* Every direct child container/widget = one column cell */
.e-loop-item[data-lth-connected] > * {
    display: flex !important;
    align-items: center;
    min-width: 0;
    overflow: hidden;
}

/* Remove Elementor's default padding on child containers */
.e-loop-item[data-lth-connected] > .e-con {
    padding: 10px 16px;
}

/* Row border is applied via scoped style in PHP */

/* ── ২. অটো ফ্লেক্স কলাম (Auto-sizing Columns) ── */
/* ক্লাস হার্ডকোড না করে ডায়নামিকালি কলাম হ্যান্ডেল করার ব্যাকআপ */
.lth-th, 
.e-loop-item[data-lth-connected] > * {
    min-width: 0 !important;
}

/* ── Show/Hide on Empty — pre-hidden until JS confirms state ── */
.lth-sh-hidden {
    display: none !important;
    visibility: hidden !important;
}