﻿:root {
  --bg: #e9eef5;
  --light: #ffffff;
  --dark: #cfd8e3;
  --primary: #007bff;
  --text: #333333;
  --radius: 18px;
  --shadow: 8px 8px 16px var(--dark), -8px -8px 16px var(--light);
  --shadow-inset: inset 6px 6px 12px var(--dark), inset -6px -6px 12px var(--light);
  --shadow-dark: #cfd8e3;
  --shadow-light: #ffffff;
}

@font-face {
  font-family: myFirstFontฺBold;
  src: url('/assets/fonts/supermarket-bold.ttf'), url('/main/supermarket-bold.ttf');
}

@font-face {
  font-family: myFirstFont;
  src: url('/assets/fonts/supermarket.ttf'), url('/main/supermarket.ttf');
}

* {
  font-family: myFirstFont, 'Prompt', sans-serif;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: myFirstFont, 'Prompt', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  padding-bottom: 70px;
}

a {
  text-decoration: none;
  color: inherit;
}

/* =====================================================
   TOP NAVIGATION & DRAWER (Matching web_server/main)
   ===================================================== */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 8%;
  background: var(--bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 9999;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.hamburger-btn {
  font-size: 26px;
  color: #005ef5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  cursor: pointer;
}

.hamburger-btn:hover {
  box-shadow: var(--shadow-inset);
}

.logo a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #005ef5;
  font-size: 24px;
  font-weight: 700;
  font-family: myFirstFontฺBold, 'Prompt', sans-serif;
}

.logo-badge {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: #fff;
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.top_menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topmenu a.top_btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
  color: #333;
  font-size: 17px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.topmenu a.top_btn:hover,
.topmenu a.top_btn.pc_active {
  box-shadow: var(--shadow-inset);
  color: var(--primary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.setm {
  position: relative;
}

.setm a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #3b82f6, #0056b3);
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 94, 245, 0.3);
  transition: transform 0.2s ease;
}

.setm a:hover {
  transform: translateY(-2px);
}

.bell-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-size: 20px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bell-btn:hover {
  box-shadow: var(--shadow-inset);
  color: var(--primary);
}

.bell-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  padding: 0 4px;
}

@media (max-width: 900px) {
  .top_menu {
    display: none;
  }
}

/* Drawer & Overlay */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

.menu-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  max-width: 85vw;
  height: 100%;
  background: var(--bg);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.25);
  z-index: 10001;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow-y: auto;
}

.menu-drawer.open {
  transform: translateX(0);
}

.menu-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.menu-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.menu-name {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
}

.menu-meta {
  font-size: 13px;
  color: #64748b;
}

.menu-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
  font-size: 17px;
  font-weight: 600;
  color: #334155;
  transition: all 0.2s ease;
}

.menu-nav a:hover,
.menu-nav a.active {
  box-shadow: var(--shadow-inset);
  color: var(--primary);
}

/* =====================================================
   HERO SECTION (Matching web_server/main/home.php)
   ===================================================== */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 8%;
  padding-bottom: 120px;
  gap: 30px;
  flex-wrap: wrap;
  background: #9148c2;
  background: linear-gradient(0deg, rgba(145, 72, 194, 1) 0%, rgba(0, 99, 230, 1) 100%);
  position: relative;
  overflow: hidden;
}

.hero-content {
  flex: 1;
  min-width: 300px;
}

.hero-content h1 {
  font-size: 2.1em;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  line-height: 1.35;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-content h2 {
  display: none;
}

.hero-content p {
  color: rgba(255, 255, 255, 0.95);
  margin-top: 10px;
  margin-bottom: 25px;
  font-size: 1.55em;
  min-height: 2.2em;
  line-height: 1.4;
  font-weight: 500;
}

.type-cursor::after {
  content: '|';
  margin-left: 4px;
  animation: blinkCursor 0.9s infinite;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-image {
  flex: 1;
  min-width: 320px;
  max-width: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* HERO PRODUCT MARQUEE */
.hero-marquee {
  width: 100%;
  max-width: 600px;
  height: 220px;
  border-radius: 16px;
  padding: 10px;
  overflow: hidden;
  position: relative;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: rgba(0, 0, 0, 0.2) 0 10px 24px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: grab;
}

.hero-marquee:active {
  cursor: grabbing;
}

.hero-marquee::before,
.hero-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  z-index: 3;
  pointer-events: none;
}

.hero-marquee::before {
  left: 0;
  background: linear-gradient(90deg, rgba(0, 99, 230, 0.4), transparent);
}

.hero-marquee::after {
  right: 0;
  background: linear-gradient(270deg, rgba(145, 72, 194, 0.4), transparent);
}

.hero-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: heroScroll 36s linear infinite;
  will-change: transform;
}

.hero-marquee:hover .hero-track {
  animation-play-state: paused;
}

@keyframes heroScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.hero-card-track {
  width: 150px;
  min-width: 150px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
}

.hero-card-track:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.hero-card-track .imgwrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f1f5f9;
}

.hero-card-track .imgwrap img.cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-card-track .imgwrap .game-label {
  position: absolute;
  left: 6px;
  bottom: 6px;
  max-width: calc(100% - 12px);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-card-track .body {
  padding: 6px 8px 8px;
}

.hero-card-track h4 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #1e293b;
}

.hero-card-track .price {
  font-size: 15px;
  font-weight: 800;
  color: #007bff;
  margin-top: 2px;
}

/* =====================================================
   BANNER SECTION (.steps.menutop)
   ===================================================== */
.steps {
  padding: 10px 8%;
  text-align: center;
  margin-top: 0px;
}

.menutop {
  width: 80%;
  margin-top: -85px;
  background-color: #e9eef5;
  border-radius: 20px;
  box-shadow: rgba(0, 0, 0, 0.12) 0px 4px 16px, rgba(0, 0, 0, 0.24) 0px 2px 6px;
  margin-left: 10%;
  padding: 16px 20px;
  position: relative;
  z-index: 5;
}

.baner_img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: block;
  aspect-ratio: 5 / 1;
  object-fit: cover;
}

@media (max-width: 768px) {
  .menutop {
    width: 94%;
    margin-left: 3%;
    margin-top: -60px;
    padding: 10px;
  }
  .baner_img {
    aspect-ratio: 3.5 / 1;
  }
}

/* =====================================================
   3 POPULAR SERVICES (ขายฝาก / จำนอง / ทุนต้องการ)
   Strict 3 columns on both Mobile & PC
   ===================================================== */
.popular-services-wrap {
  width: 100%;
  margin: 20px 0 24px 0;
  text-align: left;
}

.popular-services-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 12px;
}

.popular-services-title {
  font-size: 21px;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
  letter-spacing: -0.01em;
}

.popular-services-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.popular-svc-card {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  padding: 20px 16px 18px;
  box-sizing: border-box;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.28), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
  cursor: pointer;
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  isolation: isolate;
  min-height: 175px;
}

.popular-svc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px -4px rgba(0, 0, 0, 0.38);
}

/* Card 1: ขายฝาก (Consignment) */
.card-svc-consignment {
  border: 1.5px solid rgba(59, 130, 246, 0.45);
  background-color: #09132e;
  background-image: linear-gradient(100deg, rgba(8, 17, 43, 0.96) 0%, rgba(9, 23, 62, 0.88) 48%, rgba(13, 34, 89, 0.35) 100%);
}

.card-svc-consignment::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 18%, rgba(59, 130, 246, 0.38), transparent 60%);
  pointer-events: none;
  z-index: 1;
}

/* Card 2: จำนอง (Mortgage) */
.card-svc-mortgage {
  border: 1.5px solid rgba(20, 184, 166, 0.45);
  background-color: #032123;
  background-image: linear-gradient(100deg, rgba(3, 30, 31, 0.96) 0%, rgba(5, 48, 50, 0.88) 48%, rgba(13, 148, 136, 0.35) 100%);
}

.card-svc-mortgage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 18%, rgba(20, 184, 166, 0.38), transparent 60%);
  pointer-events: none;
  z-index: 1;
}

/* Card 3: ทุนต้องการทรัพย์ (Demands / Match) */
.card-svc-demand {
  border: 1.5px solid rgba(168, 85, 247, 0.45);
  background-color: #1e0735;
  background-image: linear-gradient(100deg, rgba(29, 6, 48, 0.96) 0%, rgba(51, 12, 85, 0.88) 48%, rgba(147, 51, 234, 0.35) 100%);
}

.card-svc-demand::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 18%, rgba(192, 38, 211, 0.38), transparent 60%);
  pointer-events: none;
  z-index: 1;
}

.svc-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  margin-bottom: 12px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.badge-consignment {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.65), inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

.badge-mortgage {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.65), inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

.badge-demand {
  background: linear-gradient(135deg, #d946ef 0%, #9333ea 100%);
  box-shadow: 0 4px 14px rgba(192, 38, 211, 0.65), inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

.svc-badge-icon {
  width: 22px;
  height: 22px;
  color: #ffffff;
}

.svc-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}

.svc-title {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.25;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
}

.svc-desc {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
  line-height: 1.35;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.svc-btn-wrap {
  position: relative;
  z-index: 2;
}

.svc-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  color: #0f172a;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.popular-svc-card:hover .svc-btn {
  background: #f8fafc;
  color: #0284c7;
  transform: translateX(3px);
}

@media (max-width: 768px) {
  .popular-services-row {
    gap: 6px !important;
  }
  .popular-svc-card {
    border-radius: 13px;
    padding: 10px 8px 10px !important;
    min-height: 136px;
  }
  .svc-badge {
    width: 32px;
    height: 32px;
    margin-bottom: 6px;
  }
  .svc-badge-icon {
    width: 16px;
    height: 16px;
  }
  .svc-title {
    font-size: 11.5px;
    line-height: 1.2;
  }
  .svc-desc {
    font-size: 9px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .svc-btn {
    padding: 4px 8px;
    font-size: 9.5px;
    gap: 2px;
  }
}

/* =====================================================
   STEPS GRID (4 Steps with Glowing Light Animation)
   ===================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 15px;
}

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.step {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 14px;
  transition: 0.3s;
  position: relative;
  border: 2px solid transparent;
  animation: rotateBorder 4s linear infinite, sparkleShadow 3s ease-in-out infinite alternate;
}

.step:nth-child(2) { animation-delay: 1s; }
.step:nth-child(3) { animation-delay: 2s; }
.step:nth-child(4) { animation-delay: 3s; }

.step:hover {
  transform: translateY(-5px) scale(1.03);
  z-index: 10;
  animation-duration: 2s, 1s;
}

@keyframes rotateBorder {
  to {
    --angle: 360deg;
  }
}

@keyframes sparkleShadow {
  0% {
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.1), inset 0 0 0px rgba(0, 0, 0, 0);
  }
  100% {
    box-shadow: 0 0 25px rgba(145, 72, 194, 0.45), 0 0 10px rgba(0, 123, 255, 0.6), inset 0 0 15px rgba(145, 72, 194, 0.12);
  }
}

.step-icon {
  font-size: 1.8em;
  color: var(--primary);
  margin-bottom: 12px;
  box-shadow: var(--shadow-inset);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-inline: auto;
}

.step h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #1e293b;
}

.step p {
  font-size: 15px;
  color: #64748b;
  line-height: 1.4;
}

/* =====================================================
   LIVE SOCIAL PROOF
   ===================================================== */
.stats-banner {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  font-size: 20px;
  font-weight: 600;
  flex-wrap: wrap;
  color: #334155;
}

.stats-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.stats-item strong {
  font-size: 24px;
  font-family: myFirstFontฺBold, 'Prompt', sans-serif;
}

/* =====================================================
   REVIEWS & SEARCH CONTAINER (Matching web_server/main)
   ===================================================== */
.reviews {
  background: var(--bg);
  padding: 24px 8%;
  text-align: center;
  width: 80%;
  margin-left: 10%;
  margin-top: 15px;
  border-radius: 20px;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
  margin-bottom: 40px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .reviews {
    width: 94%;
    margin-left: 3%;
    padding: 16px 12px;
  }
}

.search_divbar {
  display: flex;
  width: 100%;
  margin-bottom: 20px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px 14px;
  transition: 0.3s;
  position: relative;
  width: 100%;
}

.logo_search {
  font-size: 24px;
  color: #007bff;
  display: flex;
  align-items: center;
  padding-left: 6px;
}

.search-bar {
  flex: 1;
  margin-left: 12px;
  margin-right: 70px;
}

.typewriter-wrap {
  position: relative;
}

#searchTypewriter {
  width: 100%;
  padding: 10px 18px;
  font-family: myFirstFontฺBold, 'Prompt', sans-serif;
  border-radius: 25px;
  border: 1px solid #cbd5e1;
  background: var(--bg);
  font-size: 17px;
  box-shadow: inset 3px 3px 5px var(--shadow-dark), inset -3px -3px 5px var(--shadow-light);
  caret-color: transparent;
  outline: none;
  cursor: pointer;
}

.tw-cursor {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: bold;
  color: #64748b;
  pointer-events: none;
  animation: tw-blink 1s infinite;
}

@keyframes tw-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.icon-btn {
  background: linear-gradient(145deg, #007bff, #0056b3);
  position: absolute;
  right: 12px;
  border-radius: 25px;
  color: white;
  font-size: 16px;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
  cursor: pointer;
  transition: transform 0.2s ease;
}

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

/* Quick Filter Pills */
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  justify-content: center;
}

.ft-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0b5ed7;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid rgba(11, 94, 215, 0.15);
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  cursor: pointer;
}

.ft-tab:hover,
.ft-tab.active {
  background: linear-gradient(145deg, #9cd3ff, #007bff);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* =====================================================
   HOT DEALS PROPERTY GRID (Matching home.php .review-grid)
   ===================================================== */
.tp_first {
  font-size: 22px;
  font-weight: 800;
  color: #1e293b;
  text-align: left;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 15px;
}

@media (max-width: 600px) {
  .review-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

.review {
  background: var(--bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px;
  transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid #d1d5db;
  text-align: left;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.review:hover {
  transform: translateY(-4px);
  border: 1px solid #ffffff;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.box_img {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: #e2e8f0;
}

.review_img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.review:hover .review_img {
  transform: scale(1.04);
}

.ico_img {
  position: absolute;
  bottom: 6px;
  left: 6px;
  max-width: calc(100% - 12px);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.badge-sale { background: rgba(220, 38, 38, 0.85); }
.badge-mort { background: rgba(13, 148, 136, 0.85); }
.badge-cons { background: rgba(37, 99, 235, 0.85); }

.review h2 {
  font-size: 15px;
  padding: 8px 4px 2px;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  height: 2.7em;
  font-weight: 700;
  color: #1e293b;
}

.review .meta-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px;
  margin-top: auto;
}

.review .gm_name {
  font-size: 13px;
  color: #64748b;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 58%;
}

.review h3 {
  font-size: 16px;
  font-weight: 800;
  color: #007bff;
  text-align: right;
  white-space: nowrap;
}

.sp_class {
  background-color: white;
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 8px;
  box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px;
  font-weight: 800;
  font-size: 13px;
}

/* READ MORE BUTTON */
.read_more {
  margin-top: 24px;
}

.btn-more-hot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 32px;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
  border: 1px solid #cbd5e1;
  color: var(--primary);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-more-hot:hover {
  box-shadow: var(--shadow-inset);
  transform: translateY(-2px);
}

/* =====================================================
   BOTTOM NAVIGATION BAR (Matching web_server/main)
   ===================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0px 5px;
  width: 100%;
  z-index: 10000;
  height: 65px;
}

.nav-item {
  position: relative;
  width: 65px;
  height: 65px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

.nav-icon {
  font-size: 22px;
  color: #64748b;
  background: var(--bg);
  box-shadow: var(--shadow-inset);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.nav-item.active .nav-icon {
  color: var(--primary);
  background: var(--bg);
  box-shadow: rgb(204, 219, 232) 3px 3px 6px 0px inset, rgba(255, 255, 255, 0.5) -3px -3px 6px 1px inset;
  transform: translateY(-10px);
}

.nav-item.active::after {
  content: attr(data-label);
  position: absolute;
  bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
}

@media (min-width: 769px) {
  .bottom-nav {
    display: none;
  }
}
