:root {
    --rmdf-navy: #071a33;
    --rmdf-gold: #e9b257;
    --rmdf-gold-deep: #dca349;
    --rmdf-bg: #ffffff;
    --rmdf-soft: #f8f6f3;
    --rmdf-line: #e9e4de;
    --rmdf-muted: #77736e;
    --rmdf-text: #23272d;
}

/* Trigger --------------------------------------------------------------- */
.rmdf-trigger-wrap {
    display: inline-flex;
    align-items: center;
    margin: 0 0 24px;
    position: relative;
    z-index: 4;
}

.rmdf-trigger {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 19px;
    border: 1px solid rgba(233, 178, 87, .22);
    border-radius: 0;
    background: #fff;
    color: var(--rmdf-gold);
    box-shadow: 0 8px 25px rgba(7, 26, 51, .035);
    font: inherit;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .17em;
    line-height: 1;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease;
}

.rmdf-trigger:hover,
.rmdf-trigger:focus-visible {
    background: var(--rmdf-gold);
    color: #fff;
    border-color: var(--rmdf-gold);
    outline: none;
}

.rmdf-trigger:active { transform: translateY(1px); }

.rmdf-trigger-icon {
    width: 17px;
    height: 14px;
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
}
.rmdf-trigger-icon i {
    display: block;
    width: 17px;
    height: 1px;
    background: currentColor;
    position: relative;
}
.rmdf-trigger-icon i:nth-child(1)::after,
.rmdf-trigger-icon i:nth-child(2)::after,
.rmdf-trigger-icon i:nth-child(3)::after {
    content: "";
    position: absolute;
    top: -2px;
    width: 5px;
    height: 5px;
    border: 1px solid currentColor;
    background: #fff;
    border-radius: 50%;
}
.rmdf-trigger:hover .rmdf-trigger-icon i::after,
.rmdf-trigger:focus-visible .rmdf-trigger-icon i::after { background: var(--rmdf-gold); }
.rmdf-trigger-icon i:nth-child(1)::after { left: 3px; }
.rmdf-trigger-icon i:nth-child(2)::after { right: 2px; }
.rmdf-trigger-icon i:nth-child(3)::after { left: 7px; }

.rmdf-trigger-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--rmdf-navy);
    color: #fff;
    font-size: 10px;
    letter-spacing: 0;
}

/* Overlay + off-canvas ------------------------------------------------- */
.rmdf-overlay {
    position: fixed;
    inset: 0;
    z-index: 999998;
    background: rgba(7, 26, 51, .28);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .28s ease, visibility .28s ease;
}

.rmdf-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.rmdf-panel {
    position: fixed;
    z-index: 999999;
    top: 0;
    left: 0;
    width: min(430px, 92vw);
    height: 100dvh;
    background: var(--rmdf-bg);
    box-shadow: 20px 0 60px rgba(7, 26, 51, .13);
    transform: translate3d(-102%, 0, 0);
    visibility: hidden;
    transition: transform .32s cubic-bezier(.22,.61,.36,1), visibility .32s ease;
    display: flex;
    flex-direction: column;
    color: var(--rmdf-navy);
    font-family: inherit;
}

.rmdf-panel.is-open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
}

body.rmdf-lock { overflow: hidden !important; }

.rmdf-panel-header {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 34px 30px 22px;
    border-bottom: 1px solid var(--rmdf-line);
    background: #fff;
}

.rmdf-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--rmdf-gold);
    font-size: 9px;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.rmdf-panel-header h2 {
    margin: 0;
    color: var(--rmdf-navy);
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1;
    font-weight: 400;
    letter-spacing: -.025em;
}

.rmdf-close {
    appearance: none;
    -webkit-appearance: none;
    width: 34px;
    height: 34px;
    margin: -5px -5px 0 0;
    border: 0;
    background: transparent;
    color: var(--rmdf-gold);
    font: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.rmdf-close:hover,
.rmdf-close:focus-visible { color: var(--rmdf-navy); outline: none; }

.rmdf-panel-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 30px 28px;
    scrollbar-width: thin;
    scrollbar-color: #d6d0c9 transparent;
}

/* Filter form ----------------------------------------------------------- */
.rmdf-root,
.rmdf-root *,
.rmdf-root *::before,
.rmdf-root *::after { box-sizing: border-box; }

.rmdf-root {
    width: 100%;
    color: var(--rmdf-navy);
    font-family: inherit;
}
.rmdf-form { margin: 0; }

.rmdf-group {
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--rmdf-line);
    background: transparent;
}

.rmdf-group > summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 67px;
    padding: 0;
    color: var(--rmdf-navy);
    font-size: 27px;
    font-weight: 400;
    line-height: 1.15;
    cursor: pointer;
    user-select: none;
}
.rmdf-group > summary::-webkit-details-marker { display: none; }
.rmdf-group > summary::marker { display: none; content: ""; }

.rmdf-chevron {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    margin-right: 3px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .2s ease;
}
.rmdf-group[open] > summary .rmdf-chevron { transform: rotate(225deg) translate(-1px, -1px); }

.rmdf-group-body { padding: 0 0 23px; }

.rmdf-select-label {
    display: block;
    margin: 0 0 9px;
    color: var(--rmdf-muted);
    font-size: 12px;
    letter-spacing: .04em;
}

.rmdf-category-select {
    width: 100%;
    min-height: 48px;
    padding: 0 42px 0 13px;
    border: 1px solid #dcd6ce;
    border-radius: 0;
    background-color: #fff;
    color: var(--rmdf-navy);
    font: inherit;
    font-size: 15px;
    box-shadow: none;
    outline: none;
}
.rmdf-category-select:focus { border-color: var(--rmdf-gold); }

.rmdf-options {
    display: grid;
    gap: 12px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 6px;
}

.rmdf-option {
    display: grid;
    grid-template-columns: 18px minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--rmdf-text);
    font-size: 15px;
    line-height: 1.35;
    cursor: pointer;
}

.rmdf-option input {
    appearance: auto;
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--rmdf-navy);
}
.rmdf-option small {
    min-width: 22px;
    color: #aaa49c;
    font-size: 11px;
    text-align: right;
}

.rmdf-choose-category,
.rmdf-empty,
.rmdf-loading {
    padding: 37px 14px;
    text-align: center;
    color: var(--rmdf-muted);
    border-bottom: 1px solid var(--rmdf-line);
}
.rmdf-choose-category p,
.rmdf-empty p,
.rmdf-loading p {
    margin: 8px 0 4px;
    color: var(--rmdf-navy);
    font-size: 16px;
}
.rmdf-choose-category small {
    display: block;
    max-width: 300px;
    margin: 0 auto;
    color: var(--rmdf-muted);
    font-size: 12px;
    line-height: 1.45;
}
.rmdf-choose-icon { color: var(--rmdf-gold); font-size: 24px; }

.rmdf-loading span {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid #e5e0d9;
    border-top-color: var(--rmdf-gold);
    border-radius: 50%;
    animation: rmdfSpin .7s linear infinite;
}
@keyframes rmdfSpin { to { transform: rotate(360deg); } }

/* Price slider ---------------------------------------------------------- */
.rmdf-price-values {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 15px;
    color: var(--rmdf-text);
    font-size: 15px;
}
.rmdf-price-values strong { font-weight: 400; }

.rmdf-range-wrap { position: relative; height: 30px; }
.rmdf-range-wrap::before,
.rmdf-range-track {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 13px;
    height: 2px;
    background: #ddd8d1;
}
.rmdf-range-track {
    left: var(--rmdf-left, 0%);
    right: var(--rmdf-right, 0%);
    background: var(--rmdf-navy);
    z-index: 1;
}
.rmdf-range-wrap input[type="range"] {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 30px;
    margin: 0;
    padding: 0;
    background: transparent;
    pointer-events: none;
    appearance: none;
    -webkit-appearance: none;
}
.rmdf-range-wrap input[type="range"]::-webkit-slider-thumb {
    pointer-events: auto;
    width: 17px;
    height: 17px;
    border: 0;
    border-radius: 50%;
    background: var(--rmdf-navy);
    box-shadow: 0 0 0 4px #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}
.rmdf-range-wrap input[type="range"]::-moz-range-thumb {
    pointer-events: auto;
    width: 17px;
    height: 17px;
    border: 0;
    border-radius: 50%;
    background: var(--rmdf-navy);
    box-shadow: 0 0 0 4px #fff;
    cursor: pointer;
}

/* Actions --------------------------------------------------------------- */
.rmdf-actions {
    position: sticky;
    bottom: -28px;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    padding: 20px 0 28px;
    background: linear-gradient(to bottom, rgba(255,255,255,.82), #fff 24%);
}
.rmdf-apply,
.rmdf-reset {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid var(--rmdf-gold);
    border-radius: 0;
    text-decoration: none !important;
    font: inherit;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .14em;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, opacity .2s ease;
}
.rmdf-apply { background: var(--rmdf-gold); color: #fff; }
.rmdf-apply:hover,
.rmdf-apply:focus-visible { background: var(--rmdf-gold-deep); color: #fff; outline: none; }
.rmdf-apply:disabled { opacity: .4; cursor: not-allowed; }
.rmdf-reset { background: #fff; color: var(--rmdf-gold); }
.rmdf-reset:hover,
.rmdf-reset:focus-visible { background: var(--rmdf-soft); color: var(--rmdf-gold); outline: none; }

/* Fallback when theme removes woocommerce_before_shop_loop. */
.rmdf-trigger-wrap-fallback { display: flex; width: 100%; }
.rmdf-trigger.is-floating {
    position: fixed;
    z-index: 99990;
    left: 18px;
    bottom: 22px;
    box-shadow: 0 10px 35px rgba(7,26,51,.16);
}

@media (max-width: 767px) {
    .rmdf-panel { width: min(390px, 94vw); }
    .rmdf-panel-header { padding: 27px 22px 19px; }
    .rmdf-panel-scroll { padding: 0 22px 22px; }
    .rmdf-group > summary { min-height: 62px; font-size: 24px; }
    .rmdf-actions { grid-template-columns: 1fr; bottom: -22px; padding-bottom: 22px; }
    .rmdf-reset { order: 2; }
    .rmdf-trigger { min-height: 40px; padding: 0 15px; }
}

/* v4 refinements ------------------------------------------------------- */
.rmdf-category-help {
    display: block;
    margin-top: 9px;
    color: var(--rmdf-muted);
    font-size: 11px;
    line-height: 1.45;
}

.rmdf-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin: 0 -30px -28px;
    padding: 18px 30px 22px;
    background: rgba(255,255,255,.97);
    border-top: 1px solid var(--rmdf-line);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.rmdf-apply[disabled] {
    opacity: .42;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .rmdf-panel { width: min(390px, 94vw); }
    .rmdf-panel-header { padding: 28px 24px 18px; }
    .rmdf-panel-scroll { padding-left: 24px; padding-right: 24px; }
    .rmdf-actions { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; }
    .rmdf-group > summary { font-size: 24px; min-height: 62px; }
}
