/* =========================================================
   ResPlatform Light Orange-Tech Theme (White + Bright Orange)
   - No CSS custom properties
   - Stable first paint
   - Keep existing class names & behaviors
   ========================================================= */

/* ---------------- Base ---------------- */
html, body{
  height: 100%;
  margin: 0;
  color: rgba(12, 20, 38, 0.92);
  background:
    radial-gradient(1000px 520px at 12% 10%, rgba(255, 122, 24, 0.22), transparent 58%),
    radial-gradient(900px 520px at 90% 0%, rgba(0, 209, 255, 0.12), transparent 60%),
    radial-gradient(1100px 700px at 70% 92%, rgba(255, 77, 169, 0.10), transparent 62%),
    linear-gradient(180deg, #f7f9ff 0%, #ffffff 55%, #f7fbff 100%);
}

body::before{
  /* subtle tech grid */
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(10,20,40,0.035) 0 1px, transparent 1px 60px),
    repeating-linear-gradient(0deg, rgba(10,20,40,0.025) 0 1px, transparent 1px 60px);
  opacity: 0.35;
}

a{ color: inherit; text-decoration: none; }
a:hover{ opacity: 0.92; }

/* container width helper */
.rp-page{ max-width: 1200px; }

/* ---------------- Nav ---------------- */
.rp-nav{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.78);
  border-bottom: 1px solid rgba(10, 20, 40, 0.10);
  box-shadow: 0 10px 30px rgba(20, 40, 120, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.rp-brand{
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.rp-brand-icon{
  font-size: 18px;
  filter: drop-shadow(0 10px 18px rgba(255,122,24,0.25));
}
.rp-brand-text{
  font-weight: 900;
  letter-spacing: 0.2px;
  font-size: 18px;
  background: linear-gradient(90deg, #ffb15c, #ff7a18, #ff3d7f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.rp-brand-sub{
  font-size: 12px;
  color: rgba(12, 20, 38, 0.55);
  margin-left: 8px;
}

.rp-navbtn{
  padding: 8px 12px;
  border: 1px solid rgba(10, 20, 40, 0.12);
  border-radius: 12px;
  color: rgba(12, 20, 38, 0.86);
  background: rgba(255,255,255,0.68);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.rp-navbtn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.92);
  border-color: rgba(255, 122, 24, 0.28);
  box-shadow: 0 10px 26px rgba(255, 122, 24, 0.10);
}
.rp-navbtn-primary{
  border: none;
  background: linear-gradient(135deg, rgba(255,122,24,0.95), rgba(255,77,169,0.88));
  box-shadow: 0 14px 40px rgba(255,122,24,0.18);
  color: #fff;
}

/* ---------------- Hero ---------------- */
.rp-hero{
  border-radius: 26px;
  padding: 28px;
  background:
    radial-gradient(900px 260px at 15% 0%, rgba(255,122,24,0.22), transparent 60%),
    radial-gradient(700px 240px at 70% 10%, rgba(0,209,255,0.14), transparent 55%),
    rgba(255,255,255,0.82);
  border: 1px solid rgba(10, 20, 40, 0.10);
  box-shadow: 0 18px 60px rgba(20, 40, 120, 0.10);
  position: relative;
  overflow: hidden;
}
.rp-hero::before{
  content:"";
  position:absolute;
  inset:-2px;
  background: radial-gradient(800px 260px at 20% 30%, rgba(255, 210, 111, 0.20), transparent 55%);
  pointer-events:none;
}
.rp-hero h1{
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.2px;
  margin: 0 0 8px 0;
}
.rp-hero p{
  margin: 0;
  color: rgba(12, 20, 38, 0.68);
}

/* ---------------- Pills ---------------- */
.rp-pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(10, 20, 40, 0.12);
  background: rgba(255,255,255,0.78);
  color: rgba(12, 20, 38, 0.78);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.rp-pill:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.96);
  border-color: rgba(255, 122, 24, 0.22);
}
.rp-pill.active{
  border: none;
  background: linear-gradient(135deg, rgba(255,122,24,0.95), rgba(255,77,169,0.86));
  color: #fff;
  box-shadow: 0 18px 50px rgba(255,122,24,0.18);
}

/* ---------------- Cards ---------------- */
.rp-card{
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.78));
  border: 1px solid rgba(10, 20, 40, 0.10);
  box-shadow: 0 16px 46px rgba(20, 40, 120, 0.10);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  height: auto; /* FIX: was 100% */;
}
.rp-card:hover{
  transform: translateY(-3px);
  border-color: rgba(255, 122, 24, 0.22);
  box-shadow: 0 22px 70px rgba(20, 40, 120, 0.14);
}

.rp-card-img{
  width: 100%;
  height: 168px;
  object-fit: cover;
  background: rgba(10, 20, 40, 0.04);
  border-bottom: 1px solid rgba(10, 20, 40, 0.08);
}
.rp-card-body{ padding: 14px 14px 16px 14px; }

.rp-tag{
  display:inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255, 122, 24, 0.10);
  border: 1px solid rgba(255, 122, 24, 0.18);
  color: rgba(150, 60, 0, 0.92);
}

.rp-title{
  margin: 10px 0 8px 0;
  font-weight: 900;
  font-size: 16px;
  line-height: 1.2;
  color: rgba(12, 20, 38, 0.92);
}
.rp-desc{
  color: rgba(12, 20, 38, 0.62);
  font-size: 13px;
  line-height: 1.55;
  min-height: 60px;
}

/* buttons */
.rp-btn{
  width: 100%;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(10, 20, 40, 0.12);
  background: rgba(255,255,255,0.82);
  color: rgba(12, 20, 38, 0.86);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.rp-btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.98);
  box-shadow: 0 12px 30px rgba(255,122,24,0.10);
}
.rp-btn-primary{
  border: none;
  background: linear-gradient(135deg, rgba(255,122,24,0.95), rgba(255,77,169,0.88));
  color: #fff;
  box-shadow: 0 14px 40px rgba(255,122,24,0.18);
}

/* ---------------- Pagination ---------------- */
.rp-pagination .page-link{
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(10, 20, 40, 0.12);
  color: rgba(12, 20, 38, 0.78);
}
.rp-pagination .page-item.active .page-link{
  border: none;
  background: linear-gradient(135deg, rgba(255,122,24,0.95), rgba(0,209,255,0.78));
  color: #fff;
}
.rp-pagination .page-link:hover{
  background: rgba(255,255,255,0.98);
}

/* ---------------- Divider ---------------- */
.rp-glowline{
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,122,24,0.38), rgba(0,209,255,0.22), transparent);
  margin: 18px 0;
}

/* ---------------- Reveal (no jump on first paint) ---------------- */
.rp-reveal{
  opacity: 1;
  transform: none;
  will-change: transform;
}
html.rp-reveal-ready .rp-reveal{
  transition: transform 0.55s ease;
}
html.rp-reveal-ready .rp-reveal:not(.is-visible){
  transform: translateY(12px);
}
html.rp-reveal-ready .rp-reveal.is-visible{
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce){
  html.rp-reveal-ready .rp-reveal{ transition: none; }
  html.rp-reveal-ready .rp-reveal:not(.is-visible){ transform: none; }
  html.rp-reveal-ready .rp-reveal.is-visible{ transform: none; }
}

/* ---------------- Chat Widget ---------------- */
.rp-chat-btn{
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  user-select: none;
  z-index: 80;

  background: linear-gradient(135deg, rgba(255,122,24,0.95), rgba(255,77,169,0.88));
  box-shadow: 0 20px 60px rgba(255,122,24,0.22);

  color: #fff;
  font-size: 22px;
  transition: transform 0.18s ease;
}
.rp-chat-btn:hover{ transform: translateY(-2px); }

.rp-chat-window{
  display: none; /* JS open => flex */
  position: fixed;
  right: 18px;
  bottom: 84px;

  width: 380px;
  max-width: calc(100vw - 36px);
  height: 560px;
  max-height: calc(100vh - 140px);

  border-radius: 18px;
  overflow: hidden;
  z-index: 90;

  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(10, 20, 40, 0.12);
  box-shadow: 0 24px 80px rgba(20, 40, 120, 0.18);

  box-sizing: border-box;
  flex-direction: column;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.rp-chat-header{
  padding: 12px 14px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(10, 20, 40, 0.10);
  background: linear-gradient(90deg, rgba(255,122,24,0.12), rgba(0,209,255,0.08));
  box-sizing: border-box;
  flex: 0 0 auto;
}
.rp-chat-title{
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.2px;
  color: rgba(12, 20, 38, 0.88);
}
.rp-chat-actions{ display:flex; gap:8px; align-items:center; }

.rp-chat-reset, .rp-chat-close{
  border: 1px solid rgba(10, 20, 40, 0.12);
  background: rgba(255,255,255,0.76);
  color: rgba(12, 20, 38, 0.82);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}

.rp-chat-messages{
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  box-sizing: border-box;
}
.rp-chat-messages::-webkit-scrollbar{ width: 8px; }
.rp-chat-messages::-webkit-scrollbar-track{ background: transparent; }
.rp-chat-messages::-webkit-scrollbar-thumb{ background: rgba(10,20,40,0.18); border-radius: 999px; }
.rp-chat-messages::-webkit-scrollbar-thumb:hover{ background: rgba(10,20,40,0.26); }

.rp-msg{
  max-width: 92%;
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.65;
  box-sizing: border-box;
  word-break: break-word;
}
.rp-msg-ai{
  background: rgba(10, 20, 40, 0.04);
  border: 1px solid rgba(10, 20, 40, 0.08);
  color: rgba(12, 20, 38, 0.82);
}
.rp-msg-user{
  margin-left: auto;
  background: linear-gradient(135deg, rgba(255,122,24,0.90), rgba(255,77,169,0.78));
  color: #fff;
  border: none;
}

.rp-chat-inputbar{
  display:flex;
  gap:10px;
  padding: 12px;
  border-top: 1px solid rgba(10, 20, 40, 0.10);
  background: rgba(255,255,255,0.72);
  box-sizing: border-box;
  flex: 0 0 auto;
}

#rp-chat-input{
  flex: 1;
  outline: none;
  border: 1px solid rgba(10, 20, 40, 0.12);
  background: rgba(255,255,255,0.92);
  color: rgba(12, 20, 38, 0.88);
  border-radius: 12px;
  padding: 10px 12px;
  box-sizing: border-box;
}
#rp-chat-input:focus{
  border-color: rgba(255, 122, 24, 0.35);
  box-shadow: 0 0 0 4px rgba(255, 122, 24, 0.12);
}

#rp-chat-send{
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(255,122,24,0.95), rgba(255,77,169,0.88));
  color: #fff;
}

/* mobile polish */
@media (max-width: 520px){
  .rp-chat-header{ padding: 10px 12px; }
  .rp-chat-close{ width: 34px; text-align: center; }
  .rp-chat-inputbar{ padding: 10px; gap: 10px; }
  #rp-chat-input{ height: 40px; padding: 9px 12px; font-size: 13px; }
  #rp-chat-send{ height: 40px; padding: 0 14px; font-size: 13px; white-space: nowrap; }
}


/* --- END FIX --- */


/* --- FIX: button/text wrap & alignment (search button + card buttons) --- */
.rp-navbtn, a.rp-navbtn, button.rp-navbtn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;     /* 防止“搜↵索”这种换行 */
  line-height: 1.2;
  min-height: 40px;
}

.rp-btn, a.rp-btn, button.rp-btn{
  display: inline-flex;    /* 让 <a> 和 <button> 对齐一致 */
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 1.2;
  min-height: 44px;
}
/* --- END FIX --- */

/* --- FIX: align buttons to bottom, equal-height cards --- */
.rp-card{
  display: flex;
  flex-direction: column;
}
.rp-card-body{
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.rp-card-body .d-grid{
  margin-top: auto;   /* 关键：按钮区固定到底部 */
}
/* --- END FIX --- */

/* =========================================================

/* =========================================================
   Products Enterprise Layout (scoped)
   ========================================================= */

/* 产品卡片：等高 + 按钮固定底部 */
.rp-product-card{
  height: 100%;
  display: flex;
  flex-direction: column;
}
.rp-product-card .rp-card-body{
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.rp-product-card .rp-card-body .d-grid{
  margin-top: auto;        /* 按钮区压到底 */
  padding-top: 10px;
}

/* 图片区固定高度，整齐 */
.rp-product-card .rp-card-img{
  height: 180px;
  object-fit: cover;
}

/* 标题：两行截断 + 固定高度 */
.rp-product-card .rp-title{
  line-height: 1.25;
  min-height: calc(1.25em * 2);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* 描述：四行截断 + 固定高度 */
.rp-product-card .rp-desc{
  line-height: 1.55;
  min-height: calc(1.55em * 4);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

/* 按钮/搜索按钮：统一高度，防止“搜↵索”换行 */
.rp-navbtn, a.rp-navbtn, button.rp-navbtn,
.rp-btn, a.rp-btn, button.rp-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-height: 44px;
  line-height: 1;
}

