/* WR Product Filters — Frontend Styles */

/* Sort dropdown */
.wr-sort-section {
    margin-bottom: 20px;
}

.wr-sort-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    color: #004a33;
    background-color: #fff;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23004a33' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.wr-sort-select:focus {
    outline: none;
    border-color: #004a33;
}

/* Filter section */
.wr-filter-section {
    margin-top: 0;
}

.wr-filter-group {
    margin-bottom: 20px;
}

.wr-filter-group .wpc-filter-header {
    margin-bottom: 8px;
}

.wr-filter-group .wpc-filter-title {
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #004a33;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Checkbox list */
.wr-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wr-filter-list li {
    margin-bottom: 6px;
}

.wr-filter-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    color: #004a33;
    cursor: pointer;
    line-height: 1.4;
}

.wr-filter-list input[type="checkbox"] {
    accent-color: #004a33;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.wr-term-count {
    color: #999;
    font-size: 12px;
    margin-left: auto;
}

/* Apply / Reset buttons */
.wr-filter-submit {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 20px;
    background-color: #004a33;
    color: #fff;
    border: 1px solid #004a33;
    border-radius: 3px;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    transition: background-color 0.25s, border-color 0.25s;
}

.wr-filter-submit:hover {
    background-color: #c49a6c;
    border-color: #c49a6c;
}

.wr-filter-reset {
    display: block;
    text-align: center;
    margin-top: 10px;
    color: #c49a6c;
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    text-decoration: underline;
}

.wr-filter-reset:hover {
    color: #004a33;
}

/* Date direction toggle */
.wr-date-filter-group {
    margin-bottom: 24px;
}

.wr-date-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wr-date-toggle-label {
    font-family: "Montserrat", sans-serif;
    font-size: 12px;
    color: #999;
    transition: color 0.2s;
    line-height: 1.3;
}

.wr-date-toggle-label.wr-active {
    color: #004a33;
    font-weight: 600;
}

/* Toggle switch */
.wr-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.wr-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.wr-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #004a33;
    border-radius: 24px;
    transition: background-color 0.3s;
}

.wr-toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
}

.wr-toggle-switch input:checked + .wr-toggle-slider {
    background-color: #c49a6c;
}

.wr-toggle-switch input:checked + .wr-toggle-slider::before {
    transform: translateX(20px);
}

/* Event date badge on product cards */
.wr-event-date-badge {
    display: block;
    font-family: "Montserrat", sans-serif;
    font-size: 12px;
    color: #c49a6c;
    margin-top: 4px;
    font-weight: 600;
}

/* Mobile filter toggle */
.wr-mobile-filter-toggle {
    display: none;
    width: 100%;
    padding: 12px;
    background-color: #004a33;
    color: #fff;
    border: none;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    margin-bottom: 20px;
    border-radius: 3px;
}

.wr-mobile-filter-toggle:hover {
    background-color: #c49a6c;
}

@media only screen and (max-width: 768px) {
    .wr-mobile-filter-toggle {
        display: block;
    }

    .shopfilters.wr-filters-open {
        display: block !important;
    }
}
