/* Corporate Estate Malaysia - Official Brand Theme & Clean White Header Styles */
:root {
  --bg-main: #ffffff;
  --bg-card: #ffffff;
  --bg-subtle: #f8fafc;
  --cem-navy: #002742; /* Official CEM Deep Corporate Navy Blue */
  --cem-navy-hover: #00192d;
  --cem-red: #d31e28; /* Official CEM Red Ribbon Accent */
  --cem-red-hover: #b0151e;
  --cem-orange: #f37021; /* Official CEM Orange Accent */
  --nav-bg: #ffffff; /* Crisp Pure White Header */
  --primary: #002742;
  --text-main: #002742;
  --text-muted: #475569;
  --text-light: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --shadow: 0 4px 15px -2px rgba(0, 0, 0, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 12px 25px -4px rgba(211, 30, 40, 0.18);
  --radius: 8px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Crisp Pure White Navigation Header */
.navbar {
  background-color: var(--nav-bg);
  padding: 0.75rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border-bottom: 3px solid var(--cem-red);
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.logo-img {
  height: 46px;
  width: auto;
  background: transparent !important;
  padding: 0;
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--cem-navy);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.1;
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}

.logo-text span {
  font-weight: 700;
  opacity: 0.95;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--cem-red);
}

.agent-portal-badge {
  background: var(--cem-navy);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  white-space: nowrap;
}

.nav-links a {
  color: var(--cem-navy);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--cem-red);
}

.nav-btn-agent {
  background: var(--cem-red);
  color: #ffffff !important;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 800;
  white-space: nowrap;
  transition: background 0.2s;
  box-shadow: 0 4px 10px rgba(211, 30, 40, 0.25);
}

.nav-btn-agent:hover {
  background: var(--cem-red-hover) !important;
}

/* Mobile Toggle & Drawer Controls */
.mobile-nav-controls {
  display: none;
  align-items: center;
}

.mobile-menu-btn {
  background: var(--cem-navy);
  color: #ffffff;
  border: none;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

/* Hide menu button text label on very small screens, show only ☰ icon */
@media (max-width: 380px) {
  .container {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
  .dash-card {
    padding: 0.5rem !important;
  }
  .mobile-menu-btn .menu-btn-label {
    display: none;
  }
  .mobile-menu-btn {
    padding: 0.45rem 0.65rem;
    font-size: 1.1rem;
  }
}

.mobile-menu-drawer {
  display: none;
  position: fixed;
  top: 62px;
  left: 0;
  width: 100%;
  background: #ffffff;
  padding: 1rem 1.25rem;
  border-top: 3px solid var(--cem-red);
  border-bottom: 3px solid var(--cem-navy);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  z-index: 9999;
}

.mobile-menu-drawer.active,
.mobile-menu-drawer.open {
  display: flex !important;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-menu-drawer a {
  color: var(--cem-navy);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid var(--border);
  transition: all 0.15s;
}

.mobile-menu-drawer a:hover {
  background: var(--cem-navy);
  color: #ffffff !important;
}

/* Hero Section with Warehouse Background Image */
.hero {
  background: linear-gradient(rgba(248, 250, 252, 0.82), rgba(248, 250, 252, 0.95)),
              url('https://images.unsplash.com/photo-1586528116311-ad8dd3c8310d?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  padding: 3.5rem 1.5rem 2.25rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: 2.35rem;
  font-weight: 900;
  color: var(--cem-navy);
  max-width: 920px;
  margin: 0 auto 0.5rem auto;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto 1.5rem auto;
  font-weight: 500;
}

/* Mega Horizontal Filter Bar */
.filter-card {
  max-width: 1240px;
  margin: -1.75rem auto 2.5rem auto;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 0.85rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 100;
}

.filter-grid-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr) 180px;
  gap: 0.5rem;
  align-items: center;
}

/* ⚡ Single-Line 6-Column Filter Grid Row for View Listings Page */
.filter-grid-row-6col {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) 155px !important;
  gap: 0.45rem;
  align-items: center;
}

.filter-select, .filter-input {
  width: 100%;
  height: 44px;
  padding: 0 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  background-color: #ffffff;
  outline: none;
  transition: border-color 0.2s;
}

.filter-select:focus, .filter-input:focus {
  border-color: var(--cem-red);
}

.btn-show-listings {
  height: 44px;
  background: var(--cem-red);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-show-listings:hover {
  background: var(--cem-red-hover);
}

/* ⚡ INFINITE AUTO-SCROLLING CORPORATE CLIENT LOGO CAROUSEL */
.client-logo-section {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
  overflow: hidden;
  position: relative;
}

.client-logo-title {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.5rem;
  padding: 0 1rem;
}

.marquee-wrapper {
  display: flex;
  overflow: hidden;
  user-select: none;
  position: relative;
  gap: 3.5rem;
}

.marquee-content {
  display: flex;
  flex-shrink: 0;
  gap: 3.5rem;
  padding-right: 3.5rem;
  align-items: center;
  justify-content: space-around;
  min-width: 100%;
  animation: scroll-marquee 28s linear infinite;
}

.marquee-wrapper:hover .marquee-content {
  animation-play-state: paused;
}

.logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  min-width: 150px;
  padding: 0.6rem 1.25rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.logo-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.logo-item img, .client-logo-img {
  max-height: 42px;
  max-width: 135px;
  object-fit: contain;
  filter: contrast(102%);
  transition: transform 0.2s;
}

.logo-item:hover img, .logo-item:hover .client-logo-img {
  transform: scale(1.04);
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

@keyframes scroll-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* Agency Stats Section */
.stats-section {
  background: var(--cem-navy);
  color: #ffffff;
  padding: 2.5rem 1.5rem;
  overflow: hidden;
  position: relative;
  border-top: 3px solid var(--cem-orange);
  border-bottom: 3px solid var(--cem-red);
}

.stats-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-card {
  padding: 0.75rem 1rem;
  flex-shrink: 0;
}

.stat-number {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--cem-orange);
  line-height: 1;
  margin-bottom: 0.35rem;
  white-space: nowrap;
}

.stat-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #e2e8f0;
  white-space: nowrap;
}

.stat-sub {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 0.2rem;
  white-space: nowrap;
}

/* ⚡ NON-DESKTOP HORIZONTAL AUTO-SCROLLING MARQUEE (LEFT TO RIGHT / KIRI KE KANAN) */
.stats-mobile-marquee-wrapper {
  display: none;
  overflow: hidden;
  user-select: none;
  position: relative;
}

.stats-mobile-marquee-content {
  display: flex;
  flex-shrink: 0;
  gap: 3rem;
  align-items: center;
  animation: scroll-stats-left-to-right 16s linear infinite;
}

.stats-mobile-marquee-wrapper:hover .stats-mobile-marquee-content {
  animation-play-state: paused;
}

@keyframes scroll-stats-left-to-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0%); }
}

/* Core Industrial Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.service-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s;
}

.service-card:hover {
  transform: translateY(-3px);
  border-color: var(--cem-red);
}

.service-icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.service-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.service-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Ultra-Neat Corporate Advantage & Service Cards */
.neat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.neat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 39, 66, 0.08);
  border-color: var(--cem-navy);
}

.icon-box-badge {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--cem-navy);
  flex-shrink: 0;
}

/* Container */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  width: 100%;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-title h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
}

/* About Page Dedicated Grid Utilities */
.about-grid-2col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.about-grid-3col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.about-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

/* Services Page 8-Cards Grid — 2 col on desktop, 1 col on mobile */
.svc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Agent Dashboard Grid Container */
.dashboard-grid-container {
  display: grid;
  grid-template-columns: minmax(420px, 460px) 1fr;
  gap: 1.75rem;
  align-items: start;
}

.dash-card {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  max-width: 100%;
  overflow: hidden;
}

.form-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  align-items: start;
}

/* Desktop Inventory Table Container */
.inventory-desktop-table-wrap {
  display: block;
  overflow-x: auto;
  width: 100%;
}

/* Mobile Inventory App Cards View Container (Hidden on Desktop) */
.inventory-mobile-cards-container {
  display: none;
}

/* Property Cards Grid */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.75rem;
}

.property-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.property-card:hover {
  transform: translateY(-3px);
  border-color: var(--cem-red);
  box-shadow: var(--shadow-hover);
}

.card-img-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  background: #f1f5f9;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--cem-navy);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-tag.badge-sale {
  background: #2563eb !important; /* Blue for Sale */
  color: #ffffff !important;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.badge-tag.badge-rent {
  background: #d97706 !important; /* Amber / Yellow for Rent */
  color: #ffffff !important;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4);
}

.badge-status {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--cem-red);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-price {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--cem-red);
  margin-bottom: 0.35rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.card-location {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 500;
}

/* Industrial Spec Grid Inside Card */
.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 1.25rem;
}

.spec-item {
  display: flex;
  flex-direction: column;
}

.spec-item .label {
  font-size: 0.68rem;
  color: var(--text-light);
  text-transform: uppercase;
  font-weight: 700;
}

.spec-item .val {
  font-size: 0.85rem;
  color: var(--text-main);
  font-weight: 700;
}

/* Action Buttons with Transparent SVG WhatsApp Icon */
.card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  margin-top: auto;
}

.btn-whatsapp {
  background: #25d366;
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.65rem 0.9rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: opacity 0.2s;
  border: none;
}

.btn-whatsapp:hover {
  opacity: 0.9;
}

.btn-whatsapp svg {
  width: 18px;
  height: 18px;
  fill: #ffffff;
  flex-shrink: 0;
}

.btn-detail {
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.65rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
}

.btn-detail:hover {
  background: #e2e8f0;
}

/* Lead Generation Form Layout */
.lead-box-container {
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 2.25rem;
  box-shadow: var(--shadow);
}

.lead-form {
  max-width: 700px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.lead-full-width {
  grid-column: span 2;
}

/* Floating Sticky Mobile WhatsApp Button */
.floating-wa-btn {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 56px;
  height: 56px;
  background-color: #25d366;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: transform 0.2s, opacity 0.2s;
  text-decoration: none;
  border: none;
}

/* Hide floating WhatsApp button when any modal overlay is active */
body:has(.modal-overlay.active) .floating-wa-btn,
.modal-overlay.active ~ .floating-wa-btn {
  display: none !important;
}

.floating-wa-btn:hover {
  transform: scale(1.1);
}

.floating-wa-btn svg {
  width: 32px;
  height: 32px;
  fill: #ffffff;
  flex-shrink: 0;
}

/* Agent Directory Team Section */
.agent-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.agent-img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 3px solid var(--cem-navy);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  margin-bottom: 0.85rem;
}

.agent-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.agent-zone {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--cem-red);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.agent-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

/* Modal View Controls with Fixed Smooth Scrollability */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1.5rem 1rem;
  overflow-y: auto;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border-radius: 12px;
  max-width: 750px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding: 1.75rem;
  position: relative;
  color: var(--text-main);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  margin: auto;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 1.25rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* Perfect Breakpoints for ALL Devices (Tablets, iPads, Laptops & Mobile) */
@media (max-width: 1100px) {
  .nav-links {
    display: none;
  }

  .mobile-nav-controls {
    display: flex;
  }

  .stats-grid {
    display: none !important;
  }

  .stats-mobile-marquee-wrapper {
    display: flex !important;
  }

  .stats-section {
    padding: 1.75rem 0;
  }

  /* Dashboard Grid Stack on Mobile & Tablets */
  .dashboard-grid-container {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }

  .form-2col {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }
}

@media (max-width: 900px) {
  .filter-grid-row {
    grid-template-columns: 1fr 1fr;
  }
  .filter-grid-row-6col {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .btn-show-listings {
    grid-column: span 2;
  }

  /* About Page 900px Tablet Responsiveness */
  .about-grid-2col {
    grid-template-columns: 1fr !important;
    gap: 1.75rem !important;
  }

  .about-grid-3col {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  .about-pillars-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 1rem !important;
  }
}

/* ⚡ MOBILE APPS & IPHONE SE (375PX) BREAKPOINT OVERHAUL */
@media (max-width: 640px) {
  /* Narrow horizontal side gaps for maximum usable width on mobile */
  .container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  .dash-card {
    padding: 0.75rem !important;
  }

  .about-pillars-grid {
    grid-template-columns: 1fr !important;
  }

  .modal-content {
    max-height: 92vh;
    padding: 1.25rem 1rem;
  }

  /* Hide Desktop Table and Show Sleek 100% Fit Mobile Cards (Zero Side-Scroll!) */
  .inventory-desktop-table-wrap {
    display: none !important;
  }

  .inventory-mobile-cards-container {
    display: flex !important;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }

  .inv-card-item {
    display: flex;
    align-items: stretch;
    gap: 0.65rem;
    background: #ffffff;
    border: 1px solid var(--border-strong);
    padding: 0.65rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    width: 100%;
    position: relative;
    cursor: pointer;
    transition: background 0.15s;
  }

  .inv-card-item:hover {
    background: #f8fafc;
  }

  .inv-card-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    align-self: center;
  }

  .inv-card-details {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
  }

  .inv-card-title {
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
  }

  .inv-card-sub {
    font-size: 0.73rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .inv-card-price {
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--cem-red);
    margin-top: 0.15rem;
  }

  /* ⚡ Right Action Column: Trash Button on TOP Right, Green Badge on BOTTOM Right */
  .inv-card-right-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    flex-shrink: 0;
    height: 100%;
  }

  .inv-card-delete {
    width: 32px;
    height: 32px;
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
  }

  .inv-card-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
  }

  .navbar {
    padding: 0.65rem 1rem;
  }

  .logo-img {
    height: 38px;
  }

  .logo-text {
    font-size: 0.98rem;
  }

  .agent-portal-badge {
    display: none;
  }

  .hero {
    padding: 2.25rem 1rem 1.75rem 1rem;
  }

  .hero h1 {
    font-size: 1.55rem;
  }

  .hero p {
    font-size: 0.92rem;
  }

  .filter-card {
    margin: -1.25rem 0.85rem 1.5rem 0.85rem;
    padding: 0.75rem;
  }

  .filter-grid-row {
    grid-template-columns: 1fr;
  }

  .btn-show-listings {
    grid-column: span 1;
  }

  .dash-card {
    padding: 1.1rem 0.85rem;
  }

  .form-2col {
    grid-template-columns: 1fr !important;
  }

  .lead-box-container {
    padding: 1.25rem 1rem;
  }

  .lead-form {
    grid-template-columns: 1fr !important;
  }

  .lead-full-width {
    grid-column: span 1 !important;
  }

  .section-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .section-title h2 {
    font-size: 1.25rem;
  }

  .listing-grid {
    grid-template-columns: 1fr;
  }

  .card-actions {
    grid-template-columns: 1fr;
  }

  /* ⚡ Mobile Grid Stacking Fix (375px & iPhone/Android) */
  .about-grid-2col,
  .about-grid-3col,
  .about-pillars-grid,
  .services-grid,
  .svc-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .neat-card {
    padding: 1.25rem 1rem !important;
  }
}
