/* ============================================================
   LGD Diamond Filters — Full CSS (ported from original codebase)
   ============================================================ */

/* ---------- Layout & Reset ---------- */
.lgd-diamond-filters-wrap { width: 100%; }
.d-flex { display: flex; }
.w-100 { width: 100%; }
.p-0 { padding: 0; }
.m-0 { margin: 0; }
.ml-0 { margin-left: 0; }
.mr-0 { margin-right: 0; }

/* ---------- Tabs ---------- */
.diamond-tabs { margin-bottom: 0; }
.tabs-wrap { width:100%; min-height:45px; display:flex; justify-content:space-between; }
.diamond-tabs-left {
    height:45px; display:flex; align-items:center; justify-content:left;
    border-radius:10px; box-shadow:rgba(0,0,0,0.1) 0 4px 6px -1px,rgba(0,0,0,0.06) 0 2px 4px -1px;
    border:1px solid #ddd;
}
.diamond-tabs-right {
    height:45px; width:140px; display:flex; align-items:center; justify-content:right;
    border-radius:10px; box-shadow:rgba(0,0,0,0.1) 0 4px 6px -1px,rgba(0,0,0,0.06) 0 2px 4px -1px;
    border:1px solid #ddd;
}
.tab-btn {
    height:45px; color:#fff; background:#591E72; padding:0 40px;
    display:flex; justify-content:center; align-items:center; border:none;
    cursor:pointer; font-size:14px; font-weight:500; transition:all 0.2s;
}
.tab-btn:first-child { border-radius:10px 0 0 10px; }
.tab-btn:last-child { border-radius:0 10px 10px 0; }
.tab-btn.active { background:#fff; color:#333; }

/* ---------- Filter Bar ---------- */
#filterBar { margin-top:60px; }
#filterBody { border-bottom:1px solid #eee; }
.diamond-filter-head {
    height:61px; padding:0 30px; display:flex; align-items:center;
    justify-content:space-between; border-bottom:0;
    background:#fff; border-top-left-radius:10px; border-top-right-radius:10px;
}
.filter-title { font-size:22px; font-weight:500; color:#222; margin:0; }
.diamond-filter-search-toggle-btn {
    height:40px; padding:0 30px; display:flex; border:1px solid #ddd;
    background:#fff; color:#666; font-size:20px; border-radius:6px;
    line-height:38px; cursor:pointer; align-items:center;
}
#filter-search { display:none; }
#filter-search.open { display:block; }
.filter-form-wrap { padding:15px 30px; display:flex; gap:10px; }
.search-input { flex:1; height:40px; padding:0 15px; border:1px solid #ddd; border-radius:6px; font-size:14px; }
.search-btn { height:40px; padding:0 25px; background:var(--lgd-btn-bg,#222); color:#fff; border:none; border-radius:6px; cursor:pointer; font-weight:600; }
.search-btn-clear { height:40px; width:40px; background:#eee; border:none; border-radius:6px; cursor:pointer; font-size:18px; }

/* ---------- Filter Toggle ---------- */
#filterToggleBtnWrap {
    height:45px; line-height:43px; border-radius:10px; background:#222;
    color:#fff; font-size:15px; width:189px; padding:0 30px; cursor:pointer;
}
.search-toggle-icon { align-items:center; justify-content:center; font-size:22px; width:max-content; height:45px; background:#222; color:#fff; border-radius:10px; padding-right:10px; }
.search-toggle-btn { cursor:pointer; }
#filterToggleBtn { height:45px; line-height:45px; border-radius:10px; background:#222; color:#fff; font-size:15px; }

/* ---------- Filter Rows ---------- */
.diamond-filter-row { padding:15px 30px 20px; }
.diamond-filter-left { width:50%; padding-right:15px; }
.diamond-filter-right { width:50%; padding-left:15px; }
.fs-title { font-size:15px; font-weight:600; color:#333; margin-bottom:10px; }
.sv-row { display:flex; justify-content:space-between; font-size:14px; color:#591E72; font-weight:600; }
.sv { color:#591E72; }

/* ---------- Dual Range Slider ---------- */
.dual-range { position:relative; height:36px; margin:6px 0 2px; }
.dual-range .dr-track {
    position:absolute; left:0; right:0; top:50%; transform:translateY(-50%);
    height:6px; border-radius:3px; background:var(--lgd-accent,#9a14a8); z-index:1;
}
.dual-range .dr-fill {
    position:absolute; top:50%; transform:translateY(-50%);
    height:6px; border-radius:3px; background:var(--lgd-primary,#591E72);
    left:0; right:0; z-index:2;
}
.dual-range input[type=range] {
    -webkit-appearance:none; appearance:none;
    position:absolute; left:0; top:0; width:100%; height:36px;
    margin:0; background:transparent; pointer-events:none; z-index:3; border:0;
}
.dual-range input[type=range]::-webkit-slider-runnable-track {
    -webkit-appearance:none; height:36px; background:transparent; border:0;
}
.dual-range input[type=range]::-webkit-slider-thumb {
    -webkit-appearance:none; appearance:none; pointer-events:auto;
    height:20px; width:20px; border-radius:50%; background:#fff;
    border:3px solid #591E72; box-shadow:0 1px 4px rgba(0,0,0,.25);
    cursor:pointer; margin-top:8px;
}
.dual-range input[type=range]:hover::-webkit-slider-thumb { background:#591E72; }
.dual-range input[type=range]::-moz-range-track { height:36px; background:transparent; border:0; }
.dual-range input[type=range]::-moz-range-thumb {
    pointer-events:auto; height:20px; width:20px; border-radius:50%;
    background:#fff; border:3px solid #591E72; box-shadow:0 1px 4px rgba(0,0,0,.25); cursor:pointer;
}
.dual-range input[type=range]:focus { outline:none; }
.slider-ticks { position:relative; height:16px; margin-top:6px; font-size:11px; color:#444; }
.slider-ticks span { position:absolute; top:0; white-space:nowrap; }
.slider-ticks span:first-child { transform:translateX(0); }
.slider-ticks span:last-child { transform:translateX(-100%); }
.slider-ticks span:not(:first-child):not(:last-child) { transform:translateX(-50%); }

/* ---------- Shape Buttons ---------- */
.shape-group { display:grid; grid-template-columns:repeat(auto-fill,minmax(90px,1fr)); gap:10px; }
.shape-group { display:grid; grid-template-columns:repeat(auto-fill,minmax(90px,1fr)); gap:10px; }
.shape-btn {
    border:1px solid #eee; border-radius:10px; background:#fff;
    cursor:pointer; overflow:hidden; transition:all .15s ease;
}
.shape-btn:hover, .shape-btn.active { border-color:#591E72; box-shadow:0 3px 8px rgba(89,30,114,.15); }
.shape-btn-img { display:grid; place-items:center; width:100%; height:60px; }
.shape-btn:hover .shape-btn-img, .shape-btn.active .shape-btn-img {
    height:60px; background:#fff; border-radius:10px 10px 0 0;
}
.shape-btn-text {
    min-height:26px; display:flex; align-items:center; justify-content:center;
    font-size:11px; color:#555; padding:2px 4px; text-align:center;
}
.shape-btn:hover .shape-btn-text, .shape-btn.active .shape-btn-text { color:purple; font-weight:500; }
.show-shapes-btn { cursor:pointer; color:#591E72; font-weight:600; font-size:13px; }

/* ---------- Shape SVGs ---------- */
.shp-svg { width:45px; height:45px; fill:#fff; stroke:#591E72; stroke-width:1.3; stroke-linejoin:round; stroke-linecap:round; }
.shape-btn.active .shp-svg, .shape-btn:hover .shp-svg { stroke:#d73aed; }
.shp-svg .gem-outline { stroke-width:1.6; }
.shp-svg .gem-table { stroke-width:1.1; }
.shp-svg .gem-facet { stroke-width:.8; opacity:.75; }

/* ---------- Lab Buttons ---------- */
.lab-group { display:flex; flex-wrap:wrap; gap:8px; }
.lab-btn {
    height:38px; padding:0 16px; border:1px solid #ddd; border-radius:8px;
    background:#fff; color:#444; cursor:pointer; font-size:13px; transition:all 0.2s;
}
.lab-btn:hover, .lab-btn.active { border-color:#591E72; color:#591E72; background:#f7f2fb; }

/* ---------- Advanced Toggle ---------- */
.advance-wrapper { display:none; }
.advance-wrapper.open { display:block; }
.adv-toggle-wrap { background:#fff; text-align:center; display:flex; justify-content:center; border-radius:0 0 20px 20px; }
.adv-toggle-btn {
    width:max-content; height:45px; background:#fff; border:0;
    padding:0 30px; border-left:1px solid #eee; border-right:1px solid #eee;
    color:#aaa; cursor:pointer; font-size:14px;
}
.adv-toggle-btn:hover { color:#666; }
.adv-toggle-btn.open { color:#666; }
.adv-toggle-btn span { pointer-events:none; }

/* ---------- Filter Chips ---------- */
.lgd-filter-pills-col { display:flex; flex-wrap:wrap; gap:8px; padding:0 24px; }
.filter-chip {
    display:inline-flex; align-items:center; gap:6px;
    background:#f2ecf7; color:#591E72; border:1px solid #e0d3ec;
    border-radius:20px; padding:5px 6px 5px 12px; font-size:12px; font-weight:600;
}
.chip-remove {
    border:0; background:#591E72; color:#fff; width:18px; height:18px;
    border-radius:50%; line-height:1; cursor:pointer; font-size:12px;
    display:flex; align-items:center; justify-content:center;
}
.btn-clear-all {
    height:36px; padding:0 16px; border:1px solid #ddd;
    border-radius:8px; background:#fff; cursor:pointer; font-weight:600; color:#333;
}
.d-none { display:none !important; }

/* ---------- Result Details Bar ---------- */
.details-wrap { align-items:center; gap:16px; flex-wrap:wrap; margin:24px 0; }
.lgd-details-left {
    display:flex; gap:14px; align-items:center; flex-wrap:wrap;
    height:45px; box-shadow:0 4px 6px -1px rgba(0,0,0,.1); border-radius:10px;
}
.lgd-result-details {
    background:#fff; border:1px solid #eee; border-radius:10px;
    display:flex; min-height:45px; overflow:hidden; flex-wrap:wrap;
}
.lgd-result-cell {
    gap:10px; padding:0 30px; display:flex; align-items:center;
    min-height:45px;
}
.lgd-result-cell--border { border-right:1px solid #f1f5f9; }
.lgd-result-cell.clickable { cursor:pointer; }
.lgd-result-cell.clickable:hover { background:#f7f2fb; }
.lgd-results-muted { color:#999; font-size:13px; }
.product-count, .compare-count, .wishlist-count { font-weight:700; font-size:18px; color:#591E72; }

/* ---------- View Controls ---------- */
.toolbar-actions {
    display:flex; gap:8px; align-items:center; flex-wrap:wrap;
    margin-left:auto; box-shadow:0 4px 6px -1px rgba(0,0,0,.1); border-radius:10px;
}
.view-controls {
    height:45px; width:max-content; border:1px solid #ddd;
    border-radius:10px; background:#591E72; color:#fff; display:flex;
}
.view-btn {
    padding:0 25px; height:44px; background:#591E72; border:0;
    color:#fff; display:flex; justify-content:center; align-items:center;
    width:fit-content; font-size:22px; cursor:pointer; transition:all 0.2s;
}
.view-btn:first-child { border-radius:10px 0 0 10px; }
.view-btn:last-child { border-radius:0 10px 10px 0; }
.view-btn.active { background:#fff; color:purple; }

/* ---------- Table View ---------- */
#tableView { border:0; border-radius:10px; }
.data-table { width:100%; border-collapse:collapse; }
.filter-table-tr th {
    background:var(--lgd-header-bg,#591E72); height:60px; color:#fff;
    font-weight:600; font-size:14px; text-align:center; padding:0 10px;
    white-space:nowrap;
}
.filter-table-tr th:first-child { border-radius:10px 0 0 0; }
.filter-table-tr th:last-child { border-radius:0 10px 0 0; }
.filter-table-tr th.sortable { cursor:pointer; user-select:none; }
.filter-table-tr th.sorted-asc::after { content:" \2191"; }
.filter-table-tr th.sorted-desc::after { content:" \2193"; }
#tableBody { border-top:5px solid var(--lgd-accent,#9a14a8); background:#fff; }
#tableBody td { text-align:center; padding:0 15px; height:60px; color:#666; font-size:14px; }
#tableBody tr:hover { background:#f7f2fb; }
#tableBody tr td:first-child { border-radius:0; }
.lgd-table-footer {
    height:50px; padding:0 30px; display:flex; justify-content:flex-end;
    align-items:center; border:1px solid #ddd; border-top:none;
    border-radius:0 0 10px 10px; background:#fff; color:#aaa; font-size:13px;
}
.table-price { color:#591E72; font-weight:600; }
.table-score { font-weight:700; }

/* ---------- Grid View ---------- */
.generated-card-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:20px; }
.generated-card {
    border:1px solid #eee; border-radius:10px; overflow:hidden;
    background:#fff; transition:box-shadow 0.2s, transform 0.2s;
}
.generated-card:hover { box-shadow:0 4px 20px rgba(0,0,0,.08); transform:translateY(-2px); }
.generated-card-img {
    background:#faf5ff; height:200px; display:flex; align-items:center;
    justify-content:center; font-size:80px; color:#591E72; cursor:pointer;
}
.generated-card-body { padding:15px; }
.generated-card-title { font-weight:600; font-size:16px; display:flex; justify-content:space-between; }
.generated-card-price { color:#591E72; font-weight:700; }
.generated-spec-grid { display:flex; gap:12px; font-size:13px; color:#666; margin-top:8px; }
.generated-card-footer { display:flex; gap:8px; margin-top:12px; }
.generated-view-btn {
    flex:2; padding:8px; background:#222; color:#fff; border-radius:6px;
    text-decoration:none; text-align:center; font-weight:600; display:inline-block;
}

/* ---------- Pagination ---------- */
.pagination-wrapper { display:flex; justify-content:center; align-items:center; gap:8px; margin:30px 0; flex-wrap:wrap; }
.pagination-btn {
    padding:8px 12px; border:1px solid #ddd; background:#fff;
    color:#333; border-radius:4px; font-weight:500; min-width:38px;
    cursor:pointer; transition:all 0.2s;
}
.pagination-btn:hover:not(:disabled) { border-color:#591E72; color:#591E72; }
.pagination-btn.active { background:#591E72; color:#fff; border-color:#591E72; font-weight:700; }
.pagination-btn:disabled { cursor:not-allowed; background:#f5f5f5; color:#999; }
.page-numbers { display:flex; gap:4px; flex-wrap:wrap; justify-content:center; }

/* ---------- Modals ---------- */
.modal-overlay {
    display:none; position:fixed; top:0; left:0; width:100%; height:100%;
    background:rgba(0,0,0,.5); align-items:center; justify-content:center; z-index:99999;
}
.modal-overlay.show { display:flex; }
.modal-content {
    position:relative; display:flex; flex-direction:column; width:100%;
    max-width:600px; color:#888; pointer-events:auto; background-color:#fff;
    border:1px solid #eee; border-radius:10px; outline:0; padding:30px;
}
.modal-header { display:flex; justify-content:space-between; align-items:center; padding:10px 30px 5px; }
.modal-title { font-size:22px; font-weight:400; margin:0; }
.modal-sub-title { font-size:15px; color:#aaa; margin:0; }
.modal-body { display:flex; padding:20px 30px; border-top:1px solid #eee; gap:30px; }
.modal-footer { display:flex; justify-content:flex-end; padding:0 30px 20px; gap:10px; }
.attribute-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; }
.attribute-item { padding:10px 20px; border:1px solid #ddd; border-radius:10px; }
.attribute-label { font-size:14px; color:#aaa; }
.attribute-value { font-size:18px; color:#333; }
.modal-icon { font-size:48px; margin-bottom:10px; }

/* ---------- Compare Bar ---------- */
.compare-bar {
    position:fixed; left:50%; bottom:20px; transform:translateX(-50%);
    background:#591E72; color:#fff; border-radius:12px; padding:12px 18px;
    display:none; align-items:center; gap:20px; z-index:99998;
    box-shadow:0 10px 30px rgba(0,0,0,.25);
}
.compare-bar.show { display:flex; }
.compare-bar-right { display:flex; gap:10px; align-items:center; }
.compare-bar-btn {
    height:38px; padding:0 18px; background:#fff; color:#591E72;
    border:0; border-radius:8px; font-weight:700; cursor:pointer;
}
.compare-bar-close { color:#fff; background:none; border:none; font-size:24px; cursor:pointer; }

/* ---------- Popular Search Buttons ---------- */
.pop-search-btn {
    height:35px; padding:0 25px; align-items:center; border:1px solid #ddd;
    border-radius:6px; cursor:pointer; font-size:13px; color:#555;
    background:#fff; transition:all 0.2s; display:flex;
}
.pop-search-btn:hover { border-color:#591E72; color:#591E72; }

/* ---------- Responsive ---------- */
@media (max-width:768px) {
    .diamond-filter-left, .diamond-filter-right { width:100%; padding:10px 0; }
    .diamond-filter-row { flex-wrap:wrap; }
    .tab-btn { padding:0 20px; font-size:12px; }
    .data-table thead { display:none; }
    #tableBody td { display:block; text-align:right; padding:8px 10px; }
    #tableBody td::before { content:attr(data-label); float:left; font-weight:600; }
    .lgd-result-cell { padding:0 15px; }
    #filterToggleBtnWrap { width:auto; padding:0 15px; }
    .generated-card-grid { grid-template-columns:repeat(2,1fr); }
    .diamond-filter-left,
    .lgd-details-left,
    .lgd-details-right {
        width: 100%;
    }
}
.diamond-filter-left {
    width: 50%;
}
/* ---------- Intro Section ---------- */
.page-intro-wrap { margin-bottom:60px; align-items:center; }
.page-sub-title { font-size:18px; color:#aaa; margin:0; }
.page-title { font-size:26px; font-weight:400; margin:0; }
.page-intro-img { background:#eee; height:350px; border-radius:10px; }
.col-md-5 { width:41.666667%; padding-left:0; }
.col-md-7 { width:58.333333%; padding-right:0; }

/* ---------- Color Swatch ---------- */
.swatch-wrap { margin:auto; width:40px; height:30px; border-radius:6px; display:flex; align-items:center; justify-content:center; }
.color-swatch-circle { width:40px; height:28px; border-radius:6px; }

/* ---------- Table Link Button ---------- */
.search-table-btn {
    height:30px; width:70px; display:flex; justify-content:center;
    align-items:center; background:var(--lgd-btn-bg,#222); color:#fff;
    font-size:15px; border-radius:6px; margin:auto; text-decoration:none;
}
.search-table-btn:hover { background:#111; color:#fff; }

/* ---------- Wishlist / Compare Icons ---------- */
.wishlist-btn { font-size:20px; cursor:pointer; display:flex; align-items:center; justify-content:center; width:40px; height:32px; margin:0 auto; }
.wishlist-btn.added { color:#e11d48; }
.compare-table-btn { font-size:22px; width:60px; height:30px; display:flex; justify-content:center; align-items:center; border:0; border-radius:5px; background:#591E72; margin:auto; color:#fff; }
.table-btn-more { background:none; border:none; color:purple; font-size:24px; cursor:pointer; padding:0; line-height:1; }