/* =====================================================================
   Bachatcart-style theme for KHR Real Estate
   Golden-yellow accent + dark nav + white header. Loaded after marketplace.css
   so it overrides site-wide on every page.
   ===================================================================== */
:root {
    --bc-yellow: #f5a800;
    --bc-yellow-d: #d98e00;
    --bc-dark: #2b2b2b;
    --bc-dark-2: #3a3a3a;
    --bc-teal: #0f766e;
    --bc-ink: #1a1a1a;

    /* ===== Kill all blue: remap template + marketplace color vars ===== */
    --accent-color: #f5a800;     /* template links/accents (was blue #0a57b2) */
    --heading-color: #1f2937;    /* template headings (was blue #0d6efd) -> dark */
    --mk-primary: #1f2937;       /* leftover "primary" backgrounds -> dark, not blue */
    --mk-primary-600: #111827;
    --mk-primary-700: #0f172a;
    --mk-primary-50: #fff7e6;
    --mk-primary-100: #ffeebf;
    --mk-accent: #f5a800;
    --mk-accent-600: #d98e00;
    --bs-primary: #f5a800;
    --bs-primary-rgb: 245,168,0;
    --bs-link-color: #d98e00;
    --bs-link-hover-color: #b87700;
}

/* Bootstrap primary classes -> yellow/dark (inner pages use these) */
.text-primary { color: var(--bc-dark) !important; }
a.text-primary, .link-primary { color: var(--bc-yellow-d) !important; }
.bg-primary { background-color: var(--bc-yellow) !important; color: var(--bc-ink) !important; }
.badge.bg-primary, .badge.text-bg-primary { background-color: var(--bc-yellow) !important; color: var(--bc-ink) !important; }
.border-primary { border-color: var(--bc-yellow) !important; }
.btn-link { color: var(--bc-yellow-d) !important; }
/* Template accent links already use --accent-color (now yellow). Headings now dark. */

/* ---- Buttons: primary becomes golden ---- */
.btn-primary {
    background: var(--bc-yellow) !important;
    border-color: var(--bc-yellow) !important;
    color: var(--bc-ink) !important;
    font-weight: 700;
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--bc-yellow-d) !important;
    border-color: var(--bc-yellow-d) !important;
    color: #fff !important;
}
.btn-outline-primary {
    color: var(--bc-ink) !important;
    border-color: var(--bc-yellow) !important;
}
.btn-outline-primary:hover {
    background: var(--bc-yellow) !important;
    border-color: var(--bc-yellow) !important;
    color: var(--bc-ink) !important;
}
.btn-warning { background: var(--bc-yellow) !important; border-color: var(--bc-yellow) !important; color: var(--bc-ink) !important; font-weight:700; }
.btn-warning:hover { background: var(--bc-yellow-d) !important; color:#fff !important; }

/* Selected radio/checkbox buttons (e.g. Register account-type cards) -> yellow not blue */
.btn-check:checked + .btn-outline-primary,
.btn-check:active + .btn-outline-primary,
.btn-outline-primary.active,
.btn-outline-primary:active,
.btn-check:checked + .btn,
.btn.active {
    background: var(--bc-yellow) !important;
    border-color: var(--bc-yellow) !important;
    color: var(--bc-ink) !important;
}
.btn-check:checked + .btn .text-muted,
.btn-check:checked + .btn small { color: #5a4500 !important; }

/* ================= TOP UTILITY BAR ================= */
.bc-topbar {
    background: var(--bc-dark);
    color: #d4d4d4;
    font-size: .82rem;
}
.bc-topbar .container-xl { display: flex; align-items: center; justify-content: space-between; padding: 7px 12px; gap: 12px; }
.bc-topbar a { color: #d4d4d4; text-decoration: none; }
.bc-topbar a:hover { color: #fff; }
.bc-topbar .bc-top-right { display: flex; align-items: center; gap: 18px; }
.bc-topbar .bc-seller { color: var(--bc-yellow); font-weight: 700; }
@media (max-width: 575px){ .bc-topbar .bc-hide-sm { display:none; } }

/* ================= HEADER (white) ================= */
#header.header { background: #fff !important; box-shadow: 0 1px 0 #eee; padding: 6px 0; }
#header .logo .brand-name { color: var(--bc-dark) !important; }
#header .logo .brand-tag { color: var(--bc-yellow) !important; }
/* Yellow logo badge (replaces blue image logo) */
.khr-logo-badge {
    width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--bc-yellow), #ff8c00);
    color: #fff; display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin-right: 0; box-shadow: 0 3px 10px rgba(245,168,0,.4);
}
#header .logo { gap: 8px !important; }
#header .logo .brand-name { color: var(--bc-dark) !important; }

/* ===== Nav dropdown menus polish ===== */
.navmenu .dropdown-menu { border: 1px solid #eef2f7; border-radius: 12px; box-shadow: 0 12px 30px rgba(15,23,42,.12); padding: 8px; }
.navmenu .dropdown-item { border-radius: 8px; padding: 8px 12px; font-weight: 500; }
.navmenu .dropdown-item:hover, .navmenu .dropdown-item:focus { background: var(--bc-yellow) !important; color: var(--bc-ink) !important; }
.navmenu .dropdown-item:hover i { color: var(--bc-ink) !important; }
.navmenu .dropdown-item i { color: var(--bc-yellow-d); }

/* ===== Hero banner: always full cover, dark fallback (no blue) ===== */
.bc-hero .carousel, .bc-hero .carousel-inner, .bc-hero .carousel-item { background-color: #111 !important; }
.bc-hero .carousel-item { background-size: cover !important; background-position: center !important; background-repeat: no-repeat !important; }

/* ============ FULL MOBILE RESPONSIVENESS ============ */
@media (max-width: 991px){
    .bc-hero .carousel-item { height: 300px !important; }
    .bc-search { margin-top: -30px !important; padding: 12px !important; }
    .bc-search-row { grid-template-columns: 1fr 1fr !important; }
    .bc-search-row .btn { grid-column: span 2 !important; }
    .bc-sec-head h3, .bc-flash-head h3 { font-size: 1.1rem !important; }
    .bc-flash-head { gap: 8px !important; }
    .bc-grid { grid-template-columns: repeat(2,1fr) !important; gap: 10px !important; }
    .bc-citygrid { grid-template-columns: repeat(2,1fr) !important; }
    .bc-cta { padding: 22px !important; text-align: center; }
    .bc-scroller > * { flex: 0 0 220px !important; }
    .container, .container-xl { padding-left: 12px !important; padding-right: 12px !important; }
}
@media (max-width: 575px){
    .bc-hero .carousel-item { height: 240px !important; }
    .bc-search-row { grid-template-columns: 1fr !important; }
    .bc-search-row .btn { grid-column: span 1 !important; }
    .bc-grid, .bc-citygrid { grid-template-columns: 1fr !important; }
    .bc-cats { grid-template-columns: repeat(3,1fr) !important; }
    .bc-hero-content h1 { font-size: 1.4rem !important; }
    #header .logo .brand-tag { display: none; }
}

/* Header search */
.bc-hsearch { flex: 1; max-width: 560px; margin: 0 18px; }
.bc-hsearch form { display: flex; border: 2px solid var(--bc-yellow); border-radius: 30px; overflow: hidden; background:#fff; }
.bc-hsearch input { flex: 1; border: none; outline: none; padding: 9px 16px; font-size: .9rem; background:transparent; }
.bc-hsearch button { background: var(--bc-yellow); border: none; color: var(--bc-ink); padding: 0 18px; font-size: 1rem; }
.bc-hsearch button:hover { background: var(--bc-yellow-d); color:#fff; }
@media (max-width: 991px){ .bc-hsearch { display:none; } }

/* Nav links -> accent on hover/active becomes yellow underline */
.navmenu a.active, .navmenu a:hover { color: var(--bc-yellow-d) !important; }
.navmenu a.active::before, .navmenu a.active::after { background: var(--bc-yellow) !important; }

/* ===== Header single-row layout: keep everything fitting, never cut ===== */
@media (min-width: 1200px){
    #header .container-fluid.container-xl { max-width: 1320px; gap: 10px; }
    /* search should give up space first so nav + actions stay intact */
    .bc-hsearch { max-width: 360px; margin: 0 14px; }
    .navmenu { flex-shrink: 1; }
    .navmenu > ul { gap: 2px; }
    .navmenu > ul > li > a { padding: 0 12px; }
    /* right actions must never shrink or wrap -> List button always visible */
    .nav-actions { flex-shrink: 0; flex-wrap: nowrap; }
    .nav-actions .nav-cta { white-space: nowrap; flex-shrink: 0; }
}

/* ===== "More" mega dropdown (Cities / Tools / Pages in 3 columns) ===== */
.nav-more-menu { padding: 14px !important; min-width: 560px; border: 1px solid #eef2f7; border-radius: 14px; box-shadow: 0 14px 34px rgba(15,23,42,.14); }
.nav-more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 18px; }
.nav-more-h { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; padding: 2px 10px 6px; border-bottom: 1px solid #f1f5f9; margin-bottom: 4px; }
.nav-more-h i { color: var(--bc-yellow-d); }
.nav-more-menu .dropdown-item { border-radius: 8px; padding: 7px 10px; font-weight: 500; font-size: .88rem; }
.nav-more-menu .dropdown-item:hover { background: var(--bc-yellow) !important; color: var(--bc-ink) !important; }
.nav-more-menu .dropdown-item i { color: var(--bc-yellow-d); }
/* ===== Mobile nav = clean Bootstrap offcanvas side drawer ===== */
@media (max-width: 1199px){
    /* hide the desktop nav + its overlay completely on mobile (use the drawer instead) */
    #navmenu { display: none !important; }
}
/* hamburger button */
.md-toggle { background: transparent; border: none; color: var(--bc-dark,#2b2b2b); font-size: 28px; line-height: 1; padding: 4px 6px; margin-left: 6px; cursor: pointer; }
.md-toggle:hover { color: var(--bc-yellow-d,#d68f00); }
/* drawer */
.mobile-drawer { width: 300px !important; max-width: 85vw; }
.mobile-drawer .offcanvas-header { border-bottom: 1px solid #eef2f7; padding: 14px 16px; }
.mobile-drawer .offcanvas-body { padding: 8px; }
.md-link { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 10px; color: #0f172a; text-decoration: none; font-weight: 600; font-size: 15px; }
.md-link i { color: var(--bc-yellow,#f5a800); width: 22px; text-align: center; font-size: 1.05rem; }
.md-link:hover, .md-link:active { background: #fff7e6; color: var(--bc-yellow-d,#b45309); }
.md-link:hover i, .md-link:active i { color: var(--bc-yellow-d,#b45309); }
.md-sec { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; padding: 14px 14px 6px; }
/* soft backdrop — NOT a black screen */
.offcanvas-backdrop.show { opacity: .25; }

/* ===== Featured Agents: show the face (was center-cropping the head) ===== */
.featured-agents .agent-photo img { object-position: top center !important; }

/* mobile: clean horizontal compact agent card (app-like) */
@media (max-width: 575px){
    .featured-agents .agent-wrapper { display: flex !important; align-items: stretch; height: auto !important; border-radius: 16px; }
    .featured-agents .agent-photo { width: 116px !important; min-width: 116px; height: auto !important; }
    .featured-agents .agent-photo img { height: 100% !important; }
    .featured-agents .agent-photo .overlay-info { display: none !important; } /* no hover on touch */
    .featured-agents .achievement-badge { font-size: .52rem !important; padding: 3px 7px !important; top: 8px !important; left: 8px !important; right: auto !important; }
    .featured-agents .agent-details { flex: 1; text-align: left !important; padding: 14px 14px 14px 16px !important; display: flex; flex-direction: column; gap: 3px; }
    .featured-agents .agent-details h4 { font-size: 1.02rem !important; margin: 0 !important; }
    .featured-agents .agent-details .position { font-size: .78rem !important; }
    .featured-agents .agent-details .location-info { justify-content: flex-start !important; font-size: .8rem; margin: 2px 0 !important; }
    .featured-agents .agent-details .expertise-tags { justify-content: flex-start !important; gap: 5px; margin: 4px 0 !important; }
    .featured-agents .agent-details .expertise-tags .tag { font-size: .66rem !important; padding: 3px 9px !important; }
    .featured-agents .agent-details .view-profile { align-self: flex-start; margin-top: 8px !important; padding: 8px 16px !important; font-size: .82rem !important; }
}

/* ===== App-like mobile: hide big website footer + floating WhatsApp (now in the menu) ===== */
@media (max-width: 991.98px){
    #footer { display: none !important; }
    .fab-whatsapp { display: none !important; }
}
/* WhatsApp item in drawer = green */
.md-wa i { color: #25d366 !important; }
.md-wa:hover, .md-wa:active { background: #e9fbf0 !important; color: #128c4a !important; }
.md-wa:hover i, .md-wa:active i { color: #128c4a !important; }

/* ===== Consistent form styling across the whole site ===== */
.form-control, .form-select {
    border-radius: 10px;
    border-color: #e2e8f0;
}
.form-control:focus, .form-select:focus {
    border-color: var(--bc-yellow, #f5a800);
    box-shadow: 0 0 0 .2rem rgba(245,168,0,.15);
}
.form-control::placeholder { color: #9aa6b2; }
.form-label { font-weight: 600; }
textarea.form-control { min-height: 96px; }
/* keep inputs from getting oversized inside cards on mobile */
@media (max-width: 575px){
    .form-control, .form-select { font-size: .95rem; }
}
/* Sign-in button label always visible (was icon-only on mobile -> looked like logout) */
.nav-signin span { display: inline !important; }

/* Right action pills */
.nav-pref-btn { border-radius: 30px; }
.nav-cta.btn-primary { border-radius: 30px; }

/* dropdown active text */
.dropdown-item.text-primary, .text-primary { color: var(--bc-dark) !important; }
.dropdown-item.fw-bold.text-primary { color: var(--bc-yellow-d) !important; }

/* Links accent across pages */
a.bc-more, .bc-more { color: var(--bc-yellow-d) !important; }

/* ================= MOBILE SEARCH (under header) ================= */
.bc-msearch { display:none; }
@media (max-width: 991px){
    .bc-msearch { display:block; background:#fff; padding:8px 12px; border-bottom:1px solid #eee; }
    .bc-msearch form { display:flex; border:2px solid var(--bc-yellow); border-radius:30px; overflow:hidden; }
    .bc-msearch input { flex:1; border:none; outline:none; padding:9px 14px; font-size:.9rem; }
    .bc-msearch button { background:var(--bc-yellow); border:none; color:var(--bc-ink); padding:0 16px; }
}

/* ================= MOBILE TABBAR center -> orange/yellow ================= */
.mtab-fab {
    background: linear-gradient(135deg, var(--bc-yellow), #ff8c00) !important;
    box-shadow: 0 6px 16px rgba(245,168,0,.5) !important;
}
.mtab-center-lbl { color: var(--bc-yellow-d) !important; }
.mtab.active { color: var(--bc-yellow-d) !important; }

/* ================= SECTION ACCENTS ================= */
.bc-cat-ic { /* keep colorful */ }
.bc-city { background: linear-gradient(135deg, var(--bc-teal), #0d9488) !important; }

/* Hero text must stay white over the photo, with yellow kicker */
.bc-hero-content h1, .bc-hero-content p { color: #fff !important; }
.bc-hero-kicker { background: var(--bc-yellow) !important; color: var(--bc-ink) !important; }

/* ===== Section heading colors (fix blue -> dark) ===== */
.bc-sec-head h3, .bc-flash-head h3 { color: #0f172a !important; }

/* ===== Flash deal section ===== */
.bc-flash { margin-top: 36px; }
.bc-flash-head { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-bottom:16px; }
.bc-flash-head h3 { font-weight:800; font-size:1.3rem; margin:0; display:flex; align-items:center; gap:6px; }
.bc-flash-head h3 i { color: var(--bc-yellow); }
.bc-count { display:flex; gap:6px; align-items:center; }
.bc-count .box { background: var(--bc-yellow); color: var(--bc-ink); font-weight:800; border-radius:8px; padding:5px 9px; font-size:.95rem; min-width:42px; text-align:center; }
.bc-count .sep { font-weight:800; color:#94a3b8; }
.bc-count-lbl { color:#64748b; font-size:.85rem; }

/* ================= REMOVE TEMPLATE'S BIG SECTION PADDING ================= */
/* main.css gives every <section> large vertical padding -> huge gaps.
   Neutralize it for the home marketplace sections; spacing is via margins. */
section.bc-hero, section.bc-cats, section.bc-sec, section.bc-flash {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
.bc-cats { margin-top: 26px; }
.bc-sec { margin-top: 34px; }
.bc-flash { margin-top: 30px; }

/* ================= MOBILE LAYOUT FIXES ================= */
html, body { overflow-x: hidden; max-width: 100%; }
@media (max-width: 991px){
    /* tighter spacing so sections don't leave big gaps */
    .bc-cats { margin-top: 22px !important; gap: 10px !important; }
    .bc-sec, .bc-flash { margin-top: 26px !important; }
    .container { padding-left: 14px; padding-right: 14px; }
    /* leave room for the fixed bottom tabbar */
    body { padding-bottom: 72px !important; }
    /* scroll-top button should sit above the tabbar, not overlap cards */
    .scroll-top, #scroll-top { bottom: 86px !important; right: 14px !important; }
    .fab-whatsapp { bottom: 86px !important; }
}
/* Tabbar: make sure all 5 items fit and center fab stays centered */
.mobile-tabbar { padding-left: 2px; padding-right: 2px; }
.mobile-tabbar .mtab { min-width: 0; }
.mobile-tabbar .mtab span { white-space: nowrap; }

/* ================= REPLACE BLUE WITH YELLOW EVERYWHERE ================= */
/* Buy/Rent + search tabs: selected = yellow + dark text */
.bc-tab:has(input:checked), .bc-tab.active {
    background: var(--bc-yellow) !important;
    color: var(--bc-ink) !important;
}
/* Hero blank fallback should not be a blue blob */
.bc-hero .carousel-item { background-color: var(--bc-dark) !important; }
/* Banner-only slides: clean image, slightly darker fallback */
.bc-hero .carousel-item.bc-banner { background-color: #111 !important; }
/* CTA banner: charcoal instead of blue */
.bc-cta { background: linear-gradient(135deg, #2b2b2b, #1f2937) !important; }
/* Section heading icons -> yellow accent */
.bc-sec-head h3 i.text-primary, .bc-flash-head h3 i { color: var(--bc-yellow) !important; }
/* Property card price -> dark, View Details stays yellow (already) */
.pcard-price { color: var(--bc-dark) !important; }
/* Dashboard primary blue icon tint -> warm */
.di-blue { background: #fff7e6 !important; color: var(--bc-yellow-d) !important; }
/* Nav active link underline color */
.navmenu a.active { color: var(--bc-yellow-d) !important; }

/* ================= SMOOTHER SCROLL + THIN SCROLLBAR ================= */
html { scroll-behavior: smooth; }
* { scrollbar-width: thin; scrollbar-color: var(--bc-yellow) #f1f1f1; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--bc-yellow-d); }
.pcard-price, .opp-price { color: var(--bc-dark) !important; }
.section-title h2 span, .text-primary { color: var(--bc-dark); }
