/* ============================================================
   Weide Auto - Front-end Enhancements (enhance.css) v1.0.0
   Auto carousel / infinite scroll / back-to-top / form modal
   Pure additions - does not touch existing site styles
   ============================================================ */

/* ---------- Back to top button ---------- */
#enhance-back-top{
  position:fixed;right:24px;bottom:160px;z-index:996;
  width:44px;height:44px;border-radius:12px;
  background:rgba(12,12,16,.78);color:#fff;
  border:1px solid rgba(255,255,255,.18);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;box-shadow:0 6px 18px rgba(0,0,0,.35);
  opacity:0;visibility:hidden;transform:translateY(10px);
  transition:opacity .3s ease,transform .3s ease,background .2s ease;
}
#enhance-back-top.visible{opacity:1;visibility:visible;transform:none}
#enhance-back-top:hover{background:#E87D22}
@media (max-width:768px){
  #enhance-back-top{right:14px;bottom:150px;width:40px;height:40px}
}

/* ---------- Homepage auto carousel ---------- */
.enhance-carousel-section{
  position:relative;background:#020502;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.enhance-carousel-viewport{
  position:relative;overflow:hidden;
  height:clamp(260px,44vw,500px);
}
.enhance-carousel-track{
  display:flex;height:100%;
  transition:transform .6s cubic-bezier(.4,0,.2,1);
  will-change:transform;
}
.enhance-slide{
  position:relative;flex:0 0 100%;height:100%;
  display:block;text-decoration:none;overflow:hidden;
}
.enhance-slide img{
  width:100%;height:100%;object-fit:cover;display:block;
}
.enhance-slide-overlay{
  position:absolute;inset:0;z-index:1;display:block;
  background:linear-gradient(180deg,rgba(2,5,2,0) 35%,rgba(2,5,2,.82) 100%);
}
.enhance-slide-caption{
  position:absolute;left:0;right:0;bottom:0;z-index:2;
  display:block;padding:18px 6% 26px;color:#fff;
}
.enhance-slide-name{
  display:block;font-size:clamp(1rem,2.4vw,1.5rem);
  font-weight:800;margin-bottom:4px;text-shadow:0 2px 10px rgba(0,0,0,.5);
}
.enhance-slide-price{
  display:inline-block;font-size:clamp(.9rem,1.8vw,1.1rem);
  font-weight:700;color:#FFD166;margin-bottom:8px;
}
.enhance-slide-price small{font-size:.68em;color:rgba(255,255,255,.75);font-weight:500}
.enhance-slide-cta{
  display:block;font-size:.82rem;font-weight:600;color:#E87D22;
  letter-spacing:.3px;
}
.enhance-arrow{
  position:absolute;top:50%;transform:translateY(-50%);z-index:3;
  width:42px;height:42px;border-radius:50%;border:0;
  background:rgba(0,0,0,.45);color:#fff;font-size:18px;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;transition:background .2s ease;
}
.enhance-arrow:hover{background:rgba(232,125,34,.9)}
.enhance-arrow-prev{left:14px}
.enhance-arrow-next{right:14px}
.enhance-dots{
  position:absolute;bottom:12px;left:50%;transform:translateX(-50%);
  z-index:3;display:flex;gap:8px;
}
.enhance-dot{
  width:8px;height:8px;border-radius:50%;border:0;padding:0;
  background:rgba(255,255,255,.45);cursor:pointer;transition:all .25s ease;
}
.enhance-dot.active{background:#E87D22;width:22px;border-radius:5px}
@media (max-width:768px){
  .enhance-carousel-viewport{height:240px}
  .enhance-arrow{width:34px;height:34px;font-size:14px}
  .enhance-arrow-prev{left:8px}
  .enhance-arrow-next{right:8px}
  .enhance-slide-caption{padding:12px 5% 20px}
}

/* ---------- Inventory: category chips ---------- */
.enhance-cat-chips{
  display:flex;flex-wrap:wrap;gap:8px;margin-bottom:20px;
}
.enhance-chip{
  padding:8px 16px;border-radius:20px;border:1px solid rgba(45,52,54,.18);
  background:#fff;color:#2D3436;font-size:.85rem;font-weight:600;
  cursor:pointer;transition:all .2s ease;font-family:inherit;
}
.enhance-chip:hover{border-color:#E87D22;color:#E87D22}
.enhance-chip.active{background:#E87D22;border-color:#E87D22;color:#fff}

/* ---------- Inventory: infinite scroll sentinel ---------- */
.enhance-load-sentinel{
  display:flex;align-items:center;justify-content:center;
  padding:16px 0;color:#7F8C8D;font-size:.85rem;font-weight:600;
}
.enhance-load-sentinel.hidden{display:none}
.enhance-load-sentinel .spinner{
  width:20px;height:20px;border-radius:50%;
  border:3px solid rgba(232,125,34,.25);border-top-color:#E87D22;
  animation:enhance-spin .8s linear infinite;display:inline-block;
}
@keyframes enhance-spin{to{transform:rotate(360deg)}}

/* ---------- Form: inline field errors ---------- */
.enhance-has-error input,
.enhance-has-error select,
.enhance-has-error textarea{
  border-color:#E74C3C !important;
  box-shadow:0 0 0 3px rgba(231,76,60,.12) !important;
}
.enhance-field-error{
  display:block;color:#E74C3C;font-size:.78rem;
  margin-top:5px;font-weight:600;
}

/* ---------- Form: success modal ---------- */
.enhance-modal-overlay{
  position:fixed;inset:0;z-index:10000;
  background:rgba(0,0,0,.55);display:flex;
  align-items:center;justify-content:center;padding:20px;
  opacity:0;visibility:hidden;transition:opacity .25s ease;
}
.enhance-modal-overlay.open{opacity:1;visibility:visible}
.enhance-modal{
  background:#fff;border-radius:16px;max-width:400px;width:100%;
  padding:32px 28px;text-align:center;
  box-shadow:0 20px 60px rgba(0,0,0,.35);
  transform:scale(.92);transition:transform .25s ease;
}
.enhance-modal-overlay.open .enhance-modal{transform:scale(1)}
.enhance-modal-icon{
  width:56px;height:56px;border-radius:50%;
  background:#27AE60;color:#fff;display:flex;
  align-items:center;justify-content:center;
  font-size:26px;font-weight:700;margin:0 auto 14px;
}
.enhance-modal h3{margin:0 0 8px;color:#1B1B1F;font-size:1.15rem}
.enhance-modal p{margin:0 0 20px;color:#5D6D7E;font-size:.9rem;line-height:1.6}
.enhance-modal-btn{
  background:#E87D22;color:#fff;border:0;padding:10px 32px;
  border-radius:24px;font-weight:700;cursor:pointer;
  transition:opacity .2s ease;font-family:inherit;font-size:.9rem;
}
.enhance-modal-btn:hover{opacity:.85}