/* ── Related Products Widget ─────────────────────────────────────── */
.rpw-wrap { font-family: inherit; color: #1a1a1a; }

/* Title */
.rpw-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px;
}

/* Toolbar */
.rpw-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #e8e0d8;
    border-radius: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.rpw-count { flex: 1; font-size: 14px; color: #555; min-width: 140px; }
.rpw-count strong { color: #1a1a1a; }

/* Sort */
.rpw-sort-wrap { display: flex; align-items: center; gap: 8px; }
.rpw-sort-label { font-size: 14px; color: #555; white-space: nowrap; }
.rpw-sort-select {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    background: #fff;
    font-size: 14px;
    user-select: none;
    min-width: 150px;
}
.rpw-sort-current { flex: 1; }
.rpw-sort-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #2d2d2d;
    border-radius: 6px;
    list-style: none;
    margin: 0;
    padding: 6px 0;
    min-width: 180px;
    z-index: 999;
    box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.rpw-sort-select.is-open .rpw-sort-dropdown { display: block; }
.rpw-sort-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    color: #f0f0f0;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s;
}
.rpw-sort-item:hover { background: rgba(255,255,255,.1); }
.rpw-sort-item.is-active { color: #fff; }
.rpw-sort-item svg { flex-shrink: 0; }

/* View buttons */
.rpw-view-btns { display: flex; gap: 4px; margin-left: auto; }
.rpw-view-btn {
    width: 34px; height: 34px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #666;
    transition: background .15s, color .15s, border-color .15s;
}
.rpw-view-btn.is-active {
    background: var(--rpw-primary);
    border-color: var(--rpw-primary);
    color: #fff;
}

/* Grid */
.rpw-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.rpw-grid[data-view="list"] {
    grid-template-columns: 1fr;
}
.rpw-grid[data-view="list"] .rpw-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    grid-template-rows: auto auto;
}
.rpw-grid[data-view="list"] .rpw-img-wrap {
    height: 200px;
    grid-row: 1 / 3;
}
.rpw-grid[data-view="list"] .rpw-seller {
    grid-column: 2;
}

/* Card */
.rpw-card {
    background: var(--rpw-card-bg);
    border: 1px solid #e8e0d8;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s;
}
.rpw-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }

/* Image */
.rpw-img-wrap {
    position: relative;
    background: #f5f0eb;
    height: 200px;
    overflow: hidden;
}
.rpw-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.rpw-badge {
    position: absolute;
    top: 10px; left: 10px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    padding: 3px 8px;
    border-radius: 3px;
}
.rpw-extra {
    position: absolute;
    bottom: 8px; right: 8px;
    background: rgba(0,0,0,.5);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}

/* Body */
.rpw-body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rpw-prod-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    color: #1a1a1a;
    margin: 0;
}

/* Specs */
.rpw-specs { font-size: 12px; }
.rpw-spec-row {
    display: flex;
    align-items: baseline;
    padding: 4px 0;
    line-height: 1.5;
}
.rpw-spec-row + .rpw-spec-row { border-top: 1px solid #f0ece8; }
.rpw-spec-label {
    color: #888;
    font-weight: 400;
    width: 72px;
    min-width: 72px;
    flex-shrink: 0;
    white-space: nowrap;
}
.rpw-spec-val { color: #1a1a1a; font-weight: 600; flex: 1; }

/* Price */
.rpw-price {
    margin: 4px 0 0;
    font-size: 15px;
    color: #1a1a1a;
    line-height: 1.3;
}
.rpw-price strong { font-weight: 700; color: #1a1a1a; }
.rpw-price-suf { font-size: 11.5px; color: #777; margin-left: 2px; font-weight: 400; }

/* Quote button */
.rpw-btn-quote {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--rpw-primary);
    color: #fff !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 6px;
    text-align: center;
    transition: opacity .15s;
    cursor: pointer;
    border: none;
    width: 100%;
}
.rpw-btn-quote:hover { opacity: .88; }

/* Call + WhatsApp row */
.rpw-btns-row { display: flex; gap: 8px; }
.rpw-btn-call, .rpw-btn-wa {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 6px;
    text-decoration: none !important;
    cursor: pointer;
    border: 1.5px solid;
    transition: opacity .15s;
    white-space: nowrap;
}
.rpw-btn-call {
    color: #1a1a1a !important;
    border-color: #ccc;
    background: #fff;
}
.rpw-btn-call:hover { background: #f5f5f5; }
.rpw-btn-wa {
    background: var(--rpw-wa);
    border-color: var(--rpw-wa);
    color: #fff !important;
}
.rpw-btn-wa:hover { opacity: .88; }

/* Seller footer */
.rpw-seller {
    background: var(--rpw-footer-bg);
    padding: 10px 14px;
    border-top: 1px solid #e8e0d8;
}
.rpw-seller-top { margin-bottom: 4px; }
.rpw-seller-info {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #444;
    font-weight: 500;
}
.rpw-seller-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rpw-badge-gst {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 700;
    color: #27AE60;
}
.rpw-seller-yrs { font-size: 11.5px; color: #555; font-weight: 600; }
.rpw-rating { font-size: 11.5px; color: #e67e22; font-weight: 700; }

/* Pagination */
.rpw-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.rpw-page-btn {
    min-width: 38px; height: 38px;
    padding: 0 12px;
    border: 1px solid #d0c8c0;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.rpw-page-btn:hover { border-color: var(--rpw-primary); color: var(--rpw-primary); }
.rpw-page-btn.is-active {
    background: var(--rpw-primary);
    border-color: var(--rpw-primary);
    color: #fff;
}
.rpw-page-next { padding: 0 16px; }

/* Hidden (pagination) */
.rpw-hidden { display: none !important; }

/* Responsive */
@media (max-width: 1100px) { .rpw-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 780px)  { .rpw-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 480px)  { .rpw-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
    .rpw-toolbar { gap: 8px; }
    .rpw-sort-wrap { display: none; }
}