:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --accent-color: #ff9f1c;
    /* Appetizing Orange */
    --accent-hover: #ffbf69;
    --secondary-accent: #e5383b;
    /* Red for appetite */
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --gap: 1rem;
    --radius: 12px;
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    padding-bottom: 5rem;
    /* Increased for floating bar */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.main-header {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('assets/burger.png');
    /* Will need a bg later, fallback color for now */
    background-color: #000;
    background-size: cover;
    background-position: center;
    padding: 3rem 1rem;
    text-align: center;
    border-bottom: 4px solid var(--accent-color);
}

.logo {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.logo .accent {
    color: var(--accent-color);
}

.tagline {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
}

.btn-primary {
    background-color: var(--accent-color);
    color: #121212;
    box-shadow: 0 4px 15px rgba(255, 159, 28, 0.4);
}

.btn-primary:active {
    transform: scale(0.95);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.btn-disabled {
    background-color: #444 !important;
    color: #888 !important;
    cursor: not-allowed;
    box-shadow: none;
}

/* Info Section */
.info-section {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.info-card {
    background-color: var(--card-bg);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid #333;
    flex: 1;
    min-width: 150px;
    max-width: 300px;
}

.info-card h3 {
    color: var(--accent-color);
    font-size: 1rem;
    margin-bottom: 0.3rem;
    font-family: var(--font-heading);
}

.info-card p {
    font-size: 0.9rem;
    color: #aaa;
}

/* Category Nav */
.category-nav {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    scrollbar-width: none;
    /* Firefox */
}

.category-nav::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.cat-btn {
    background-color: var(--card-bg);
    color: #fff;
    border: 1px solid #333;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    white-space: nowrap;
    cursor: pointer;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    transition: 0.3s;
    text-decoration: none;
    /* Since they are anchors now */
    display: inline-block;
}

.cat-btn.active,
.cat-btn:hover {
    background-color: var(--secondary-accent);
    border-color: var(--secondary-accent);
    transform: translateY(-2px);
}

/* Menu Grid */
.menu-section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    border-left: 5px solid var(--accent-color);
    padding-left: 1rem;
    margin-top: 3rem;
    /* Increased separation */
    scroll-margin-top: 2rem;
    /* Buffer for scroll jump */
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.menu-item {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid #2a2a2a;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.menu-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.item-img-wrapper {
    position: relative;
    padding-bottom: 60%;
    /* Aspect ratio */
    overflow: hidden;
    background-color: #222;
}

.item-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-content {
    padding: 1.2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.item-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.item-price {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1.1rem;
    background-color: rgba(255, 159, 28, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    white-space: nowrap;
    margin-left: 0.5rem;
}

.item-desc {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.item-actions {
    margin-top: 0.5rem;
}

/* Quantity Controls */
.btn-add {
    width: 100%;
    background-color: var(--card-bg);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 0.5rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.btn-add:hover {
    background-color: var(--accent-color);
    color: #121212;
}

.qty-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #2a2a2a;
    border-radius: 8px;
    padding: 4px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background-color: var(--accent-color);
    color: #121212;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:active {
    transform: scale(0.9);
}

.qty-val {
    font-weight: bold;
    font-size: 1.1rem;
    color: #fff;
    width: 30px;
    text-align: center;
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 3rem 1rem;
    margin-top: 3rem;
    border-top: 1px solid #333;
    color: #555;
    background-color: #0f0f0f;
}

@media (max-width: 600px) {
    .menu-grid {
        grid-template-columns: 1fr;
    }
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-right: 1rem;
    background-color: #eee;
    color: #333;
}

.status-open {
    background-color: rgba(46, 204, 113, 0.2);
    color: #27ae60;
    border: 1px solid #27ae60;
}

.status-closed {
    background-color: rgba(231, 76, 60, 0.2);
    color: #c0392b;
    border: 1px solid #c0392b;
}

.status-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    background-color: currentColor;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Adjust contact bar for mobile to stack */
@media (max-width: 768px) {
    .contact-bar {
        flex-direction: column;
        gap: 10px;
    }

    .status-badge {
        margin-right: 0;
    }
}

.contact-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.helper-text {
    font-size: 0.8rem;
    color: #ffd700;
    margin-top: 0.4rem;
    font-weight: 300;
    opacity: 0.9;
    text-align: center;
}

/* Floating Cart Bar */
.cart-floating-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    background-color: var(--accent-color);
    color: #121212;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    cursor: pointer;
    animation: slideUp 0.3s ease-out;
    font-family: var(--font-heading);
    font-weight: bold;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.floating-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.count-badge {
    background-color: #121212;
    color: var(--accent-color);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.floating-total {
    font-size: 1.2rem;
}

/* Cart Modal */
.cart-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    /* Center Vertically */
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s;
}

.cart-modal {
    background-color: var(--card-bg);
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    border: 1px solid #333;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #333;
    padding-bottom: 1rem;
}

.cart-header h2 {
    font-family: var(--font-heading);
    color: var(--accent-color);
    margin-bottom: 0;
}

.close-cart {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.cart-items-list {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    padding-right: 5px;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #2a2a2a;
}

.cart-item-row:last-child {
    border-bottom: none;
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-item-qty {
    background-color: var(--accent-color);
    color: #121212;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
}

.cart-item-name {
    font-weight: 500;
}

.cart-item-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.trash-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: 0.2s;
}

.trash-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.cart-summary {
    background-color: #2a2a2a;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: #bbb;
}

.summary-row.total {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid #444;
    font-weight: bold;
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 0;
}

.empty-msg {
    text-align: center;
    color: #777;
    padding: 2rem 0;
}

/* Sold Out Feature Styles */
.menu-item.sold-out .item-img {
    filter: grayscale(100%);
    opacity: 0.6;
}

.menu-item.sold-out .item-content {
    opacity: 0.7;
}

.sold-out-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--secondary-accent);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-weight: bold;
    font-family: var(--font-heading);
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    font-size: 0.9rem;
    text-transform: uppercase;
    transform: rotate(3deg);
}

.btn-add:disabled {
    background-color: #333;
    border-color: #444;
    color: #666;
    cursor: not-allowed;
    box-shadow: none;
}