@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg:       #0a0500;
    --bg-2:     #140a02;
    --bg-3:     #1c0f05;
    --bg-4:     #2b180a;
    --text:     #e4e4e4;
    --text-2:   #b0b0b0;
    --text-3:   #777777;
    --white:    #ffffff;
    --border:   #3d210b;
    --border-2: #5c3211;
    --success:  #22c55e;
    --danger:   #ef4444;
    --brand:    #ff6600;
    --radius:   8px;
    --radius-lg:16px;
    --shadow:   0 8px 32px rgba(0,0,0,0.5);
    --t:        0.18s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 1px;
}

::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-2);
    border-radius: 2px;
}

/* ---- HEADER ---- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 15, 15, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0 1rem;
}

.header-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo img {
    height: 38px;
    width: 38px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid var(--border-2);
}

.logo-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.35rem;
    color: var(--white);
    letter-spacing: 2px;
    line-height: 1;
}

.logo-sub {
    font-family: 'Inter', sans-serif;
    font-size: 0.58rem;
    color: var(--text-3);
    letter-spacing: 3px;
    text-transform: uppercase;
    display: block;
    margin-top: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.open {
    background: rgba(34, 197, 94, .1);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, .2);
}

.status-badge.closed {
    background: rgba(239, 68, 68, .1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, .2);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-badge.open .status-dot {
    animation: blink 2s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: .3
    }
}

.cart-btn {
    position: relative;
    background: var(--white);
    color: var(--bg);
    border: none;
    border-radius: var(--radius);
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--t);
    font-family: 'Inter', sans-serif;
}

.cart-btn:hover {
    background: #e0e0e0;
}

.cart-count {
    background: var(--danger);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -6px;
    right: -6px;
}

.pulse-anim {
    animation: pulseBtn 0.3s ease;
}

@keyframes pulseBtn {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

/* ---- HERO ---- */
.hero {
    text-align: center; padding: 3.5rem 1rem 2.5rem;
    background: linear-gradient(160deg, #3d1600 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
}

.hero-logo {
    width: 88px;
    height: 88px;
    object-fit: contain;
    border-radius: 14px;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-2);
    box-shadow: 0 0 0 8px rgba(255, 255, 255, .03);
}

.hero h1 {
    font-size: clamp(2.2rem, 7vw, 3.6rem);
    color: var(--white);
    letter-spacing: 5px;
    line-height: 1;
    margin-bottom: 0.6rem;
}

.hero p {
    color: var(--text-3);
    font-size: 0.78rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* ---- SEARCH ---- */
.search-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 1rem 0;
}

.search-input {
    width: 100%;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 11px 16px 11px 42px;
    color: var(--text);
    font-size: 0.88rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: var(--t);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 14px center;
}

.search-input:focus {
    border-color: var(--border-2);
    background-color: var(--bg-4);
}

.search-input::placeholder {
    color: var(--text-3);
}

/* ---- CATEGORY NAV ---- */
.cat-nav {
    max-width: 960px;
    margin: 0 auto;
    padding: 1rem 1rem;
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    scrollbar-width: none;
}

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

.cat-btn {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-2);
    border-radius: 100px;
    padding: 5px 14px;
    font-size: 0.76rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: var(--t);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cat-btn:hover {
    border-color: var(--border-2);
    color: var(--text);
}

.cat-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---- MENU ---- */
.menu-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem 6rem;
}

.cat-section {
    margin-bottom: 2.5rem;
}

.cat-heading {
    font-size: 1.5rem;
    color: var(--white);
    letter-spacing: 2px;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.cat-count {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    color: var(--text-3);
    font-weight: 400;
    letter-spacing: 0;
}

.items-grid {
    display: grid;
    gap: 0.6rem;
}

/* ---- ITEM CARD ---- */
.item-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1rem 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    transition: var(--t);
    position: relative;
    overflow: hidden;
}

.item-card:hover {
    border-color: var(--border-2);
    background: var(--bg-3);
}

.item-card.featured::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px; background: var(--brand); border-radius: 3px 0 0 3px;
}

.item-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: var(--bg-3);
    border: 1px solid var(--border);
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-weight: 600;
    font-size: 0.93rem;
    color: var(--text);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.featured-badge {
    font-size: 0.62rem; background: var(--brand); color: #fff;
    padding: 1px 6px; border-radius: 3px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px; flex-shrink: 0;
}

.item-desc {
    font-size: 0.78rem;
    color: var(--text-2);
    line-height: 1.5;
    display: block;
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
    margin-top: 0.15rem;
}

.item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
    padding-top: 0.2rem;
}

.item-price {
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--white);
    white-space: nowrap;
    line-height: 1.2;
}

.add-btn {
    background: var(--white);
    color: var(--bg);
    border: none;
    border-radius: 6px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 300;
    transition: var(--t);
    line-height: 1;
}

.add-btn:hover {
    background: #e0e0e0;
    transform: scale(1.08);
}

/* ---- CART OVERLAY ---- */
.cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .75);
    z-index: 200;
    backdrop-filter: blur(3px);
}

.cart-overlay.open {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.cart-panel {
    background: var(--bg-2);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border: 1px solid var(--border);
    border-bottom: none;
    width: 100%;
    max-width: 580px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    animation: slideUp .22s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%)
    }

    to {
        transform: translateY(0)
    }
}

.cart-header {
    padding: 1.25rem 1.25rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.cart-title {
    font-size: 1.3rem;
    color: var(--white);
    letter-spacing: 2px;
}

.cart-close {
    background: var(--bg-4);
    border: none;
    color: var(--text-2);
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--t);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-close:hover {
    color: var(--text);
    background: var(--border);
}

.cart-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1.25rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.15rem;
}

.cart-item-price {
    font-size: 0.78rem;
    color: var(--text-2);
}

.qty-ctrl {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.qty-btn {
    background: var(--bg-4);
    border: 1px solid var(--border);
    color: var(--text);
    width: 26px;
    height: 26px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--t);
    font-family: 'Inter', sans-serif;
    line-height: 1;
}

.qty-btn:hover {
    background: var(--border);
    border-color: var(--border-2);
}

.qty-num {
    font-weight: 600;
    font-size: 0.88rem;
    min-width: 1.25rem;
    text-align: center;
}

.cart-item-total {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--white);
    min-width: 58px;
    text-align: right;
}

.cart-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-3);
}

.cart-empty i {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 0.75rem;
}

/* Cart footer */
.cart-foot {
    padding: 1rem 1.25rem 1.5rem;
    border-top: 1px solid var(--border);
}

.order-type {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.ot-btn {
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--text-2);
    border-radius: var(--radius);
    padding: 0.55rem;
    font-size: 0.78rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: var(--t);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.ot-btn:hover {
    border-color: var(--border-2);
    color: var(--text);
}

.ot-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.obs-input {
    width: 100%;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    color: var(--text);
    font-size: 0.83rem;
    font-family: 'Inter', sans-serif;
    resize: none;
    outline: none;
    margin-bottom: 0.75rem;
    transition: var(--t);
}

.obs-input:focus {
    border-color: var(--border-2);
}

.obs-input::placeholder {
    color: var(--text-3);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
}

.total-label {
    font-size: 0.88rem;
    color: var(--text-2);
}

.total-value { font-family: 'Bebas Neue', sans-serif; font-size: 1.7rem; color: var(--brand); letter-spacing: 1px; }

.cart-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.4rem;
}

.btn-wpp {
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 11px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--t);
}

.btn-wpp:hover {
    background: #1fba58;
}

.btn-wpp:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.btn-print {
    background: var(--bg-4);
    color: var(--text-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 11px 14px;
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--t);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-print:hover {
    background: var(--border);
    color: var(--text);
    border-color: var(--border-2);
}

.btn-print:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* ---- FOOTER ---- */
.footer {
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    padding: 2.5rem 1rem;
}

.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    display: grid;
    gap: 2rem;
}

.footer-brand h2 {
    font-size: 1.7rem;
    color: var(--white);
    letter-spacing: 3px;
    margin-bottom: 0.4rem;
}

.footer-brand p {
    color: var(--text-2);
    font-size: 0.83rem;
}

.footer-social {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.social-link {
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--text-2);
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--t);
}

.social-link:hover {
    border-color: var(--border-2);
    color: var(--text);
}

.footer-info-list {
    display: grid;
    gap: 0.7rem;
}

.footer-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.83rem;
    color: var(--text-2);
}

.footer-info-item i {
    color: var(--text-3);
    width: 16px;
    flex-shrink: 0;
    margin-top: 3px;
}

.footer-info-item strong {
    color: var(--text);
}

.footer-copy {
    max-width: 960px;
    margin: 1.5rem auto 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-3);
    font-size: 0.73rem;
}

/* ---- TOAST ---- */
.toast-wrap {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    pointer-events: none;
}

.toast {
    background: var(--bg-3);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 9px 16px;
    font-size: 0.83rem;
    white-space: nowrap;
    animation: fadeUp .18s ease;
    box-shadow: var(--shadow);
}

.toast.success {
    border-color: rgba(34, 197, 94, .3);
    color: var(--success);
}

.toast.error {
    border-color: rgba(239, 68, 68, .3);
    color: var(--danger);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(6px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/* ---- EMPTY STATE ---- */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-3);
}

.empty-state i {
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-2);
}

/* ---- PRINT RECEIPT ---- */
#print-receipt {
    display: none;
}

@media print {
    body>*:not(#print-receipt) {
        display: none !important;
    }

    #print-receipt {
        display: block !important;
        width: 76mm;
        max-width: 76mm;
        font-family: 'Courier New', monospace;
        font-size: 11px;
        color: #000;
        background: #fff;
        padding: 3mm;
        line-height: 1.5;
    }

    #print-receipt .r-center {
        text-align: center;
    }

    #print-receipt .r-bold {
        font-weight: bold;
    }

    #print-receipt .r-lg {
        font-size: 13px;
    }

    #print-receipt .r-sep {
        border-top: 1px dashed #000;
        margin: 3mm 0;
    }

    #print-receipt .r-row {
        display: flex;
        justify-content: space-between;
    }

    #print-receipt .r-spacer {
        height: 8mm;
    }
}

/* ---- RESPONSIVE ---- */
@media (min-width: 640px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .items-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 420px) {
    .logo-name {
        font-size: 1.1rem;
    }
}