/* =============================================================
   WPR Rental Filter – Frontend Styles
   Matches the design: Filter panel, Product grid, Search bar
   ============================================================= */

/* ---------------------------------------------------------------
   1. FILTER BOX
--------------------------------------------------------------- */
.wpr-rf-filter-box {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 24px 20px;
    box-sizing: border-box;
}

.wpr-rf-filter-title {
    font-size: 20px;
    font-weight: 700;
    color: #111111;
    margin: 0 0 20px 0;
    padding: 0;
    line-height: 1.3;
}

.wpr-rf-filter-section {
    margin-bottom: 20px;
}

.wpr-rf-filter-section:last-of-type {
    margin-bottom: 0;
}

.wpr-rf-section-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #222222;
    margin-bottom: 10px;
    text-transform: none;
}

/* Checkboxes */
.wpr-rf-checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    cursor: pointer;
}

.wpr-rf-checkbox-wrap:last-child {
    margin-bottom: 0;
}

.wpr-rf-checkbox-wrap input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: #000000;
    flex-shrink: 0;
}

.wpr-rf-checkbox-label {
    font-size: 14px;
    color: #333333;
    line-height: 1.4;
    cursor: pointer;
}

/* Radio */
.wpr-rf-radio-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    cursor: pointer;
}

.wpr-rf-radio-wrap:last-child {
    margin-bottom: 0;
}

.wpr-rf-radio-wrap input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: #000000;
    flex-shrink: 0;
}

.wpr-rf-radio-label {
    font-size: 14px;
    color: #333333;
    line-height: 1.4;
    cursor: pointer;
}

/* Reset Button */
.wpr-rf-reset-btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 11px 20px;
    background: #ffffff;
    color: #111111;
    border: 1.5px solid #cccccc;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.wpr-rf-reset-btn:hover {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
}

/* ---------------------------------------------------------------
   2. SEARCH & SORT BAR
--------------------------------------------------------------- */
.wpr-rf-search-wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.wpr-rf-search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.wpr-rf-search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaaaaa;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.wpr-rf-search-input {
    width: 100%;
    padding: 10px 14px 10px 36px;
    border: 1px solid #dddddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333333;
    background: #ffffff;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
}

.wpr-rf-search-input:focus {
    border-color: #888888;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.06);
}

.wpr-rf-search-input::placeholder {
    color: #aaaaaa;
}

.wpr-rf-sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.wpr-rf-sort-label {
    font-size: 14px;
    color: #555555;
    white-space: nowrap;
}

.wpr-rf-sort-select {
    padding: 8px 12px;
    border: 1px solid #dddddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333333;
    background: #ffffff;
    cursor: pointer;
    outline: none;
    min-width: 140px;
    appearance: auto;
}

.wpr-rf-sort-select:focus {
    border-color: #888888;
}

/* ---------------------------------------------------------------
   3. RESULTS INFO
--------------------------------------------------------------- */
.wpr-rf-results-info {
    font-size: 14px;
    color: #555555;
    margin-bottom: 16px;
    display: block;
}

/* ---------------------------------------------------------------
   4. PRODUCT GRID
--------------------------------------------------------------- */
.wpr-rf-grid-wrapper {
    width: 100%;
}

.wpr-rf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

/* Column variants (data-driven from PHP) */
.wpr-rf-cols-1 { grid-template-columns: repeat(1, 1fr); }
.wpr-rf-cols-2 { grid-template-columns: repeat(2, 1fr); }
.wpr-rf-cols-3 { grid-template-columns: repeat(3, 1fr); }
.wpr-rf-cols-4 { grid-template-columns: repeat(4, 1fr); }
.wpr-rf-cols-5 { grid-template-columns: repeat(5, 1fr); }
.wpr-rf-cols-6 { grid-template-columns: repeat(6, 1fr); }

/* ---------------------------------------------------------------
   5. PRODUCT CARD
--------------------------------------------------------------- */
.wpr-rf-product-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.25s ease;
}

.wpr-rf-product-card:hover {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.10);
}

/* Image Wrap */
.wpr-rf-product-image-wrap {
    position: relative;
    width: 100%;
    height: 220px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wpr-rf-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.wpr-rf-product-no-image {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
}

/* Badge */
.wpr-rf-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    line-height: 1.4;
    white-space: nowrap;
}

.wpr-rf-badge--instock {
    background: #e0e0e0;
    color: #333333;
}

.wpr-rf-badge--backorder {
    background: #e0e0e0;
    color: #333333;
}

.wpr-rf-badge--outofstock {
    background: #f5c2c2;
    color: #c00000;
}

/* Product Info */
.wpr-rf-product-info {
    padding: 14px 14px 8px;
    flex: 1;
}

.wpr-rf-product-title {
    font-size: 15px;
    font-weight: 600;
    color: #111111;
    margin: 0 0 6px 0;
    padding: 0;
    line-height: 1.35;
}

.wpr-rf-product-price {
    font-size: 15px;
    font-weight: 700;
    color: #111111;
    line-height: 1.3;
}

.wpr-rf-per-day {
    font-size: 13px;
    font-weight: 400;
    color: #888888;
    margin-left: 1px;
}

/* Sewa Button */
.wpr-rf-btn-sewa {
    display: block;
    width: 100%;
    margin: 14px 0 0;
    padding: 12px 20px;
    background: #111111;
    color: #ffffff;
    border: none;
    border-radius: 0 0 8px 8px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
    box-sizing: border-box;
}

.wpr-rf-btn-sewa:hover {
    background: #333333;
    color: #ffffff;
    text-decoration: none;
}

/* ---------------------------------------------------------------
   6. PAGINATION
--------------------------------------------------------------- */
.wpr-rf-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.wpr-rf-page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: #f0f0f0;
    color: #333333;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.wpr-rf-page-btn:hover {
    background: #dddddd;
}

.wpr-rf-page-btn.wpr-rf-page--active {
    background: #111111;
    color: #ffffff;
}

/* ---------------------------------------------------------------
   7. LOADING / STATES
--------------------------------------------------------------- */
.wpr-rf-loading {
    opacity: 0.5;
    pointer-events: none;
}

.wpr-rf-no-products {
    font-size: 15px;
    color: #666666;
    text-align: center;
    padding: 40px 0;
    margin: 0;
}

/* ---------------------------------------------------------------
   8. RESPONSIVE
--------------------------------------------------------------- */
@media (max-width: 1024px) {
    .wpr-rf-grid.wpr-rf-cols-4,
    .wpr-rf-grid.wpr-rf-cols-5,
    .wpr-rf-grid.wpr-rf-cols-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .wpr-rf-grid,
    .wpr-rf-grid.wpr-rf-cols-3,
    .wpr-rf-grid.wpr-rf-cols-4,
    .wpr-rf-grid.wpr-rf-cols-5,
    .wpr-rf-grid.wpr-rf-cols-6 {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .wpr-rf-search-wrap {
        flex-direction: row;
        gap: 12px;
    }

    .wpr-rf-sort-wrap {
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .wpr-rf-grid,
    .wpr-rf-grid.wpr-rf-cols-2,
    .wpr-rf-grid.wpr-rf-cols-3 {
        grid-template-columns: repeat(1, 1fr);
    }

    .wpr-rf-search-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .wpr-rf-sort-wrap {
        justify-content: space-between;
    }

    .wpr-rf-sort-select {
        flex: 1;
    }
}
