/* ========================================
   HOME.CSS (Redesigned v2)
   ======================================== */

/* ---- Hero ---- */
/* Carousel wrapper — no flex/padding here */
.hero-section {
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  position: relative;
  overflow: hidden;
  background: #1A1A2E;
  gap: 0 !important;
}
.hero-section::before,
.hero-section::after { display: none !important; }
.hero-content { flex: 1; z-index: 1; }
.hero-tag {
  font-size: 0.76rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 10px;
  background: rgba(255,107,44,0.16);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,107,44,0.25);
  letter-spacing: 0.4px;
}
.hero-section h1 {
  color: #fff;
  font-size: 1.75rem;
  line-height: 1.2;
  margin-bottom: 10px;
}
.hero-section h1 span { color: var(--primary); }
.hero-sub {
  color: rgba(255,255,255,0.55);
  font-size: 0.84rem;
  margin-bottom: 22px;
  line-height: 1.5;
}
.hero-btn {
  max-width: 158px;
  font-size: 0.88rem;
  padding: 13px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(255,107,44,0.40);
}
.hero-img-wrap {
  width: 115px;
  flex-shrink: 0;
  z-index: 1;
}
.hero-img-wrap img {
  width: 100%;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.4));
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* ---- Stats Row ---- */
.stats-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: var(--bg-card);
  border-radius: var(--radius);
  margin: 14px 16px 0;
  padding: 18px 12px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}
.stat-item { text-align: center; padding: 0 8px; }
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label { font-size: 0.70rem; color: var(--text-muted); font-weight: 500; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* ---- Quick Filter ---- */
.quick-filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.quick-filter::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  font-size: 0.83rem;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.filter-chip.active, .filter-chip:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(255,107,44,0.28);
}

/* ================================================
   VEHICLE CARDS GRID
   Mobile: 2 col | Desktop: 4 col
   ================================================ */
.vehicles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;          /* Mobile: 2 col */
  gap: 12px;
}

@media (min-width: 600px) {
  .vehicles-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}
@media (min-width: 900px) {
  .vehicles-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}

/* ---- Vehicle Card ---- */
.vehicle-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}
.vehicle-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.vehicle-card:active { transform: scale(0.97); }

/* ---- Image: fixed height, always fills frame ---- */
.vehicle-img-wrap {
  position: relative;
  width: 100%;
  height: 130px;                           /* fixed height */
  overflow: hidden;
  background: linear-gradient(135deg, #eef0f5, #e4e6ee);
  flex-shrink: 0;
}
.vehicle-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;                       /* fills frame, crops edges */
  object-position: center center;
  display: block;
  transition: transform 0.4s ease;
}
.vehicle-card:hover .vehicle-img-wrap img { transform: scale(1.07); }

/* Skeleton placeholder while image loads */
.vehicle-img-wrap img[src=""],
.vehicle-img-wrap img:not([src]) {
  background: linear-gradient(90deg, #eef0f5 25%, #f5f6fa 50%, #eef0f5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

/* Badges */
.card-badge {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 1;
}
.popular-badge {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  color: #ea580c;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  z-index: 1;
}

/* ---- Card Info ---- */
.vehicle-info {
  padding: 11px 11px 13px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.vehicle-info h3 {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 3px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vehicle-type-tag { font-size: 1rem; }
.vehicle-rating {
  font-size: 0.72rem;
  color: var(--warning);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.vehicle-rating span { color: var(--text-muted); }

/* Price + arrow row */
.vehicle-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.vehicle-price {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
}
.vehicle-price span {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  font-family: var(--font-body);
}
.card-book-btn {
  width: 26px; height: 26px;
  background: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition-bounce);
}
.card-book-btn svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 2.5; fill: none; }
.vehicle-card:hover .card-book-btn { transform: scale(1.12) rotate(5deg); }

/* ---- How It Works ---- */
.how-section {
  background: linear-gradient(135deg, var(--primary-light), #fde8d8);
  border-radius: var(--radius-lg);
  margin: 0 16px;
  padding: 22px 18px;
  border: 1px solid rgba(255,107,44,0.12);
}
.steps-list { display: flex; flex-direction: column; gap: 16px; }
.step-item { display: flex; align-items: flex-start; gap: 14px; }
.step-icon {
  font-size: 1.3rem;
  width: 46px; height: 46px;
  background: #fff;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(255,107,44,0.14);
  border: 1px solid rgba(255,107,44,0.10);
}
.step-title { font-weight: 700; font-size: 0.92rem; margin-bottom: 3px; }
.step-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }

/* ---- Reviews ---- */
.reviews-list { display: flex; flex-direction: column; gap: 12px; }
.review-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  position: relative;
}
.review-card::before {
  content: '"';
  position: absolute;
  top: 10px; right: 14px;
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--primary);
  opacity: 0.10;
  line-height: 1;
  pointer-events: none;
}
.review-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.reviewer-avatar {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
  flex-shrink: 0;
}
.reviewer-name { font-weight: 700; font-size: 0.9rem; margin-bottom: 2px; }
.review-stars { color: var(--warning); font-size: 0.8rem; letter-spacing: 1px; }
.review-text { font-size: 0.84rem; color: var(--text-muted); line-height: 1.6; }

/* Location */
.location-card { padding: 16px; }
.location-info { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; font-weight: 500; }

/* WhatsApp */
.whatsapp-btn { color: #25D366; }

/* ================================================
   DESKTOP ENHANCEMENTS (768px+)
   ================================================ */
@media (min-width: 768px) {
  /* hero-section is carousel - no padding override needed */
  .hero-img-wrap { width: 160px; }

  .stats-row { margin: 16px 24px 0; padding: 22px 20px; }
  .stat-num { font-size: 1.8rem; }

  .section { padding: 24px 24px; }

  /* Image taller on desktop */
  .vehicle-img-wrap { height: 160px; }

  .how-section { margin: 0 24px; padding: 28px 24px; }
  .steps-list { flex-direction: row; gap: 20px; }
  .step-item { flex-direction: column; align-items: center; text-align: center; flex: 1; }

  .reviews-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
}

.login-icon-img{
   width:26px;
   height:26px;
   object-fit:contain;
}
/* ══════════════════════════════════════
   REVIEWS — Firebase Dynamic
══════════════════════════════════════ */

.review-skeleton {
  height: 90px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 16px;
  margin-bottom: 12px;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* Review Card */
.review-card {
  background: var(--card-bg, #161b2e);
  border-radius: 18px;
  padding: 18px 16px 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.07);
  transition: transform 0.18s;
}
.review-card:hover { transform: translateY(-2px); }

.review-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.reviewer-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  font-weight: 800;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(99,102,241,0.35);
}
.reviewer-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main, #f9fafb);
  line-height: 1.2;
}
.review-stars {
  color: #f59e0b;
  font-size: 0.82rem;
  letter-spacing: 2px;
  margin-top: 2px;
}
.review-date {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--text-muted, #6b7280);
  white-space: nowrap;
}
.review-text {
  font-size: 0.9rem;
  color: var(--text-sub, #d1d5db);
  line-height: 1.6;
  margin: 0;
  padding-left: 54px;
}

/* View All */
.btn-view-all {
  background: transparent;
  border: 1.5px solid var(--primary, #f97316);
  color: var(--primary, #f97316);
  border-radius: 999px;
  padding: 11px 32px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}
.btn-view-all:hover { background: var(--primary,#f97316); color:#fff; }

/* Divider */
.review-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 24px 0 20px;
}

/* ═══════════════════════════════
   PREMIUM REVIEW FORM
═══════════════════════════════ */

.review-form-box{
  background: linear-gradient(
    145deg,
    rgba(17,24,39,0.96),
    rgba(30,41,59,0.96)
  );
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(18px);
  border-radius: 26px;
  padding: 24px 18px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 10px 40px rgba(0,0,0,0.45);
}

.review-form-box::before{
  content:'';
  position:absolute;
  width:220px;
  height:220px;
  background: radial-gradient(circle, rgba(249,115,22,0.18), transparent 70%);
  top:-80px;
  right:-80px;
}

.review-form-title{
  color:#fff;
  font-size:1.15rem;
  font-weight:800;
  margin-bottom:20px;
}

.review-input{
  width:100%;
  background: rgba(255,255,255,0.06);
  border:1.5px solid rgba(255,255,255,0.08);
  border-radius:16px;
  padding:15px 16px;
  color:#fff !important;
  font-size:0.95rem;
  margin-bottom:14px;
  transition: all .25s ease;
  outline:none;
}

.review-input::placeholder{
  color:rgba(255,255,255,0.42);
}

.review-input:focus{
  background: rgba(255,255,255,0.09);
  border-color:#f97316;
  box-shadow:
    0 0 0 4px rgba(249,115,22,0.14);
}

.review-textarea{
  min-height:120px;
  resize:none;
  line-height:1.7;
}

.star-opt{
  font-size:2.3rem;
  transition: all .18s ease;
}

.star-opt.active{
  color:#f59e0b;
  text-shadow:
    0 0 12px rgba(245,158,11,0.55);
}

.star-opt:hover{
  transform: scale(1.18);
}

.star-hint{
  color:rgba(255,255,255,0.62);
  font-weight:600;
  margin-bottom:18px;
}

.btn-submit-review{
  width:100%;
  background: linear-gradient(
    135deg,
    #f97316,
    #ea580c
  );
  color:#fff;
  border:none;
  border-radius:16px;
  padding:16px;
  font-size:1rem;
  font-weight:800;
  cursor:pointer;
  transition: all .22s ease;
  box-shadow:
    0 10px 25px rgba(249,115,22,0.35);
}

.btn-submit-review:hover{
  transform: translateY(-2px);
}

.btn-submit-review:active{
  transform: scale(.98);
}

/* Messages */
.rv-success, .rv-error {
  text-align: center;
  padding: 11px 14px;
  border-radius: 11px;
  font-size: 0.88rem;
  font-weight: 700;
  margin-top: 12px;
}
.rv-success { background: rgba(34,197,94,0.12);  color: #22c55e; border: 1px solid rgba(34,197,94,0.2); }
.rv-error   { background: rgba(239,68,68,0.10);   color: #f87171; border: 1px solid rgba(239,68,68,0.2); }

@media (min-width: 768px) {
  .review-card { padding: 22px 20px 18px; border-radius: 22px; }
  .review-form-box { padding: 28px 24px; border-radius: 26px; }
  .review-text { font-size: 0.93rem; }
}