:root {
    --brand: #ff6b35;
    --brand-dark: #d94d1f;
    --ink: #222831;
    --muted: #6c757d;
    --soft: #fff7f2;
    --card: #ffffff;
    --line: #eef0f3;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #fff;
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.menu-page {
    background: linear-gradient(180deg, var(--menu-bg, var(--soft)) 0%, #ffffff 42%);
}

.hero-section {
    padding: 28px 0 12px;
}

.hero-card {
    background: linear-gradient(135deg, var(--brand), #ffb347);
    border-radius: 28px;
    box-shadow: 0 18px 45px rgba(255, 107, 53, 0.23);
    color: #fff;
    padding: 32px;
    overflow: hidden;
    position: relative;
}

.hero-card:after {
    content: "";
    position: absolute;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    right: -45px;
    bottom: -55px;
}

.hero-card h1 {
    font-size: clamp(2rem, 9vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.06em;
    margin: 0 0 8px;
}

.hero-card p {
    font-size: 1.08rem;
    max-width: 520px;
    margin-bottom: 0;
    opacity: .94;
}

.eyebrow {
    display: inline-block;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    margin-bottom: 8px;
    opacity: .84;
}

.eyebrow.dark {
    color: var(--brand-dark);
}

.btn-pill {
    border-radius: 999px;
    font-weight: 700;
    padding: 12px 22px;
}

.section-heading {
    margin: 34px auto 22px;
    max-width: 680px;
}

.section-heading h2 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 6px;
}

.section-heading p {
    color: var(--muted);
    margin-bottom: 0;
}

.category-nav-wrap {
    position: sticky;
    top: 0;
    z-index: 10;
    margin: 0 -15px 26px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(238, 240, 243, .72);
    border-bottom: 1px solid rgba(238, 240, 243, .72);
}

.category-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-pill {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(34, 40, 49, 0.06);
    color: var(--ink);
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 800;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    text-decoration: none;
    white-space: nowrap;
}

.category-pill:hover,
.category-pill.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    text-decoration: none;
}

.menu-category {
    scroll-margin-top: 84px;
}

.category-heading {
    margin: 10px 0 18px;
}

.category-heading h3 {
    font-size: 1.7rem;
    font-weight: 850;
    letter-spacing: -0.04em;
    margin-bottom: 0;
}

.menu-grid {
    align-items: stretch;
}

.menu-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 16px 40px rgba(34, 40, 49, 0.08);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}

.menu-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 50px rgba(34, 40, 49, 0.13);
}

.menu-card-image-wrap {
    height: 220px;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.menu-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.menu-card:hover .menu-card-image {
    transform: scale(1.04);
}

.price-badge {
    position: absolute;
    right: 14px;
    bottom: 14px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 999px;
    box-shadow: 0 10px 28px rgba(0,0,0,.14);
    color: var(--brand-dark);
    font-weight: 850;
    line-height: 1;
    max-width: calc(100% - 28px);
    overflow: hidden;
    padding: 9px 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-card-body {
    padding: 20px;
}

.menu-card-body h3 {
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.menu-card-body p {
    color: var(--muted);
    margin-bottom: 0;
    line-height: 1.55;
}

.empty-state {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 16px 40px rgba(34, 40, 49, 0.06);
    padding: 48px 24px;
}

.empty-img {
    width: 120px;
    max-width: 40%;
    margin-bottom: 18px;
}

.site-footer {
    background: #111827;
    color: rgba(255,255,255,.78);
    padding: 22px 0;
}

.admin-body {
    background: #f5f7fb;
}

.admin-shell {
    min-height: 100vh;
}

.admin-topbar {
    background: #111827;
    color: #fff;
    padding: 14px 0;
}

.admin-topbar a {
    color: rgba(255,255,255,.86);
}

.admin-card {
    background: #fff;
    border: 1px solid #e9edf3;
    border-radius: 18px;
    box-shadow: 0 12px 35px rgba(17, 24, 39, 0.06);
}

.stat-card {
    padding: 24px;
}

.stat-card .stat-number {
    font-size: 2.3rem;
    font-weight: 850;
    letter-spacing: -0.06em;
    margin: 0;
}

.stat-card .stat-label {
    color: #6b7280;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .76rem;
}

.table-img {
    width: 62px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    background: #f3f4f6;
}

.login-card {
    max-width: 420px;
    margin: 8vh auto;
}

.color-text-input {
    max-width: 160px;
}

.color-picker {
    border: 1px solid #ced4da;
    border-radius: 10px;
    height: 42px;
    width: 70px;
}

@media (max-width: 575.98px) {
    .hero-section {
        padding-top: 16px;
    }

    .hero-card {
        border-radius: 22px;
        padding: 26px 22px;
    }

    .hero-card p {
        font-size: 1rem;
    }

    .section-heading {
        margin-top: 24px;
    }

    .section-heading h2 {
        font-size: 1.85rem;
    }

    .category-nav-wrap {
        margin-bottom: 20px;
    }

    .category-heading h3 {
        font-size: 1.45rem;
    }

    .menu-card-image-wrap {
        height: 205px;
    }

    .menu-card-body {
        padding: 18px;
    }
}

.admin-item-card {
    overflow: hidden;
}

.admin-item-thumb {
    background: #f3f4f6;
    border-radius: 14px;
    display: block;
    height: 96px;
    object-fit: cover;
    width: 100%;
}

.admin-meta-label {
    color: #6b7280;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.admin-action-buttons {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.admin-action-buttons form {
    margin: 0;
}

@media (max-width: 767.98px) {
    .admin-action-buttons {
        justify-content: flex-start;
    }

    .admin-action-buttons .btn,
    .admin-action-buttons form {
        flex: 1 1 auto;
    }

    .admin-action-buttons .btn {
        display: block;
        width: 100%;
    }
}

/* v4 visibility fixes */
.menu-title-row {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.menu-title-row h3 {
    flex: 1 1 auto;
}

.menu-price-text {
    color: var(--brand-dark);
    flex: 0 0 auto;
    font-size: 1.02rem;
    line-height: 1.25;
    white-space: nowrap;
}

.menu-description {
    color: #525c6b !important;
    display: block !important;
    font-size: 0.98rem;
    margin-top: 4px;
    min-height: 1.4em;
}

.settings-save-bar {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e9edf3;
    border-radius: 16px;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 14px;
}

@media (max-width: 575.98px) {
    .menu-title-row {
        display: block;
    }

    .menu-price-text {
        display: block;
        margin: 4px 0 8px;
    }

    .settings-save-bar {
        align-items: stretch;
        flex-direction: column;
        position: sticky;
        top: 10px;
        z-index: 11;
    }

    .settings-save-bar .btn {
        width: 100%;
    }

    .admin-action-buttons {
        flex-direction: column;
    }
}

/* v5 final display fixes: keep item name, price, and description visible beside the image */
.menu-card {
    display: flex !important;
    align-items: stretch;
    min-height: 150px;
}

.menu-card-image-wrap {
    flex: 0 0 150px;
    height: auto !important;
    min-height: 150px;
}

.menu-card-image {
    height: 100% !important;
    min-height: 150px;
}

.menu-card-body {
    background: #fff;
    display: block !important;
    flex: 1 1 auto;
    min-width: 0;
    padding: 18px !important;
}

.menu-title-row {
    align-items: flex-start;
    display: flex !important;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 8px;
}

.menu-title-row h3 {
    color: var(--ink);
    display: block !important;
    flex: 1 1 auto;
    margin: 0;
    min-width: 0;
}

.menu-price-text {
    color: var(--brand-dark) !important;
    display: block !important;
    flex: 0 0 auto;
    font-weight: 900;
    white-space: nowrap;
}

.menu-description {
    color: #525c6b !important;
    display: block !important;
    line-height: 1.5;
    margin: 0 !important;
    visibility: visible !important;
}

.price-badge {
    display: inline-block !important;
    font-size: .84rem;
    min-width: 42px;
    text-align: center;
}

.admin-item-head {
    border-bottom: 1px solid #eef0f3;
    padding-bottom: 14px;
}

.admin-action-buttons {
    align-items: stretch;
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.admin-action-buttons .btn {
    min-width: 112px;
}

.admin-action-buttons form {
    display: inline-block;
    margin: 0;
}

.admin-price-value {
    color: var(--brand-dark);
    font-size: 1.05rem;
}

.price-input-group .input-group-text {
    background: #fff7f2;
    color: var(--brand-dark);
    font-weight: 900;
    min-width: 56px;
    justify-content: center;
}

@media (max-width: 991.98px) {
    .admin-action-buttons {
        justify-content: flex-start;
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .menu-card {
        min-height: 132px;
    }

    .menu-card-image-wrap {
        flex-basis: 112px;
        min-height: 132px;
    }

    .menu-card-image {
        min-height: 132px;
    }

    .menu-card-body {
        padding: 14px !important;
    }

    .menu-title-row {
        display: block !important;
    }

    .menu-price-text {
        margin: 4px 0 7px;
    }

    .menu-description {
        font-size: .92rem;
    }

    .price-badge {
        bottom: 8px;
        font-size: .78rem;
        padding: 7px 9px;
        right: 8px;
    }

    .admin-action-buttons {
        flex-direction: row;
    }

    .admin-action-buttons .btn,
    .admin-action-buttons form {
        flex: 1 1 130px;
    }
}
