/* Seafood Market Direct — Design System */

/* ── COLOR TOKENS ─────────────────────────────────────────────────────────── */
:root {
    --deep-ocean:  #6B2A2A;   /* deep wine/burgundy */
    --atlantic:    #B5392A;   /* warm crimson */
    --seafoam:     #D5877A;   /* muted salmon */
    --coral:       #C8920A;   /* warm honey gold — accent */
    --coral-dark:  #A87508;   /* burnished gold — hover states */
    --coral-light: #F0C96A;   /* soft golden tint — backgrounds */
    --pearl:       #FAF7F6;   /* warm off-white */
    --charcoal:    #4a4a4a;
    --light-gray:  #EAE5E5;   /* warm light gray */

    /* legacy aliases for any older template code */
    --navy:        var(--deep-ocean);
    --ocean:       var(--atlantic);

    /* layout measurements */
    --navbar-h:    57px;   /* sticky navbar rendered height */
    --live-bar-h:  28px;   /* map page live indicator bar */

    /* mobile bottom sheet */
    --sheet-peek:  45vh;
    --sheet-full:  91vh;
}

/* ── BASE ─────────────────────────────────────────────────────────────────── */
body {
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--charcoal);
    background-color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ── NAVBAR ───────────────────────────────────────────────────────────────── */
.navbar {
    background: rgba(255,255,255,0.97) !important;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--light-gray);
    box-shadow: 0 2px 8px rgba(107,42,42,0.08);
    position: sticky;
    top: 0;
    z-index: 1030;
    min-height: var(--navbar-h);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.navbar-brand img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}
.navbar-brand .brand-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--deep-ocean);
    letter-spacing: -0.01em;
}
.navbar-brand .brand-suffix {
    font-size: 1.15rem;
    font-weight: 300;
    color: var(--atlantic);
}
.navbar .nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--charcoal) !important;
    padding: 6px 14px !important;
    border-radius: 8px;
    transition: all 0.15s;
}
.navbar .nav-link:hover {
    background: var(--pearl);
    color: var(--deep-ocean) !important;
}
.navbar .nav-link.active {
    background: rgba(181,57,42,0.1);
    color: var(--atlantic) !important;
}
.bg-navy { background-color: var(--deep-ocean) !important; }

/* ── FOOTER ───────────────────────────────────────────────────────────────── */
.footer {
    background-color: var(--deep-ocean);
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    flex-shrink: 0;
}
.footer a { color: var(--seafoam); text-decoration: none; }
.footer a:hover { color: #fff; }

/* ── CARD UTILITY ─────────────────────────────────────────────────────────── */
.bmc-card {
    background: #fff;
    border: 1px solid var(--light-gray);
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(107,42,42,0.08);
    transition: box-shadow 0.2s;
}
.bmc-card:hover {
    box-shadow: 0 4px 16px rgba(107,42,42,0.12);
}

/* ── BUTTONS ──────────────────────────────────────────────────────────────── */
.btn-primary, .btn-primary:focus {
    background-color: var(--atlantic) !important;
    border-color: var(--atlantic) !important;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(107,42,42,0.08);
}
.btn-primary:hover {
    background-color: var(--deep-ocean) !important;
    border-color: var(--deep-ocean) !important;
    box-shadow: 0 4px 16px rgba(107,42,42,0.18);
}
.btn-outline-primary {
    border-color: var(--atlantic) !important;
    color: var(--atlantic) !important;
    font-weight: 600;
    border-radius: 8px;
}
.btn-outline-primary:hover,
.btn-check:checked + .btn-outline-primary {
    background-color: var(--atlantic) !important;
    color: #fff !important;
}
.btn-warning, .btn-warning:focus {
    background-color: var(--coral) !important;
    border-color: var(--coral) !important;
    color: #fff !important;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
}
.btn-warning:hover {
    background-color: var(--coral-dark) !important;
    border-color: var(--coral-dark) !important;
    box-shadow: 0 4px 16px rgba(192,122,46,0.3);
}
.btn-outline-secondary {
    border-color: var(--light-gray) !important;
    color: var(--charcoal) !important;
    border-radius: 8px;
    font-weight: 500;
}
.btn-outline-secondary:hover {
    background-color: var(--pearl) !important;
    border-color: rgba(181,57,42,0.4) !important;
    color: var(--deep-ocean) !important;
}

/* ── FORM CONTROLS ────────────────────────────────────────────────────────── */
.form-control, .form-select {
    border-color: var(--light-gray);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--charcoal);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--atlantic);
    box-shadow: 0 0 0 3px rgba(181,57,42,0.15);
    outline: none;
}

/* ── BADGES ───────────────────────────────────────────────────────────────── */
.badge-market     { background-color: var(--atlantic); color: #fff; }
.badge-restaurant { background-color: var(--coral); color: #fff; }
.badge-wholesale  { background-color: var(--deep-ocean); color: #fff; }
.badge-dock       { background-color: #5c8fa3; color: #fff; }
.badge-processor  { background-color: #6c757d; color: #fff; }

/* ── SECTION TITLES ───────────────────────────────────────────────────────── */
.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--deep-ocean);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}
.section-subtitle {
    font-size: 1.05rem;
    color: rgba(74,74,74,0.7);
    margin-bottom: 2rem;
    max-width: 42rem;
}

/* ── HERO ─────────────────────────────────────────────────────────────────── */
.bmc-hero {
    background: linear-gradient(135deg, var(--deep-ocean) 0%, var(--atlantic) 60%, var(--deep-ocean) 100%);
    position: relative;
    overflow: hidden;
}
.bmc-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 40%, rgba(127,179,213,0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 70%, rgba(248,249,250,0.08) 0%, transparent 40%);
    pointer-events: none;
}

/* ── STAT CARDS ───────────────────────────────────────────────────────────── */
.stat-card {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 1.1rem 1.5rem;
    text-align: center;
    color: #fff;
    backdrop-filter: blur(4px);
}
.stat-card .stat-num  { font-size: 2.25rem; font-weight: 800; line-height: 1; }
.stat-card .stat-lbl  { font-size: 0.8rem; opacity: 0.7; margin-top: 4px; }

/* ── LIVE BADGE ───────────────────────────────────────────────────────────── */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 20px;
    border-radius: 99px;
    background: rgba(200,146,10,0.12);
    border: 1.5px solid rgba(200,146,10,0.45);
    color: #C8920A;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
    box-shadow: 0 0 18px rgba(200,146,10,0.22), inset 0 0 12px rgba(200,146,10,0.06);
    animation: badge-glow 3s ease-in-out infinite;
}
.live-badge .live-word {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #E8B830;
}
.live-badge .live-text {
    color: rgba(255,255,255,0.75);
    font-weight: 500;
}
@keyframes badge-glow {
    0%, 100% { box-shadow: 0 0 14px rgba(200,146,10,0.2), inset 0 0 10px rgba(200,146,10,0.04); }
    50%       { box-shadow: 0 0 28px rgba(200,146,10,0.38), inset 0 0 16px rgba(200,146,10,0.08); }
}
.live-dot {
    width: 8px; height: 8px;
    background: #C8920A;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 0 6px #C8920A;
}
.live-dot::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 1.5px solid #C8920A;
    animation: sonar 2s ease-out infinite;
}
@keyframes sonar {
    0%   { transform: scale(0.6); opacity: 0.9; }
    100% { transform: scale(2.4); opacity: 0; }
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.6; transform: scale(0.85); }
}

/* ── LANDING PAGE — MOBILE ────────────────────────────────────────────────── */
@media (max-width: 575px) {
    .bmc-hero { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }

    /* Headline block */
    .hero-headline-block { margin-bottom: 1.75rem !important; }

    /* CTA cards — tighter padding on small phones */
    .hero-cta-card { padding: 1.25rem !important; }
    .hero-cta-card h3 { font-size: 1.15rem !important; }
    .hero-cta-card .hero-cta-icon {
        width: 42px !important; height: 42px !important;
    }
    .hero-cta-card .hero-cta-icon i { font-size: 1.2rem !important; }
    .hero-cta-card .hero-cta-list li { font-size: 0.83rem !important; }

    /* Stats row */
    .stat-card { padding: 0.7rem 0.5rem; }
    .stat-card .stat-num { font-size: 1.5rem; }
    .stat-card .stat-lbl { font-size: 0.7rem; }

    /* Below-hero sections */
    .section-title  { font-size: 1.35rem; }
    .section-subtitle { font-size: 0.9rem; }

    /* Features grid — 2-up on small phones */
    .features-grid .col-md-6 { flex: 0 0 100%; max-width: 100%; }

    /* "How it works" — stack tighter */
    .how-step-icon { width: 52px; height: 52px; font-size: 1.4rem; }
}

/* ── HOW IT WORKS STEPS ───────────────────────────────────────────────────── */
.how-step-icon {
    width: 64px; height: 64px;
    background: rgba(181,57,42,0.1);
    border: 1px solid rgba(181,57,42,0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.25rem;
    box-shadow: 0 2px 8px rgba(107,42,42,0.08);
}
.how-step-num {
    position: absolute;
    top: 0; right: 1rem;
    font-size: 4rem;
    font-weight: 900;
    color: var(--light-gray);
    line-height: 1;
    user-select: none;
    z-index: 0;
}

/* ── FLASH MESSAGES ───────────────────────────────────────────────────────── */
.flash-messages { flex-shrink: 0; }

/* ── MAP PAGE ─────────────────────────────────────────────────────────────── */
:root {
    --topbar-h: 52px;
}
.map-page-body {
    overflow: hidden;
    display: block;
}
.map-page-body .footer { display: none; }

/* ── TOP FILTER BAR ───────────────────────────────────────────────────────── */
#map-topbar {
    position: sticky;
    top: var(--navbar-h);
    z-index: 600;
    background: #fff;
    border-bottom: 1px solid var(--light-gray);
    box-shadow: 0 2px 8px rgba(107,42,42,0.07);
    height: var(--topbar-h);
    display: flex;
    align-items: center;
}
#topbar-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}
#topbar-inner::-webkit-scrollbar { display: none; }

.topbar-search-wrap {
    position: relative;
    flex-shrink: 0;
    min-width: 180px;
    max-width: 240px;
    flex: 1;
}
.topbar-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(74,74,74,0.45);
    font-size: 0.8rem;
    pointer-events: none;
}
.topbar-input {
    width: 100%;
    height: 34px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    padding: 0 10px 0 30px;
    font-size: 0.82rem;
    font-family: inherit;
    color: var(--charcoal);
    background: var(--pearl);
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}
.topbar-input:focus {
    border-color: var(--atlantic);
    box-shadow: 0 0 0 3px rgba(181,57,42,0.12);
    background: #fff;
}
.topbar-price {
    min-width: 80px;
    max-width: 100px;
    padding-left: 10px;
}

#topbar-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.topbar-select {
    height: 34px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    padding: 0 26px 0 10px;
    font-size: 0.82rem;
    font-family: inherit;
    color: var(--charcoal);
    background: var(--pearl);
    cursor: pointer;
    white-space: nowrap;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%234a4a4a' opacity='.4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: border-color 0.15s;
    min-width: 100px;
}
.topbar-select:focus {
    border-color: var(--atlantic);
    box-shadow: 0 0 0 3px rgba(181,57,42,0.12);
    background-color: #fff;
}
.topbar-select.active-filter {
    border-color: var(--atlantic);
    background-color: rgba(181,57,42,0.06);
    color: var(--atlantic);
    font-weight: 600;
}

/* When topbar-select is a <button> (Bootstrap dropdown toggle) */
button.topbar-select {
    display: flex;
    align-items: center;
    text-align: left;
}
button.topbar-select::after {
    display: none; /* hide Bootstrap's default dropdown chevron; SVG bg-image is used instead */
}
button.topbar-select:hover,
button.topbar-select:active,
button.topbar-select.show {
    background-color: rgba(181,57,42,0.04);
    border-color: var(--atlantic);
    color: var(--charcoal);
}
button.topbar-select:focus-visible {
    outline: none;
    border-color: var(--atlantic);
    box-shadow: 0 0 0 3px rgba(181,57,42,0.12);
}
/* Dropdown menus opened from topbar — appear above map */
.topbar-dropdown-menu {
    z-index: 1200;
    font-size: 0.82rem;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(107,42,42,0.12);
    padding: 4px 0;
}
.topbar-dropdown-menu .dropdown-item {
    padding: 6px 14px;
    color: var(--charcoal);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.82rem;
}
.topbar-dropdown-menu .dropdown-item:hover,
.topbar-dropdown-menu .dropdown-item:focus {
    background-color: rgba(181,57,42,0.07);
    color: var(--deep-ocean);
}

#topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}
.topbar-btn {
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--light-gray);
    padding: 0 12px;
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    font-weight: 500;
    transition: all 0.15s;
}
.topbar-btn-locate {
    background: rgba(181,57,42,0.08);
    border-color: rgba(181,57,42,0.25);
    color: var(--atlantic);
}
.topbar-btn-locate:hover {
    background: rgba(181,57,42,0.15);
    border-color: var(--atlantic);
}
.topbar-btn-locate.locating {
    opacity: 0.7;
    pointer-events: none;
}
.topbar-btn-clear {
    background: rgba(192,122,46,0.08);
    border-color: rgba(192,122,46,0.3);
    color: var(--coral);
}
.topbar-btn-clear:hover {
    background: rgba(192,122,46,0.15);
}

/* ── MAP BODY LAYOUT ──────────────────────────────────────────────────────── */
#map-page {
    display: flex;
    height: calc(100vh - var(--navbar-h) - var(--topbar-h) - var(--live-bar-h));
}

/* ── LEFT PANEL ───────────────────────────────────────────────────────────── */
#left-panel {
    width: 340px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid var(--light-gray);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* List view */
#panel-list {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.28s cubic-bezier(.4,0,.2,1), opacity 0.2s;
}
#panel-list.slide-out {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
#list-header {
    padding: 8px 14px;
    border-bottom: 1px solid var(--light-gray);
    background: var(--pearl);
    flex-shrink: 0;
}
#business-list { flex: 1; overflow-y: auto; }

/* Business list cards */
.biz-card {
    padding: 11px 14px;
    border-bottom: 1px solid var(--light-gray);
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.12s;
}
.biz-card:hover { border-left-color: var(--atlantic); background: rgba(181,57,42,0.03); }
.biz-card.active { border-left-color: var(--deep-ocean); background: rgba(107,42,42,0.05); }
.biz-card.featured { background: #fffbf0; border-left-color: #e8c84a; }
.biz-card.featured:hover { background: #fff7e0; border-left-color: #d4a017; }
.biz-card .biz-name {
    font-weight: 600; font-size: 0.875rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    color: var(--deep-ocean);
}
.biz-card .biz-meta { font-size: 0.75rem; color: rgba(74,74,74,0.6); margin-top: 1px; }
.biz-card .biz-dist { font-size: 0.72rem; color: var(--atlantic); font-weight: 600; margin-top: 3px; }
.biz-card .biz-price {
    font-size: 0.72rem; color: var(--charcoal); opacity: 0.55; margin-top: 1px;
}

/* Detail view */
#panel-detail {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}
#panel-detail.visible {
    transform: translateX(0);
}
#panel-detail.hidden {
    transform: translateX(100%);
}
#detail-header {
    padding: 10px 14px;
    border-bottom: 1px solid var(--light-gray);
    background: var(--pearl);
    flex-shrink: 0;
}
#detail-back {
    background: none;
    border: none;
    color: var(--atlantic);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.12s;
}
#detail-back:hover { color: var(--deep-ocean); }

#detail-hero {
    padding: 14px 16px 0;
    border-bottom: 1px solid var(--light-gray);
    flex-shrink: 0;
    padding-bottom: 12px;
}
.detail-pill {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 99px;
}
.detail-pill-type {
    background: rgba(181,57,42,0.1);
    color: var(--atlantic);
}
.detail-pill-featured {
    background: rgba(255,193,7,0.15);
    color: #a07000;
}

#detail-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
#detail-body {
    flex: 1;
    overflow-y: auto;
}
.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 16px;
    border-bottom: 1px solid var(--light-gray);
    font-size: 0.85rem;
    color: var(--charcoal);
    line-height: 1.45;
}
.detail-row-icon {
    color: rgba(74,74,74,0.4);
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 2px;
}
.detail-section-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 700;
    color: rgba(74,74,74,0.45);
    margin-bottom: 6px;
}
.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid var(--light-gray);
    font-size: 0.83rem;
}
.price-row:last-child { border-bottom: none; }
.price-amount { font-weight: 700; color: var(--deep-ocean); }
.verified-pill  { font-size: 0.62rem; background: #d4edda; color: #155724; border-radius: 10px; padding: 1px 7px; font-weight: 600; }
.community-pill { font-size: 0.62rem; background: var(--pearl); color: rgba(74,74,74,0.6); border: 1px solid var(--light-gray); border-radius: 10px; padding: 1px 7px; }

/* Vote buttons on price rows */
.vote-buttons { display: flex; gap: 6px; margin-top: 4px; }
.vote-btn {
    background: none;
    border: 1px solid var(--light-gray);
    border-radius: 99px;
    font-size: 0.7rem;
    padding: 2px 8px;
    cursor: pointer;
    color: rgba(74,74,74,0.6);
    font-family: inherit;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 3px;
}
.vote-btn:hover { border-color: var(--atlantic); color: var(--atlantic); }
.vote-btn.active-vote { background: var(--atlantic); border-color: var(--atlantic); color: #fff; }

/* Favorite star in detail */
#detail-fav-btn { transition: transform 0.15s; }
#detail-fav-btn:hover { transform: scale(1.2); }

/* ── MAP AREA ─────────────────────────────────────────────────────────────── */
#map-area { position: relative; flex: 1; height: 100%; }
#map { width: 100%; height: 100%; }

/* ── LIVE BAR ─────────────────────────────────────────────────────────────── */
.map-live-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--live-bar-h);
    z-index: 100;
    background: #fff;
    border-top: 1px solid var(--light-gray);
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: rgba(74,74,74,0.5);
}

/* ── MAP LEGEND ───────────────────────────────────────────────────────────── */
.map-legend {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255,255,255,0.96);
    border: 1px solid var(--light-gray);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(107,42,42,0.1);
    padding: 10px 12px;
    font-size: 0.75rem;
    z-index: 10;
    backdrop-filter: blur(4px);
}
.map-legend .leg-title { font-weight: 700; color: var(--charcoal); margin-bottom: 6px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; }
.map-legend .leg-item { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; color: rgba(74,74,74,0.7); }
.map-legend .leg-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* ── ADMIN / TABLES ───────────────────────────────────────────────────────── */
.table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(74,74,74,0.6); font-weight: 600; }
.btn-xs { padding: 0.15rem 0.5rem; font-size: 0.75rem; border-radius: 6px; }

/* ── MOBILE FILTER BAR ────────────────────────────────────────────────────── */
#mob-filter-bar {
    display: none; /* desktop: hidden */
}

/* ── MOBILE TAB BAR ───────────────────────────────────────────────────────── */
:root { --mob-tab-h: 56px; --mob-filter-h: 46px; }

#mobile-tab-bar {
    display: none; /* hidden on desktop */
}

/* Mobile filter tray — slides up from above tab bar */
#mobile-filter-tray {
    display: none;
    position: fixed;
    left: 0; right: 0;
    bottom: var(--mob-tab-h);
    z-index: 990;
    background: #fff;
    border-top: 1px solid var(--light-gray);
    box-shadow: 0 -4px 16px rgba(107,42,42,0.12);
    transform: translateY(100%);
    transition: transform 0.25s cubic-bezier(.4,0,.2,1);
}
#mobile-filter-tray.open { transform: translateY(0); }

/* ── BOTTOM SHEET HANDLE ─────────────────────────────────────────────────── */
.sheet-handle-wrap {
    display: none;
    justify-content: center;
    align-items: center;
    height: 22px;
    flex-shrink: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    background: #fff;
}
#panel-detail .sheet-handle-wrap {
    border-radius: 16px 16px 0 0;
}
.sheet-handle-bar {
    width: 36px;
    height: 4px;
    background: var(--light-gray);
    border-radius: 2px;
    transition: background 0.15s;
}
.sheet-handle-wrap:active .sheet-handle-bar { background: var(--seafoam); }

/* ── MOBILE ───────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    #left-panel { display: none; }

    /* Bottom sheet — slides up from above tab bar */
    #left-panel.mobile-open,
    #left-panel.mobile-list-view {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        top: auto;
        bottom: calc(var(--mob-tab-h) + env(safe-area-inset-bottom, 0px));
        height: var(--sheet-peek);
        /* z-index 900 keeps sheet above leaflet controls (800) and the search button */
        z-index: 900;
        width: 100%;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 24px rgba(107,42,42,0.18);
        transition: height 0.3s cubic-bezier(.4,0,.2,1);
    }
    /* Expanded state — nearly full screen */
    #left-panel.mobile-open.sheet-full,
    #left-panel.mobile-list-view.sheet-full {
        height: var(--sheet-full);
    }
    /* Show handle bars on mobile */
    .sheet-handle-wrap { display: flex; }

    #panel-detail.visible { width: 100%; }
    .section-title { font-size: 1.5rem; }
    .stat-card { padding: 0.85rem 0.75rem; }
    .stat-card .stat-num { font-size: 1.75rem; }

    /* Topbar: hide filter selects (use filter tray instead) and near-me button */
    #topbar-filters { display: none; }
    #topbar-actions { display: none; }
    .topbar-search-wrap { max-width: none; flex: 1; }

    /* Live bar hidden — tab bar replaces it at bottom */
    .map-page-body .map-live-bar { display: none; }

    /* Mobile filter bar — prominent row below topbar */
    #mob-filter-bar {
        display: flex;
        position: sticky;
        top: calc(var(--navbar-h) + var(--topbar-h));
        z-index: 598;
        background: #fff;
        border-bottom: 2px solid var(--atlantic);
        padding: 7px 10px;
        gap: 8px;
        align-items: center;
        box-shadow: 0 2px 6px rgba(107,42,42,0.1);
    }
    #mob-filter-bar .form-select {
        flex: 1;
        font-size: 0.82rem;
        font-weight: 500;
        border-color: var(--light-gray);
        color: var(--deep-ocean);
    }
    #mob-filter-bar .form-select:focus {
        border-color: var(--atlantic);
        box-shadow: 0 0 0 2px rgba(181,57,42,0.15);
    }

    /* Hide the in-panel filters — mob-filter-bar handles it on mobile */
    #panel-filters { display: none !important; }

    /* Recalculate map height: account for mob-filter-bar + tab bar instead of live bar */
    #map-page {
        height: calc(100dvh - var(--navbar-h) - var(--topbar-h) - var(--mob-filter-h) - var(--mob-tab-h) - env(safe-area-inset-bottom, 0px));
    }

    /* Mobile tab bar */
    #mobile-tab-bar {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        height: calc(var(--mob-tab-h) + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: #fff;
        border-top: 1px solid var(--light-gray);
        box-shadow: 0 -2px 8px rgba(107,42,42,0.07);
        z-index: 1020;
    }
    .mob-tab {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        background: none;
        border: none;
        font-size: 0.62rem;
        font-family: inherit;
        font-weight: 500;
        color: rgba(74,74,74,0.5);
        cursor: pointer;
        padding: 6px 0;
        transition: color 0.15s;
        -webkit-tap-highlight-color: transparent;
    }
    .mob-tab i { font-size: 1.25rem; line-height: 1; }
    .mob-tab.active { color: var(--atlantic); }

    /* Mobile filter tray */
    #mobile-filter-tray { display: block; }
}

/* ── ANIMATIONS ───────────────────────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.35s ease forwards; }

/* ── NOTIFICATION TOAST ───────────────────────────────────────────────────── */
.bmc-toast {
    position: fixed;
    top: 76px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--deep-ocean);
    color: #fff;
    font-size: 0.85rem;
    padding: 8px 18px;
    border-radius: 99px;
    box-shadow: 0 4px 16px rgba(107,42,42,0.25);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeIn 0.2s ease;
}
.bmc-toast .toast-dot { width: 7px; height: 7px; background: #4ade80; border-radius: 50%; }

/* ── SEARCH AUTOCOMPLETE DROPDOWN ────────────────────────────────────────── */
.search-drop-item {
    display: flex;
    flex-direction: column;
    padding: 8px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--light-gray);
    gap: 1px;
    transition: background 0.1s;
}
.search-drop-item:last-child { border-bottom: none; }
.search-drop-item:hover { background: rgba(181,57,42,0.07); }
.search-drop-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--deep-ocean);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-drop-meta {
    font-size: 0.75rem;
    color: rgba(74,74,74,0.55);
}

/* ── FIND SEAFOOD PAGE ────────────────────────────────────────────────────── */
.find-biz-card:hover {
    border-left-color: var(--atlantic) !important;
    background: rgba(181,57,42,0.03) !important;
}
@media (max-width: 767px) {
    #find-list {
        max-height: 45vh !important;
        border-right: none !important;
        border-bottom: 1px solid var(--light-gray);
    }
    #find-map { min-height: 280px !important; }
}

/* ── PRICE ROW: LIVE / OUT OF STOCK ──────────────────────────────────────── */
.in-stock-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: #198754;
    letter-spacing: 0.03em;
}
.in-stock-label .bi { font-size: 0.45rem; vertical-align: middle; }

.out-of-stock-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(74,74,74,0.45);
    letter-spacing: 0.03em;
}

.price-out-of-stock {
    opacity: 0.55;
}
.price-out-of-stock .price-amount {
    text-decoration: line-through;
    color: rgba(74,74,74,0.45);
}

/* ── MODAL NATIVE SELECT FIX ──────────────────────────────────────────────────
   Firefox 148+ renders <select> popups as positioned HTML elements rather than
   OS-level popups, so they get clipped by .modal's overflow-y:auto. Setting
   overflow:visible on .modal.show lets native popups escape the clip rect.
   Our modals are short enough that they never need the .modal to scroll. */
.modal.show {
    overflow: visible;
}
.modal.fade:not(.show) {
    overflow: hidden;
}
