/* === GLOBAL STYLES (Final Polish) === */
/* === GLOBAL LAYOUT UTILITIES === */

/* 1. CONTAINER (Centralized Fix) */
.container-custom {
    max-width: 1140px; 
    margin: 0 auto; 
    padding: 0 20px; /* Prevents edge touching on ALL pages */
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* 2. TEXT UTILITIES */
.text-center { text-align: center; }
.mb-60 { margin-bottom: 60px; }

/* ... (Keep your existing Font/Header styles below this) ... */
.razorpay-container {
    z-index: 2147483647 !important; /* Max Z-Index possible */
}
/* 3. LOCAL FONTS */
@font-face { font-family: 'Playfair Display'; src: url('../fonts/playfair-display-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('../fonts/playfair-display-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('../fonts/playfair-display-bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('../fonts/playfair-display-black.woff2') format('woff2'); font-weight: 900; font-style: normal; font-display: swap; }

@font-face { font-family: 'Inter'; src: url('../fonts/Inter-Light.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/Inter-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/Inter-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/Inter-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/Inter-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

/* 4. VARIABLES */
:root {
    --primary: #1a4d2e; /* Deep Green */
    --gold: #EBC06D;    /* Button Gold */
    --cream: #F3EFE8;   /* Lifestyle Section Bg */
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --white: #ffffff;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}
/* Update the body/html rule at top */
html, body {
    overflow-x: hidden; /* Stops side scrolling */
    width: 100%;
    margin: 0; 
    padding: 0;
}
/* ... rest of global css ... */
body {
    font-family: var(--font-body);
    color: var(--text-dark);
    margin: 0; padding: 0;
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); color: var(--primary); }

/* === 3. HEADER STYLES (Updated) === */

/* Base Header (Shared) */
.site-header {
    position: absolute; top: 0; left: 0; width: 100%;
    z-index: 10000; padding: 25px 0; transition: background 0.3s;
}

/* STATE 1: Transparent (Homepage) */
.site-header-transparent {
    background: transparent;
}

/* STATE 2: Solid Green (Inner Pages) */
.site-header-solid {
    background-color: var(--primary); /* Deep Green */
    position: relative; /* Pushes content down so it's not hidden */
}
.header-container {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    display: flex; justify-content: space-between; align-items: center;
}

.site-logo {
    display: flex; align-items: center; gap: 10px; text-decoration: none;
    color: var(--white); font-family: var(--font-heading);
    font-weight: 700; font-size: 1.4rem;
}

.desktop-nav { display: flex; align-items: center; }
.main-menu { display: flex; gap: 35px; list-style: none; margin: 0; padding: 0; }

.main-menu a {
    color: rgba(255,255,255,0.9); text-decoration: none; font-size: 0.9rem; font-weight: 500;
    padding-bottom: 5px; position: relative;
    transition: color 0.3s;
}

/* Header Underline Animation */
.main-menu a::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: 0; left: 50%;
    background-color: var(--gold);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.main-menu a:hover { color: var(--gold); }
.main-menu a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 25px; }
.link-login { color: var(--white); text-decoration: none; font-weight: 600; font-size: 0.9rem; transition: color 0.3s; }
.link-login:hover { color: var(--gold); }

.btn-header-gold {
    background: var(--gold); color: var(--primary);
    padding: 12px 28px; border-radius: 4px;
    text-decoration: none; font-weight: 600; font-size: 0.9rem;
    transition: 0.2s;
}
.btn-header-gold:hover { transform: translateY(-2px); background: #dcb365; }

/* 4. MOBILE DRAWER */
.mobile-toggle { display: none; background: transparent !important; border: none; cursor: pointer; }
.hamburger-icon { width: 24px; height: 2px; background: white; position: relative; }
.hamburger-icon::before, .hamburger-icon::after {
    content: ''; position: absolute; width: 24px; height: 2px; background: white; left: 0;
}
.hamburger-icon::before { top: -8px; }
.hamburger-icon::after { top: 8px; }

.mobile-drawer {
    position: fixed; top: 0; right: 0; width: 100%; max-width: 300px; height: 100vh;
    background: white; z-index: 9999; transform: translateX(100%); transition: 0.4s ease;
    padding: 30px; display: flex; flex-direction: column;
}
.mobile-drawer.is-open { transform: translateX(0); }
.mobile-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5);
    z-index: 9998; opacity: 0; pointer-events: none; transition: 0.3s;
}
.mobile-backdrop.is-active { opacity: 1; pointer-events: auto; }

.drawer-header { text-align: right; margin-bottom: 20px; }
.drawer-close { background: transparent !important; border: none; font-size: 2.5rem; cursor: pointer; color: var(--text-gray); }
.drawer-close:hover { color: var(--primary); transform: rotate(90deg); }

.mobile-menu-list { list-style: none; padding: 0; margin: 0; }
.mobile-menu-list a { display: block; padding: 15px 0; color: var(--text-dark); text-decoration: none; font-weight: 600; border-bottom: 1px solid #eee; }
.full-width { display: block; text-align: center; width: 100%; margin-top: 20px; }
.link-login-mobile { display: block; text-align: center; margin-top: 15px; color: var(--primary); font-weight: 700; text-decoration: none; }

.mobile-drawer .link-login {
    color: var(--primary); /* Deep Green instead of White */
    font-weight: 700;
}

.mobile-drawer .link-login:hover {
    color: var(--gold); /* Gold on hover */
    text-decoration: underline;
}
@media (max-width: 900px) {
    .desktop-nav, .header-actions { display: none; }
    .mobile-toggle { display: block; }
}
/* --- GLOBAL COMPONENTS --- */
/* Gold Action Button */
.btn-premium {
    background-color: var(--accent);
    color: var(--text-dark);
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-premium:hover {
    background-color: #d4b15b;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-available { background: #d1fae5; color: #065f46; }
.badge-sold { background: #fee2e2; color: #991b1b; }

/* --- GLOBAL CARDS --- */
.plot-card-premium {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.plot-card-premium:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.plot-image-thumb {
    height: 180px; width: 100%; object-fit: cover;
    border-radius: 12px; margin-bottom: 16px;
}

/* --- LAYOUT UTILITIES --- */
.split-layout { display: grid; grid-template-columns: 1fr 1fr; height: calc(100vh - 80px); overflow: hidden; }
.split-map { background: #e5e7eb; position: relative; overflow: hidden; }
.split-list { overflow-y: auto; padding: 40px; background: #f9fafb; }

.dash-premium-layout { display: flex; min-height: 100vh; }
.dash-sidebar-premium { width: 280px; background: var(--primary); color: white; padding: 40px 20px; display: flex; flex-direction: column; }

.dash-link {
    color: rgba(255,255,255,0.7); padding: 16px; border-radius: 12px;
    margin-bottom: 8px; text-decoration: none; font-weight: 500;
    transition: 0.2s; display: flex; align-items: center; gap: 12px;
}
.dash-link:hover, .dash-link.active { background: rgba(255,255,255,0.1); color: white; }
.dash-main-premium { flex: 1; background: #f3f4f6; padding: 40px; overflow-y: auto; }

/* --- RESPONSIVE HELPERS --- */
@media (max-width: 768px) {
    .split-layout { grid-template-columns: 1fr; height: auto; }
    .split-map { height: 300px; }
    .dash-premium-layout { flex-direction: column; }
    .dash-sidebar-premium { width: 100%; padding: 20px; }
    h1 { font-size: 2.5rem !important; }
}

@media (max-width: 900px) {
    .plot-card-premium { padding: 20px !important; }
}

/* --- GLOBAL POPUP STYLES --- */
.custom-popup-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.custom-popup-content {
    background: white; padding: 40px; width: 90%; max-width: 500px;
    border-radius: 12px; position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3); animation: popupFadeIn 0.3s ease-out;
}
@keyframes popupFadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.custom-popup-close {
    position: absolute; top: 15px; right: 20px; font-size: 28px;
    font-weight: bold; color: #999; cursor: pointer; transition: color 0.2s;
}
.custom-popup-close:hover { color: #333; }
.popup-header { text-align: center; margin-bottom: 20px; }
.popup-header h3 { color: var(--primary); margin: 0 0 10px; }
.privacy-note { font-size: 0.8rem; color: #999; text-align: center; margin-top: 15px; }
/* === NEW HEADER DROPDOWN STYLES (Add to Bottom) === */

/* 1. The Container */
.al-user-dropdown {
    position: relative;
    display: inline-block;
    padding-bottom: 10px; /* Helps keep hover active */
    margin-bottom: -10px; /* Counteracts padding */
}

/* 2. The Trigger Button */
.dropdown-trigger {
    display: flex;
    align-items: center;
    cursor: pointer;
    border: none;
    font-family: inherit;
    /* Inherits btn-header-gold styles */
}

/* 3. The Menu Box */
.al-dropdown-menu {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%;
    right: 0;
    width: 240px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    padding: 8px 0;
    z-index: 9999;
    margin-top: 5px;
    border: 1px solid #f1f5f9;
    text-align: left; /* Ensure text aligns left */
}

/* CRITICAL FIX: Invisible bridge to prevent menu closing on mouse move */
.al-dropdown-menu::before {
    content: "";
    position: absolute;
    top: -20px; /* Extends hit area upwards to touch button */
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

/* 4. Show on Hover */
.al-user-dropdown:hover .al-dropdown-menu {
    display: block;
    animation: alFadeIn 0.2s ease-out;
}

/* 5. Menu Items */
.al-dd-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #1f2937; /* Dark Charcoal */
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
    line-height: 1.2;
}

.al-dd-item:hover {
    background: #f8fafc;
    color: #1a4d2e; /* Primary Green */
    padding-left: 25px; /* Slide effect */
}

.dd-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* 6. Divider & Logout */
.al-dd-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 4px 0;
}

.al-dd-item.logout {
    color: #ef4444; /* Red */
}
.al-dd-item.logout:hover {
    background: #fef2f2;
}

/* 7. Animation */
@keyframes alFadeIn { 
    from { opacity: 0; transform: translateY(10px); } 
    to { opacity: 1; transform: translateY(0); } 
}
/* === CRITICAL Z-INDEX FIXES (Updated) === */

/* 1. Dashboard Mobile Sidebar (Highest priority) */
.dash-sidebar {
    z-index: 2147483647 !important; /* Max possible Z-Index */
}

/* 2. Global Mobile Menu Drawer */
#mobile-drawer {
    z-index: 2147483647 !important;
}

/* 3. The Dark Overlay (Must be lower than sidebar) */
.dash-overlay,
.mobile-backdrop {
    z-index: 2147483640 !important;
}

/* 4. The Header (FIXED) */
/* Must be higher than Farm Map (9999) but lower than Overlays */
.site-header,
.site-header-inner {
    z-index: 12000 !important; 
}