:root {
    --primary-color: #008080;
    /* Teal/Green */
    --primary-dark: #006666;
    --bg-color: #f8f9fa;
    /* Light grey background for contrast with white cards */
    --text-color: #333333;
    --card-bg: #ffffff;
    --border-radius: 12px;
    --spacing-unit: 1rem;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* --- Shared Utilities (Used in Admin & Public) --- */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
}

.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-size: 1rem;
}

.btn:hover {
    background-color: var(--primary-dark);
}

.btn-block {
    display: block;
    width: 100%;
}

/* --- Admin Login Specific --- */
.admin-login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #e9ecef;
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
}

/* --- Public Frontend Styles --- */

/* Header */
.main-header {
    background-color: #008080;
    /* Teal/Green */
    text-align: center;
    padding: 30px 20px;
    border-bottom: 1px solid #006666;
}

.cafe-logo {
    max-height: 80px;
    margin-bottom: 10px;
}

.cafe-logo-placeholder {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.cafe-name {
    margin: 0;
    font-size: 1.8rem;
    color: #222;
}

.cafe-slogan {
    margin: 5px 0 0;
    color: white;
    /* Changed to white for visibility on Teal bg */
    font-size: 1rem;
    font-style: italic;
}

/* Sticky Category Tabs */
.category-tabs {
    background: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 0 10px;
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tabs-container {
    display: flex;
    justify-content: center;
    /* Center on desktop */
    min-width: 100%;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: bold;
    color: #777;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Mobile Alignment for Tabs */
@media (max-width: 600px) {
    .tabs-container {
        justify-content: flex-start;
        /* Left align on mobile for scrolling */
    }
}

/* Main Container */
.menu-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 15px;
    min-height: 80vh;
}

.category-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.category-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Subcategory Pills */
.subcategory-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    justify-content: center;
}

.pill-btn {
    background: white;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    color: #555;
    transition: all 0.2s;
}

.pill-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0, 128, 128, 0.3);
}

/* Item Grids & Cards */
.subcategory-title {
    color: #222;
    margin: 30px 0 15px;
    padding-bottom: 8px;
    font-size: 1.4rem;
    font-weight: bold;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.menu-item-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    /* Stack vertically as per Price Under Name */
    align-items: flex-start;
    transition: transform 0.2s;
}

.menu-item-card:active {
    transform: scale(0.99);
    /* Touch feedback */
}

.item-info {
    width: 100%;
}

.item-name {
    margin: 0 0 5px;
    font-size: 1.05rem;
    color: #222;
    font-weight: 600;
}

.item-desc {
    margin: 0;
    font-size: 0.85rem;
    color: #888;
}

.item-price {
    margin-top: 8px;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
    align-self: flex-start;
}

/* Slogan Footer */
.main-footer {
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 0.8rem;
}

/* Scroll To Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: background 0.3s, transform 0.3s;
}

.scroll-top-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

.scroll-top-btn.visible {
    display: flex;
    animation: fadeInUp 0.3s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sub-Subcategory Pills Navigation */
.sub-sub-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
    justify-content: flex-start;
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 15px;
    border: 1px solid #eee;
}

.sub-sub-btn {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.sub-sub-btn:hover {
    background: #fff;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.sub-sub-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 128, 128, 0.25);
    transform: translateY(-1px);
}

.items-list-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.4s ease-out;
}

/* Specific animation for filtering */
.sub-sub-group {
    animation: fadeIn 0.4s ease-out;
}

/* Mobile Tweak */
@media (max-width: 600px) {
    .sub-sub-pills {
        padding: 5px;
        background: transparent;
        border: none;
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 15px;
    }

    .sub-sub-btn {
        flex-shrink: 0;
        padding: 8px 18px;
    }
}