html {
  background: #f8fafc;
  margin: 0;
  padding: 0;
}
.hidden {
  display: none !important;
}

:root {
  --blue-600: #2563eb;
  --slate-900: #0f172a;
  --slate-50: #f8fafc;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Plus Jakarta Sans", sans-serif;
}
body {
  background: var(--slate-50);
  color: #0f172a;
}
.top-announcement {
  background: #f59e0b;
  color: #000;
  text-align: center;
  padding: 8px;
  font-size: 12px;
  font-weight: bold;
}
.main-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 12px 20px;
}
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.lang-switcher {
  display: flex;
  align-items: center;
  margin-right: 15px;
  border-right: 1px solid var(--slate-200);
  padding-right: 15px;
}
.lang-dropdown {
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  outline: none;
  transition: 0.2s;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="none" stroke="%2364748b" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 9l6 6 6-6"></path></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  padding-right: 32px;
}
.lang-dropdown:hover {
  border-color: var(--blue-600);
}
.lang-dropdown:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.btn-text {
  background: none;
  border: none;
  color: var(--slate-900);
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
}
.btn-post-ad {
  background: #087f5b;
  color: #ffffff;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 99px;
  font-weight: 800;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(11, 158, 118, 0.25);
}

/* HERE IS THE HERO BACKGROUND IMAGE FIX FOR DASHBOARD */
.portal-hero {
  background:
    linear-gradient(90deg, rgba(5, 20, 38, 0.25), rgba(5, 20, 38, 0.15)),
    url("../images/marketplace-hero.svg") center/cover no-repeat;
  min-height: 430px;
  box-sizing: border-box;
  padding: 90px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}
.portal-hero .portal-search-box {
  width: 100%;
  max-width: 780px;
}
.portal-hero #heroGreeting {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.4;
  min-height: 2.8em;
  text-shadow: 0 2px 12px #061e35;
}
.typing-cursor {
  color: #60cfff;
  animation: heroBlink 0.8s step-end infinite;
}
@keyframes heroBlink {
  50% {
    opacity: 0;
  }
}
@media (max-width: 600px) {
  .portal-hero {
    min-height: 360px;
    padding: 55px 20px;
    background-position: center;
  }
  .portal-hero .search-bar-wrapper input {
    min-width: 0;
    width: 100%;
    font-size: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .typing-cursor {
    display: none;
  }
}
.portal-search-box {
  max-width: 700px;
  margin: 0 auto;
}
.portal-search-box h1,
.portal-search-box h2 {
  font-size: 28px;
  margin-bottom: 20px;
}
.search-bar-wrapper {
  display: flex;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}
.search-bar-wrapper input {
  flex: 1;
  border: none;
  padding: 10px 15px;
  font-size: 16px;
  outline: none;
  border-radius: 8px;
}
.btn-search-hero {
  background: #f59e0b;
  border: none;
  width: 50px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
}

.promo-section {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}
.promo-banner {
  background: url("https://images.unsplash.com/photo-1593941707882-a5bba14938c7?auto=format&fit=crop&w=800&q=70")
    center/cover;
  border-radius: 16px;
  padding: 60px 40px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
@media (min-width: 900px) {
  .promo-banner {
    background-image: url("https://images.unsplash.com/photo-1593941707882-a5bba14938c7?auto=format&fit=crop&w=1200&q=72");
  }
}
.promo-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.2) 100%
  );
  z-index: 1;
}
.promo-content {
  position: relative;
  z-index: 2;
  max-width: 500px;
}
.promo-content h2 {
  font-size: 32px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 10px;
}
.promo-content p {
  font-size: 14px;
  margin-bottom: 20px;
  opacity: 0.9;
}
.promo-content button {
  background: #fff;
  color: #000;
  font-weight: 800;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
}
.category-main {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}
.category-header h3 {
  font-size: 20px;
  color: var(--slate-900);
  margin-bottom: 20px;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
.cat-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  transition: 0.2s;
  cursor: pointer;
}
.cat-card.active-cat:hover {
  border-color: var(--blue-600);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}
.cat-icon {
  font-size: 32px;
}
.cat-info h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.cat-count {
  font-size: 12px;
  color: #64748b;
}
.disabled-cat {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f8fafc;
}

/* NEW FOOTER STYLES */
.site-footer {
  background: #1e1b4b;
  color: #fff;
  font-family: "Plus Jakarta Sans", sans-serif;
  margin-top: 50px;
}
.footer-top {
  padding: 50px 20px;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-col h4 {
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 20px;
  color: #fff;
  letter-spacing: 0.5px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col ul li {
  margin-bottom: 12px;
}
.footer-col ul li a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: 0.2s;
}
.footer-col ul li a:hover {
  color: #fff;
  text-decoration: underline;
}
.brand-col p {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.6;
}
.app-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-bottom {
  background: #334155;
  padding: 25px 20px;
}
.bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #475569;
  padding-bottom: 20px;
  margin-bottom: 20px;
}
.bottom-item {
  display: flex;
  flex-direction: column;
}
.bottom-item .sub {
  font-size: 10px;
  color: #94a3b8;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.bottom-item strong {
  font-size: 14px;
  color: #fff;
  letter-spacing: 1px;
}
.social-box {
  align-items: flex-end;
}
.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 5px;
}
.social-icons a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: 0.2s;
}
.social-icons a:hover {
  color: #38bdf8;
}
.footer-copyright {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
}
@media (max-width: 900px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
  .bottom-row {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
  .social-box {
    align-items: flex-start;
  }
}
@media (max-width: 600px) {
  .footer-container {
    grid-template-columns: 1fr;
  }
}

/* ISLAND-WIDE COVERAGE SRI LANKA MAP SECTION */
.coverage-section {
  max-width: 1200px;
  margin: 50px auto 20px;
  padding: 0 20px;
}
.coverage-container {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 24px;
  padding: 45px;
  color: #fff;
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 40px;
  align-items: center;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
  border: 1px solid #334155;
}
.coverage-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 11px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 99px;
  letter-spacing: 0.8px;
  margin-bottom: 16px;
}
.coverage-info h2 {
  font-size: 30px;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 14px;
  color: #fff;
}
.coverage-info p {
  font-size: 14px;
  color: #cbd5e1;
  line-height: 1.7;
  margin-bottom: 24px;
}
.coverage-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 26px;
}
.stat-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 16px;
  border-radius: 14px;
}
.stat-box strong {
  display: block;
  font-size: 22px;
  font-weight: 900;
  color: #38bdf8;
  margin-bottom: 2px;
}
.stat-box span {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
}
.district-pills-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #94a3b8;
  margin-bottom: 12px;
}
.district-pills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dist-pill {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid #475569;
  color: #e2e8f0;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: 0.25s;
}
.dist-pill:hover,
.dist-pill.active-pill {
  background: #2563eb;
  border-color: #60a5fa;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.35);
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pillBlink 1.8s infinite ease-in-out;
}
.dist-pill.active-pill .pulse-dot {
  background: #fbbf24;
  box-shadow: 0 0 10px #fbbf24;
}

.coverage-map-card {
  background: radial-gradient(circle at 50% 50%, #1e293b 0%, #090d16 100%);
  border: 1px solid #334155;
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.map-live-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.live-indicator {
  font-size: 10px;
  font-weight: 800;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.6px;
}
.live-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pillBlink 1s infinite;
}
.active-dist-label {
  font-size: 12px;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.sl-map-wrapper {
  width: 100%;
  max-width: 350px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.sl-svg-map {
  width: 100%;
  height: auto;
  overflow: visible;
}
.sl-island-outline {
  fill: url(#slLandGrad);
  stroke: #38bdf8;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.25));
}

.map-node {
  cursor: pointer;
}
.map-node .core-dot {
  fill: #38bdf8;
  stroke: #fff;
  stroke-width: 1.5;
  transition: 0.25s;
}

.map-node text {
  fill: #cbd5e1;
  font-size: 9px;
  font-weight: 700;
  pointer-events: none;
  transition: 0.25s;
  text-shadow: 0 1px 4px #000;
}

.map-node:hover .core-dot,
.map-node.active-node .core-dot {
  fill: #f59e0b;
  r: 8;
  stroke: #fff;
  stroke-width: 2;
}
.map-node:hover .pulse-ring,
.map-node.active-node .pulse-ring {
  fill: rgba(245, 158, 11, 0.55);
}
.map-node:hover text,
.map-node.active-node text {
  fill: #fbbf24;
  font-size: 11px;
  font-weight: 900;
}

.map-footer-note {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 10px;
  text-align: center;
}

@keyframes mapPulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.85);
    opacity: 0;
  }
}
@keyframes pillBlink {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.8);
  }
}

@media (max-width: 900px) {
  .coverage-container {
    grid-template-columns: 1fr;
    padding: 28px;
  }
}

/* --- M4U PRELOADER STYLES --- */
.m4u-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease;
}
.m4u-preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}
.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.loader-logo-wrapper {
  position: relative;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.loader-img {
  width: auto;
  height: auto;
  max-width: 100px;
  max-height: 100px;
  object-fit: contain;
  z-index: 2;
  position: relative;
  margin-left: -5px; /* Visual balance for the 'm' logo */
}
.loader-spin-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 3px dashed #2563eb;
  border-radius: 50%;
  border-top-color: #38bdf8;
  border-left-color: #93c5fd;
  animation: m4uSpin 1.8s linear infinite;
  opacity: 0.85;
}
.loader-text-brand {
  font-size: 26px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  line-height: 1;
}
.loader-text-sub {
  font-size: 13px;
  font-weight: 800;
  color: #2563eb;
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: m4uPulse 1.5s ease-in-out infinite;
}
@keyframes m4uSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
@keyframes m4uPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* Animated category columns and permanent seller invitation */
.portal-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #15546b, #09283f);
}
.portal-hero .portal-search-box {
  position: relative;
  z-index: 2;
  max-width: min(780px, 52vw);
}
.hero-category-motion {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(2, 9vw) 1fr repeat(2, 9vw);
  gap: 1vw;
  padding: 0 3vw;
  mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent);
}
.hero-category-column {
  overflow: hidden;
}
.hero-category-column:nth-child(3) {
  grid-column: 4;
}
.hero-category-track {
  display: flex;
  flex-direction: column;
  animation: categoryRise 22s linear infinite;
}
.hero-category-column:nth-child(odd) .hero-category-track {
  animation-direction: reverse;
}
.hero-category-card {
  height: 150px;
  box-sizing: border-box;
  margin-bottom: 18px;
  border: 1px solid #ffffff15;
  background: #ffffff0c;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #b4d9e5;
  font-size: 13px;
}
.hero-category-card svg {
  width: 52px;
  height: 52px;
}
@keyframes categoryRise {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-50%);
  }
}
.seller-poster {
  max-width: 1160px;
  margin: 40px auto;
  box-sizing: border-box;
  padding: 48px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  background: linear-gradient(125deg, #eaf7ff, #f3f0ff 65%, #e1f8f1);
  border: 1px solid #dce7f3;
  border-radius: 26px;
  overflow: hidden;
  color: #112b49;
}
.seller-eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 800;
  color: #0f6a8e;
}
.seller-poster h2 {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
  margin: 16px 0;
}
.seller-poster p {
  line-height: 1.7;
  font-size: 14px;
  max-width: 500px;
}
.seller-availability {
  color: #526880;
}
.seller-post-button {
  display: inline-flex;
  gap: 30px;
  background: #1456f0;
  color: white;
  text-decoration: none;
  padding: 15px 24px;
  border-radius: 12px;
  font-weight: 800;
  margin-top: 14px;
  box-shadow: 0 8px 22px #1456f026;
}
.seller-post-button:hover {
  background: #1043be;
}
.seller-post-button:focus-visible {
  outline: 3px solid #093082;
  outline-offset: 4px;
}
.seller-poster-art {
  position: relative;
  min-height: 310px;
}
.seller-art-halo {
  position: absolute;
  inset: 15px;
  border-radius: 50%;
  background: #b7ddec60;
}
.seller-object {
  position: absolute;
  background: #ffffffdb;
  box-shadow: 0 14px 30px #19486b18;
  border: 1px solid white;
  border-radius: 20px;
  width: 120px;
  height: 106px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 44px;
}
.seller-object span {
  font-size: 11px;
  color: #506780;
  font-weight: 700;
}
.seller-car {
  top: 6px;
  left: 5%;
  transform: rotate(-8deg);
}
.seller-home {
  right: 2%;
  top: 0;
  transform: rotate(7deg);
}
.seller-device {
  bottom: 8px;
  left: 1%;
  transform: rotate(5deg);
}
.seller-chair {
  right: 0;
  bottom: 0;
  transform: rotate(-6deg);
}
.seller-category-count {
  position: absolute;
  inset: 90px 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.seller-category-count strong {
  font-size: 65px;
  color: #1456f0;
}
.seller-category-count span {
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
}
@media (max-width: 800px) {
  .portal-hero .portal-search-box {
    max-width: 100%;
    background: #09283fcc;
    border-radius: 20px;
    padding: 20px;
    box-sizing: border-box;
  }
  .hero-category-motion {
    opacity: 0.4;
  }
  .seller-poster {
    margin: 28px 20px;
    padding: 28px;
    grid-template-columns: 1fr;
  }
  .seller-poster-art {
    max-width: 440px;
    width: 100%;
    margin: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-category-track {
    animation: none;
  }
}

/* Shared page footer and language control. */
.footer-copyright {
  text-align: center;
  padding: 20px;
  color: #cbd5e1;
  background: #334155;
  font-size: 12px;
}


/* v324: header pills (My Chats, My Account, Login / Register) */
.hd-pill{border:0;cursor:pointer;font-family:inherit;display:inline-flex;align-items:center;gap:7px;padding:9px 14px;border-radius:10px;background:#f1f5f9;color:#334155;font-weight:700;font-size:14px;text-decoration:none;transition:.2s;white-space:nowrap;margin-right:10px;line-height:1.2}
.hd-pill:hover{background:#dbeafe;color:#1d4ed8}
.hd-pill svg{width:16px;height:16px;flex:none}
.hd-cnt{min-width:18px;height:18px;border-radius:9px;background:#ef4444;color:#fff;font-size:11px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;padding:0 5px}
.hd-cnt[hidden]{display:none}
/* v329: Post Your Ad slow heartbeat; stops and lifts on hover */
@keyframes hdBeat{0%,60%,100%{transform:scale(1)}15%{transform:scale(1.07)}30%{transform:scale(1)}45%{transform:scale(1.07)}}
.btn-post-ad{border-radius:10px;animation:hdBeat 2.4s infinite}
.btn-post-ad:hover{animation:none;background:#047857;transform:translateY(-2px);box-shadow:0 8px 18px rgba(5,150,105,.4)}
.btn-post-ad:active{transform:scale(.96)}
@media (prefers-reduced-motion:reduce){.btn-post-ad{animation:none}}
