:root {
    --dm-primary: #ffffff;
    --dm-secondary: #f0f2f5;
    --dm-accent: #0f3460;
    /* Deep Sapphire Blue */
    --dm-accent-alt: #e94560;
    /* Vibrant Ruby */
    --dm-gold: #0f3460;
    /* Rich Gold */
    --dm-text: #1a1a2e;
    --dm-text-dim: #4e5d78;
    --dm-glass: rgba(15, 52, 96, 0.03);
    --dm-glass-border: #e1e8f0;
    --dm-success: #27ae60;
}

.dm-wrapper *:not(i) {
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.dm-header {
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--dm-glass-border);
}

.dm-logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--dm-text);
    letter-spacing: 2px;
    margin: 0;
}

.dm-logo h1 span {
    color: var(--dm-accent);
}

.dm-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.dm-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--dm-glass-border);
    background: var(--dm-glass);
    color: var(--dm-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dm-btn:hover {
    background: var(--dm-glass);
    border-color: var(--dm-accent);
    transform: translateY(-2px);
    color: var(--dm-accent);
}

.dm-btn-primary {
    background: linear-gradient(135deg, var(--dm-accent) 0%, #16213e 100%);
    border: none;
    color: #ffffff !important;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    overflow: hidden;
}

.dm-btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transition: all 0.6s;
}

.dm-btn-primary:hover::after {
    left: 100%;
}

.dm-btn-primary:hover {
    background: linear-gradient(135deg, var(--dm-accent) 0%, #16213e 100%) !important;
    transform: translateY(-2px);
    color: #ffffff !important;
}

.dm-main {
    padding: 2rem 5%;
}

.dm-inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.dm-diamond-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--dm-glass-border);
    border-top: 3px solid var(--dm-accent);
    transition: all 0.3s ease;
    position: relative;
}

.dm-diamond-card:hover {
    border-color: var(--dm-accent);
    transform: translateY(-5px);
}

.dm-card-image {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #f3f4f6;
    aspect-ratio: 5 / 4;
}

.dm-image-actions {
    position: absolute;
    bottom: 0.8rem;
    right: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 20;
}

.dm-img-action {
    width: 32px;
    height: 32px;
    background: #ffffff;
    border: 1px solid var(--dm-glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.dm-svg-icon {
    width: 16px;
    height: 16px;
    stroke: var(--dm-accent);
}



.dm-card-image img {
    display: block;
    width: 100%;
    height: auto;
    padding: 0;
    mix-blend-mode: multiply;
    transition: transform 0.5s ease;
}

.dm-diamond-card:hover .dm-card-image img {
    transform: scale(1.1);
}

.dm-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, var(--dm-accent) 0%, #16213e 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    color: #fff;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dm-card-content {
    padding: 1.5rem 1.5rem 0.8rem;
}

.dm-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.dm-ref-no {
    font-size: 0.7rem;
    color: var(--dm-text-dim);
    margin-bottom: 0.4rem;
    letter-spacing: 1px;
}

.dm-shape-weight {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dm-text);
    margin-bottom: 0;
}

.dm-price {
    font-size: 1.1rem;
    color: var(--dm-text);
    font-weight: 600;
    margin-top: 0;
}

.dm-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--dm-glass-border);
}

.dm-detail-item {
    display: flex;
    flex-direction: column;
}

.dm-detail-label {
    font-size: 0.65rem;
    color: var(--dm-text-dim);
    text-transform: uppercase;
}

.dm-detail-value {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Modal / Certificate Popup */
.dm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(10px);
    display: none;
    touch-action: pan-y pinch-zoom;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    padding: 1.5rem;
}

.dm-modal-content {
    background: #fff;
    width: 100%;
    max-width: 900px;
    height: 80vh;
    border-radius: 24px;
    position: relative;
    overflow: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    max-height: 80vh;
}

.dm-close-modal {
    background: none;
    border: none;
    cursor: pointer;
}

#certFrame {
    width: 100%;
    border: none;
    background: #fff;
}

#videoPlayer {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.dm-modal-overlay.active {
    display: flex;
}

.dm-filter-group {
    flex: 1;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dm-filter-group label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--dm-text-dim);
    letter-spacing: 0.5px;
}

.dm-filter-group input,
.dm-filter-group select {
    padding: 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.dm-filter-group input:focus,
.dm-filter-group select:focus {
    border-color: var(--dm-accent);
    outline: none;
    background: #fff;
    box-shadow: 0 0 10px rgba(15, 52, 96, 0.1);
}

.dm-dual-range {
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
}

.dm-dual-range input[type="range"] {
    position: absolute;
    width: 100%;
    pointer-events: none;
    appearance: none;
    background: none;
    margin: 0;
    z-index: 2;
}

.dm-dual-range input[type="range"]::-webkit-slider-thumb {
    pointer-events: auto;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--dm-accent);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.dm-dual-range input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.dm-dual-range::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 6px;
    background: #edf2f7;
    border-radius: 3px;
    z-index: 1;
}

.dm-range-display {
    text-align: center;
    font-size: 0.85rem;
    color: var(--dm-text);
    font-weight: 600;
}

/* Custom Range Styling */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]:focus {
    outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #e1e8f0;
    border-radius: 10px;
}

input[type=range]::-webkit-slider-thumb {
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: var(--dm-accent);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid #fff;
}

input[type=range]::-moz-range-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #e1e8f0;
    border-radius: 10px;
}

input[type=range]::-moz-range-thumb {
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: var(--dm-accent);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid #fff;
}

/* Product Detail Page */
.dm-detail-container {
    max-width: 1460px;
    margin: 4rem auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    padding: 0 2rem;
}

.dm-detail-media {
    position: sticky;
    top: 6rem;
    height: fit-content;
}

.dm-main-image {
    width: 100%;
    background: #f3f4f6;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--dm-glass-border);
    margin-bottom: 1.5rem;
}

.dm-main-image img,
.dm-main-image video {
    width: 100%;
    height: auto;
    display: block;
}

.dm-media-thumbnails {
    display: flex;
    gap: 1rem;
}

.dm-thumb {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    border: 1px solid var(--dm-glass-border);
    cursor: pointer;
    overflow: hidden;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.dm-thumb.active,
.dm-thumb:hover {
    opacity: 1;
    border-color: var(--dm-accent);
}

.dm-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dm-detail-info {
    display: flex;
    flex-direction: column;
}

.dm-detail-info .dm-ref-no {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--dm-accent);
    margin-bottom: 0.5rem;
}

.dm-detail-info h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.1;
    color: var(--dm-text);
}

.dm-cta-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dm-btn-large {
    padding: 1.2rem 2.5rem !important;
    font-size: 1.1rem;
    justify-content: center;
    border-radius: 8px !important;
}

.dm-trust-badges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: var(--dm-glass);
    border-radius: 16px;
}

.dm-trust-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.85rem;
    color: var(--dm-text-dim);
}

.dm-trust-item i {
    color: var(--dm-accent);
    font-size: 1.2rem;
}

.dm-spec-accordion {
    border-top: 1px solid var(--dm-glass-border);
}

.dm-accordion-item {
    border-bottom: 1px solid var(--dm-glass-border);
}

.dm-accordion-header {
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    color: var(--dm-text);
}

.dm-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding-bottom: 0;
}

.dm-accordion-item.active .dm-accordion-content {
    max-height: 500px;
    padding-bottom: 1.5rem;
}

.dm-accordion-item.active i {
    transform: rotate(180deg);
}

.dm-spec-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.dm-spec-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dm-spec-label {
    color: var(--dm-text-dim);
    font-size: 0.85rem;
}

.dm-spec-value {
    font-weight: 600;
    font-size: 0.85rem;
}

@media (max-width: 992px) {
    .dm-detail-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .dm-detail-media {
        position: static;
    }

    .dm-detail-info h1 {
        font-size: 2.2rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dm-diamond-card {
    animation: fadeIn 0.6s ease forwards;
}

/* Scrollbar */
.dm-wrapper ::-webkit-scrollbar {
    width: 8px;
}

.dm-wrapper ::-webkit-scrollbar-track {
    background: var(--dm-primary);
}

.dm-wrapper ::-webkit-scrollbar-thumb {
    background: var(--dm-glass-border);
    border-radius: 10px;
}

.dm-wrapper ::-webkit-scrollbar-thumb:hover {
    background: var(--dm-accent);
}

.dm-jewelry-opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    flex: 1;
    padding: 1rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.dm-jewelry-opt span {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

.dm-jewelry-opt.dm-selected {
    border: 1px solid #333;
    border-radius: 8px;
}

.dm-jewelry-opt.dm-selected span {
    color: #000;
    font-weight: 600;
}

/* --- MOBILE RESPONSIVENESS (APPENDED) --- */

@media (max-width: 768px) {
    .dm-header {
        flex-direction: column;
        padding: 1rem 5%;
        gap: 1rem;
        text-align: center;
    }

    .dm-logo h1 {
        font-size: 1.5rem;
    }

    .dm-actions {
        width: 100%;
        justify-content: center;
        gap: 0.5rem;
    }

    .dm-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .dm-main {
        padding: 1rem 5%;
    }

    .dm-filter-group input {
        min-width: unset;
        width: 100%;
    }

    .dm-inventory-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .dm-diamond-card .dm-card-image {
        height: 200px;
    }

    .dm-details-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
    }

    .dm-detail-item {
        padding: 0.3rem;
    }

    .dm-details-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .dm-detail-value {
        font-size: 0.75rem;
    }

    .dm-detail-container {
        margin: 1rem auto;
        padding: 0 1rem;
    }

    .dm-detail-info h1 {
        font-size: 1.8rem;
        margin-top: 1rem;
    }

    .dm-trust-badges {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .dm-spec-list {
        grid-template-columns: 1fr;
    }

    .dm-modal-overlay {
        padding: 1.5rem;
    }

    .dm-modal-content {
        background: #fff;
        width: 100%;
        max-width: 900px;
        height: 50vh;
        max-height: 50vh;
        border-radius: 16px;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    }
}

@media (max-width: 480px) {
    .dm-details-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Comparison Section */
.dm-comparison-section {
    max-width: 1460px;
    margin: 2.5rem auto;
    padding: 2rem 1.5rem;
}

.dm-comparison-section h2 {
    text-align: center;
    font-size: 2.2rem;
    font-family: 'Playfair Display', serif;
    color: var(--dm-text);
    margin-bottom: 3rem;
}

.dm-comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
}

.dm-comparison-table th,
.dm-comparison-table td {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid #f0f2f5;
}

.dm-comparison-table thead th {
    background: #f8fafc;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--dm-text);
}

.dm-comparison-table .row-title {
    text-align: left;
    font-weight: 600;
    color: var(--dm-text);
    width: 25%;
}

.dm-col-highlight {
    background: rgba(15, 52, 96, 0.03);
    color: var(--dm-accent);
    font-weight: 500;
    width: 37.5%;
}

.dm-col-others {
    color: var(--dm-text-dim);
    width: 37.5%;
}

.dm-comparison-table thead th.dm-col-highlight {
    background: var(--dm-accent);
    color: #fff;
}

.dm-comparison-table tbody tr:last-child td {
    border-bottom: none;
}

@media (max-width: 768px) {

    .dm-comparison-table th,
    .dm-comparison-table td {
        padding: 1rem;
        font-size: 0.85rem;
    }

    .dm-comparison-section h2 {
        font-size: 1.8rem;
    }

    .dm-comparison-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .dm-comparison-table thead,
    .dm-comparison-table tbody,
    .dm-comparison-table tr {
        display: table;
        width: 100%;
        min-width: 600px;
        /* Force minimum width to enable scrolling instead of squishing */
    }

    .dm-jewelry-opt {
        flex-direction: row;
        justify-content: space-between;
        padding: 0.8rem;
    }

    .dm-filter-group {
        width: 100%;
    }
}

/* Comparison row icons */
.dm-comparison-table .row-title i {
    width: 18px;
    margin-right: 8px;
    color: var(--dm-accent);
    font-size: 0.95rem;
}

.dm-comparison-table .dm-col-highlight {
    color: #059669;
}

.dm-comparison-table .dm-col-others {
    color: var(--dm-text-dim);
}

/* Similar Products Section */
.dm-similar-section {
    max-width: 1460px;
    margin: 1.5rem auto;
    padding: 0 2rem;
}

.dm-similar-section h2 {
    text-align: center;
    font-size: 1.8rem;
    font-family: 'Playfair Display', serif;
    color: var(--dm-text);
    margin-bottom: 2rem;
}

.dm-similar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.dm-similar-grid .dm-shape-weight {
    font-size: 1.2rem;
    text-align: left;
}

/* Widescreen: 4 cards in a row */
@media (min-width: 1200px) {
    .dm-main {
        padding: 2rem 2%;
    }
    .dm-inventory-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 992px) {
    .dm-detail-info h1 {
        font-size: 1.6rem;
    }

    .dm-price {
        font-size: 1.8rem;
    }

    .dm-comparison-table {
        margin: 0 -1rem;
        /* Full width on tiny screens */
    }

    .dm-inventory-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .dm-card-image {
        height: 150px;
        background: #fff;
        /* White background looks better with 'contain' */
    }

    .dm-card-image img {
        object-fit: initial;
        /* Back to cover to fill the area */
        padding: 0;
    }

    .dm-card-content {
        padding: 0.8rem 0.8rem 0.4rem;
    }

    .dm-shape-weight {
        font-size: 0.8rem;
        line-height: 1.2;
    }

    .dm-price {
        font-size: 0.85rem;
        font-weight: 700;
        color: var(--dm-accent);
        margin-top: 0.2rem;
    }

    /* Hide technical details on mobile as requested */
    .dm-details-grid {
        display: none;
    }

    .dm-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.1rem;
        margin-bottom: 0.5rem;
    }
}

/* Premium Filter System Styles */
.dm-premium-filters {
    background: #fff;
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2.5rem;
}

/* Shape Selector */
.dm-shape-section {
    margin-bottom: 2rem;
}

.dm-shape-section label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--dm-text);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dm-shape-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.dm-shape-item {
    flex: 1;
    min-width: 80px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f8fafc;
    color: #94a3b8;
}

.dm-shape-item i {
    font-size: 1.5rem;
    color: currentColor;
    margin-bottom: 0.5rem;
}

.dm-shape-item img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    margin-bottom: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dm-shape-item span {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.dm-shape-item:hover {
    border-color: var(--dm-accent);
    background: #fff;
    transform: translateY(-2px);
    color: var(--dm-accent);
}

.dm-shape-item:hover span {
    color: var(--dm-accent);
}

.dm-shape-item:hover img {
    transform: scale(1.1);
}

.dm-shape-item.active {
    border: 2px solid var(--dm-accent);
    background: #f0f7ff;
    color: var(--dm-accent);
}

.dm-shape-item.active span {
    color: var(--dm-accent);
}

.dm-shape-item.active img {
    transform: scale(1.1);
}

/* Main Filter Grid */
.dm-filter-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: center;
}

.dm-filter-card {
    background: #f8fafc;
    padding: 1.2rem;
    border-radius: 15px;
    border: 1px solid #edf2f7;
}

.dm-filter-card label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.dm-search-wrapper {
    position: relative;
    flex: 1;
}

.dm-search-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.dm-search-wrapper input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 0.9rem;
}

/* Pills Section */
.dm-pills-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border-top: 1px solid #edf2f7;
    padding-top: 1.5rem;
}

.dm-pill-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.dm-pill-group label {
    min-width: 80px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--dm-text);
    text-transform: uppercase;
}

.dm-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dm-pill {
    padding: 0.5rem 1rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dm-pill:hover {
    background: #e2e8f0;
}

.dm-pill.active {
    background: var(--dm-accent);
    border-color: var(--dm-accent);
    color: #fff;
}

/* Dual Range Premium Fixes */
.dm-dual-range {
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    /* Add padding to prevent handles from clipping */
}

.dm-dual-range input[type="range"] {
    position: absolute;
    width: calc(100% - 20px);
    pointer-events: none;
    appearance: none;
    background: none;
    z-index: 2;
    margin: 0;
    left: 10px;
}

.dm-dual-range input[type="range"]::-webkit-slider-thumb {
    pointer-events: auto;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--dm-accent);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.dm-dual-range::before {
    content: '';
    position: absolute;
    width: calc(100% - 20px);
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    z-index: 1;
    left: 10px;
}

.dm-range-track-fill {
    position: absolute;
    height: 6px;
    background: var(--dm-accent);
    border-radius: 3px;
    z-index: 1;
    pointer-events: none;
}



@media (max-width: 992px) {
    .dm-filter-main-grid {
        display: block !important;
    }

    .dm-filter-col {
        margin-bottom: 1.5rem;
    }

    .dm-shape-item {
        min-width: 70px;
        height: 70px;
    }

    .dm-pill-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* Product Card Mobile Adjustments */
    .dm-card-image {
        height: auto !important;
        /* Proportional height now handled by padding-bottom calc */
    }

}

@media (max-width: 768px) {
    .dm-main {
        padding: 1rem 2% !important;
    }
}

/* Desktop Filter Toggle */
.dm-desktop-filter-toggle {
    display: none;
    margin-bottom: 2.5rem;
}

.dm-desktop-filter-toggle .dm-btn-primary {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    border: none;
    align-items: center;
    gap: 0.8rem;
    border: none;
    background: var(--dm-accent);
    color: #fff;
    cursor: pointer;
}

.dm-desktop-filter-toggle .dm-btn-primary:hover {
    transform: translateY(-2px);
}

@media (min-width: 993px) {
    .dm-desktop-filter-toggle {
        display: block;
    }

    .dm-premium-filters {
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow: hidden;
        max-height: 2000px;
        /* Large enough to show all */
        opacity: 1;
        margin-bottom: 3rem;
    }

    .dm-premium-filters.collapsed {
        max-height: 0;
        opacity: 0;
        margin-bottom: 0;
        pointer-events: none;
    }
}

/* Unified Filter Action Bar (Desktop & Mobile) */
.dm-mobile-apply-wrapper {
    display: flex !important;
    gap: 1rem;
    padding: 1.5rem 0;
    border-top: 1px solid #e2e8f0;
    margin-top: 2rem;
}

.dm-mobile-apply-wrapper button {
    flex: 1;
    max-width: 200px;
    padding: 0.8rem 1.5rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    transition: all 0.2s ease;
}

.dm-mobile-apply-wrapper #mobileCloseBtn,
.dm-mobile-apply-wrapper #mobileResetBtn {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
}

.dm-mobile-apply-wrapper #mobileCloseBtn:hover,
.dm-mobile-apply-wrapper #mobileResetBtn:hover {
    background: #e2e8f0 !important;
}

/* Back Link */
.dm-back-link {
    margin-bottom: 2rem;
}

.dm-back-link a {
    text-decoration: none;
    color: var(--dm-text-dim);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.dm-back-link a:hover {
    color: var(--dm-accent);
}

.dm-back-link i {
    margin-right: 5px;
}

/* Mobile Filter Toggle */
.dm-mobile-filter-toggle {
    display: none;
    margin-bottom: 1.5rem;
}

.dm-filter-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 99997;
    transition: opacity 0.3s ease;
}

.dm-filter-backdrop.active {
    display: block !important;
}

.dm-mobile-filter-toggle .dm-btn-primary {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    font-size: 1rem;
    border-radius: 12px;
}

@media (max-width: 992px) {
    .dm-mobile-filter-toggle {
        display: block !important;
        position: fixed !important;
        bottom: 2rem !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 99999 !important;
        width: auto !important;
        min-width: 200px !important;
    }

    .dm-mobile-filter-toggle .dm-btn-primary {
        width: 100% !important;
        justify-content: center !important;
        padding: 0.8rem 1.5rem !important;
        font-size: 1rem !important;
        border-radius: 50px !important;
        background: var(--dm-accent) !important;
        color: #fff !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.8rem !important;
    }

    .dm-premium-filters {
        display: none;
        max-height: 0;
        overflow: hidden;
        transition: opacity 0.3s ease;
        padding: 0;
        margin: 0;
    }

    .dm-premium-filters.active {
        display: block !important;
        position: fixed !important;
        top: 5% !important;
        /* Spacing at top */
        left: 0 !important;
        width: 100% !important;
        height: 95% !important;
        z-index: 99998 !important;
        background: #fff !important;
        overflow-y: auto !important;
        max-height: none !important;
        padding: 0 !important;
        margin: 0 !important;
        border-top-left-radius: 25px !important;
        border-top-right-radius: 25px !important;
    }

    /* Mobile Filter Header */
    .dm-mobile-filter-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 1.5rem;
        background: #f8fafc;
        border-bottom: 1px solid #e2e8f0;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .dm-mobile-filter-header h3 {
        margin: 0;
        font-size: 1.2rem;
        color: var(--dm-primary);
    }

    /* Add padding back to internal sections */
    .dm-premium-filters.active>*:not(.dm-mobile-filter-header) {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .dm-premium-filters.active .dm-pills-section {
        padding-bottom: 10rem;
        /* More space for sticky Apply button */
    }

    @media (max-width: 992px) {
        .dm-mobile-apply-wrapper {
            position: sticky;
            bottom: 0;
            left: 0;
            width: 100%;
            background: #fff;
            padding: 0.8rem;
            z-index: 10;
            margin-top: 0;
            gap: 0.5rem;
        }

        .dm-mobile-apply-wrapper button {
            max-width: none;
            padding: 0.6rem 0.2rem !important;
            font-size: 0.8rem !important;
            min-height: 38px !important;
        }
    }
}

/* Ultra Mobile Adjustments */
@media (max-width: 550px) {
    .dm-inventory-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.8rem !important;
    }

    .dm-card-image {
        height: auto !important;
    }

    .dm-card-content {
        padding: 0.8rem 0.8rem 0.4rem !important;
    }

    .dm-shape-weight {
        font-size: 0.85rem !important;
        margin-bottom: 0.3rem !important;
    }

    .dm-price {
        font-size: 0.95rem !important;
    }

    .dm-details-grid {
        gap: 0.4rem !important;
        margin-bottom: 0.8rem !important;
    }

    .dm-detail-item {
        font-size: 0.7rem !important;
    }

    .dm-badge {
        top: 0.5rem;
        left: 0.5rem;
        padding: 0.2rem 0.5rem;
        font-size: 0.55rem;
    }

    .dm-image-actions {
        bottom: 0.5rem;
        right: 0.5rem;
        gap: 0.3rem;
    }

    .dm-img-action {
        width: 28px;
        height: 28px;
    }
}

/* Hide floating button when filters are open */
body.filters-active .dm-mobile-filter-toggle {
    display: none !important;
}

/* Custom Product Options UI */
.gm-options-container {
    margin: 0 0 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.gm-option-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--dm-glass-border);
}

.gm-option-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--dm-text);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gm-select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--dm-glass-border);
    border-radius: 8px;
    background: #fff;
    font-size: 0.95rem;
    color: var(--dm-text);
    cursor: pointer;
}

.gm-visual-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.gm-visual-selector[data-type="metal"],
.gm-visual-selector[data-type="design"] {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.gm-visual-selector[data-type="metal"] .gm-selector-card,
.gm-visual-selector[data-type="design"] .gm-selector-card {
    max-width: none;
}

.gm-selector-card {
    flex: 1;
    min-width: 0;
    max-width: 150px;
    background: #fff;
    border: 2px solid var(--dm-glass-border);
    border-radius: 12px;
    padding: 0.6rem 0.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

/* Design-selector cards only: reserve square space to prevent CLS while images lazy-load. */
.gm-visual-selector[data-type="design"] .gm-selector-card {
    aspect-ratio: 1 / 1;
    contain: layout paint;
}

.gm-selector-card img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.gm-selector-card span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--dm-text-dim);
    line-height: 1.2;
}

.gm-selector-card:hover {
    border-color: var(--dm-accent);
    background: var(--dm-glass);
    transform: translateY(-4px);
}

.gm-selector-card.active {
    border-color: var(--dm-gold);
    background: #fffdf5;
}

.gm-selector-card.active span {
    color: var(--dm-text);
}

.gm-selector-card.active img {
    transform: scale(1.1);
}

@media (max-width: 600px) {
    .gm-visual-selector {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.4rem;
    }

    .gm-selector-card {
        max-width: none;
        padding: 0.5rem 0.2rem;
    }

    .gm-selector-card span {
        font-size: 0.65rem;
    }

    .gm-selector-card img {
        width: 35px;
        height: 35px;
    }
}

/* Hide Edit Options for GemAstro products only */
.gemastro-cart-item .tm-cart-edit-options {
    display: none !important;
}

/* Sort Select Styling matching .dm-btn-primary */
.dm-sort-select {
    padding: 0 2.5rem 0 1.5rem !important;
    height: 42px !important;
    border: none !important;
    border-radius: 50px !important;
    background-color: var(--dm-accent) !important;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E') !important;
    background-repeat: no-repeat !important;
    background-position: right 15px top 50% !important;
    background-size: 10px auto !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    color: #ffffff !important;
    cursor: pointer !important;
    min-width: 220px !important;
    transition: all 0.3s ease !important;
    outline: none !important;
}

.dm-sort-select:hover {
    transform: translateY(-2px) !important;
}

.dm-sort-select option {
    background: #ffffff !important;
    color: #1a1a2e !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-weight: normal !important;
}

/* ===================================================
   v8.2 Design Refresh — Product Cards & Detail Page
   =================================================== */

/* --- Product Cards --- */

/* Cleaner card — remove top accent border, deeper hover shadow */
.dm-diamond-card {
    border-top: 1px solid var(--dm-glass-border);
    cursor: pointer;
}
.dm-diamond-card:hover {
    transform: translateY(-8px);
}

/* Brighter images — remove multiply blend */
.dm-card-image {
    background: #f8f9fa;
}
.dm-card-image img {
    mix-blend-mode: normal;
}
.dm-diamond-card:hover .dm-card-image img {
    transform: scale(1.08);
}

/* Gold-accented badge */
.dm-badge {
    background: #fff;
    border: none;
    display: flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
}
.dm-badge-logo {
    height: 22px !important;
    width: auto;
    display: block;
}

/* Card header: stacked layout */
.dm-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

/* Weight / title */
.dm-shape-weight {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.15rem;
}

/* Price — gold accent, larger */
.dm-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dm-gold);
}

/* Spec details — cleaner pills */
.dm-details-grid {
    border-top: 1px solid #edf2f7;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}
.dm-detail-item {
    background: #f8fafc;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
}
.dm-detail-label {
    font-size: 0.6rem;
}
.dm-detail-value {
    font-size: 0.8rem;
}

/* Show specs on mobile (previously hidden) */
@media (max-width: 992px) {
    .dm-details-grid {
        display: grid !important;
    }
    .dm-detail-item {
        padding: 0.3rem 0.5rem;
    }
    .dm-detail-label {
        font-size: 0.55rem;
    }
    .dm-detail-value {
        font-size: 0.7rem;
    }
}

/* Skeleton loader for media viewer */
.dm-image-skeleton {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: dm-shimmer 1.5s infinite;
    border-radius: 24px;
    z-index: 1;
}
@keyframes dm-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Detail Page --- */

/* Price display (was inline style) */
.dm-price-display {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0.5rem 0 1.5rem 0;
    font-family: inherit;
}

/* Design preview box (was inline styles) */
.gm-design-preview-box {
    text-align: center;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    padding: 1.2rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
}
.gm-design-preview-box .gm-design-preview-img {
    max-height: 200px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
    transition: all 0.3s ease;
    aspect-ratio: 1 / 1;
}
.gm-design-preview-title {
    margin-top: 0.8rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: #111;
    letter-spacing: 0.5px;
}

/* Price breakdown box (was inline styles) */
.gm-price-breakdown-box {
    margin: 0.75rem 0;
    background: #f8fafc;
    border-radius: 16px;
    padding: 1.2rem 1.5rem;
    border: 1px solid #e2e8f0;
    font-family: inherit;
}
.gm-price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: #64748b;
}
.gm-price-row-label {
    font-weight: 600;
    color: #1e293b;
}
.gm-price-option-text {
    font-weight: 600;
    color: #b45309;
}
.gm-price-divider {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 0.8rem 0;
}
.gm-price-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.gm-price-total-label-group {
    display: flex;
    flex-direction: column;
}
.gm-price-total-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}
.gm-price-total-code {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 400;
}
.gm-price-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
}
.gm-price-advance-note {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    margin-top: 8px;
    display: none;
    font-style: italic;
    text-align: left;
    border-top: 1px dashed #e2e8f0;
    padding-top: 6px;
}

/* Price note below price */
.dm-price-note {
    font-size: 0.65rem;
    color: #64748b;
    margin: -1.2rem 0 0.8rem 0;
    font-weight: 400;
}

/* Coupon discount section */
.dm-coupon-section {
    background: #eff6ff;
    border: 1px dashed #93c5fd;
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    margin: 0.5rem 0 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.dm-coupon-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.dm-coupon-code {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 2px;
}
.dm-coupon-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.dm-coupon-original {
    font-size: 1rem;
    color: #94a3b8;
    text-decoration: line-through;
}
.dm-coupon-discounted {
    font-size: 1.3rem;
    font-weight: 800;
    color: #059669;
}
.dm-coupon-save {
    font-size: 0.65rem;
    font-weight: 700;
    color: #059669;
    background: #dcfce7;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Tooltip styles */
.dm-tooltip-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    vertical-align: middle;
}
.dm-tooltip-trigger {
    color: #94a3b8;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}
.dm-tooltip-wrapper:hover .dm-tooltip-trigger {
    color: #0f172a;
}
.dm-tooltip-text {
    visibility: hidden;
    width: 250px;
    background-color: #1e293b;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 100;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.35;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    pointer-events: none;
}
.dm-tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}
.dm-tooltip-wrapper:hover .dm-tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    .dm-tooltip-text {
        left: auto;
        right: -10px;
        transform: translateY(5px);
    }
    .dm-tooltip-text::after {
        left: auto;
        right: 12px;
        margin-left: 0;
    }
    .dm-tooltip-wrapper:hover .dm-tooltip-text {
        transform: translateY(0);
    }
}

/* Trust badges — icon circles */
.dm-trust-badges {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
    padding: 1.2rem 1rem;
    border: 1px solid var(--dm-glass-border);
    margin-bottom: 1.5rem;
}
.dm-trust-item {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}
.dm-trust-item i {
    font-size: 0.8rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dm-accent);
    color: #fff;
    border-radius: 50%;
    flex-shrink: 0;
}
.dm-trust-item span {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--dm-text);
    line-height: 1.3;
}

.dm-main-cert-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    z-index: 10;
    display: flex;
    align-items: center;
}
.dm-main-cert-badge img {
    height: 24px !important;
    width: auto !important;
    display: block;
}
.dm-spec-list {
    gap: 0;
}
.dm-spec-row {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid #f0f2f5;
}
.dm-spec-row:nth-child(odd) {
    background: #f8fafc;
    border-radius: 6px;
}
.dm-accordion-header {
    font-size: 0.85rem;
    padding: 1.2rem 0;
}

/* Media viewer — subtle zoom */
.dm-main-image {
    background: #f8f9fa;
    border-radius: 20px;
    overflow: hidden;
}
.dm-main-image img,
.dm-main-image video {
    transition: transform 0.4s ease;
}
.dm-main-image:hover img {
    transform: scale(1.05);
}


/* Thumbnails — slightly larger */
.dm-thumb {
    width: 90px;
    height: 90px;
    border-radius: 14px;
}
.dm-thumb.active {
    border-width: 2px;
}
.dm-thumb-usp img {
    object-fit: contain;
    background: #f8f9fa;
}
.certi-thumb {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    padding: 0.6rem 1rem;
    border: 1px solid var(--dm-glass-border);
    border-radius: 10px;
    background: #f8fafc;
    color: var(--dm-accent);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1rem;
}
.certi-thumb:hover {
    border-color: var(--dm-accent);
    background: #f0f4ff;
}
.certi-thumb i {
    font-size: 1.2rem;
}

/* Add to cart — navy gradient CTA */
.dm-btn-large {
    width: 100%;
    background: linear-gradient(135deg, var(--dm-accent) 0%, #16213e 100%) !important;
    border: none !important;
    transition: all 0.3s ease !important;
}
.dm-btn-large:hover {
    background: linear-gradient(135deg, #16213e 0%, var(--dm-accent) 100%) !important;
    transform: translateY(-2px);
}

/* Option selectors — tighter, cleaner */
.gm-option-group {
    padding-bottom: 1.2rem;
}
.gm-option-group label {
    font-size: 0.78rem;
}

/* Comparison section — lighter */
.dm-comparison-section h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
}
.dm-comparison-table th,
.dm-comparison-table td {
    padding: 1.2rem 1.5rem;
}

@media (max-width: 768px) {
    .dm-trust-badges {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.3rem;
        padding: 0.6rem 0.5rem;
        margin-bottom: 0.8rem;
    }
    .dm-trust-item {
        flex-direction: row;
        gap: 0.3rem;
        text-align: left;
    }
    .dm-trust-item i {
        width: 20px;
        height: 20px;
        font-size: 0.55rem;
    }
    .dm-trust-item span {
        font-size: 0.6rem;
    }
    .dm-detail-info h1 {
        font-size: 1.6rem;
    }
    .dm-badge-logo {
        height: 14px !important;
    }
    .dm-main-cert-badge {
        top: 0.5rem;
        left: 0.5rem;
        padding: 2px 5px;
    }
    .dm-main-cert-badge img {
        height: 16px !important;
    }
}
@media (max-width: 480px) {
    .dm-trust-badges {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.2rem;
        padding: 0.4rem 0.3rem;
    }
    .dm-trust-item i {
        width: 16px;
        height: 16px;
        font-size: 0.45rem;
    }
    .dm-trust-item span {
        font-size: 0.55rem;
    }
}
@media (max-width: 992px) {
    .dm-inventory-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}
@media (max-width: 480px) {
    .dm-similar-grid {
        grid-template-columns: 1fr;
    }
}

/* Inventory Search Input Styling */
.dm-search-wrapper {
    position: relative;
    flex: 1;
    max-width: 420px;
    min-width: 260px;
    margin: 0;
    display: flex;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.dm-search-wrapper:hover {
    transform: translateY(-1px);
}

#dmSearchInput {
    width: 100%;
    padding: 0.75rem 2.8rem 0.75rem 2.8rem;
    border: 1px solid var(--dm-glass-border);
    border-radius: 12px;
    font-size: 0.92rem;
    font-family: inherit;
    background: var(--dm-glass);
    color: var(--dm-text);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

#dmSearchInput::placeholder {
    color: var(--dm-text-dim);
    opacity: 0.75;
    font-style: italic;
    transition: opacity 0.2s;
}

#dmSearchInput:focus::placeholder {
    opacity: 0.4;
}

#dmSearchInput:focus {
    background: #fff;
    border-color: var(--dm-accent);
    outline: none;
    box-shadow: 0 8px 30px rgba(15, 52, 96, 0.08), 0 0 0 4px rgba(15, 52, 96, 0.05);
}

/* Icons within wrapper */
.dm-search-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dm-text-dim);
    font-size: 0.95rem;
    pointer-events: none;
    transition: color 0.3s, transform 0.3s;
}

#dmSearchInput:focus ~ .dm-search-icon {
    color: var(--dm-accent);
    transform: translateY(-50%) scale(1.1);
}

#dmSearchClear {
    position: absolute;
    right: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dm-text-dim);
    font-size: 1rem;
    cursor: pointer;
    display: none;
    transition: all 0.2s ease;
}

#dmSearchClear:hover {
    color: var(--dm-accent-alt) !important;
    transform: translateY(-50%) scale(1.15);
}

/* Search Highlighting Styling */
.dm-highlight {
    background: rgba(15, 52, 96, 0.12) !important;
    color: var(--dm-accent) !important;
    padding: 1px 3px;
    border-radius: 4px;
    font-weight: 600;
}

/* Certificate Image Responsive */
#certImage {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    touch-action: pinch-zoom;
    cursor: zoom-in;
}

/* Skeleton Loading */
.dm-skeleton-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--dm-glass-border);
    border-top: 3px solid var(--dm-glass-border);
}

.dm-skeleton-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: dm-shimmer 1.4s ease-in-out infinite;
}

.dm-skeleton-content {
    padding: 1rem 1.2rem;
}

.dm-skeleton-line {
    height: 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: dm-shimmer 1.4s ease-in-out infinite;
}

.dm-skeleton-line:last-child {
    width: 60%;
}

@keyframes dm-shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

@media (max-width: 768px) {
    .dm-active-filters .dm-filter-chip {
        font-size: 0.7rem;
        padding: 2px 8px;
    }
    #dm-active-reset {
        font-size: 0.7rem;
        padding: 2px 8px;
    }
    .dm-search-wrapper {
        width: 100%;
        max-width: none;
    }
    .dm-search-wrapper input {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem 0.4rem 2rem;
        height: 36px;
    }
    .dm-search-wrapper .dm-search-icon {
        left: 10px;
        font-size: 0.8rem;
    }
    #dmProductCount {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
        height: 32px;
        min-width: 32px;
    }
    .dm-sort-select {
        min-width: 0 !important;
        font-size: 0.7rem;
        padding: 0.3rem 1.8rem 0.3rem 0.8rem !important;
        height: 32px;
    }
    .dm-toolbar-right {
        gap: 0.5rem;
        flex-wrap: nowrap;
    }
    #desktopToggleFiltersBtn, #toggleFiltersBtn {
        font-size: 0.75rem;
        padding: 0.3rem 0.7rem;
        height: 34px;
    }
    .dm-inventory-toolbar {
        gap: 0.5rem;
    }
}

/* ===================================================
   Mobile Spacing Reduction — Product Detail Page
   =================================================== */
@media (max-width: 768px) {
    .dm-detail-container {
        gap: 1.5rem;
    }
    .dm-back-link {
        margin-bottom: 1rem;
    }
    .dm-detail-info h1 {
        margin-bottom: 0.5rem;
        margin-top: 0.5rem;
    }
    .dm-price-display {
        margin: 0.3rem 0 1rem 0;
    }
    .dm-price-note {
        margin: -1.2rem 0 0.5rem 0;
        font-size: 0.6rem;
    }
    .gm-options-container {
        margin: 0 0 1.2rem 0;
        gap: 1.2rem;
    }
    .gm-option-group {
        padding-bottom: 0.8rem;
    }
    .dm-cta-section {
        margin-bottom: 1.5rem;
    }
    .gm-price-breakdown-box {
        padding: 0.8rem 1rem;
    }
    .dm-main-image {
        margin-bottom: 0.8rem;
    }
    .dm-media-thumbnails {
        gap: 0.5rem;
    }
    .dm-thumb {
        width: 60px;
        height: 60px;
    }
    .certi-thumb {
        margin-top: 0.6rem;
        padding: 0.4rem 0.8rem;
    }
    .dm-accordion-header {
        padding: 0.8rem 0;
    }
    .dm-comparison-section {
        margin: 2rem auto;
        padding: 1rem 1rem;
    }
    .dm-similar-section {
        margin: 1.5rem auto;
        padding: 0 1rem;
    }
    .dm-coupon-section {
        padding: 0.6rem 0.8rem;
        margin: 0.3rem 0 0.8rem 0;
    }
    .dm-coupon-code {
        font-size: 1rem;
    }
    .dm-coupon-discounted {
        font-size: 1.1rem;
    }
    .dm-coupon-original {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .dm-detail-container {
        padding: 0 0.75rem;
    }
    .dm-detail-info h1 {
        font-size: 1.4rem;
    }
    .dm-price-display {
        font-size: 1.3rem;
    }
}