/* ===== MODERN DIAMOND SEARCH VARIABLES & BASE ===== */
:root {
    --primary: #081c33;
    --primary-hover: #003a61;
    --primary-light: #e6f0f7;
    --bg-gray: #f8fafc;
    --border: #e2e8f0;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-hover: 0 10px 25px -5px rgba(0,0,0,0.1);
}

* {
    box-sizing: border-box;
}

body {
    color: var(--text-dark);
    background-color: var(--bg-gray);
}

/* ===== FILTER BAR RE-DESIGN ===== */
.rb-filter {
    background: #fff;
    padding: 30px 0;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.rb-filter .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Responsive Grid for Filters */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    width: 100%;
    margin-bottom: 20px;
}

.d_box1 {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
}

.shapeslabel {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

/* Shapes Buttons */
.d_search_filt {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.d_search_filt li button {
    width: 100%;
    padding: 10px 5px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.d_search_filt li button:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 77, 128, 0.1);
}

.d_search_filt li button.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.d_search_filt li button img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.shape-title, .shape-title2 {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Range Sliders */
.noUi-target {
    background: #e2e8f0;
    border-radius: 4px;
    border: none;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.noUi-horizontal {
    height: 6px;
    margin: 20px 10px 10px;
}

.noUi-connect {
    background: var(--primary);
}

.noUi-handle {
    width: 22px !important;
    height: 22px !important;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    right: -11px !important;
    top: -8px !important;
    transition: transform 0.1s ease;
}

.noUi-handle:hover {
    transform: scale(1.1);
}

.noUi-handle:before, .noUi-handle:after {
    display: none;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 5px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 8px;
}

/* Inputs */
.input-style {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.input-style > div {
    flex: 1;
    position: relative;
}

.text-design {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    text-align: center;
    transition: border 0.2s;
    color: var(--text-dark);
}

.text-design:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.pric_sett, .pric_sett1 {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    left: 12px;
    pointer-events: none;
}

.pric_mins {
    padding-left: 25px !important;
    text-align: left !important;
}

/* Button Filters (Lab, Availability) */
.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    padding: 8px 16px !important;
    border: 1px solid var(--border) !important;
    background: #fff !important;
    border-radius: 20px !important;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted) !important;
    transition: all 0.2s ease !important;
}

.filter-btn:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

.filter-btn.active {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}

/* Tooltips */
.tooltip-click {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: var(--text-muted);
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    cursor: pointer;
    margin-left: 8px;
    transition: background 0.2s;
}

.tooltip-click:hover {
    background: var(--text-dark);
}

.tooltip-popup {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    width: 300px;
    max-width: 90vw;
    box-shadow: var(--shadow-md);
}

.tooltip-heading {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.close-box1 {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
}

/* Advance Filters Bar */
.ad_filter_btn {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.filt_btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: background 0.3s;
}

.filt_btn:hover {
    background: var(--primary-hover);
    color: #fff;
}

.reset-fl {
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.reset-fl:hover {
    color: var(--primary);
}

/* ===== RESULTS SECTION ===== */
.top-title-bar {
    text-align: center;
    padding: 50px 0 30px;
}

.top-title-bar h3 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.top-title-bar p {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.6;
}

/* Tabs */
.main_tab {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 25px;
    border-bottom: 2px solid var(--border);
}

.main_tab li a {
    display: block;
    padding: 15px 30px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.main_tab li.active a, .main_tab li a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Controls Bar */
.shop-top-bar {
    background: #fff;
    padding: 15px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.sort-pagi-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.sort-by {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-by span {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-control, .new_drop {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: #fff;
    color: var(--text-dark);
}

/* View Toggle */
.view-toggle-bar {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 20px;
}

.view-toggle-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-toggle-btn:hover, .view-toggle-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ===== LIST VIEW ===== */
.flex-container {
    display: flex;
    background: #fff;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 16px;
    color: var(--text-muted);
    text-transform: uppercase;
    border: 1px solid var(--border);
    margin-bottom: 10px;
}

.flex-item {
    flex: 1;
    text-align: center;
}
.flex-item:first-child { text-align: left; flex: 1.2; }
.flex-item:last-child { flex: 0.8; text-align: right; }

#diamond_list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.item-product-list {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 15px 20px;
    transition: all 0.2s;
}

.item-product-list:hover {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.flex-container-section {
    display: flex;
    align-items: center;
    width: 100%;
}

.flex-item-new {
    flex: 1;
    text-align: center;
    font-size: 16px;
    color: var(--text-dark);
    font-weight: 500;
}

.flex-item-new:first-child { text-align: left; flex: 1.2; font-weight: 700; }
.flex-item-new:last-child { flex: 0.8; text-align: right; }

.compare-price span {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.certificatelink span {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.bt-icon button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-muted);
    transition: color 0.2s;
}

.bt-icon button:hover {
    color: var(--primary);
}

.btn-round {
    display: inline-block;
    padding: 8px 24px;
    border: 1px solid var(--primary);
    color: var(--primary);
    text-decoration: none;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-round:hover {
    background: var(--primary);
    color: #fff;
}

/* ===== GRID VIEW ===== */
.grid-view-container {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.grid-view-container.active {
    display: grid;
}

.diamond-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.diamond-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.diamond-card-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    background: var(--bg-gray);
    display: block;
}

.diamond-card-body {
    padding: 20px;
}

.diamond-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.diamond-card-stock {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 600;
}

.diamond-card-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--primary-light);
    color: var(--primary);
}

.diamond-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.diamond-card-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.diamond-card-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
}

.diamond-card-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.card-detail-item {
    text-align: center;
    padding: 10px 5px;
    background: var(--bg-gray);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.card-detail-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
    font-weight: 600;
}

.card-detail-value {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 14px;
}

.diamond-card-actions {
    display: flex;
    gap: 10px;
}

.diamond-card-actions .btn-view {
    flex: 1;
    padding: 12px;
    background: var(--primary);
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s;
}

.diamond-card-actions .btn-view:hover {
    background: var(--primary-hover);
}

.diamond-card-actions .btn-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: #fff;
    color: var(--text-muted);
    transition: all 0.2s;
    font-size: 18px;
}

.diamond-card-actions .btn-icon:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.diamond-card-video {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 77, 128, 0.9);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.2s;
    box-shadow: var(--shadow-md);
}

.diamond-card-video:hover {
    transform: scale(1.1);
}

/* ===== PAGINATION ===== */
.pagi-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 50px 0;
}

.pagi-nav span a, .pagi-nav .curlink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 15px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-dark);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.pagi-nav span a:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.pagi-nav .curlink {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Modal Tweaks */
.modal-content { border-radius: var(--radius-lg); border: none; box-shadow: 0 20px 40px rgba(0,0,0,0.2); }

/* ===== RESPONSIVE UTILITIES ===== */
.d-sm-none { display: none; }
.icon-div {
    display: inline-block;
    text-align: center;
    width: 60px;
    padding-bottom: 10px;
    padding-top: 10px;
}
.icon-div img {
    width: 40px;
}
.shape-title1 {
    font-size: 12.5px;
    margin-top: 8px;
}
.tab-content1 {
    margin-bottom: 10px;
}
.tooltip-popup .nav {
    text-align: center;
}
.tooltip-popup li {
    width: 60px;
    display: inline-block;
    text-align: center;
    float: none;
}
.cut-popup li {
    width: auto;
}
.tooltip-popup .nav>li>a {
    position: relative;
    display: block;
    padding: 4px 12px;
    margin-bottom: 10px;
    background: #eeee;
    color: #081c33;
}
.tooltip-popup .nav-pills > li.active > a {
    background-color: #081c33 !important;
    color: #fff;
}
.tooltip-popup p {
    font-weight: 400;
    font-size: 13px;
    line-height: 20px;
    color: #444;
    letter-spacing: .5px;
}
@media (max-width: 991px) {
    .d_search_filt { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .filter-grid { grid-template-columns: 1fr; }
    .d-sm-none { display: block; }
    .d-sm-block { display: none; }
    
    .rbfilterlabel {
        width: 100%;
        text-align: left;
        padding: 12px 15px;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        margin-bottom: 5px;
        font-size: 15px;
        display: flex;
        justify-content: space-between;
    }

    .sort-pagi-bar { flex-direction: column; align-items: stretch; }
    .sort-by { justify-content: space-between; }
    
    .hidden-xs { display: none !important; }

    /* List View Mobile Tweaks */
    .flex-container, .flex-container-section {
        justify-content: space-between;
    }
    .flex-item:first-child, .flex-item-new:first-child { flex: 1; }
    .flex-item:last-child, .flex-item-new:last-child { flex: 1; text-align: right; }
}

@media (max-width: 480px) {
    .d_search_filt { grid-template-columns: repeat(2, 1fr); }
    .grid-view-container { grid-template-columns: 1fr; }
    .ad_filter_btn { flex-direction: column; }
}

/* Utility */
.no-padding1 { padding: 0 !important; }
.mt-4 { margin-top: 20px; }
.text-center { text-align: center; }
.button_bg_transparent { background: transparent; border: none; cursor: pointer; }