/**
 * NivoSync — Elegant Theme Loop
 *
 * Self-sufficient CSS for the elegant theme diamond loop.
 * Loaded with: ns-tokens.css (variables, reset, utilities)
 * Contains: header bar, type toggle, view toggle, sort, shapes bar,
 *           cards, grid, list view, expansion panel, sidebar filters,
 *           pagination, and all responsive rules.
 *
 * @package NivoSync
 * @since   2.1.0
 */

/* ==========================================================================
   1. SCOPED VARIABLES
   ========================================================================== */

.ns-theme-elegant {
    /* ns-theme-elegant.css values (primary) */
    --ns-primary: #1a1a1a;
    --ns-primary-hover: #333;
    --ns-accent: #b8860b;
    --ns-border: #e5e7eb;
    --ns-bg-light: #f9fafb;
    --ns-bg-hover: #f3f4f6;
    --ns-text: #1a1a1a;
    --ns-text-muted: #6b7280;

    /* ns-theme-variables.css overrides */
    --ns-primary-light: #f5f5f5;
    --ns-primary-dark: #000000;
    --ns-font-family: Georgia, "Times New Roman", Times, serif;
    --ns-font-family-heading: Georgia, "Times New Roman", Times, serif;
    --ns-border-radius-sm: 0;
    --ns-border-radius-md: 0;
    --ns-border-radius-lg: 0;
    --ns-border-radius-xl: 0;
    --ns-letter-spacing-normal: 0.05em;
    --ns-letter-spacing-wide: 0.1em;
    --ns-letter-spacing-wider: 0.15em;
}

.ns-diamonds-wrapper {
    /* Layout spacing */
    --ns-gap-sm: 12px;
    --ns-gap-md: 20px;
    --ns-gap-lg: 30px;
    --ns-max-width: 1400px;

    /* Component Colors */
    --ns-color-primary: #1a1a1a;
    --ns-color-secondary: #3b82f6;
    --ns-color-accent: #3b82f6;
    --ns-color-text: #1a1a1a;
    --ns-color-text-muted: #6b7280;
    --ns-color-text-light: #9ca3af;
    --ns-color-bg: #ffffff;
    --ns-color-bg-light: #f9fafb;
    --ns-color-bg-dark: #f3f4f6;
    --ns-color-border: #e5e7eb;
    --ns-color-border-dark: #d1d5db;
    --ns-space-xs: 4px;
    --ns-space-sm: 8px;
    --ns-space-md: 16px;
    --ns-space-lg: 24px;
    --ns-space-xl: 32px;
    --ns-space-2xl: 48px;
    --ns-radius-sm: 4px;
    --ns-radius-md: 6px;
    --ns-radius-lg: 8px;
    --ns-radius-xl: 12px;
    --ns-radius-full: 9999px;
    --ns-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --ns-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --ns-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --ns-transition-fast: 150ms ease;
    --ns-transition: 200ms ease;
    --ns-transition-slow: 300ms ease;
    --ns-grid-gap: 24px;
    --ns-card-gap: 20px;
}

/* ==========================================================================
   2. RESET
   ========================================================================== */

.ns-diamonds-wrapper {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #1a1a1a;
}

.ns-diamonds-wrapper *,
.ns-diamonds-wrapper *::before,
.ns-diamonds-wrapper *::after {
    box-sizing: inherit;
}

.ns-diamonds-wrapper button,
.ns-diamonds-wrapper input,
.ns-diamonds-wrapper select,
.ns-diamonds-wrapper textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
}

.ns-diamonds-wrapper button,
.ns-diamonds-wrapper [type="button"] {
    background-color: transparent;
    border: none;
    outline: none;
    box-shadow: none;
    text-decoration: none;
    cursor: pointer;
}

.ns-diamonds-wrapper button:focus,
.ns-diamonds-wrapper button:active,
.ns-diamonds-wrapper [type="button"]:focus,
.ns-diamonds-wrapper [type="button"]:active {
    outline: none;
    text-decoration: none;
}

.ns-diamonds-wrapper input[type="text"],
.ns-diamonds-wrapper input[type="number"],
.ns-diamonds-wrapper input[type="search"],
.ns-diamonds-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    border-radius: 0;
}

.ns-diamonds-wrapper ul,
.ns-diamonds-wrapper ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ns-diamonds-wrapper a {
    color: inherit;
    text-decoration: none;
}

.ns-diamonds-wrapper a:hover,
.ns-diamonds-wrapper a:focus {
    text-decoration: none;
}

/* ==========================================================================
   3. SECTION CONTAINERS
   ========================================================================== */

.ns-topbar-section {
    width: 100%;
    margin-bottom: var(--ns-gap-md);
}

.ns-topbar-inner {
    width: 100%;
    margin: 0 auto;
}

.ns-topbar-inner.ns-container-fullwidth {
    max-width: none;
    padding: 0;
}

.ns-topbar-inner.ns-container-boxed {
    max-width: var(--ns-topbar-max-width, 1200px);
    padding: 0 15px;
}

.ns-content-section {
    width: 100%;
}

.ns-content-inner {
    width: 100%;
    margin: 0 auto;
}

.ns-content-inner.ns-container-fullwidth {
    max-width: none;
    padding: 0 15px;
}

.ns-content-inner.ns-container-boxed {
    max-width: var(--ns-content-max-width, 1200px);
    padding: 0 15px;
}

.ns-horizontal-filters-wrapper {
    width: 100%;
}

/* ==========================================================================
   4. HEADER BAR — Queensmith two-column layout
   ========================================================================== */

.ns-diamonds-wrapper .ns-header-bar {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border-bottom: 1px solid var(--ns-border, #e5e7eb);
    margin-bottom: var(--ns-gap-md, 20px);
    background: #fff;
    padding: 0;
    gap: 0;
    flex-wrap: nowrap;
}

.ns-diamonds-wrapper .ns-header-left {
    display: flex;
    align-items: center;
    padding: 18px 10px 18px 30px;
    border-right: 1px solid var(--ns-border, #e5e7eb);
    flex-shrink: 0;
}

.ns-diamonds-wrapper .ns-header-right {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    padding: 18px 20px;
    gap: 20px;
}

/* ==========================================================================
   5. TYPE TOGGLE — Queensmith button-row style
   ========================================================================== */

.ns-diamonds-wrapper .ns-type-toggle {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    font-size: 14px;
    width: 100%;
    color: var(--ns-text, #1a1a1a);
}

.ns-diamonds-wrapper .ns-type-btn {
    box-shadow: rgba(39, 63, 78, 0.2) 0px 0px 0px 1px inset;
    display: block;
    line-height: 1;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
    border: none;
    flex: 1 1 0%;
    margin: 0.625rem;
    padding: 15px 20px;
    white-space: nowrap;
    background-color: #fff;
    color: var(--ns-text, #1a1a1a);
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    text-align: center;
}

.ns-diamonds-wrapper .ns-type-btn:hover:not(.ns-type-btn--active) {
    box-shadow: rgb(49, 63, 78) 0px 0px 0px 1px inset;
}

.ns-diamonds-wrapper .ns-type-btn.ns-type-btn--active,
.ns-diamonds-wrapper .ns-type-btn--active {
    background-color: var(--ns-primary, #1a1a1a);
    color: #fff;
    box-shadow: none;
    font-weight: 500;
}

/* ==========================================================================
   6. VIEW TOGGLE — Queensmith inline text+icon
   ========================================================================== */

.ns-diamonds-wrapper .ns-view-toggle {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 24px;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.ns-diamonds-wrapper .ns-view-btn {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: opacity 0.2s ease;
    color: var(--ns-text, #1a1a1a);
    font-size: 14px;
    line-height: 1;
    opacity: 0.5;
    white-space: nowrap;
    width: auto;
    height: auto;
    box-shadow: none;
}

.ns-diamonds-wrapper .ns-view-btn.active {
    opacity: 1;
    background: transparent;
    box-shadow: none;
    color: #000000;
}

.ns-diamonds-wrapper .ns-view-btn:hover {
    opacity: 1;
}

.ns-diamonds-wrapper .ns-view-btn svg {
    width: 15px;
    height: 15px;
}

.ns-diamonds-wrapper .ns-view-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.ns-diamonds-wrapper .ns-view-label {
    margin-top: 2px;
}

.ns-diamonds-wrapper .ns-view-label-extra {
    display: none;
}

/* ==========================================================================
   7. SORT DROPDOWN — Queensmith hover/click
   ========================================================================== */

.ns-diamonds-wrapper .ns-sort-container {
    position: relative;
    margin-left: 20px;
}

.ns-diamonds-wrapper .ns-sort-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 300;
    color: var(--ns-text, #1a1a1a);
    user-select: none;
    line-height: 1;
    white-space: nowrap;
}

.ns-diamonds-wrapper .ns-sort-label {
    display: none;
    font-weight: 300;
    color: var(--ns-text, #1a1a1a);
}

.ns-diamonds-wrapper .ns-sort-current {
    font-weight: 500;
}

.ns-diamonds-wrapper .ns-sort-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
    transform-origin: center;
    height: 16px;
    position: relative;
    top: 2px;
}

.ns-diamonds-wrapper .ns-sort-arrow--open {
    transform: rotate(180deg);
}

.ns-diamonds-wrapper .ns-sort-arrow-icon {
    width: 16px;
    height: 16px;
    fill: var(--ns-accent, #b8860b);
}

.ns-diamonds-wrapper .ns-sort-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 10px;
    background: #fff;
    z-index: 10;
    padding: 15px 20px;
    min-width: max-content;
    border: 1px solid var(--ns-border, #e5e7eb);
}

.ns-diamonds-wrapper .ns-sort-menu--open {
    display: block;
}

.ns-diamonds-wrapper .ns-sort-options {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    white-space: nowrap;
}

.ns-diamonds-wrapper .ns-sort-option {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 400;
    color: var(--ns-text, #1a1a1a);
    cursor: pointer;
    text-align: left;
    line-height: 1.4;
    transition: color 0.15s ease;
}

.ns-diamonds-wrapper .ns-sort-option:hover {
    color: var(--ns-accent, #b8860b);
}

.ns-diamonds-wrapper .ns-sort-option--active {
    color: var(--ns-accent, #b8860b);
}

/* ==========================================================================
   8. RESULTS COUNT
   ========================================================================== */

.ns-diamonds-wrapper .ns-results-count {
    font-size: 14px;
    color: var(--ns-color-text-muted);
}

.ns-diamonds-wrapper .ns-results-count strong {
    color: var(--ns-color-text);
    font-weight: 600;
}

/* ==========================================================================
   9. SHAPES BAR — Queensmith flex-wrap dark theme
   ========================================================================== */

.ns-diamonds-wrapper .ns-shapes-header {
    --ns-shapes-bg: #000000;
    --ns-shapes-text: #ffffff;

    background-color: var(--ns-shapes-bg);
    color: var(--ns-shapes-text);
    padding: 1.25rem 1.25rem 0.25rem;
    margin-bottom: var(--ns-space-lg, 24px);
    border-radius: var(--ns-shapes-radius, 0);
}

.ns-diamonds-wrapper .ns-shapes-header.ns-shapes-fullwidth,
.ns-diamonds-wrapper .ns-shapes-header.ns-shapes-boxed {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.ns-diamonds-wrapper .ns-shapes-header-content {
    text-align: center;
    margin-bottom: var(--ns-space-lg, 24px);
}

.ns-diamonds-wrapper .ns-shapes-title {
    font-family: var(--ns-font-heading);
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 var(--ns-space-sm, 8px);
    color: inherit;
    letter-spacing: 0.5px;
}

.ns-diamonds-wrapper .ns-shapes-description {
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    opacity: 0.85;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.ns-diamonds-wrapper .ns-shapes-filter-container {
    width: 100%;
}

.ns-diamonds-wrapper .ns-shapes-filter-track {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    padding: 0;
}

.ns-diamonds-wrapper .ns-shape-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 0 1.25rem 1.25rem;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    border-radius: 0;
    min-width: auto;
}

.ns-diamonds-wrapper .ns-shape-btn:hover:not(.ns-shape-disabled) {
    opacity: 1;
}

.ns-diamonds-wrapper .ns-shape-btn:focus {
    outline: none;
}

.ns-diamonds-wrapper .ns-shape-btn:focus-visible {
    outline: 2px solid var(--ns-shapes-text);
    outline-offset: 2px;
}

.ns-diamonds-wrapper .ns-shape-btn.ns-shape-active {
    opacity: 1;
}

.ns-diamonds-wrapper .ns-shape-btn.ns-shape-disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.ns-diamonds-wrapper .ns-shape-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ns-diamonds-wrapper .ns-shape-icon svg,
.ns-diamonds-wrapper .ns-shape-icon .ns-shape-svg {
    width: 100%;
    height: 100%;
    color: var(--ns-icon-stroke, var(--ns-shapes-text, currentColor));
    stroke: currentColor;
    fill: var(--ns-icon-fill, none);
}

.ns-diamonds-wrapper .ns-shape-icon svg g,
.ns-diamonds-wrapper .ns-shape-icon svg path,
.ns-diamonds-wrapper .ns-shape-icon svg circle,
.ns-diamonds-wrapper .ns-shape-icon svg ellipse,
.ns-diamonds-wrapper .ns-shape-icon svg polygon,
.ns-diamonds-wrapper .ns-shape-icon svg rect,
.ns-diamonds-wrapper .ns-shape-icon svg line {
    stroke: currentColor;
}

.ns-diamonds-wrapper .ns-shape-icon .stroke-current {
    stroke: currentColor;
}

.ns-diamonds-wrapper .ns-shape-icon img,
.ns-diamonds-wrapper .ns-shape-icon .ns-shape-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.ns-diamonds-wrapper .ns-shape-name {
    font-size: 0.875rem;
    font-weight: 300;
    text-transform: capitalize;
    white-space: nowrap;
}

.ns-diamonds-wrapper .ns-shape-count {
    font-size: 10px;
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 6px;
    border-radius: 10px;
    margin-top: 0.25rem;
}

/* ==========================================================================
   10. MAIN CONTENT + SIDEBAR
   ========================================================================== */

.ns-main-content {
    display: flex;
    gap: var(--ns-gap-lg);
    width: 100%;
    align-items: flex-start;
}

.ns-layout-sidebar .ns-main-content,
.ns-layout-sidebar.ns-sidebar-left .ns-main-content {
    flex-direction: row;
}

.ns-layout-sidebar.ns-sidebar-right .ns-main-content {
    flex-direction: row-reverse;
}

.ns-layout-horizontal .ns-main-content {
    flex-direction: column;
}

.ns-grid-container h1,
.ns-grid-container h2,
.ns-grid-container h3,
.ns-grid-container h4,
.ns-grid-container h5,
.ns-grid-container h6 {
    text-decoration: inherit;
}

.ns-grid-container {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.ns-layout-horizontal .ns-grid-container {
    width: 100%;
}

.ns-sidebar-filters {
    width: var(--ns-sidebar-width);
    min-width: var(--ns-sidebar-width);
    flex-shrink: 0;
}

.ns-layout-horizontal .ns-sidebar-filters {
    display: none;
}

.ns-horizontal-filters-container {
    margin-bottom: var(--ns-gap-md);
}

.ns-layout-sidebar .ns-horizontal-filters-container {
    display: none;
}

/* ==========================================================================
   11. MOBILE FILTER TOGGLE
   ========================================================================== */

.ns-mobile-filter-toggle {
    display: none;
    position: static;
    bottom: auto;
    right: auto;
    z-index: auto;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--ns-bg-light);
    border: 1px solid var(--ns-border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ns-text);
    cursor: pointer;
    margin-bottom: var(--ns-gap-md);
    width: 100%;
    justify-content: center;
    box-shadow: none;
    transform: none;
    transition: all var(--ns-transition);
}

.ns-mobile-filter-toggle:hover {
    background: var(--ns-bg-hover);
}

.ns-mobile-filter-toggle svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   12. GRID ITEMS
   ========================================================================== */

.ns-grid-items {
    display: grid;
    gap: var(--ns-gap-md);
}

.ns-grid-view .ns-grid-items,
.ns-diamonds-wrapper[data-view="grid"] .ns-grid-items {
    grid-template-columns: repeat(1, 1fr);
}

.ns-list-view .ns-grid-items,
.ns-diamonds-wrapper[data-view="list"] .ns-grid-items {
    grid-template-columns: 1fr;
}

/* ==========================================================================
   13. GRID ELEGANT
   ========================================================================== */

.ns-diamonds-wrapper .ns-grid-elegant.ns-grid-view .ns-grid-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.ns-diamonds-wrapper .ns-grid-elegant .ns-grid-items {
    transition: opacity 0.2s ease;
    opacity: 1;
}

.ns-diamonds-wrapper .ns-grid-elegant .ns-grid-items.ns-view-transitioning {
    opacity: 0;
    pointer-events: none;
}

/* ==========================================================================
   14. LOADING STATE ELEGANT
   ========================================================================== */

.ns-diamonds-wrapper .ns-loading {
    position: relative;
    pointer-events: none;
}

.ns-diamonds-wrapper .ns-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: 10;
}

.ns-diamonds-wrapper .ns-loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1.75rem;
    height: 1.75rem;
    border: 2px solid #e0e0e0;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: ns-elegant-spin 0.7s linear infinite;
    z-index: 11;
}

/* ==========================================================================
   15. CARDS ELEGANT
   ========================================================================== */

/* --- Card Base --- */
.ns-diamonds-wrapper .ns-card-elegant {
    background: #fff;
    border: 1px solid var(--ns-border, #e5e7eb);
    border-radius: 3px;
    cursor: pointer;
    transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ns-diamonds-wrapper .ns-card-elegant:hover {
    border-color: #999;
}

.ns-diamonds-wrapper .ns-card-elegant.ns-card--active {
    border-color: var(--ns-primary, #1a1a1a);
}

/* --- Card Image --- */
.ns-diamonds-wrapper .ns-card-elegant .ns-card-image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f9fafb;
}

.ns-diamonds-wrapper .ns-card-elegant .ns-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.ns-diamonds-wrapper .ns-card-elegant:hover .ns-card-image img {
    transform: scale(1.03);
}

/* --- Card Badges --- */
.ns-diamonds-wrapper .ns-card-elegant .ns-card-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 4px;
    z-index: 1;
}

.ns-diamonds-wrapper .ns-card-elegant .ns-card-badge {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 2px;
    line-height: 1.4;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.ns-diamonds-wrapper .ns-card-elegant .ns-card-badge--lab {
    background-color: var(--ns-primary, #1a1a1a);
    color: #fff;
}

/* --- Card Body (Queensmith layout) --- */
.ns-diamonds-wrapper .ns-card-elegant .ns-card-body {
    padding: 12px 15px 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* --- Card Price (top of body) --- */
.ns-diamonds-wrapper .ns-card-elegant .ns-card-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--ns-text, #1a1a1a);
    margin: 0 0 4px;
    line-height: 1.3;
}

/* --- Card Title --- */
.ns-diamonds-wrapper .ns-card-elegant .ns-card-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--ns-text, #1a1a1a);
    margin: 0 0 2px;
    line-height: 1.3;
}

/* --- Card Subtitle --- */
.ns-diamonds-wrapper .ns-card-elegant .ns-card-subtitle {
    font-size: 12px;
    font-weight: 400;
    color: var(--ns-text-muted, #6b7280);
    margin: 0 0 10px;
    line-height: 1.3;
}

/* --- Card Footer (More Info + Cert) --- */
.ns-diamonds-wrapper .ns-card-elegant .ns-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--ns-border, #e5e7eb);
}

/* --- More Info Button --- */
.ns-diamonds-wrapper .ns-card-elegant .ns-card-more-info-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 400;
    font-family: inherit;
    color: var(--ns-text, #1a1a1a);
    cursor: pointer;
    transition: color 0.2s ease;
}

.ns-diamonds-wrapper .ns-card-elegant .ns-card-more-info-btn:hover {
    color: #000;
}

.ns-diamonds-wrapper .ns-card-elegant .ns-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    height: 12px;
}

.ns-diamonds-wrapper .ns-card-elegant.ns-card--active .ns-chevron {
    transform: rotate(180deg);
}

/* --- Certification Badge --- */
.ns-diamonds-wrapper .ns-card-elegant .ns-card-cert {
    height: 20px;
    display: flex;
    align-items: center;
    opacity: 0.7;
}

.ns-diamonds-wrapper .ns-card-elegant .ns-cert-logo {
    height: 20px;
    width: auto;
}

/* ==========================================================================
   16. LIST VIEW — Queensmith-style table rows
   ========================================================================== */

/* Table header: hidden in grid view, shown in list view */
.ns-diamonds-wrapper .ns-grid-elegant.ns-grid-view .ns-list-header {
    display: none;
}

.ns-diamonds-wrapper .ns-grid-elegant.ns-list-view .ns-list-header {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr) 40px;
    gap: 10px;
    border-bottom: 1px solid #e5e1da;
    padding: 15px 0;
}

.ns-diamonds-wrapper .ns-list-header .ns-list-col {
    text-align: center;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8a8578;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.ns-diamonds-wrapper .ns-sort-arrows {
    display: inline-flex;
    opacity: 0.4;
}

.ns-diamonds-wrapper .ns-list-sort-label {
    display: inline;
}

/* Grid items container — single column, no gap */
.ns-diamonds-wrapper .ns-grid-elegant.ns-list-view .ns-grid-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

/* Data row */
.ns-diamonds-wrapper .ns-grid-elegant.ns-list-view .ns-list-row {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr) 40px;
    gap: 10px;
    padding: 12px 0;
    cursor: pointer;
    border-bottom: 1px solid #f0ede8;
    align-items: center;
    transition: background-color 0.15s ease;
}

.ns-diamonds-wrapper .ns-list-row:hover {
    background-color: #faf9f7;
}

.ns-diamonds-wrapper .ns-list-row.ns-card--active {
    background-color: #f5f3ef;
}

/* Data cells */
.ns-diamonds-wrapper .ns-list-row .ns-list-col {
    text-align: center;
    font-size: 14px;
    color: #3a3630;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    padding: 2px 0;
}

/* Shape icon in list row */
.ns-diamonds-wrapper .ns-list-row .ns-col-shape .ns-shape-icon {
    width: 20px;
    height: 20px;
    opacity: 0.55;
}

/* Price column — bolder */
.ns-diamonds-wrapper .ns-list-row .ns-col-price {
    font-weight: 600;
    color: #1a1814;
}

/* Chevron toggle */
.ns-diamonds-wrapper .ns-list-chevron {
    display: inline-flex;
    transition: transform 0.25s ease;
    color: #b8a88a;
}

.ns-diamonds-wrapper .ns-list-row.ns-card--active .ns-list-chevron {
    transform: rotate(180deg);
}

/* ==========================================================================
   17. EXPANSION PANEL — Elegant inline detail panel
   ========================================================================== */

/* --- Panel Container --- */
.ns-diamonds-wrapper .ns-expansion-panel {
    grid-column: 1 / -1;
    border: 1px solid var(--ns-primary, #1a1a1a);
    border-radius: 3px;
    overflow: hidden;
    background: #fff;
    position: relative;
}

/* --- Slide Animation --- */
.ns-diamonds-wrapper .ns-expansion-panel--animating {
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

/* --- Panel Inner Layout --- */
.ns-diamonds-wrapper .ns-expansion-panel-inner {
    display: flex;
    flex-direction: row;
    padding: 30px;
    gap: 30px;
    max-height: 480px;
    overflow-y: auto;
}

/* --- Close Button --- */
.ns-diamonds-wrapper .ns-expansion-close {
    display: flex;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--ns-border, #e5e7eb);
    background: #fff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--ns-text, #1a1a1a);
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.ns-diamonds-wrapper .ns-expansion-close:hover {
    background: var(--ns-primary, #1a1a1a);
    border-color: var(--ns-primary, #1a1a1a);
    color: #fff;
}

/* --- Media Section (Left) --- */
.ns-diamonds-wrapper .ns-expansion-media {
    flex: 0 0 auto;
    width: 380px;
    min-width: 0;
}

.ns-diamonds-wrapper .ns-expansion-media-main {
    position: relative;
    width: 340px;
    height: 340px;
    border-radius: 6px;
    overflow: hidden;
    background: #f9fafb;
}

.ns-diamonds-wrapper .ns-expansion-media-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* 360° Canvas Viewer Container (expansion panel) */
.ns-diamonds-wrapper .ns-expansion-media-main .ns-360-viewer-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    background: var(--ns-gray-100);
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.ns-diamonds-wrapper .ns-expansion-media-main .ns-360-viewer-container:active {
    cursor: grabbing;
}

.ns-diamonds-wrapper .ns-360-viewer-container canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ns-diamonds-wrapper .ns-360-viewer-container .ns-360-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ns-gray-100);
}

.ns-diamonds-wrapper .ns-expansion-media-main video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ns-diamonds-wrapper .ns-expansion-media-item {
    display: none;
    width: 100%;
    height: 100%;
}

.ns-diamonds-wrapper .ns-expansion-media-item.active {
    display: block;
}

/* --- Media Thumbnails --- */
.ns-diamonds-wrapper .ns-expansion-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.ns-diamonds-wrapper .ns-expansion-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    border: 1px solid var(--ns-border, #e5e7eb);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.ns-diamonds-wrapper .ns-expansion-thumb:hover {
    border-color: #999;
}

.ns-diamonds-wrapper .ns-expansion-thumb.active {
    border-color: var(--ns-primary, #1a1a1a);
}

.ns-diamonds-wrapper .ns-expansion-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ns-diamonds-wrapper .ns-expansion-thumb svg {
    width: 20px;
    height: 20px;
    color: var(--ns-text-muted, #6b7280);
}

.ns-diamonds-wrapper .ns-expansion-thumb .ns-expansion-thumb-360-icon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    pointer-events: none;
}

/* --- Details Section (Right) --- */
.ns-diamonds-wrapper .ns-expansion-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding-left: 10px;
}

/* --- Panel Title, Subtitle, Price Header --- */
.ns-diamonds-wrapper .ns-expansion-title {
    font-size: 26px;
    font-weight: 500;
    font-family: 'Cormorant Garamond', Georgia, serif;
    margin: 0 0 2px;
    color: var(--ns-text, #1a1a1a);
    line-height: 1.3;
}

.ns-diamonds-wrapper .ns-expansion-subtitle {
    font-size: 14px;
    color: var(--ns-text-muted, #6b7280);
    margin: 0 0 10px;
    line-height: 1.4;
}

.ns-diamonds-wrapper .ns-expansion-price-header {
    font-size: 20px;
    font-weight: 500;
    margin: 0 0 20px;
    color: var(--ns-text, #1a1a1a);
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ns-diamonds-wrapper .ns-expansion-lab-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ns-text-muted, #6b7280);
}

/* --- Specs Grid --- */
.ns-diamonds-wrapper .ns-expansion-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
    font-size: 12px;
    margin-bottom: 20px;
    line-height: 1.4;
}

.ns-diamonds-wrapper .ns-expansion-spec {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    line-height: 1.6;
}

.ns-diamonds-wrapper .ns-expansion-spec-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--ns-text, #1a1a1a);
    opacity: 0.7;
    display: none; /* Hidden — will be re-enabled in a future update */
}

.ns-diamonds-wrapper .ns-expansion-spec-label {
    font-weight: 500;
    white-space: nowrap;
    color: var(--ns-text, #1a1a1a);
}

.ns-diamonds-wrapper .ns-expansion-spec-value {
    font-weight: 400;
    color: var(--ns-text, #1a1a1a);
}

/* --- Certificate Info --- */
.ns-diamonds-wrapper .ns-expansion-cert {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    color: var(--ns-text-muted, #6b7280);
}

.ns-diamonds-wrapper .ns-expansion-cert a {
    color: var(--ns-text, #1a1a1a);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ns-diamonds-wrapper .ns-expansion-cert a:hover {
    color: #000;
}

/* --- Actions Row --- */
.ns-diamonds-wrapper .ns-expansion-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
}

/* CTA Button (base) */
.ns-diamonds-wrapper .ns-expansion-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 1.25rem 1.875rem !important;
    background: var(--ns-primary, #1a1a1a);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    border: 1px solid var(--ns-primary, #1a1a1a);
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    line-height: 1;
    text-align: center;
}

.ns-diamonds-wrapper .ns-expansion-cta:hover {
    background: var(--ns-primary-hover, #333);
    border-color: var(--ns-primary-hover, #333);
    color: #fff;
    text-decoration: none;
}

/* Add to Ring button */
.ns-diamonds-wrapper .ns-expansion-cta--ring {
    background: var(--ns-primary, #1a1a1a);
    color: #fff;
}

.ns-diamonds-wrapper .ns-expansion-cta--ring.ns-hidden {
    display: none;
}

/* View Details button — solid style (matches Book Appointment) */
.ns-diamonds-wrapper .ns-expansion-cta--details {
    background: var(--ns-primary, #1a1a1a);
    color: #fff;
    border: 1px solid var(--ns-primary, #1a1a1a);
}

.ns-diamonds-wrapper .ns-expansion-cta--details:hover {
    background: transparent;
    color: var(--ns-primary, #1a1a1a);
    border: 1px solid var(--ns-primary, #1a1a1a);
}

/* --- Loading State --- */
.ns-diamonds-wrapper .ns-expansion-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    gap: 12px;
    color: var(--ns-text-muted, #6b7280);
    font-size: 14px;
}

/* ==========================================================================
   18. NO RESULTS
   ========================================================================== */

.ns-diamonds-wrapper .ns-diamonds-grid {
    width: 100%;
}

.ns-diamonds-wrapper .ns-no-results {
    grid-column: 1 / -1;
    padding: var(--ns-space-2xl);
    text-align: center;
    background: var(--ns-color-bg-light);
    border: 1px solid var(--ns-color-border);
    border-radius: var(--ns-radius-lg);
}

.ns-diamonds-wrapper .ns-no-results p {
    margin: 0;
    font-size: 15px;
    color: var(--ns-color-text-muted);
}

/* ==========================================================================
   19. SIDEBAR FILTERS — CORE
   ========================================================================== */

.ns-diamonds-wrapper .ns-filters-sidebar {
    background: var(--ns-color-bg);
    border: 1px solid var(--ns-color-border);
    border-radius: var(--ns-radius-lg);
    overflow: hidden;
}

.ns-diamonds-wrapper .ns-filter-section {
    padding: var(--ns-space-md);
    border-bottom: 1px solid var(--ns-color-border);
}

.ns-diamonds-wrapper .ns-filter-section:last-child {
    border-bottom: none;
}

.ns-diamonds-wrapper .ns-filter-section h4 {
    margin: 0 0 var(--ns-space-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--ns-color-text);
}

.ns-diamonds-wrapper .ns-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ns-diamonds-wrapper .ns-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    background: var(--ns-color-bg);
    border: 1px solid var(--ns-color-border);
    border-radius: var(--ns-radius-full);
    font-size: 12px;
    font-weight: 500;
    color: var(--ns-color-text);
    cursor: pointer;
    transition: all var(--ns-transition);
}

.ns-diamonds-wrapper .ns-filter-btn:hover {
    border-color: var(--ns-color-border-dark);
}

.ns-diamonds-wrapper .ns-filter-btn.active {
    background: var(--ns-color-primary);
    border-color: var(--ns-color-primary);
    color: #ffffff;
}

.ns-diamonds-wrapper .ns-filter-range {
    display: flex;
    align-items: center;
    gap: var(--ns-space-sm);
}

.ns-diamonds-wrapper .ns-filter-range-input {
    flex: 1;
}

.ns-diamonds-wrapper .ns-filter-range-input label {
    display: block;
    font-size: 10px;
    color: var(--ns-color-text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ns-diamonds-wrapper .ns-filter-range-input input {
    width: 100%;
    padding: 10px 12px;
    background: var(--ns-color-bg);
    border: 1px solid var(--ns-color-border);
    border-radius: var(--ns-radius-md);
    font-size: 14px;
    color: var(--ns-color-text);
    transition: border-color var(--ns-transition);
}

.ns-diamonds-wrapper .ns-filter-range-input input:focus {
    border-color: var(--ns-color-accent);
    outline: none;
}

.ns-diamonds-wrapper .ns-filter-range-separator {
    color: var(--ns-color-text-muted);
    padding-top: 20px;
}

.ns-diamonds-wrapper .ns-filter-clear {
    display: block;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--ns-color-border);
    border-radius: var(--ns-radius-md);
    font-size: 13px;
    color: var(--ns-color-text-muted);
    cursor: pointer;
    transition: all var(--ns-transition);
}

.ns-diamonds-wrapper .ns-filter-clear:hover {
    border-color: var(--ns-color-border-dark);
    color: var(--ns-color-text);
}

/* ==========================================================================
   20. SIDEBAR FILTERS — ELEGANT
   ========================================================================== */

.ns-diamonds-wrapper .ns-sidebar-elegant {
    background: #fff;
    color: #1a1a1a;
    font-size: 14px;
    border: none;
    border-radius: 0;
    border-right: 1px solid rgba(26, 26, 26, 0.1);
}

.ns-diamonds-wrapper .ns-elegant-filters {
    padding: 30px 20px;
}

.ns-diamonds-wrapper .ns-elegant-filter-section {
    margin-bottom: 30px;
}

.ns-diamonds-wrapper .ns-elegant-filter-section:last-child {
    margin-bottom: 0;
}

.ns-diamonds-wrapper .ns-elegant-filter-label {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.ns-diamonds-wrapper .ns-elegant-filter-grid {
    display: grid;
    gap: 5px;
    max-width: 540px;
}

.ns-diamonds-wrapper .ns-elegant-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ns-diamonds-wrapper .ns-elegant-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ns-diamonds-wrapper .ns-elegant-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.ns-diamonds-wrapper .ns-elegant-grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

.ns-diamonds-wrapper .ns-elegant-filter-btn {
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px #313f4e;
    display: block;
    font-size: 12px;
    line-height: 1;
    padding: 17px 3px 13px;
    text-align: center;
    transition-duration: 0.25s;
    transition-property: box-shadow, color, background-color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #1a1a1a;
    font-family: inherit;
}

.ns-diamonds-wrapper .ns-elegant-filter-btn:hover {
    box-shadow: inset 0 0 0 2px #313f4e;
}

.ns-diamonds-wrapper .ns-elegant-filter-btn--selected {
    background-color: #1a1a1a;
    color: #ffffff;
    box-shadow: none;
}

.ns-diamonds-wrapper .ns-elegant-filter-btn--selected:hover {
    background-color: rgb(26, 26, 26);
    color: rgb(255, 255, 255);
    box-shadow: none;
}

.ns-diamonds-wrapper .ns-elegant-filter-btn--disabled {
    background-color: #fff;
    box-shadow: inset 0 0 0 1px rgba(39, 63, 78, 0.2);
    color: #a2adba;
    cursor: not-allowed;
}

.ns-diamonds-wrapper .ns-elegant-select-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.ns-diamonds-wrapper .ns-elegant-select-box {
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px #313f4e;
    padding-top: 0.625rem;
    transition-duration: 0.25s;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
}

.ns-diamonds-wrapper .ns-elegant-select-box:hover {
    box-shadow: inset 0 0 0 2px #313f4e;
}

.ns-diamonds-wrapper .ns-elegant-select-label {
    font-size: 8px;
    opacity: 0.6;
    text-align: center;
    margin-bottom: 2px;
    text-transform: lowercase;
}

.ns-diamonds-wrapper .ns-elegant-select {
    background: transparent;
    color: #1a1a1a;
    text-align: center;
    padding: 0 15px 8px;
    border: none;
    width: 100%;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.ns-diamonds-wrapper .ns-elegant-select:focus {
    outline: none;
}

.ns-diamonds-wrapper .ns-elegant-select-separator {
    font-size: 8px;
    opacity: 0.6;
    flex-shrink: 0;
}

.ns-diamonds-wrapper .ns-elegant-hidden-input {
    display: none;
}

.ns-diamonds-wrapper .ns-elegant-accordion {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: none;
    border-top: 1px solid rgba(26, 26, 26, 0.1);
    border-bottom: 1px solid rgba(26, 26, 26, 0.1);
    padding: 15px 20px;
    font-weight: 500;
    font-size: 14px;
    background: #fff;
    color: #1a1a1a;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-family: inherit;
}

.ns-diamonds-wrapper .ns-elegant-accordion:hover {
    background: #fafafa;
}

.ns-diamonds-wrapper .ns-elegant-accordion.ns-elegant-accordion--open {
    background: #fafafa;
}

.ns-diamonds-wrapper .ns-elegant-accordion-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(26, 26, 26, 0.4);
    background: #fff;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.ns-diamonds-wrapper .ns-elegant-accordion--open .ns-elegant-accordion-arrow {
    transform: rotate(180deg);
}

.ns-diamonds-wrapper .ns-elegant-arrow-fill {
    fill: #1a1a1a;
}

.ns-diamonds-wrapper .ns-elegant-accordion-content {
    display: none;
    overflow: hidden;
}

.ns-diamonds-wrapper .ns-elegant-accordion-content.ns-elegant-accordion-content--open {
    display: block;
}

.ns-diamonds-wrapper .ns-elegant-accordion-inner {
    padding: 30px 20px;
}

/* ==========================================================================
   21. HORIZONTAL FILTERS
   ========================================================================== */

.ns-diamonds-wrapper .ns-filters-horizontal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--ns-space-md);
    padding: var(--ns-space-md);
    background: var(--ns-color-bg);
    border: 1px solid var(--ns-color-border);
    border-radius: var(--ns-radius-lg);
}

.ns-diamonds-wrapper .ns-filters-horizontal .ns-filter-group {
    display: flex;
    align-items: center;
    gap: var(--ns-space-sm);
}

.ns-diamonds-wrapper .ns-filters-horizontal .ns-filter-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ns-color-text);
    white-space: nowrap;
}

/* ==========================================================================
   22. PAGINATION
   ========================================================================== */

/* --- Layout base (ns-layout.css) --- */

.ns-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: var(--ns-gap-lg);
    padding: 20px 0;
    flex-wrap: wrap;
}

.ns-page-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ns-page-btn,
.ns-page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid var(--ns-border);
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    color: var(--ns-text);
    transition: all var(--ns-transition);
}

.ns-page-btn:hover,
.ns-page-num:hover {
    background: var(--ns-bg-hover);
    border-color: var(--ns-primary);
}

.ns-page-current {
    background: var(--ns-primary);
    border-color: var(--ns-primary);
    color: #fff;
}

.ns-page-dots {
    padding: 0 8px;
    color: var(--ns-text-muted);
}

.ns-diamonds-wrapper .ns-pagination a,
.ns-diamonds-wrapper .ns-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--ns-color-bg, #fff);
    border: 1px solid var(--ns-color-border, #e5e7eb);
    border-radius: var(--ns-radius-md, 6px);
    font-size: 14px;
    color: var(--ns-color-text, #1a1a1a);
    text-decoration: none;
    transition: all 200ms ease;
}

.ns-diamonds-wrapper .ns-pagination a:hover {
    border-color: var(--ns-color-border-dark, #d1d5db);
    background: var(--ns-color-bg-light, #f9fafb);
}

.ns-diamonds-wrapper .ns-pagination .current,
.ns-diamonds-wrapper .ns-pagination span.current {
    background: var(--ns-color-primary, #1a1a1a);
    border-color: var(--ns-color-primary, #1a1a1a);
    color: #ffffff;
}

.ns-diamonds-wrapper .ns-pagination .dots {
    background: transparent;
    border: none;
    color: var(--ns-color-text-muted, #6b7280);
}

.ns-diamonds-wrapper .ns-pagination .prev,
.ns-diamonds-wrapper .ns-pagination .next {
    padding: 0 16px;
}

.ns-diamonds-wrapper .ns-pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- Elegant theme pagination --- */

.ns-theme-elegant .ns-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 0 1rem;
}

.ns-theme-elegant .ns-pagination .ns-pagination-list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.ns-theme-elegant .ns-pagination .ns-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.625rem;
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    font-family: inherit;
    color: #1a1a1a;
    background: transparent;
    border: 1px solid #d4d4d4;
    border-radius: 0;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    line-height: 1;
}

.ns-theme-elegant .ns-pagination .ns-page-item:not(.ns-active):not(.ns-disabled) .ns-page-link:hover {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.ns-theme-elegant .ns-pagination .ns-active .ns-page-link {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
    cursor: default;
    font-weight: 500;
}

.ns-theme-elegant .ns-pagination .ns-disabled .ns-page-link {
    color: #ccc;
    border-color: #eee;
    cursor: not-allowed;
    background: transparent;
}

.ns-theme-elegant .ns-pagination .ns-page-dots .ns-page-link {
    border: none;
    cursor: default;
    min-width: 1.5rem;
    padding: 0 0.25rem;
    color: #999;
}

.ns-theme-elegant .ns-pagination .ns-page-dots .ns-page-link:hover {
    background: transparent;
    color: #999;
}

.ns-theme-elegant .ns-pagination .ns-page-prev .ns-page-link,
.ns-theme-elegant .ns-pagination .ns-page-next .ns-page-link {
    font-size: 0.875rem;
    padding: 0 0.75rem;
}

.ns-theme-elegant .ns-pagination .ns-page-first .ns-page-link,
.ns-theme-elegant .ns-pagination .ns-page-last .ns-page-link {
    font-size: 0.875rem;
    padding: 0 0.625rem;
}

/* --- Load More Button (elegant) --- */
.ns-theme-elegant .ns-load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 2.5rem 0 1rem;
}

.ns-theme-elegant .ns-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: inherit;
    color: #1a1a1a;
    background: transparent;
    border: 1px solid #1a1a1a;
    border-radius: 0;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    line-height: 1;
}

.ns-theme-elegant .ns-load-more-btn:hover {
    background: #1a1a1a;
    color: #fff;
}

.ns-theme-elegant .ns-load-more-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* --- Infinite Scroll Trigger (elegant) --- */
.ns-theme-elegant .ns-infinite-scroll-trigger {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.ns-theme-elegant .ns-loading-spinner {
    width: 1.75rem;
    height: 1.75rem;
    border: 2px solid #e0e0e0;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: ns-elegant-spin 0.7s linear infinite;
}

/* ==========================================================================
   23. MOBILE SIDEBAR OVERLAY
   ========================================================================== */

.ns-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* ==========================================================================
   24. TESTING IDENTIFIER
   ========================================================================== */

.ns-diamonds-wrapper .ns-template-identifier {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 15px;
    margin-bottom: 10px;
    border-radius: var(--ns-radius-sm);
}

/* ==========================================================================
   25. QUICK VIEW — ELEGANT OVERRIDES
   (Absorbed from ns-quick-view.css)
   ========================================================================== */

.ns-theme-elegant .ns-qv-title {
    font-family: var(--ns-font-family-primary, 'Cormorant Garamond', Georgia, serif);
    font-weight: 500;
}

.ns-theme-elegant .ns-qv-btn--primary {
    background: var(--ns-color-primary, #1a3a4a);
    border-radius: 0;
}

.ns-theme-elegant .ns-qv-btn--outline {
    border-radius: 0;
}

/* ==========================================================================
   26. KEYFRAMES
   ========================================================================== */

@keyframes ns-elegant-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   26. RESPONSIVE
   ========================================================================== */

/* --- Desktop (min-width: 1200px) --- */

@media (min-width: 1200px) {
    .ns-diamonds-wrapper .ns-header-left {
        width: 25%;
        padding: 2px 10px;
    }
}

/* --- Grid layout fallbacks (min-width breakpoints) --- */

@media (min-width: 576px) {
    .ns-grid-view .ns-grid-items,
    .ns-diamonds-wrapper[data-view="grid"] .ns-grid-items {
        grid-template-columns: repeat(2, 1fr);
    }

    .ns-diamonds-wrapper .ns-view-label-extra {
        display: inline;
    }

    .ns-diamonds-wrapper .ns-sort-label {
        display: inline;
    }
}

@media (min-width: 768px) {
    .ns-diamonds-wrapper .ns-elegant-filters {
        padding: 15px 20px;
    }

    .ns-diamonds-wrapper .ns-elegant-accordion {
        padding: 15px 40px;
    }

    .ns-diamonds-wrapper .ns-elegant-accordion-inner {
        padding: 30px 40px;
    }
}

@media (min-width: 992px) {
    .ns-grid-view .ns-grid-items,
    .ns-diamonds-wrapper[data-view="grid"] .ns-grid-items {
        grid-template-columns: repeat(3, 1fr);
    }

    .ns-mobile-filter-toggle {
        display: none;
    }

    .ns-sidebar-filters {
        display: block;
        position: static;
        transform: none;
        height: auto;
        box-shadow: none;
        padding: 0;
    }
}

@media (min-width: 1200px) {
    .ns-grid-view .ns-grid-items,
    .ns-diamonds-wrapper[data-view="grid"] .ns-grid-items {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --- Tablet grid (max-width: 1200px) --- */

@media (max-width: 1200px) {
    .ns-diamonds-wrapper .ns-grid-elegant.ns-grid-view .ns-grid-items {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Tablet (max-width: 991px) — sidebar collapse to modal --- */

@media (max-width: 991px) {
    .ns-diamonds-wrapper {
        --ns-sidebar-width: 240px;
    }

    .ns-layout-sidebar .ns-main-content {
        flex-direction: column;
    }

    .ns-mobile-filter-toggle {
        display: flex;
    }

    .ns-sidebar-filters {
        position: fixed;
        top: 0;
        left: 0;
        width: 320px;
        max-width: 90vw;
        height: 100vh;
        background: #fff;
        z-index: 1000;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        padding: 20px;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    }

    .ns-sidebar-filters.ns-mobile-open {
        transform: translateX(0);
    }

    .ns-sidebar-filters::before {
        content: '\2715';
        position: absolute;
        top: 15px;
        right: 15px;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--ns-bg-light);
        border-radius: 50%;
        cursor: pointer;
        font-size: 14px;
    }

    .ns-diamonds-wrapper .ns-shapes-header {
        padding: 1.25rem 1rem 0.25rem;
    }
}

/* --- Tablet (max-width: 768px) --- */

@media (max-width: 768px) {
    .ns-diamonds-wrapper .ns-grid-elegant.ns-grid-view .ns-grid-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .ns-diamonds-wrapper .ns-expansion-panel-inner {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        max-height: none;
    }

    .ns-diamonds-wrapper .ns-expansion-media {
        width: 100%;
    }

    .ns-diamonds-wrapper .ns-expansion-media-main {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        max-height: 340px;
    }

    .ns-diamonds-wrapper .ns-expansion-details {
        padding-left: 0;
    }

    .ns-diamonds-wrapper .ns-expansion-specs {
        grid-template-columns: 1fr 1fr;
        gap: 8px 16px;
    }

    .ns-diamonds-wrapper .ns-list-header,
    .ns-diamonds-wrapper .ns-list-row {
        grid-template-columns: 40px repeat(5, 1fr) 30px;
    }

    .ns-diamonds-wrapper .ns-col-polish,
    .ns-diamonds-wrapper .ns-col-symmetry {
        display: none;
    }

    .ns-diamonds-wrapper .ns-list-row .ns-list-col {
        font-size: 11px;
    }

    .ns-diamonds-wrapper .ns-list-header .ns-list-col {
        font-size: 9px;
    }
}

/* --- Mobile (max-width: 767px) --- */

@media (max-width: 767px) {
    .ns-diamonds-wrapper .ns-header-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .ns-diamonds-wrapper .ns-header-left {
        border-right: none;
        border-bottom: 1px solid var(--ns-border, #e5e7eb);
        padding: 18px 15px;
        justify-content: center;
    }

    .ns-diamonds-wrapper .ns-header-right {
        padding: 18px 15px;
        justify-content: space-between;
    }

    .ns-diamonds-wrapper .ns-sort-container {
        margin-left: auto;
    }

    .ns-diamonds-wrapper .ns-shapes-header {
        padding: 1rem 0.75rem 0;
        margin-bottom: var(--ns-space-md, 16px);
        border-radius: var(--ns-radius-sm, 4px);
    }

    .ns-diamonds-wrapper .ns-shapes-title {
        font-size: 22px;
    }

    .ns-diamonds-wrapper .ns-shapes-description {
        font-size: 14px;
    }

    .ns-diamonds-wrapper .ns-shapes-header-content {
        margin-bottom: var(--ns-space-md, 16px);
    }

    .ns-diamonds-wrapper .ns-shape-btn {
        margin: 0 0.75rem 1rem;
    }

    .ns-diamonds-wrapper .ns-shape-icon {
        width: 36px;
        height: 36px;
    }

    .ns-diamonds-wrapper .ns-shape-name {
        font-size: 0.75rem;
        margin-top: 0.625rem;
    }

    .ns-diamonds-wrapper .ns-elegant-filter-grid {
        max-width: none;
    }

    .ns-diamonds-wrapper .ns-elegant-filter-btn {
        padding: 14px 3px 10px;
        font-size: 11px;
    }

    .ns-diamonds-wrapper .ns-elegant-select-row {
        gap: 12px;
    }
}

/* --- Small mobile (max-width: 576px) --- */

@media (max-width: 576px) {
    .ns-diamonds-wrapper .ns-header-left {
        padding: 15px 10px;
    }

    .ns-diamonds-wrapper .ns-header-right {
        padding: 15px 10px;
        gap: 15px;
    }

    .ns-diamonds-wrapper .ns-type-btn {
        padding: 12px 15px;
        margin: 0.4rem;
    }

    .ns-diamonds-wrapper .ns-sort-container {
        margin-left: 0;
    }
}

/* --- Mobile grid (max-width: 480px) --- */

@media (max-width: 480px) {
    .ns-diamonds-wrapper .ns-grid-elegant.ns-grid-view .ns-grid-items {
        grid-template-columns: 1fr;
    }

    .ns-diamonds-wrapper .ns-expansion-specs {
        grid-template-columns: 1fr;
    }

    .ns-diamonds-wrapper .ns-expansion-panel-inner {
        padding: 15px;
        gap: 15px;
    }

    .ns-diamonds-wrapper .ns-list-header,
    .ns-diamonds-wrapper .ns-list-row {
        grid-template-columns: 30px repeat(4, 1fr) 25px;
    }

    .ns-diamonds-wrapper .ns-col-cut {
        display: none;
    }

    .ns-diamonds-wrapper .ns-list-row .ns-list-col {
        font-size: 10px;
    }

    .ns-theme-elegant .ns-pagination .ns-page-link {
        min-width: 2rem;
        height: 2rem;
        font-size: 0.75rem;
        padding: 0 0.375rem;
    }

    .ns-theme-elegant .ns-pagination .ns-page-first,
    .ns-theme-elegant .ns-pagination .ns-page-last {
        display: none;
    }
}

/* --- Tiny (max-width: 479px) --- */

@media (max-width: 479px) {
    .ns-diamonds-wrapper .ns-shapes-header {
        padding: 0.75rem 0.5rem 0;
        margin-left: 0;
        margin-right: 0;
        border-radius: 0;
    }

    .ns-diamonds-wrapper .ns-shapes-title {
        font-size: 18px;
    }

    .ns-diamonds-wrapper .ns-shapes-description {
        font-size: 13px;
    }

    .ns-diamonds-wrapper .ns-shape-btn {
        margin: 0 0.5rem 0.75rem;
    }

    .ns-diamonds-wrapper .ns-shape-icon {
        width: 32px;
        height: 32px;
    }

    .ns-diamonds-wrapper .ns-shape-name {
        font-size: 0.6875rem;
        margin-top: 0.5rem;
    }
}
