/* products.css - styles shared by diamonds, colored-diamonds, colored-stones and jewelry pages.
   Only rules that were byte-for-byte identical on all four pages live here; anything page-specific stays inline. */

/* ===== SECTION TITLE (centered, flanked by hairlines) ===== */

.section {
    padding: 60px 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 26px;
    justify-content: center;
    margin-bottom: 46px;
}

.section-title-line {
    flex: 1;
    max-width: 260px;
    height: 1px;
    background: var(--line);
}

.section-title h2 {
    font-size: 17px;
    letter-spacing: .3em;
    color: var(--ink-soft);
    white-space: nowrap;
}

/* ===== PAGE HERO ===== */

.page-hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.page-hero-scrim {
    position: absolute;
    inset: 0;
    background: rgb(243 238 229 / 11%);
}

.page-hero-content {
    position: relative;
    z-index: 1;
    max-width: 620px;
    padding-top: 30px;
    padding-bottom: 30px;
    margin-left: 0;
}

/* ===== REFINE + FEATURED ===== */

.catalog-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 44px;
    align-items: start;
}

.refine-panel {
    border: 1px solid var(--line);
    padding: 30px 28px 32px;
    position: sticky;
    top: 118px;
}

    .refine-panel h3 {
        font-size: 15px;
        letter-spacing: .16em;
        color: var(--ink);
        margin-bottom: 24px;
    }

.refine-row {
    margin-bottom: 18px;
}

    .refine-row select:hover, .refine-row select:focus {
        border-color: var(--gold);
        outline: none;
    }

.feat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.feat-card {
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 2px;
    overflow: hidden;
    transition: box-shadow .35s ease, transform .35s ease;
}

    .feat-card:hover {
        box-shadow: 0 22px 46px rgba(21,19,15,.10);
        transform: translateY(-4px);
    }

.feat-card-link:hover {
    border-color: var(--gold);
}

    .feat-card-link:hover svg {
        transform: translateX(3px);
    }

/* ===== TRUST STRIP ===== */

.trust-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 46px 60px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1200px) {
    .catalog-grid {
        grid-template-columns: 260px 1fr;
        gap: 32px;
    }
}

@media (max-width: 1100px) {
    .wrap {
        padding: 0 28px;
    }

    .search-tools {
        grid-template-columns: 1fr 1fr;
        gap: 34px;
    }

    .search-block:nth-child(1) {
        grid-column: 1 / -1;
    }

    .foot-main {
        grid-template-columns: 1fr 1fr;
        row-gap: 40px;
    }

    .topbar .left a:nth-child(2) {
        display: none;
    }
}

@media (max-width: 900px) {
    nav.primary {
        display: none;
    }

    .acct-links {
        display: none;
    }

    .burger {
        display: flex;
        width: 42px;
        height: 42px;
        border: 1px solid var(--line);
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 4px;
        background: #111111;
    }

        .burger span {
            width: 16px;
            height: 1px;
            background: #ffffff;
            display: block;
        }

    .nav-search {
        width: 38px;
        height: 38px;
        padding: 0;
        gap: 0;
        justify-content: center;
        border-radius: 50%;
    }

        .nav-search span {
            display: none;
        }

    .nav-login-icon {
        display: inline-flex;
    }

    .search-close {
        top: 20px;
        right: 20px;
    }

    header.main .wrap {
        height: 78px;
    }

    .catalog-grid {
        grid-template-columns: 1fr;
    }

    .refine-panel {
        position: static;
    }

    .foot-badge-wrap {
        display: inline-flex;
        justify-content: center !important;
        align-items: center;
    }
}

.visible-xs {
    display: none;
}

.hidden-xs {
    display: block;
}

@media (max-width: 760px) {
    .d-flex {
        display: block !important;
    }

    .visible-xs {
        display: block;
    }

    .hidden-xs {
        display: none;
    }

    .page-hero-content {
        max-width: 100%;
    }

    .section-title {
        gap: 14px;
        margin-bottom: 32px;
    }

    .section-title-line {
        max-width: 40px;
    }

    .section-title h2 {
        font-size: 14px;
        letter-spacing: .22em;
        white-space: normal;
        text-align: center;
    }

    .trust-strip {
        gap: 26px 34px;
        justify-content: flex-start;
    }

    .foot-main {
        grid-template-columns: 1fr;
    }
}

/* ===== DIAMOND DETAIL DRAWER ===== */

.detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(21,19,15,.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 1000;
}

    .detail-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }

.d-flex {
    display: flex;
}

.detail-drawer {
    position: fixed;
    top: 5%;
    right: 0%;
    max-height: 600px;
    width: 70%;
    max-width: 90vw;
    background: #ffffff;
    box-shadow: -18px 0 40px rgba(21, 19, 15, .18);
    transform: translateX(100%);
    transition: transform .35s ease;
    z-index: 1001;
    overflow-y: auto;
}

    .detail-drawer.open {
        right: 15%;
        transform: translateX(0);
    }

.detail-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 26px;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 1;
}

.detail-drawer-item {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold);
}

.detail-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #ffffff;
    font-size: 18px;
    line-height: 1;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .25s ease, color .25s ease;
}

    .detail-close:hover {
        border-color: var(--gold);
        color: var(--gold);
    }

.detail-drawer-body {
    padding: 24px 26px 40px;
}

.detail-section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.detail-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold);
}

.detail-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    text-align: right;
}

body.drawer-open {
    overflow: hidden;
}

/* Video plays directly in this same area (swapped in for the <img> via .is-video) */

.detail-drawer-img video {
    display: none;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #000;
}

.detail-drawer-img.is-video video {
    display: block;
}

.detail-thumbs {
    display: none;
    gap: 8px;
    flex-wrap: wrap;
    padding: 14px 26px 0;
}

.detail-thumb {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: #ffffff;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .2s ease;
}

.detail-thumb-video {
    position: relative;
    padding: 0;
    overflow: hidden;
}

.detail-thumb-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(21,19,15,.72);
    border: 1.5px solid #ffffff;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: background .2s ease;
}

.detail-thumb-video:hover .detail-thumb-play {
    background: var(--gold);
}

/* ===== CHECKBOX MULTI-SELECT DROPDOWN ===== */

.ms-select {
    position: relative;
}

.ms-toggle-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== FULL-SIZE IMAGE MODAL ===== */

.img-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(21,19,15,.72);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 1100;
}

    .img-modal-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }

.img-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.94);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease, transform .3s ease;
    z-index: 1101;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .img-modal.open {
        opacity: 1;
        pointer-events: auto;
        transform: translate(-50%, -50%) scale(1);
    }

.img-modal-close {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #ffffff;
    font-size: 20px;
    line-height: 1;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .25s ease, color .25s ease;
}

    .img-modal-close:hover {
        border-color: var(--gold);
        color: var(--gold);
    }

body.img-modal-open {
    overflow: hidden;
}

/* ===== MOBILE "MANAGE FILTERS" ===== */

.btn-manage-filters {
    display: none;
}

.refine-panel-head {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

    .refine-panel-head h3 {
        margin-bottom: 0;
    }

.refine-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #ffffff;
    font-size: 18px;
    line-height: 1;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .25s ease, color .25s ease;
}

    .refine-close:hover {
        border-color: var(--gold);
        color: var(--gold);
    }

body.filters-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .refine-panel-head {
        display: flex;
    }

    /* Original inline h3 is redundant on mobile now that the head row shows it */

    .refine-panel > h3 {
        display: none;
    }
}

.detail-block {
    max-width: 70%;
}
/* Optional: visually indicate that actual images are clickable */

@media (max-width: 480px) {
    .img-modal-close {
        top: -46px;
        right: 0;
    }

    .detail-block {
        max-width: 100%;
    }

    .detail-drawer.open {
        right: auto;
        transform: translateX(0);
    }
    a.btnGeneral {
        padding: 5px 10px;
        display: block !important;
        text-align: center;
        margin: 10px;
    }
}

/* ===== PRICE/CARAT SLIDER (matches colored-diamonds.aspx) ===== */

.price-filter-select {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.price-filter-label {
    font-size: 12px;
    color: var(--ink-soft, #6b6459);
    white-space: nowrap;
}

.price-slider {
    position: relative;
    height: 20px;
}

.price-range {
    position: absolute;
    top: 8px;
    left: 0;
    width: 100%;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    pointer-events: none;
}

    .price-range::-webkit-slider-runnable-track {
        height: 3px;
        background: var(--line, #e0e0e0);
        border-radius: 3px;
    }

    .price-range::-moz-range-track {
        height: 3px;
        background: var(--line, #e0e0e0);
        border-radius: 3px;
    }

    .price-range::-webkit-slider-thumb {
        -webkit-appearance: none;
        pointer-events: auto;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: var(--gold, #b08d57);
        border: 2px solid #ffffff;
        box-shadow: 0 1px 4px rgba(21,19,15,.35);
        margin-top: -5.5px;
        cursor: pointer;
    }

    .price-range::-moz-range-thumb {
        pointer-events: auto;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: var(--gold, #b08d57);
        border: 2px solid #ffffff;
        box-shadow: 0 1px 4px rgba(21,19,15,.35);
        cursor: pointer;
    }
