/* =============================================================
   WPR Rental Product Widgets — Stylesheet v1.0.0
   ============================================================= */

/* ── Reset / Base ─────────────────────────────────────────── */
.wpr-product-hero *,
.wpr-product-description *,
.wpr-product-reviews * {
    box-sizing: border-box;
}

/* ── WPR Product Hero ─────────────────────────────────────── */
.wpr-product-hero {
    font-family: inherit;
    color: #1a1a1a;
}

.wpr-ph-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: flex-start;
}

@media (max-width: 768px) {
    .wpr-ph-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Image */
.wpr-ph-image-wrap {
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wpr-ph-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

/* Badge */
.wpr-ph-badge {
    display: inline-block;
    background: #1a1a1a;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

/* Title */
.wpr-ph-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 10px;
    color: #1a1a1a;
}

/* Stars */
.wpr-ph-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}
.wpr-ph-stars {
    display: flex;
    gap: 2px;
}
.wpr-star,
.wpr-rv-star {
    font-size: 16px;
    line-height: 1;
}
.wpr-star--full,
.wpr-rv-star--full { color: #f4a81d; }
.wpr-star--half,
.wpr-rv-star--half { color: #f4a81d; opacity: 0.7; }
.wpr-star--empty,
.wpr-rv-star--empty { color: #ddd; }

.wpr-ph-rating-score {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}
.wpr-ph-review-count {
    font-size: 13px;
    color: #777;
}

/* Price */
.wpr-ph-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 16px;
}
.wpr-ph-price {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
}
.wpr-ph-price-unit {
    font-size: 14px;
    color: #777;
}

/* Divider */
.wpr-ph-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 0 0 16px;
}

/* Description */
.wpr-ph-desc {
    font-size: 14px;
    line-height: 1.7;
    color: #555;
    margin: 0 0 16px;
}

/* Meta badges */
.wpr-ph-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.wpr-ph-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #444;
}
.wpr-ph-meta-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: #666;
}

/* Form */
.wpr-ph-form { display: flex; flex-direction: column; gap: 16px; }
.wpr-ph-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
}

/* Quantity */
.wpr-ph-qty-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.wpr-ph-qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}
.wpr-qty-btn {
    background: #f5f5f5;
    border: none;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    color: #333;
    line-height: 1;
}
.wpr-qty-btn:hover { background: #e5e5e5; }
.wpr-qty-input {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    font-size: 14px;
    font-weight: 600;
    height: 36px;
    outline: none;
    background: #fff;
    -moz-appearance: textfield;
}
.wpr-qty-input::-webkit-inner-spin-button,
.wpr-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.wpr-ph-total-display {
    font-size: 13px;
    color: #555;
}
.wpr-ph-total { color: #1a1a1a; }

/* Dates */
.wpr-ph-date-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.wpr-ph-date-field {
    position: relative;
}
.wpr-date-input {
    width: 100%;
    height: 42px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0 36px 0 12px;
    font-size: 13px;
    color: #444;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
    cursor: pointer;
}
.wpr-date-input:focus { border-color: #1a1a1a; }
.wpr-date-input::-webkit-calendar-picker-indicator { opacity: 0; position: absolute; right: 8px; cursor: pointer; width: 24px; height: 100%; }
.wpr-date-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}
.wpr-date-icon svg {
    width: 16px;
    height: 16px;
    stroke: #888;
    display: block;
}

/* CTA Row */
.wpr-ph-cta-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.wpr-ph-cta-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    line-height: 1;
}
.wpr-ph-cta-btn:hover {
    background: #333;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}
.wpr-btn-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    flex-shrink: 0;
}
.wpr-ph-wishlist-btn {
    width: 48px;
    height: 48px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    flex-shrink: 0;
}
.wpr-ph-wishlist-btn:hover { border-color: #e74c3c; color: #e74c3c; }
.wpr-ph-wishlist-btn svg { width: 20px; height: 20px; }

/* Guarantee */
.wpr-ph-guarantee {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 14px 16px;
}
.wpr-ph-guarantee-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: #555;
    margin-top: 1px;
}
.wpr-ph-guarantee div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.wpr-ph-guarantee strong {
    font-size: 13px;
    font-weight: 700;
    color: #222;
}
.wpr-ph-guarantee span {
    font-size: 12px;
    color: #777;
}

/* ── WPR Product Description ──────────────────────────────── */
.wpr-product-description {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.wpr-pd-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
    padding: 0 20px;
    gap: 0;
}
.wpr-pd-tab {
    background: none;
    border: none;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #777;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    white-space: nowrap;
}
.wpr-pd-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    transition: background 0.2s;
}
.wpr-pd-tab.is-active { color: #1a1a1a; font-weight: 600; }
.wpr-pd-tab.is-active::after { background: #1a1a1a; }
.wpr-pd-tab:hover:not(.is-active) { color: #333; }

.wpr-pd-tab-content {
    padding: 28px 28px 24px;
    background: #fff;
}

.wpr-pd-heading {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 14px;
}

.wpr-pd-paragraph {
    font-size: 14px;
    line-height: 1.75;
    color: #555;
    margin: 0 0 12px;
}
.wpr-pd-paragraph:last-of-type { margin-bottom: 0; }

.wpr-pd-features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 32px;
    margin-top: 24px;
}
@media (max-width: 600px) {
    .wpr-pd-features-grid { grid-template-columns: 1fr; }
}

.wpr-pd-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.wpr-pd-feature-icon {
    font-size: 18px;
    color: #1a73e8;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1.2;
}
.wpr-pd-feature-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.wpr-pd-feature-text strong {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
}
.wpr-pd-feature-text span {
    font-size: 13px;
    color: #777;
}

/* ── WPR Product Reviews ──────────────────────────────────── */
.wpr-product-reviews {
    font-family: inherit;
    color: #1a1a1a;
}

/* Header */
.wpr-rv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.wpr-rv-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}
.wpr-rv-write-btn {
    background: #fff;
    border: 1px solid #1a1a1a;
    border-radius: 6px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.wpr-rv-write-btn:hover { background: #1a1a1a; color: #fff; }

/* Body layout */
.wpr-rv-body {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 32px;
    align-items: flex-start;
}
@media (max-width: 680px) {
    .wpr-rv-body { grid-template-columns: 1fr; }
}

/* Summary */
.wpr-rv-summary {
    text-align: center;
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 20px 16px;
}
.wpr-rv-overall-score {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
    color: #1a1a1a;
    margin-bottom: 8px;
}
.wpr-rv-overall-stars {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-bottom: 4px;
}
.wpr-rv-overall-stars .wpr-rv-star { font-size: 18px; }
.wpr-rv-total {
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
}

/* Bars */
.wpr-rv-bars { display: flex; flex-direction: column; gap: 6px; }
.wpr-rv-bar-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}
.wpr-rv-bar-label {
    width: 28px;
    text-align: right;
    color: #555;
    flex-shrink: 0;
}
.wpr-rv-bar-track {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}
.wpr-rv-bar-fill {
    height: 100%;
    background: #f4a81d;
    border-radius: 3px;
    transition: width 0.4s ease;
}
.wpr-rv-bar-count {
    width: 22px;
    text-align: left;
    color: #777;
    flex-shrink: 0;
}

/* Review List */
.wpr-rv-list { display: flex; flex-direction: column; gap: 0; }

.wpr-rv-card {
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}
.wpr-rv-card:last-of-type { border-bottom: none; }
.wpr-rv-hidden { display: none; }

.wpr-rv-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.wpr-rv-avatar {
    width: 40px;
    height: 40px;
    background: #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: #555;
    flex-shrink: 0;
}
.wpr-rv-card-meta {
    flex: 1;
    min-width: 0;
}
.wpr-rv-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
}
.wpr-rv-date {
    font-size: 12px;
    color: #999;
}
.wpr-rv-card-stars {
    display: flex;
    gap: 2px;
    margin-left: auto;
}
.wpr-rv-card-stars .wpr-rv-star { font-size: 15px; }
.wpr-rv-content {
    font-size: 14px;
    line-height: 1.7;
    color: #555;
    margin: 0;
}

/* Load More */
.wpr-rv-load-more-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
}
.wpr-rv-load-more-btn:hover { background: #f5f5f5; }

/* ── Modal ───────────────────────────────────────────────── */
.wpr-rv-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.wpr-rv-modal[hidden] { display: none !important; }
.wpr-rv-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}
.wpr-rv-modal-box {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 28px 24px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.wpr-rv-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 4px;
}
.wpr-rv-modal-close:hover { color: #1a1a1a; }
.wpr-rv-modal-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px;
    color: #1a1a1a;
}

/* Form inside modal */
.wpr-rv-form { display: flex; flex-direction: column; gap: 16px; }
.wpr-rv-form-group { display: flex; flex-direction: column; gap: 6px; }
.wpr-rv-form-group label { font-size: 13px; font-weight: 600; color: #444; }
.wpr-rv-field {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}
.wpr-rv-field:focus { border-color: #1a1a1a; }
.wpr-rv-textarea { resize: vertical; min-height: 90px; }

/* Star picker */
.wpr-rv-star-picker {
    display: flex;
    gap: 6px;
    flex-direction: row-reverse;
    justify-content: flex-end;
}
.wpr-rv-star-pick {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #ddd;
    transition: color 0.15s;
    line-height: 1;
    padding: 0;
}
.wpr-rv-star-pick.is-active,
.wpr-rv-star-pick:hover,
.wpr-rv-star-pick:hover ~ .wpr-rv-star-pick { color: #f4a81d; }

/* Submit */
.wpr-rv-submit-btn {
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.wpr-rv-submit-btn:hover { background: #333; }
.wpr-rv-form-msg {
    font-size: 13px;
    min-height: 18px;
    text-align: center;
}
.wpr-rv-form-msg.is-success { color: #27ae60; }
.wpr-rv-form-msg.is-error   { color: #e74c3c; }
