/* ---- Layout ---- */
.branch-hero {
    background: #FDFBF7; /* Light background */
    padding: 64px 40px 48px;
    position: relative;
    overflow: hidden;
    margin-top: 104px; /* Space between navbar and hero */
    border-bottom: 0.5px solid #e2ddd5;
    border-radius: 24px;
    margin-left: 20px;
    margin-right: 20px;
}
.branch-hero h1 { font-size: 32px; font-weight: 600; color: #1C1C1E; margin-bottom: 12px; font-family: 'Playfair Display', serif; }
.branch-hero p  { color: #666; font-size: 15px; line-height: 1.6; max-width: 600px; margin-bottom: 0; }

/* Animated Shapes */
.hero-shape {
    position: absolute;
    z-index: 0;
    opacity: 0.6;
    animation: floatShape 8s ease-in-out infinite;
}
.hero-shape-1 { top: -20px; right: 10%; width: 120px; height: 120px; background: rgba(184,135,42,0.1); border-radius: 50%; }
.hero-shape-2 { bottom: -40px; right: 25%; width: 200px; height: 200px; background: rgba(184,135,42,0.05); border-radius: 50%; animation-delay: -3s; }
.hero-shape-3 { top: 40px; right: -20px; width: 80px; height: 80px; background: rgba(28,28,30,0.03); border-radius: 50%; animation-delay: -5s; }

@keyframes floatShape {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Adjust tag for light mode */
.hero-tag {
    display: inline-flex; align-items: center; gap: 6px;
    background: #F5EDD6;
    border: 0.5px solid #D4A843;
    border-radius: 100px; padding: 4px 12px;
    font-size: 12px; color: #7A5A18; margin-bottom: 16px;
}

/* Search bar row */
.search-bar { display: flex; gap: 10px; margin-top: 32px; flex-wrap: wrap; align-items: center; }
.search-bar input,
.search-bar select {
    background: #fff;
    border: 1px solid #e2ddd5;
    border-radius: 12px; padding: 14px 20px;
    color: #1C1C1E; font-size: 14px; flex: 1; min-width: 160px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}
.search-bar input::placeholder { color: #999; }
.search-bar input:focus,
.search-bar select:focus { border-color: #B8872A; outline: none; box-shadow: 0 0 0 3px rgba(184,135,42,0.1); }
.search-bar select option { color: #1C1C1E; }

#use-location-btn {
    background: #B8872A; color: #fff; border: none;
    border-radius: 12px; padding: 14px 24px;
    font-size: 14px; font-weight: 500; cursor: pointer;
    white-space: nowrap;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    transition: background 0.2s;
}
#use-location-btn:hover { background: #9A7022; }

/* Stats in hero */
.hero-stats {
    display: flex; gap: 40px; margin-top: 32px;
}
.hero-stat {
    display: flex; flex-direction: column;
}
.hero-stat span { font-size: 28px; font-weight: 600; color: #1C1C1E; line-height: 1; margin-bottom: 4px; }
.hero-stat small { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; }

/* ---- Body ---- */
.locator-body {
    display: grid;
    grid-template-columns: 340px 1fr;
    position: relative;
    height: calc(100vh - 420px);
    min-height: 500px;
    margin: 20px;
    border-radius: 24px;
    overflow: hidden;
    border: 0.5px solid #e2ddd5;
    box-shadow: 0 8px 32px rgba(0,0,0,0.04);
}

/* ---- Sidebar ---- */
.branch-sidebar {
    display: flex; flex-direction: column;
    border-right: 0.5px solid #e2ddd5;
    background: #fff; overflow: hidden;
}
.sidebar-header { padding: 20px 20px 12px; border-bottom: 0.5px solid #e2ddd5; }
.sidebar-header p:first-child { font-size: 12px; color: #888; margin-bottom: 0; }
#sidebar-count { font-size: 15px; font-weight: 500; margin-bottom: 0; }

/* Filter chips */
.filter-chips { display: flex; gap: 6px; padding: 14px 20px; flex-wrap: wrap; border-bottom: 0.5px solid #e2ddd5; }
.chip {
    padding: 5px 12px; border-radius: 100px;
    font-size: 12px; border: 0.5px solid #ddd;
    background: #f5f5f5; color: #666; cursor: pointer;
}
.chip.active { background: #F5EDD6; border-color: #D4A843; color: #7A5A18; }

/* Branch list */
.branch-list { overflow-y: auto; flex: 1; }
.branch-card { padding: 16px 20px; border-bottom: 0.5px solid #f0ece4; cursor: pointer; transition: background .15s; }
.branch-card:hover { background: #fafaf8; }
.branch-card.selected { background: #FEFBF3; border-left: 2px solid #B8872A; }
.branch-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.branch-name { font-size: 14px; font-weight: 500; }
.distance-badge {
    font-size: 11px; color: #7A5A18;
    background: #F5EDD6; border: 0.5px solid #D4A843;
    border-radius: 100px; padding: 2px 8px; white-space: nowrap;
}
.province-badge { font-size: 11px; color: #888; background: #f5f5f5; border: 0.5px solid #ddd; border-radius: 100px; padding: 2px 8px; }
.branch-province { font-size: 11px; color: #999; margin-top: 3px; margin-bottom: 0; }
.branch-addr, .branch-phone { font-size: 12px; color: #777; margin-top: 5px; line-height: 1.4; margin-bottom: 0; }
.branch-hours { display: flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 11px; color: #999; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.status-dot.open { background: #3B6D11; }
.status-dot.closed { background: #A32D2D; }

/* ---- Map ---- */
.map-area { position: relative; z-index: 1; }
#map { width: 100%; height: 100%; min-height: 500px; z-index: 1; }

/* ---- Overlay Card ---- */
.map-overlay-card {
    position: absolute; top: 24px; right: 24px; z-index: 999;
    background: #fff; border: 0.5px solid #e2ddd5;
    border-radius: 12px; padding: 16px 20px; width: 240px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.overlay-label { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.overlay-name { font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.overlay-addr, .overlay-phone { font-size: 12px; color: #777; line-height: 1.5; margin-bottom: 4px; }
.btn-directions {
    display: block; width: 100%; text-align: center;
    background: #1C1C1E; color: #fff; text-decoration: none;
    border-radius: 8px; padding: 9px; font-size: 13px; margin-top: 12px;
}
.btn-directions:hover { background: #333; }

/* No results */
.no-results { padding: 32px 20px; text-align: center; color: #999; font-size: 13px; line-height: 1.6; }

/* ---- Custom Toast ---- */
.custom-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1C1C1E;
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 1000;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    visibility: hidden;
}
.custom-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}
.toast-content { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.toast-icon { color: #D4A843; flex-shrink: 0; }
.toast-close { background: none; border: none; color: rgba(255,255,255,0.5); font-size: 18px; cursor: pointer; padding: 0 4px; display: flex; align-items: center; }
.toast-close:hover { color: #fff; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .locator-body { grid-template-columns: 1fr; grid-template-rows: 50vh auto; height: auto; }
    .branch-sidebar { order: 2; height: 50vh; }
    #map { height: 50vh; order: 1; }
    .map-overlay-card { display: none !important; }
    .search-bar { flex-direction: column; align-items: stretch; }
    .hero-stats { flex-direction: column; gap: 16px; }
}
