/*
 * base.css — MenuSpace structural layout
 * Never edit for visual changes — use a theme file instead.
 * Theme files override :root variables and visual classes.
 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.6;
}

/* ── Page wrapper ── */
.page {
    width: min(1080px, calc(100% - 24px));
    margin: 0 auto;
    padding: 0 0 140px;
}

/* ── Layout: sticky sidebar + scrolling content ── */
.content-wrap {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    align-items: start;
    padding-top: 24px;
}

/* ── Sticky section nav sidebar ── */
.section-sidebar {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sidebar-label {
    padding: 0 12px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.sidebar-link {
    display: block;
    padding: 9px 12px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-left: 2px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .15s, background .15s;
}

/* ── Search bar ── */
.search-wrap {
    padding: 14px 0 20px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.search-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
}

.search-icon { font-size: 16px; flex-shrink: 0; }

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 14px 0;
}

.search-clear {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    display: none;
    transition: color .15s;
}
.search-clear.show { display: block; }

/* ── Pill bar — hidden on desktop ── */
.pill-bar { display: none; }

/* ── Menu content ── */
.menu-content {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

/* ── Section ── */
.section-block { scroll-margin-top: 80px; }

.section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.section-line { flex: 1; height: 1px; }

.section-count { white-space: nowrap; }

/* ── Item list ── */
.items-list {
    display: block;
    overflow: hidden;
}

/* ── Item row ── */
.item-row {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    grid-template-rows: auto auto;
}

/* Image */
.item-img-wrap {
    position: relative;
    width: 110px;
    height: 100%;
    min-height: 90px;
    flex-shrink: 0;
    overflow: hidden;
    grid-row: 1 / 3;
}

.item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.item-no-img {
    width: 100%;
    height: 100%;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

/* Content */
.item-content {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-width: 0;
}

.item-name {
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-desc {
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.item-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* Action */
.item-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px 14px 8px;
    flex-shrink: 0;
}

.item-add-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.qty-picker {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-val {
    min-width: 24px;
    text-align: center;
}

.add-btn {
    height: 32px;
    border: 0;
    cursor: pointer;
    padding: 0 14px;
    white-space: nowrap;
}
.add-btn:disabled { cursor: not-allowed; }

.customize-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    cursor: pointer;
    padding: 0 14px;
    white-space: nowrap;
    text-decoration: none;
}

/* Closed banner */
.closed-banner {
    margin: 16px 0;
    padding: 14px 20px;
    text-align: center;
    font-weight: 600;
}

/* No results */
.no-results {
    text-align: center;
    padding: 40px 20px;
    display: none;
}

/* ── Mobile ── */
@media (max-width: 800px) {
    .page         { width: 100%; padding: 0 0 140px; }
    .content-wrap { grid-template-columns: 1fr; gap: 0; padding-top: 0; }
    .section-sidebar { display: none; }
    .menu-content { gap: 0; }

    .search-wrap  { padding: 0; margin: 0; }
    .search-inner { border-radius: 0; border-left: none; border-right: none; border-top: none; }

    .pill-bar {
        display: flex;
        gap: 6px;
        padding: 8px 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        position: sticky;
        top: 53px;
        z-index: 40;
        flex-shrink: 0;
    }
    .pill-bar::-webkit-scrollbar { display: none; }

    .pill-tab {
        flex-shrink: 0;
        padding: 5px 14px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        white-space: nowrap;
        -webkit-tap-highlight-color: transparent;
    }

    .section-block { scroll-margin-top: 110px; }

    .section-header {
        padding: 12px 16px 8px;
        margin-bottom: 0;
    }

    .section-title { font-size: 1rem; font-weight: 700; }
    .section-line  { display: none; }
    .section-count { font-size: 10px; }

    .items-list { border: none; border-radius: 0; }

    .item-row {
        display: grid;
        grid-template-columns: 96px 1fr;
        grid-template-rows: auto auto;
        border-radius: 0;
        border: none;
    }
    .item-row:last-child { border-bottom: none; }

    .item-img-wrap  { width: 96px; min-height: 96px; grid-row: 1 / 3; border-radius: 0; }
    .item-content   { padding: 12px 14px 4px; grid-column: 2; grid-row: 1; }
    .item-action    { grid-column: 2; grid-row: 2; flex-direction: row; align-items: center;
                      justify-content: flex-start; gap: 10px; padding: 6px 14px 14px; }

    .item-name  { font-size: .92rem; white-space: normal; font-weight: 600; }
    .item-desc  { font-size: .78rem; }
    .item-badges { gap: 4px; }
    .item-badge  { font-size: .65rem; padding: 1px 6px; }

    .add-btn       { height: 34px; padding: 0 16px; font-size: 12px; }
    .customize-btn { height: 34px; padding: 0 12px; font-size: 12px; }
    .qty-btn       { width: 30px; height: 30px; font-size: 16px; }
    .qty-val       { min-width: 22px; font-size: 13px; }

    .closed-banner { border-radius: 0; margin: 0; border-left: none; border-right: none; }
    .no-results    { padding: 40px 16px; }
}

/* ── Brand strip ── */
.brand-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.brand-strip-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.brand-strip img {
    height: 38px;
    display: block;
    flex-shrink: 0;
}

.brand-strip-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.brand-strip-title {
    font-size: 16px;
    font-weight: 900;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hours-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    width: fit-content;
    white-space: nowrap;
}

.brand-strip-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.brand-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity .2s;
    border-radius: 999px;
}
.brand-action-btn:hover { opacity: .8; }

@media (max-width: 640px) {
    .brand-strip { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
    .brand-strip img { height: 42px; }
    .brand-strip-title { font-size: 17px; }
    .brand-strip-actions { width: 100%; justify-content: stretch; gap: 10px; }
    .brand-action-btn { flex: 1; justify-content: center; padding: 10px 12px; font-size: 14px; }
    .hours-tag { font-size: 12px; padding: 4px 9px; }
}

/* ── Food truck widget ── */
.ft-wrap  { max-width: 900px; margin: 0 auto; padding: 20px 16px 0; }
.ft-card  { border-radius: 16px; overflow: hidden; }

.ft-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 18px;
}

.ft-header-left { display: flex; align-items: center; gap: 10px; }
.ft-icon        { font-size: 1.3rem; }
.ft-title       { font-weight: 800; font-size: .95rem; line-height: 1.3; }
.ft-address     { font-size: .75rem; margin-top: 2px; }
.ft-status-badge { padding: 4px 12px; border-radius: 999px; font-size: .75rem; font-weight: 700; border: 1px solid; }

.ft-map { height: 280px; width: 100%; display: block; }
.ft-no-loc { height: 280px; display: flex; align-items: center; justify-content: center; font-size: .9rem; }

.ft-distance-bar { padding: 10px 16px; font-size: .82rem; text-align: center; border-top: 1px solid; }

.ft-actions { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid; }

.ft-btn-locate {
    flex: 1; padding: 11px; border: none; border-radius: 8px;
    font-weight: 800; font-size: .85rem; cursor: pointer;
    transition: opacity .15s;
}
.ft-btn-locate:hover { opacity: .85; }

.ft-btn-navigate {
    flex: 1; padding: 11px; border-radius: 8px; font-weight: 700;
    font-size: .85rem; text-decoration: none; text-align: center;
    display: block; border: 1px solid; transition: opacity .15s;
}
.ft-btn-navigate:hover { opacity: .8; }

.ft-manual     { padding: 12px 16px; border-top: 1px solid; }
.ft-manual-row { display: flex; gap: 8px; }

.ft-input {
    flex: 1; padding: 10px; border-radius: 8px;
    font-size: .88rem; outline: none; border: 1px solid;
}

.ft-go-btn {
    padding: 10px 14px; border: none; border-radius: 8px;
    font-weight: 800; cursor: pointer;
}

.ft-addr-err { font-size: .75rem; margin-top: 6px; color: #f87171; }
