/*
Theme Name: রংপুর লোকাল মার্কেট
Theme URI: https://rangpurlocalmarket.local
Author: Rangpur Local Market Team
Author URI: https://rangpurlocalmarket.local
Description: রংপুর জেলার জন্য স্থানীয় মার্কেটপ্লেস থিম। বিক্রেতারা নিজেদের দোকানে প্রোডাক্ট আপলোড করতে পারে, উপজেলা ও ইউনিয়ন অনুযায়ী ঠিকানা সেট করতে পারে এবং ক্রেতারা লোকেশন অনুযায়ী সার্চ করে অর্ডার করতে পারে। ৮টি উপজেলা ও সকল ইউনিয়ন অন্তর্ভুক্ত।
Version: 3.1.1
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rangpur-local-market
Tags: e-commerce, marketplace, bangladesh, custom-menu, responsive-layout
*/

/* ===== CSS Variables ===== */
:root {
  --rlm-primary: #0d9488;
  --rlm-header: #0f766e;
  --rlm-secondary: #4f46e5;
  --rlm-button: #0d9488;
  --rlm-primary-dark: #0f766e;
  --rlm-primary-light: #ccfbf1;
  --rlm-accent: #f59e0b;
  --rlm-bg: #f0fdfa;
  --rlm-card: #ffffff;
  --rlm-text: #134e4a;
  --rlm-muted: #5eead4;
  --rlm-danger: #ef4444;
  --rlm-success: #10b981;
  --rlm-border: #99f6e4;
  --rlm-shadow: 0 4px 20px rgba(13, 148, 136, 0.12);
}

/* ===== Reset & Base ===== */
.rlm-wrap *,
.rlm-wrap *::before,
.rlm-wrap *::after {
  box-sizing: border-box;
}

.rlm-wrap {
  font-family: 'Noto Sans Bengali', system-ui, -apple-system, sans-serif;
  background: var(--rlm-bg);
  color: var(--rlm-text);
  min-height: 100vh;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

.rlm-wrap a {
  color: var(--rlm-primary);
  text-decoration: none;
}

.rlm-wrap button,
.rlm-wrap .rlm-btn {
  cursor: pointer;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s;
}

.rlm-wrap .rlm-btn-primary {
  background: var(--rlm-primary);
  color: white;
}
.rlm-wrap .rlm-btn-primary:hover {
  background: var(--rlm-primary-dark);
  transform: translateY(-1px);
}

.rlm-wrap .rlm-btn-outline {
  background: transparent;
  border: 2px solid var(--rlm-primary);
  color: var(--rlm-primary);
}
.rlm-wrap .rlm-btn-outline:hover {
  background: var(--rlm-primary-light);
}

.rlm-wrap .rlm-btn-danger {
  background: var(--rlm-danger);
  color: white;
}

.rlm-wrap .rlm-btn-accent {
  background: var(--rlm-accent);
  color: #78350f;
}

.rlm-wrap .rlm-btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.rlm-wrap input,
.rlm-wrap select,
.rlm-wrap textarea {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--rlm-border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  background: white;
  color: var(--rlm-text);
  outline: none;
  transition: border 0.2s;
}

.rlm-wrap input:focus,
.rlm-wrap select:focus,
.rlm-wrap textarea:focus {
  border-color: var(--rlm-primary);
}

.rlm-wrap label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
}

/* ===== Header ===== */
.rlm-header {
  background: linear-gradient(135deg, #0f766e, #0d9488);
  color: white;
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
}

.rlm-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.rlm-logo {
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #fff !important;
  text-decoration: none !important;
}
.rlm-logo-txt { color: #fff !important; }

.rlm-logo span {
  font-size: 28px;
}

.rlm-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.rlm-nav-btn,
a.rlm-nav-btn,
button.rlm-nav-btn {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.3;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  min-height: 38px;
  box-sizing: border-box;
}
.rlm-nav-btn .rlm-nav-ico { font-size: 16px; line-height: 1; flex-shrink: 0; }
.rlm-nav-btn .rlm-nav-txt { color: inherit; font-size: 14px; font-weight: 600; }
.rlm-nav-btn:hover,
.rlm-nav-btn.active,
a.rlm-nav-btn:hover {
  background: #ffffff;
  color: #0f766e;
}
/* Hidden nav items — wins over display:inline-flex */
.rlm-nav-hidden,
.rlm-nav-btn.rlm-nav-hidden,
a.rlm-nav-btn.rlm-nav-hidden,
button.rlm-nav-btn.rlm-nav-hidden,
span.rlm-nav-hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
/* Public always visible */
.rlm-nav-public {
  display: inline-flex !important;
  visibility: visible !important;
}
.rlm-nav-earn {
  background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
  color: #fff !important;
}
.rlm-nav-earn:hover { filter: brightness(1.08); color: #fff !important; }

.rlm-user-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  display: none;
  align-items: center;
  gap: 6px;
}

/* ===== Layout ===== */
.rlm-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
}

.rlm-page {
  display: none;
  animation: rlmFadeIn 0.3s ease;
}

.rlm-page.active {
  display: block;
}

@keyframes rlmFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ===== Cards & Grid ===== */
.rlm-card {
  background: var(--rlm-card);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--rlm-shadow);
  border: 1px solid var(--rlm-border);
}

.rlm-grid {
  display: grid;
  gap: 20px;
}

.rlm-grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* ===== Hero ===== */
.rlm-hero {
  background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 50%, #5eead4 100%);
  border-radius: 20px;
  padding: 40px 28px;
  text-align: center;
  margin-bottom: 32px;
  border: 2px solid var(--rlm-border);
}

.rlm-hero h1 {
  font-size: 32px;
  margin-bottom: 10px;
  color: var(--rlm-primary-dark);
}

.rlm-hero p {
  font-size: 17px;
  color: #115e59;
  max-width: 600px;
  margin: 0 auto 20px;
}

.rlm-search-bar {
  display: flex;
  gap: 10px;
  max-width: 700px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.rlm-search-bar select,
.rlm-search-bar input {
  flex: 1;
  min-width: 140px;
}

/* ===== Product Card ===== */
.rlm-product-card {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--rlm-border);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.rlm-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(13, 148, 136, 0.18);
}

.rlm-product-img {
  height: 160px;
  background: linear-gradient(135deg, #ccfbf1, #99f6e4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.rlm-product-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.rlm-product-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
}

.rlm-product-price {
  color: var(--rlm-primary-dark);
  font-weight: 700;
  font-size: 18px;
  margin: 6px 0;
}

.rlm-product-loc {
  font-size: 12px;
  color: #0f766e;
  background: var(--rlm-primary-light);
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 8px;
}

.rlm-product-seller {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 10px;
}

.rlm-product-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
}

/* ===== Forms ===== */
.rlm-form-group {
  margin-bottom: 16px;
}

.rlm-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 600px) {
  .rlm-form-row {
    grid-template-columns: 1fr;
  }
}

.rlm-auth-box {
  max-width: 420px;
  margin: 40px auto;
  padding: 32px;
}

.rlm-auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.rlm-auth-tabs button {
  flex: 1;
  padding: 10px;
  background: var(--rlm-primary-light);
  color: var(--rlm-primary-dark);
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.rlm-auth-tabs button.active {
  background: var(--rlm-primary);
  color: white;
}

/* ===== Dashboard ===== */
.rlm-dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.rlm-stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.rlm-stat-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  border: 1px solid var(--rlm-border);
  box-shadow: var(--rlm-shadow);
}

.rlm-stat-card .num {
  font-size: 28px;
  font-weight: 700;
  color: var(--rlm-primary);
}

.rlm-stat-card .label {
  font-size: 13px;
  color: #64748b;
}

/* ===== Tables ===== */
.rlm-wrap table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

.rlm-wrap th,
.rlm-wrap td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--rlm-border);
  font-size: 14px;
}

.rlm-wrap th {
  background: var(--rlm-primary-light);
  font-weight: 600;
  color: var(--rlm-primary-dark);
}

.rlm-wrap tr:hover {
  background: #f0fdfa;
}

/* ===== Badge ===== */
.rlm-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.rlm-badge-pending { background: #fef3c7; color: #92400e; }
.rlm-badge-confirmed { background: #dbeafe; color: #1e40af; }
.rlm-badge-delivered { background: #d1fae5; color: #065f46; }
.rlm-badge-cancelled { background: #fee2e2; color: #991b1b; }

/* ===== Modal ===== */
.rlm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.rlm-modal-overlay.show {
  display: flex;
}

.rlm-modal {
  background: white;
  border-radius: 16px;
  padding: 28px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.rlm-modal h2 {
  margin-bottom: 18px;
  color: var(--rlm-primary-dark);
}

.rlm-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ===== Empty & Toast ===== */
.rlm-empty {
  text-align: center;
  padding: 48px 20px;
  color: #64748b;
}

.rlm-empty .icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.rlm-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--rlm-primary-dark);
  color: white;
  padding: 14px 22px;
  border-radius: 12px;
  z-index: 300;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
  max-width: 320px;
}

.rlm-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ===== Footer ===== */
.rlm-footer {
  background: #134e4a;
  color: #99f6e4;
  text-align: center;
  padding: 28px 16px;
  margin-top: 60px;
}

.rlm-footer a {
  color: #5eead4;
}

/* ===== Section Title ===== */
.rlm-section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--rlm-primary-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .rlm-hero h1 {
    font-size: 24px;
  }
  .rlm-logo {
    font-size: 18px;
  }
  .rlm-header-inner {
    justify-content: center;
  }
}

/* WordPress admin bar offset */
body.admin-bar .rlm-header {
  top: 32px;
}
@media (max-width: 782px) {
  body.admin-bar .rlm-header {
    top: 46px;
  }
}

/* ===== Subscription ===== */
.rlm-sub-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
}
.rlm-sub-banner.rlm-sub-active {
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}
.rlm-sub-banner.rlm-sub-expired {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
}

.rlm-sub-status-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 14px;
  font-size: 14px;
}
.rlm-sub-status-card.rlm-sub-active {
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}
.rlm-sub-status-card.rlm-sub-expired {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
}
.rlm-sub-status-icon {
  font-size: 28px;
  line-height: 1;
}

.rlm-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 640px;
}

.rlm-plan-card {
  background: white;
  border: 2px solid var(--rlm-border);
  border-radius: 16px;
  padding: 28px 24px;
  position: relative;
  box-shadow: var(--rlm-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.rlm-plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(13, 148, 136, 0.18);
}
.rlm-plan-card.rlm-plan-featured {
  border-color: var(--rlm-accent);
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 40%);
}

.rlm-plan-badge {
  position: absolute;
  top: -12px;
  right: 16px;
  background: var(--rlm-primary);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}
.rlm-plan-badge-best {
  background: var(--rlm-accent);
  color: #78350f;
}

.rlm-plan-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--rlm-primary-dark);
}
.rlm-plan-price {
  font-size: 36px;
  font-weight: 700;
  color: var(--rlm-primary);
  line-height: 1.1;
}
.rlm-plan-period {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 18px;
}
.rlm-plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  font-size: 14px;
}
.rlm-plan-features li {
  padding: 6px 0;
  border-bottom: 1px solid #f0fdfa;
  color: #334155;
}

/* ===== Payment Methods ===== */
.rlm-payment-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rlm-pay-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 2px solid var(--rlm-border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: white;
}
.rlm-pay-option:has(input:checked),
.rlm-pay-option.rlm-pay-active:has(input:checked) {
  border-color: var(--rlm-primary);
  background: var(--rlm-primary-light);
}
.rlm-pay-option input[type="radio"] {
  width: auto;
  margin: 0;
  accent-color: var(--rlm-primary);
}
.rlm-pay-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}
.rlm-pay-label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rlm-pay-label strong {
  font-size: 14px;
  color: var(--rlm-text);
}
.rlm-pay-label small {
  font-size: 12px;
  color: #64748b;
}
.rlm-pay-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  background: #f1f5f9;
  color: #64748b;
  white-space: nowrap;
}
.rlm-pay-status.rlm-pay-available {
  background: #d1fae5;
  color: #065f46;
}
.rlm-pay-option.rlm-pay-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f8fafc;
}
.rlm-pay-option.rlm-pay-disabled input {
  cursor: not-allowed;
}

/* ===== Order Delivery Summary ===== */
.rlm-order-delivery-box {
  background: #f0fdfa;
  border: 1px solid var(--rlm-border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 14px;
}
.rlm-del-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  color: #334155;
}
.rlm-del-total {
  border-top: 1px dashed var(--rlm-border);
  margin-top: 6px;
  padding-top: 8px;
  font-weight: 700;
  font-size: 16px;
  color: var(--rlm-primary-dark);
}
.rlm-del-free {
  margin-top: 8px;
  padding: 6px 10px;
  background: #d1fae5;
  color: #065f46;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
}
.rlm-del-hint {
  margin-top: 8px;
  padding: 6px 10px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 8px;
  font-size: 13px;
}
.rlm-del-rules {
  margin-top: 8px;
  font-size: 11px;
  color: #64748b;
}

/* Ad slots */
.rlm-ad-slot {
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
  border-radius: 12px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0;
  padding: 12px;
  text-align: center;
  overflow: hidden;
}
.rlm-ad-slot:empty { display: none; }

/* Social share */
.rlm-share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
.rlm-share-label {
  font-size: 11px;
  color: #64748b;
  width: 100%;
}
.rlm-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: #f0fdfa;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  padding: 0;
}
.rlm-share-btn:hover {
  transform: scale(1.08);
  background: #ccfbf1;
}

/* Product image upload */
.rlm-image-hint {
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
  line-height: 1.45;
}
.rlm-image-preview {
  margin-top: 12px;
  padding: 12px;
  background: #f0fdfa;
  border: 1px solid var(--rlm-border, #a7f3d0);
  border-radius: 12px;
  text-align: center;
}
.rlm-image-preview img {
  max-width: 100%;
  max-height: 180px;
  border-radius: 10px;
  object-fit: cover;
  margin-bottom: 8px;
}
.rlm-image-meta {
  font-size: 12px;
  color: #0f766e;
  margin-bottom: 8px;
  font-weight: 600;
}
.rlm-product-img-photo {
  padding: 0 !important;
  overflow: hidden;
  background: #e2e8f0 !important;
}
.rlm-product-img-photo img {
  width: 100%;
  height: 100%;
  min-height: 140px;
  max-height: 180px;
  object-fit: cover;
  display: block;
}


/* Support / Report */
.rlm-support-fab,
.rlm-chat-fab {
  position: fixed;
  bottom: 20px;
  left: 16px;
  right: auto !important;
  z-index: 99950 !important;
  background: var(--rlm-primary, #0d9488);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(13,148,136,0.35);
  pointer-events: auto !important;
}
.rlm-support-fab:hover,
.rlm-chat-fab:hover { filter: brightness(1.05); }


/* ===== Mega location search ===== */
.rlm-mega-search {
  background: #fff;
  border: 1px solid var(--rlm-border, #a7f3d0);
  border-radius: 20px;
  padding: 24px 22px 20px;
  margin: -12px 0 28px;
  box-shadow: 0 12px 40px rgba(13, 148, 136, 0.12);
  position: relative;
  z-index: 2;
}
.rlm-mega-search-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.rlm-mega-search-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.rlm-mega-search-head strong {
  display: block;
  font-size: 1.15rem;
  color: var(--rlm-primary-dark, #0f766e);
}
.rlm-mega-search-head span {
  font-size: 0.9rem;
  color: #64748b;
}
.rlm-mega-search-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}
@media (max-width: 900px) {
  .rlm-mega-search-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .rlm-mega-search-grid { grid-template-columns: 1fr; }
}
.rlm-mega-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}
.rlm-mega-field select {
  width: 100%;
  padding: 14px 14px;
  font-size: 1rem;
  border: 2px solid #ccfbf1;
  border-radius: 12px;
  background: #f8fffe;
  font-family: inherit;
  color: #134e4a;
  outline: none;
  transition: border-color 0.15s;
}
.rlm-mega-field select:focus {
  border-color: #0d9488;
  background: #fff;
}
.rlm-mega-search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.rlm-mega-keyword {
  flex: 1;
  min-width: 180px;
  padding: 14px 16px;
  font-size: 1rem;
  border: 2px solid #ccfbf1;
  border-radius: 12px;
  font-family: inherit;
  outline: none;
}
.rlm-mega-keyword:focus { border-color: #0d9488; }
.rlm-mega-btn {
  padding: 14px 28px !important;
  font-size: 1.05rem !important;
  border-radius: 12px !important;
}
.rlm-mega-hint {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.5;
}

/* Store cards on home */
.rlm-stores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.rlm-store-result-card {
  background: #fff;
  border: 1px solid var(--rlm-border, #a7f3d0);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 6px 20px rgba(13,148,136,0.08);
  transition: transform 0.2s;
}
.rlm-store-result-card:hover { transform: translateY(-3px); }
.rlm-store-result-card .rlm-store-emoji {
  font-size: 2rem;
  margin-bottom: 8px;
}
.rlm-store-result-card h3 {
  font-size: 1.1rem;
  color: var(--rlm-primary-dark, #0f766e);
  margin-bottom: 4px;
}
.rlm-store-result-card .loc {
  font-size: 0.85rem;
  color: #0f766e;
  background: #ccfbf1;
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.rlm-store-result-card .meta {
  font-size: 0.88rem;
  color: #64748b;
  margin-bottom: 10px;
}
.rlm-store-result-card .badge-v {
  font-size: 0.75rem;
  font-weight: 700;
  color: #065f46;
  background: #d1fae5;
  padding: 2px 8px;
  border-radius: 999px;
}

/* Hide WP admin bar for non-admins */
body.rlm-no-wpadmin #wpadminbar { display: none !important; }
html.wp-toolbar, body.rlm-no-wpadmin { padding-top: 0 !important; margin-top: 0 !important; }
body.rlm-app-shell { background: var(--rlm-bg, #f8fffe); }

/* Full-screen custom auth */
body.rlm-auth-mode .rlm-header,
body.rlm-auth-mode .rlm-footer { display: none !important; }
body.rlm-auth-mode .rlm-container { max-width: none; padding: 0; }
body.rlm-auth-mode .rlm-support-fab { display: none !important; }

.rlm-auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(ellipse 70% 50% at 20% 20%, rgba(153,246,228,0.5), transparent),
    linear-gradient(160deg, #0f766e 0%, #0d9488 45%, #ecfdf5 100%);
}
.rlm-auth-panel { width: 100%; max-width: 420px; }
.rlm-auth-brand { text-align: center; color: #fff; margin-bottom: 20px; }
.rlm-auth-logo { font-size: 3rem; display: block; margin-bottom: 8px; }
.rlm-auth-brand h1 { font-size: 1.5rem; margin: 0 0 4px; color: #fff; }
.rlm-auth-brand p { opacity: 0.9; font-size: 0.95rem; margin: 0; }
.rlm-auth-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.18);
}
.rlm-auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: #f0fdfa;
  padding: 6px;
  border-radius: 12px;
}
.rlm-auth-tabs button {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  color: #64748b;
}
.rlm-auth-tabs button.active {
  background: #0d9488;
  color: #fff;
}
.rlm-btn-block { width: 100%; padding: 14px !important; font-size: 1.05rem !important; margin-top: 8px; }
.rlm-auth-foot {
  margin-top: 16px;
  font-size: 0.8rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.4;
}

/* Profile page */
.rlm-profile-screen { max-width: 900px; margin: 0 auto; }
.rlm-profile-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: #fff;
  border-radius: 20px;
  padding: 28px 24px;
  margin-bottom: 20px;
  box-shadow: 0 12px 30px rgba(13,148,136,0.25);
}
.rlm-profile-avatar {
  width: 72px; height: 72px;
  border-radius: 20px;
  background: rgba(255,255,255,0.2);
  display: grid; place-items: center;
  font-size: 2rem;
  flex-shrink: 0;
}
.rlm-profile-hero h1 { margin: 0 0 4px; font-size: 1.4rem; color: #fff; }
.rlm-profile-hero p { margin: 0; opacity: 0.95; }
.rlm-profile-phone { font-size: 0.9rem; opacity: 0.85; }
.rlm-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.rlm-profile-links { display: flex; flex-wrap: wrap; gap: 8px; }


/* Store image on profile */
.rlm-profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
/* Facebook-style cover 815×315 */
.rlm-profile-store-img {
  width: 100%;
  max-width: 815px;
  aspect-ratio: 815 / 315;
  height: auto;
  object-fit: cover;
  border-radius: 14px;
  border: 3px solid rgba(255,255,255,0.45);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  display: block;
  background: rgba(0,0,0,0.1);
}
.rlm-profile-hero-store .rlm-profile-avatar {
  width: 100%;
  max-width: 815px;
  aspect-ratio: 815 / 315;
  height: auto;
  min-height: 120px;
  font-size: 2.5rem;
  border-radius: 14px;
}
.rlm-profile-hero-store {
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  padding: 16px 16px 22px;
}
.rlm-profile-hero-store .rlm-profile-avatar-wrap {
  width: 100%;
  max-width: 815px;
  margin: 0 auto 12px;
}
.rlm-profile-hero-store > div:last-child {
  width: 100%;
  text-align: center;
}
.rlm-cover-banner {
  width: 100%;
  max-width: 815px;
  margin: 0 auto 14px;
  aspect-ratio: 815 / 315;
  border-radius: 14px;
  overflow: hidden;
  background: #ecfdf5;
  box-shadow: 0 8px 24px rgba(6,95,70,0.12);
}
.rlm-cover-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rlm-cover-placeholder {
  display: grid;
  place-items: center;
  font-size: 2.5rem;
  min-height: 120px;
  aspect-ratio: 815 / 315;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border-radius: 14px;
  color: #166534;
}
.rlm-farmer-card-cover {
  width: 100%;
  aspect-ratio: 815 / 315;
  overflow: hidden;
  background: #ecfdf5;
}
.rlm-farmer-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rlm-store-img-upload {
  margin-top: 10px;
  text-align: center;
}
.rlm-store-img-label {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.rlm-store-img-label input { display: none; }
.rlm-store-img-upload small {
  display: block;
  color: rgba(255,255,255,0.75);
  font-size: 0.7rem;
  margin-top: 4px;
}
.rlm-profile-products-section {
  margin-top: 24px;
  margin-bottom: 8px;
}
.rlm-store-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 10px;
  display: block;
}


/* PointEarn CTA */
.rlm-hero-cta {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.rlm-btn-earn {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%) !important;
  color: #fff !important;
  border: none !important;
  padding: 14px 22px !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
  font-size: 1.05rem !important;
  text-decoration: none !important;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  transition: transform .15s, box-shadow .15s;
}
.rlm-btn-earn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.4);
  color: #fff !important;
}
.rlm-hero-cta-hint {
  font-size: 0.88rem;
  color: #64748b;
}
.rlm-nav-earn {
  background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
}
.rlm-nav-earn:hover {
  filter: brightness(1.08);
  color: #fff !important;
}
@media (max-width: 640px) {
  .rlm-hero-cta { align-items: stretch; }
  .rlm-btn-earn { justify-content: center; width: 100%; box-sizing: border-box; }
}

/* Guest auth hidden when seller session active */
body.rlm-is-seller .rlm-nav-guest {
  display: none !important;
}
/* PointEarn auth pages: minimal chrome inside theme shell */
body.pe-remote-auth-page .rlm-header,
body.pe-remote-auth-page .rlm-footer,
body.pe-remote-auth-page footer {
  display: none !important;
}
body.pe-remote-auth-page .rlm-wrap,
body.pe-remote-auth-page .rlm-container,
body.pe-remote-auth-page .rlm-page-content,
body.pe-remote-auth-page .rlm-page-article {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* WP PointEarn user logged in: never show guest PE auth or seller login */
body.logged-in #rlm-nav-pe-login,
body.logged-in #rlm-nav-pe-register,
body.logged-in #rlm-nav-auth {
  display: none !important;
}

.rlm-chip {
  display: inline-block;
  background: #ecfdf5;
  color: #0f766e;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}
.rlm-detail-store {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
}


/* Product detail full page */
.rlm-pd-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.rlm-pd-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}
.rlm-pd-card { padding: 20px 22px; }
.rlm-pd-hero-img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 16px;
}
.rlm-pd-hero-emoji {
  font-size: 72px;
  text-align: center;
  padding: 24px;
  background: #f0fdfa;
  border-radius: 16px;
  margin-bottom: 16px;
}
.rlm-pd-title {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  line-height: 1.3;
}
.rlm-pd-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f766e;
  margin-bottom: 12px;
}
.rlm-pd-price small { font-size: 0.95rem; font-weight: 600; color: #64748b; }
.rlm-pd-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.rlm-pd-desc h3 { margin: 0 0 6px; font-size: 1.05rem; }
.rlm-pd-desc p { margin: 0 0 16px; color: #475569; line-height: 1.6; }
.rlm-pd-side .rlm-product-card { margin-bottom: 12px; }
.rlm-pd-related { display: flex; flex-direction: column; gap: 12px; }
.rlm-ad-slot {
  margin: 16px 0;
  min-height: 90px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8px;
}
.rlm-ad-product_side { min-height: 250px; }
@media (max-width: 900px) {
  .rlm-pd-layout { grid-template-columns: 1fr; }
  .rlm-pd-side { order: 3; }
}


/* ===== PointEarn = only regular users (NOT store owners) ===== */
body.rlm-is-seller .rlm-pe-only,
body.rlm-is-seller .rlm-nav-earn,
body.rlm-is-seller .rlm-btn-earn,
body.rlm-is-seller .rlm-hero-cta,
body.rlm-is-seller #rlm-nav-pe-start,
body.rlm-is-seller #pe-reward-widget,
body.rlm-is-seller .pe-reward-widget,
body.rlm-is-seller a[href*="pe-login"],
body.rlm-is-seller a[href*="pe-register"],
body.rlm-is-seller a[href*="pe-profile"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.rlm-store-phone-box {
  margin: 14px 0;
  padding: 14px 16px;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  border-radius: 12px;
  color: #065f46;
}
.rlm-order-summary {
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 16px;
}

#pe-remote-header-auth,.pe-remote-header-auth{display:none!important}

.rlm-ad-home_mid {
  margin: 18px auto;
  max-width: 1200px;
  min-height: 100px;
}
.rlm-chat-messages {
  flex: 1;
  overflow-y: auto;
  min-height: 220px;
  max-height: 45vh;
  padding: 10px;
  background: #f8fafc;
  border-radius: 12px;
  margin-bottom: 10px;
}
.rlm-chat-bubble {
  margin: 8px 0;
  padding: 8px 12px;
  border-radius: 12px;
  max-width: 85%;
  font-size: 14px;
  line-height: 1.45;
}
.rlm-chat-bubble small { display: block; font-size: 11px; opacity: .7; margin-bottom: 2px; }
.rlm-chat-mine { margin-left: auto; background: #ccfbf1; color: #134e4a; }
.rlm-chat-theirs { margin-right: auto; background: #fff; border: 1px solid #e2e8f0; }
.rlm-chat-compose { display: flex; gap: 8px; }
.rlm-chat-compose input { flex: 1; padding: 10px 12px; border-radius: 10px; border: 1px solid #e2e8f0; }
.rlm-chat-badge {
  display: inline-block;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 4px;
}
.rlm-seller-chat-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  margin: 6px 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.rlm-seller-chat-item:hover { border-color: #0d9488; background: #f0fdfa; }
.rlm-seller-chat-notify { border-left: 4px solid #0d9488; }


/* Header: left menus + right PE/seller cluster */
.rlm-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}
.rlm-nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}
.rlm-nav-left {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.rlm-nav-right {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-left: auto;
  justify-content: flex-end;
}
.rlm-nav-pe-right,
a.rlm-nav-earn.rlm-nav-pe-right {
  order: 1;
}

/* Hero: PE button bottom-right */
.rlm-hero.rlm-hero-pe-right {
  position: relative;
  padding-bottom: 56px;
}
.rlm-hero-cta-right {
  position: absolute !important;
  right: 16px;
  bottom: 14px;
  left: auto !important;
  display: flex !important;
  flex-direction: column;
  align-items: flex-end !important;
  text-align: right !important;
  margin: 0 !important;
  gap: 4px;
}
.rlm-hero-cta-right .rlm-btn-earn {
  white-space: nowrap;
}
.rlm-hero-cta-right .rlm-hero-cta-hint {
  font-size: 11px;
  max-width: 220px;
  text-align: right;
}
@media (max-width: 640px) {
  .rlm-nav {
    flex-direction: column;
    align-items: stretch;
  }
  .rlm-nav-right {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }
  .rlm-hero.rlm-hero-pe-right {
    padding-bottom: 72px;
  }
  .rlm-hero-cta-right {
    right: 12px;
    bottom: 12px;
  }
}


/* ========== Header 2.4.2 — title then nav, mobile-friendly ========== */
.rlm-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--rlm-header, #0f766e);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}
.rlm-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.rlm-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.rlm-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff !important;
  text-decoration: none !important;
  min-width: 0;
  flex: 1;
}
.rlm-logo-text {
  font-size: clamp(1rem, 3.5vw, 1.35rem);
  font-weight: 800;
  line-height: 1.25;
  color: #fff !important;
  word-break: break-word;
}
.rlm-logo-icon { font-size: 1.5rem; flex-shrink: 0; }

/* Hamburger — mobile only */
.rlm-nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 10px;
  background: rgba(255,255,255,.15);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.rlm-nav-toggle span {
  display: block;
  width: 20px;
  height: 2.5px;
  background: #fff;
  border-radius: 2px;
  transition: .2s;
}
.rlm-nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.rlm-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.rlm-nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Nav sits UNDER title — not beside on mobile */
.rlm-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.rlm-nav-left,
.rlm-nav-right {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.rlm-nav-right {
  margin-left: auto;
}

.rlm-nav-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 8px 14px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  background: rgba(255,255,255,.14) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  text-decoration: none !important;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
}
.rlm-nav-btn .rlm-nav-txt { color: #fff !important; }
.rlm-nav-earn {
  background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(79,70,229,.35);
}

/* Desktop: brand left, nav right on same visual band but still under if title long */
@media (min-width: 900px) {
  .rlm-header-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 20px;
  }
  .rlm-brand-row {
    flex: 0 1 auto;
    max-width: 42%;
  }
  .rlm-nav {
    flex: 1 1 auto;
    justify-content: flex-end;
    width: auto;
  }
  .rlm-nav-toggle { display: none !important; }
}

/* Mobile: hamburger + collapsible nav under title */
@media (max-width: 899px) {
  .rlm-nav-toggle { display: flex; }
  .rlm-header-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .rlm-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,.12);
    margin-top: 2px;
  }
  .rlm-header.rlm-nav-open .rlm-nav {
    display: flex;
  }
  .rlm-nav-left,
  .rlm-nav-right {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-left: 0 !important;
    gap: 8px;
  }
  .rlm-nav-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 16px !important;
    font-size: 15px !important;
    border-radius: 12px !important;
  }
  .rlm-nav-earn {
    order: 99;
  }
}

/* Prevent old absolute hero CTA colliding on tiny screens */
@media (max-width: 640px) {
  .rlm-hero.rlm-hero-pe-right {
    padding-bottom: 20px;
  }
  .rlm-hero-cta-right {
    position: static !important;
    align-items: flex-start !important;
    text-align: left !important;
    margin-top: 12px !important;
  }
}

.rlm-upload-notice {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 100050;
  opacity: 0;
  transition: .35s ease;
  max-width: min(420px, 94vw);
  pointer-events: none;
}
.rlm-upload-notice-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.rlm-upload-notice-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 16px;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15,23,42,.18);
  color: #065f46;
  font-size: 14px;
}
.rlm-upload-notice-inner strong { font-weight: 800; }
.rlm-upload-notice-inner span { flex: 1; min-width: 120px; color: #047857; }
.rlm-upload-notice-x {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
  padding: 0 4px;
}




/* ========== MOBILE FIX 2.5.3 — full-width header, no title overflow ========== */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}
.rlm-wrap {
  max-width: 100vw;
  overflow-x: hidden;
}

.rlm-header {
  width: 100% !important;
  max-width: 100vw !important;
  box-sizing: border-box !important;
  background: var(--rlm-header, #0f766e) !important;
  background-image: none !important;
  padding: 0 !important;
}

.rlm-header-inner {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  flex-wrap: nowrap !important;
  gap: 0 !important;
}

.rlm-brand-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 10px 12px !important;
  gap: 8px !important;
  background: var(--rlm-header, #0f766e) !important;
}

.rlm-logo {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: calc(100% - 48px) !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  color: #fff !important;
  text-decoration: none !important;
}

.rlm-logo-icon {
  flex-shrink: 0 !important;
  font-size: 1.2rem !important;
}

.rlm-logo-text {
  min-width: 0 !important;
  overflow: hidden !important;
  color: #fff !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

.rlm-logo-full { display: none !important; }
.rlm-logo-short {
  display: block !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: 0.95rem !important;
  max-width: 100% !important;
}

.rlm-logo img,
.rlm-logo .custom-logo,
.rlm-logo .custom-logo-link img {
  max-height: 36px !important;
  width: auto !important;
  max-width: 160px !important;
  object-fit: contain !important;
}

.rlm-nav-toggle {
  display: flex !important;
  flex-shrink: 0 !important;
  width: 40px !important;
  height: 40px !important;
  margin: 0 !important;
}

/* Nav under brand — full width green */
.rlm-nav {
  width: 100% !important;
  box-sizing: border-box !important;
  background: rgba(0,0,0,.12);
  padding: 8px 12px !important;
}

@media (min-width: 900px) {
  .rlm-header-inner {
    flex-direction: row !important;
    align-items: center !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 10px 16px !important;
  }
  .rlm-brand-row {
    width: auto !important;
    max-width: 40% !important;
    padding: 0 !important;
    background: transparent !important;
  }
  .rlm-logo-full { display: block !important; }
  .rlm-logo-short { display: none !important; }
  .rlm-logo-text {
    font-size: 1.05rem !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal !important;
  }
  .rlm-nav-toggle { display: none !important; }
  .rlm-nav {
    width: auto !important;
    flex: 1 !important;
    background: transparent !important;
    padding: 0 !important;
    display: flex !important;
  }
}

@media (max-width: 899px) {
  .rlm-nav {
    display: none !important;
  }
  .rlm-header.rlm-nav-open .rlm-nav {
    display: flex !important;
    flex-direction: column !important;
  }
  .rlm-nav-left,
  .rlm-nav-right {
    width: 100% !important;
    margin: 0 !important;
    flex-direction: column !important;
  }
  .rlm-nav-btn {
    width: 100% !important;
    justify-content: flex-start !important;
  }

  /* Content breathing room */
  .rlm-container {
    padding: 8px 10px 80px !important;
  }
  .rlm-hero {
    padding: 12px !important;
    margin: 8px 0 !important;
    border-radius: 14px !important;
  }
  .rlm-hero h1 {
    font-size: 1.05rem !important;
    line-height: 1.3 !important;
  }
  .rlm-hero p {
    font-size: 0.8rem !important;
  }
  .rlm-hero-cta-right {
    position: static !important;
    margin-top: 10px !important;
    align-items: stretch !important;
  }
  .rlm-hero-cta-right .rlm-btn-earn {
    width: 100% !important;
    text-align: center !important;
  }
  .rlm-mega-search {
    padding: 12px !important;
    border-radius: 14px !important;
  }
  .rlm-grid-3 {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  /* PE reward widget — smaller, less blocking */
  #pe-reward-widget,
  .pe-reward-widget {
    max-width: min(280px, calc(100vw - 24px)) !important;
    font-size: 12px !important;
    bottom: 70px !important;
    left: 12px !important;
    right: auto !important;
    z-index: 9990 !important;
  }
  .rlm-support-fab,
  .rlm-chat-fab {
    z-index: 99950 !important;
    bottom: 16px !important;
    left: 12px !important;
    right: auto !important;
  }
  .rlm-lang-fab {
    bottom: 72px !important;
    left: 12px !important;
    right: auto !important;
  }
}


/* ===== Blog cards & SEO pages ===== */
.rlm-blog-page { background: #f1f5f9; min-height: 60vh; padding-bottom: 48px; }
.rlm-blog-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #0ea5e9 100%);
  color: #fff; padding: 36px 16px 28px; text-align: center;
}
.rlm-blog-hero h1 { margin: 0 0 8px; font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; }
.rlm-blog-hero p { margin: 0; opacity: .92; font-size: .95rem; }
.rlm-blog-wrap { max-width: 1100px; margin: 0 auto; padding: 20px 14px; }
.rlm-blog-filters {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px;
  justify-content: center;
}
.rlm-blog-filter {
  display: inline-flex; align-items: center;
  padding: 8px 14px; border-radius: 999px;
  background: #fff; color: #1e3a8a; text-decoration: none;
  font-size: .85rem; font-weight: 600;
  border: 1px solid #e2e8f0; box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.rlm-blog-filter.is-active,
.rlm-blog-filter:hover {
  background: #2563eb; color: #fff; border-color: #2563eb;
}
.rlm-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.rlm-blog-card {
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(15,23,42,.07);
  border: 1px solid #e2e8f0;
  display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.rlm-blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(15,23,42,.12);
}
.rlm-blog-card-media {
  display: block; aspect-ratio: 16/10; overflow: hidden; background: #e2e8f0;
}
.rlm-blog-card-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.rlm-blog-card-placeholder {
  width: 100%; height: 100%; min-height: 140px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; background: linear-gradient(135deg, #dbeafe, #e0e7ff);
}
.rlm-blog-card-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.rlm-blog-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.rlm-blog-chip {
  display: inline-block; font-size: .72rem; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
  background: #eff6ff; color: #1d4ed8; text-decoration: none;
}
.rlm-blog-card-title { margin: 0 0 8px; font-size: 1.05rem; line-height: 1.35; }
.rlm-blog-card-title a { color: #0f172a; text-decoration: none; }
.rlm-blog-card-title a:hover { color: #2563eb; }
.rlm-blog-card-excerpt {
  margin: 0 0 12px; color: #64748b; font-size: .88rem; line-height: 1.5; flex: 1;
}
.rlm-blog-card-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .8rem; color: #94a3b8; margin-top: auto;
}
.rlm-blog-read { color: #2563eb; font-weight: 600; text-decoration: none; }
.rlm-blog-empty {
  text-align: center; padding: 48px 16px; background: #fff; border-radius: 14px;
  color: #64748b;
}
.rlm-blog-empty .icon { font-size: 2.5rem; margin-bottom: 8px; }
.rlm-blog-pagination { margin-top: 28px; text-align: center; }
.rlm-blog-pagination .page-numbers {
  display: inline-flex; gap: 6px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; justify-content: center;
}
.rlm-blog-pagination .page-numbers li { display: inline-block; }
.rlm-blog-pagination a,
.rlm-blog-pagination span {
  display: inline-block; padding: 8px 12px; margin: 2px;
  border-radius: 8px; background: #fff; border: 1px solid #e2e8f0;
  color: #1e3a8a; text-decoration: none; font-weight: 600; font-size: .85rem;
}
.rlm-blog-pagination .current { background: #2563eb; color: #fff; border-color: #2563eb; }

/* Single article */
.rlm-blog-single { max-width: 800px; margin: 0 auto; padding: 24px 16px 48px; }
.rlm-article-top { margin-bottom: 16px; }
.rlm-back-blog {
  display: inline-block; margin-bottom: 12px; color: #2563eb;
  text-decoration: none; font-weight: 600; font-size: .9rem;
}
.rlm-article-title {
  margin: 10px 0 8px; font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  line-height: 1.3; color: #0f172a;
}
.rlm-article-meta { color: #94a3b8; font-size: .88rem; display: flex; gap: 8px; flex-wrap: wrap; }
.rlm-article-thumb {
  border-radius: 14px; overflow: hidden; margin: 16px 0 20px;
  box-shadow: 0 4px 16px rgba(15,23,42,.08);
}
.rlm-article-thumb img { width: 100%; height: auto; display: block; }
.rlm-article-content {
  font-size: 1.05rem; line-height: 1.75; color: #334155;
}
.rlm-article-content h2, .rlm-article-content h3 { color: #0f172a; margin-top: 1.4em; }
.rlm-article-content img { max-width: 100%; height: auto; border-radius: 10px; }
.rlm-article-tags { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 6px; }
.rlm-related { margin-top: 40px; padding-top: 24px; border-top: 1px solid #e2e8f0; }
.rlm-related h2 { font-size: 1.2rem; margin: 0 0 16px; color: #0f172a; }

@media (max-width: 600px) {
  .rlm-blog-grid { grid-template-columns: 1fr; }
  .rlm-blog-hero { padding: 28px 12px 22px; }
}


/* ===== Farmer / wholesale ===== */
.rlm-btn-farmer {
  background: #15803d !important;
  color: #fff !important;
  border: none !important;
}
.rlm-btn-farmer:hover { background: #166534 !important; }
.rlm-farmer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 12px;
}
.rlm-farmer-card {
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(6,95,70,.08);
  display: flex;
  flex-direction: column;
}
.rlm-farmer-card-imgs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: #ecfdf5;
  min-height: 120px;
}
.rlm-farmer-card-imgs img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  display: block;
}
.rlm-farmer-card-body { padding: 14px 14px 16px; flex: 1; display: flex; flex-direction: column; }
.rlm-farmer-card-title { margin: 0 0 6px; font-size: 1.05rem; color: #14532d; }
.rlm-farmer-card-meta { font-size: .82rem; color: #64748b; margin-bottom: 8px; }
.rlm-farmer-card-price { font-weight: 800; color: #15803d; font-size: 1.1rem; margin-bottom: 8px; }
.rlm-farmer-phone {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f0fdf4; color: #166534; font-weight: 700;
  padding: 6px 10px; border-radius: 8px; font-size: .9rem;
  text-decoration: none; margin-bottom: 10px;
}
.rlm-farmer-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.rlm-farmer-previews {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px;
}
.rlm-farmer-previews img {
  width: 88px; height: 88px; object-fit: cover; border-radius: 10px;
  border: 2px solid #a7f3d0;
}
.rlm-farmer-hero-card h2 { margin: 10px 0 6px; color: #14532d; }
.rlm-farmer-detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin: 12px 0 16px;
}
.rlm-farmer-detail-gallery img {
  width: 100%; height: 140px; object-fit: cover; border-radius: 12px;
}
.rlm-farmer-contact-box {
  background: #f0fdf4; border: 1px solid #86efac; border-radius: 12px;
  padding: 14px 16px; margin: 12px 0;
}
.rlm-farmer-contact-box a { color: #166534; font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.rlm-farmer-article {
  line-height: 1.7; color: #334155; white-space: pre-wrap; margin: 12px 0 16px;
}
.rlm-form-row-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
@media (max-width: 600px) {
  .rlm-form-row-2 { grid-template-columns: 1fr; }
  .rlm-farmer-grid { grid-template-columns: 1fr; }
}


/* AdSense / ad slots */
.rlm-ad-slot {
  margin: 14px 0;
  padding: 10px 8px;
  text-align: center;
  min-height: 50px;
  overflow: hidden;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
}
.rlm-ad-slot ins,
.rlm-ad-slot iframe {
  margin: 0 auto;
  max-width: 100%;
}
.rlm-ad-placeholder {
  color: #94a3b8;
  font-size: 12px;
  display: inline-block;
  padding: 8px;
}
.rlm-ad-farmer_top, .rlm-ad-farmer_mid, .rlm-ad-farmer_bottom,
.rlm-ad-profile_top, .rlm-ad-profile_mid, .rlm-ad-profile_bottom,
.rlm-ad-seller_top, .rlm-ad-seller_mid, .rlm-ad-seller_bottom {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.rlm-ad-product_side {
  position: sticky;
  top: 80px;
}
@media (max-width: 768px) {
  .rlm-ad-product_side { position: static; }
}


/* ===== Job Sector ===== */
.rlm-job-hero{background:linear-gradient(135deg,var(--rlm-primary-light,#dbeafe),#fff);border:1px solid var(--rlm-border,#e2e8f0)}
.rlm-job-hero h2{margin:10px 0 6px;color:var(--rlm-primary-dark,#1e3a8a)}
.rlm-job-hero-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.rlm-job-tabs{display:flex;gap:8px;padding:10px;margin-bottom:12px}
.rlm-job-tab{flex:1;padding:10px 14px;border:1px solid var(--rlm-border,#e2e8f0);background:#fff;border-radius:10px;cursor:pointer;font-weight:600;color:#475569}
.rlm-job-tab.active{background:var(--rlm-primary,#1e40af);color:#fff;border-color:var(--rlm-primary,#1e40af)}
.rlm-job-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px;margin-top:12px}
.rlm-job-card{background:#fff;border:1px solid var(--rlm-border,#e2e8f0);border-radius:14px;padding:16px;box-shadow:var(--rlm-shadow,0 4px 16px rgba(0,0,0,.06));transition:transform .15s,box-shadow .15s}
.rlm-job-card:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,0,0,.1)}
.rlm-job-card-cat{display:inline-block;font-size:.75rem;font-weight:700;padding:3px 10px;border-radius:20px;background:var(--rlm-primary-light,#dbeafe);color:var(--rlm-primary-dark,#1e3a8a);margin-bottom:8px}
.rlm-job-card h3{margin:0 0 8px;font-size:1.05rem;color:var(--rlm-text,#0f172a);line-height:1.35}
.rlm-job-card-meta{font-size:.85rem;color:#64748b;margin:4px 0;line-height:1.45}
.rlm-job-card-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.rlm-job-detail-card{background:#fff;border-radius:16px;padding:20px;border:1px solid var(--rlm-border,#e2e8f0)}
.rlm-job-detail-card h2{margin:0 0 10px;color:var(--rlm-primary-dark,#1e3a8a)}
.rlm-job-badge{display:inline-block;padding:4px 12px;border-radius:8px;background:#f1f5f9;font-size:.85rem;margin:4px 6px 4px 0}
.rlm-job-contact-box{margin-top:16px;padding:14px;background:var(--rlm-primary-light,#dbeafe);border-radius:12px;display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.rlm-job-article{margin-top:16px;line-height:1.7;color:#334155;white-space:pre-wrap}
@media(max-width:600px){
  .rlm-job-grid{grid-template-columns:1fr}
  .rlm-job-hero-actions .rlm-btn{width:100%}
}

/* Farmer independent mega search */
.rlm-farmer-mega-search{margin-bottom:20px;border-color:#86efac;background:linear-gradient(180deg,#f0fdf4 0%,#fff 40%)}
.rlm-farmer-mega-search .rlm-mega-search-icon{background:#dcfce7;color:#166534}
.rlm-farmer-mega-search .rlm-mega-search-head strong{color:#14532d}


/* ===== Floating language switch (ABOVE support button) ===== */
.rlm-lang-fab{
  position:fixed;
  z-index:99960 !important;
  left:16px;
  right:auto !important;
  bottom:78px; /* above Support on LEFT */
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:12px 16px;
  border:none;
  border-radius:999px;
  background:linear-gradient(135deg,#1e3a8a,#2563eb);
  color:#fff;
  font-weight:700;
  font-size:14px;
  cursor:pointer;
  box-shadow:0 8px 28px rgba(37,99,235,.45);
  transition:transform .15s,box-shadow .15s;
  font-family:inherit;
  line-height:1;
  pointer-events:auto !important;
}
.rlm-lang-fab:hover{transform:translateY(-2px);box-shadow:0 12px 32px rgba(37,99,235,.55)}
.rlm-lang-fab:active{transform:translateY(0)}
.rlm-lang-fab-ico{font-size:18px;line-height:1}
.rlm-lang-fab-label{letter-spacing:.02em}
@media(max-width:480px){
  .rlm-lang-fab{
    left:12px !important;
    right:auto !important;
    bottom:72px;
    padding:10px 14px;
    font-size:13px;
  }
  .rlm-support-fab,
  .rlm-chat-fab{
    left:12px !important;
    right:auto !important;
    bottom:16px;
  }
}


/* Profile hero — mobile: no side crop */
.rlm-profile-hero {
  overflow: visible;
  min-width: 0;
}
.rlm-profile-hero > div:last-child {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
.rlm-profile-hero h1 {
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.rlm-profile-hero-store {
  flex-wrap: wrap;
}
@media (max-width: 560px) {
  .rlm-profile-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px;
    gap: 14px;
  }
  .rlm-profile-avatar-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .rlm-profile-store-img,
  .rlm-profile-hero-store .rlm-profile-avatar {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 815 / 315;
    max-height: none;
  }
  .rlm-profile-hero > div:last-child {
    width: 100%;
    text-align: center;
  }
  .rlm-profile-hero h1 {
    font-size: 1.2rem;
    line-height: 1.35;
  }
  .rlm-store-img-upload {
    width: 100%;
  }
}

/* Modal actions stay above FABs on mobile */
.rlm-modal-overlay .rlm-modal {
  padding-bottom: 24px;
}
.rlm-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  position: relative;
  z-index: 2;
  padding-bottom: 8px;
  margin-bottom: 4px;
}
@media (max-width: 560px) {
  .rlm-modal-overlay {
    align-items: flex-end;
  }
  .rlm-modal-overlay .rlm-modal {
    max-height: 92vh;
    overflow-y: auto;
    margin-bottom: 0;
    border-radius: 16px 16px 0 0;
    padding-bottom: 28px;
  }
  .rlm-modal-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 12px 0 8px;
    margin-top: 8px;
    box-shadow: 0 -6px 16px rgba(0,0,0,0.06);
    justify-content: stretch;
  }
  .rlm-modal-actions .rlm-btn {
    flex: 1 1 auto;
    min-width: 120px;
  }
}


/* Blog keyword search */
.rlm-blog-search { margin: 0 0 18px; }
.rlm-blog-search-inner {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #fff;
	border: 1.5px solid #cbd5e1;
	border-radius: 14px;
	padding: 6px 8px 6px 14px;
	box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
	transition: border-color .15s, box-shadow .15s;
}
.rlm-blog-search-inner:focus-within {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
.rlm-blog-search-ico { font-size: 1.1rem; line-height: 1; flex-shrink: 0; }
.rlm-blog-search-inner input[type="search"] {
	flex: 1;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
	font-size: 1rem;
	padding: 10px 4px;
	min-width: 0;
	color: #0f172a;
}
.rlm-blog-search-inner input[type="search"]::placeholder { color: #94a3b8; }
.rlm-blog-search-btn {
	flex-shrink: 0;
	border: none;
	border-radius: 10px;
	background: linear-gradient(135deg, #2563eb, #1d4ed8);
	color: #fff;
	font-weight: 700;
	font-size: .95rem;
	padding: 10px 18px;
	cursor: pointer;
}
.rlm-blog-search-btn:hover { filter: brightness(1.05); }
.rlm-blog-search-clear {
	flex-shrink: 0;
	font-size: .85rem;
	font-weight: 600;
	color: #64748b;
	text-decoration: none;
	padding: 8px 10px;
}
.rlm-blog-search-clear:hover { color: #dc2626; }
.rlm-blog-search-meta {
	margin: 10px 2px 0;
	font-size: .9rem;
	color: #475569;
}
@media (max-width: 520px) {
	.rlm-blog-search-inner { flex-wrap: wrap; padding: 10px; }
	.rlm-blog-search-inner input[type="search"] { width: 100%; flex: 1 1 100%; }
	.rlm-blog-search-btn { flex: 1; }
}


.pe-lang-pill{
  display:inline-flex;align-items:center;gap:0;
  background:#f1f5f9;border:1px solid #e2e8f0;border-radius:999px;
  padding:3px;box-shadow:0 1px 3px rgba(15,23,42,.06);
}
.pe-lang-pill a,.pe-lang-pill button{
  appearance:none;border:none;cursor:pointer;text-decoration:none!important;
  font-weight:800;font-size:12px;line-height:1;padding:8px 14px;border-radius:999px;
  color:#64748b!important;background:transparent;transition:background .15s,color .15s,box-shadow .15s;
  font-family:system-ui,-apple-system,sans-serif;min-width:44px;text-align:center;
}
.pe-lang-pill a.is-active,.pe-lang-pill button.is-active,
.pe-lang-pill a.active,.pe-lang-pill button.active{
  background:#0f766e;color:#fff!important;box-shadow:0 2px 8px rgba(15,118,110,.35);
}
.pe-lang-pill a:hover:not(.is-active):not(.active),
.pe-lang-pill button:hover:not(.is-active):not(.active){color:#0f172a!important}
/* header variant on dark green bars */
.rlm-header .pe-lang-pill,.site-header .pe-lang-pill{
  background:rgba(255,255,255,.95);border-color:rgba(255,255,255,.5);
}
#pe-lang-fab.pe-lang-fab{
  position:fixed;top:14px;right:14px;z-index:99996;
  flex-direction:row!important;gap:0!important;
  background:transparent!important;box-shadow:none!important;border-radius:0!important;
  transform:none!important;
}
@media(max-width:640px){
  #pe-lang-fab.pe-lang-fab{top:auto;bottom:88px;right:12px}
}

.rlm-header .pe-lang-pill{margin:0 8px;flex-shrink:0}
.rlm-lang-opt.is-active{background:#0f766e;color:#fff!important;box-shadow:0 2px 8px rgba(15,118,110,.35)}
#rlm-lang-fab{display:none!important} /* hide old FAB */


/* Header language pill (like main theme) — always visible beside logo */
.rlm-brand-row .rlm-lang-pill,
.rlm-header #rlm-lang-pill{
  display:inline-flex!important;
  align-items:center!important;
  gap:0!important;
  background:rgba(255,255,255,.95)!important;
  border:1px solid rgba(255,255,255,.7)!important;
  border-radius:999px!important;
  padding:3px!important;
  margin:0 8px 0 auto!important;
  box-shadow:0 2px 8px rgba(0,0,0,.12)!important;
  flex-shrink:0!important;
  z-index:5;
}
.rlm-header #rlm-lang-pill .rlm-lang-opt,
.rlm-header #rlm-lang-pill .pe-lang-btn{
  appearance:none!important;border:none!important;cursor:pointer!important;
  text-decoration:none!important;font-weight:800!important;font-size:12px!important;
  line-height:1!important;padding:7px 12px!important;border-radius:999px!important;
  color:#64748b!important;background:transparent!important;min-width:40px!important;
  text-align:center!important;margin:0!important;box-shadow:none!important;
  font-family:system-ui,sans-serif!important;
}
.rlm-header #rlm-lang-pill .rlm-lang-opt.is-active,
.rlm-header #rlm-lang-pill .rlm-lang-opt.active,
.rlm-header #rlm-lang-pill .pe-lang-btn.is-active,
.rlm-header #rlm-lang-pill .pe-lang-btn.active{
  background:#2563eb!important;color:#fff!important;
  box-shadow:0 2px 8px rgba(37,99,235,.4)!important;
}
/* Hide old floating FAB / globe button */
#rlm-lang-fab,
.rlm-lang-fab,
button.rlm-lang-fab{display:none!important;visibility:hidden!important;pointer-events:none!important}
@media(max-width:640px){
  .rlm-header #rlm-lang-pill .rlm-lang-opt{padding:6px 10px!important;font-size:11px!important;min-width:34px!important}
}
