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

:root {
    --base-white: #FCFBFA;
    --base-black: #12100F;
    --coffee-yellow: #C5A880;
    --coffee-dark: #A58B65;
    --text-dark: #25221F;
    --text-light: #FBF9F6;
    --text-muted: #847C75;
    --card-bg: #FFFFFF;
    --border-color: rgba(197, 168, 128, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--base-white);
    color: var(--text-dark);
    min-height: 100vh;
    padding-bottom: 90px;
    /* Space for sticky cart */
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120' width='120' height='120'%3E%3Cg transform='translate(10, 10) rotate(15)' opacity='0.035'%3E%3Cpath d='M25,50 C10,65 10,85 25,100 C40,115 60,115 75,100 C90,85 90,65 75,50 C60,35 40,35 25,50 Z' fill='%23A58B65'/%3E%3Cpath d='M28,95 C45,85 45,65 50,60 C55,55 55,35 72,25 C55,45 55,55 50,60 C45,65 28,85 28,95 Z' fill='%2312100F' opacity='0.3'/%3E%3C/g%3E%3Cg transform='translate(60, 45) rotate(-35)' opacity='0.025'%3E%3Cpath d='M15,30 C5,40 5,55 15,65 C25,75 40,75 50,65 C60,55 60,40 50,30 C40,20 25,20 15,30 Z' fill='%23A58B65'/%3E%3Cpath d='M17,60 C28,54 28,42 31,39 C34,36 34,24 45,17 C34,30 34,36 31,39 C28,42 17,54 17,60 Z' fill='%2312100F' opacity='0.3'/%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120' width='120' height='120'%3E%3Cg transform='translate(15, 15) rotate(110)' opacity='0.03'%3E%3Cpath d='M25,50 C10,65 10,85 25,100 C40,115 60,115 75,100 C90,85 90,65 75,50 C60,35 40,35 25,50 Z' fill='%23A58B65'/%3E%3Cpath d='M28,95 C45,85 45,65 50,60 C55,55 55,35 72,25 C55,45 55,55 50,60 C45,65 28,85 28,95 Z' fill='%2312100F' opacity='0.3'/%3E%3C/g%3E%3C/svg%3E");
    background-position: top 300px left 20px, bottom 120px right 20px;
    background-repeat: no-repeat, no-repeat;
    background-size: 110px 110px, 90px 90px;
    background-attachment: fixed;
}

/* Header & Banner */
.header-banner {
    background: var(--base-black);
    color: var(--text-light);
    padding: 30px 20px 50px 20px;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    position: relative;
    box-shadow: 0 8px 30px rgba(18, 16, 15, 0.15);
}

.cafe-title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cafe-title-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 768px) {
    .cafe-title-wrapper {
        justify-content: center;
    }

    .cafe-info {
        text-align: center;
    }
}

.cafe-logo {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--coffee-yellow) 0%, var(--coffee-dark) 100%);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 20px;
    color: var(--base-black);
}

.cafe-info {
    margin-top: 20px;
}

.cafe-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.cafe-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
}

.table-badge {
    position: absolute;
    bottom: -15px;
    left: 20px;
    background: var(--coffee-yellow);
    color: var(--base-black);
    font-weight: 700;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(197, 168, 128, 0.4);
    border: 2px solid var(--base-white);
}

/* Category Navigation (Horizontal scrollable tabs) */
.category-nav {
    display: flex;
    gap: 10px;
    padding: 30px 20px 15px 20px;
    overflow-x: auto;
    scrollbar-width: none;
    /* Firefox */
}

.category-nav::-webkit-scrollbar {
    display: none;
    /* Safari & Chrome */
}

.category-tab {
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-tab.active {
    background: var(--base-black);
    color: var(--coffee-yellow);
    border-color: var(--base-black);
}

/* Search bar */
.search-wrapper {
    padding: 0 20px 15px 20px;
}

.search-input {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 14px;
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.search-input:focus {
    outline: none;
    border-color: var(--coffee-yellow);
    box-shadow: 0 4px 12px rgba(197, 168, 128, 0.15);
}

/* Menu Items List */
.menu-section {
    padding: 0 20px;
    margin-bottom: 25px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--base-black);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: var(--border-color);
}

.menu-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 14px;
    display: flex;
    gap: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.menu-card:active {
    transform: scale(0.98);
}

.menu-img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #fdfdfd;
}

.menu-img-placeholder {
    width: 90px;
    height: 90px;
    background: #f5f5f5;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: var(--coffee-yellow);
}

.menu-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--base-black);
}

.menu-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.menu-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--base-black);
}

.btn-add-cart {
    background: var(--base-black);
    color: var(--coffee-yellow);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.btn-add-cart:hover {
    background: var(--coffee-yellow);
    color: var(--base-black);
}

/* Sticky Float Cart Bar */
.cart-bar {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--base-black);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    padding: 16px 20px;
    display: none;
    /* Shown dynamically via JS */
    justify-content: space-between;
    align-items: center;
    z-index: 500;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }

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

.cart-bar-info {
    color: var(--text-light);
}

.cart-bar-count {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--coffee-yellow);
    letter-spacing: 0.5px;
}

.cart-bar-price {
    font-size: 17px;
    font-weight: 800;
    margin-top: 2px;
}

.btn-cart-view {
    background: var(--coffee-gradient, linear-gradient(135deg, var(--coffee-yellow) 0%, var(--coffee-dark) 100%));
    color: var(--base-black);
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(197, 168, 128, 0.3);
}

/* Modal Checkout */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: flex-end;
    /* Mobile drawer style: slides from bottom */
    align-items: flex-end;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    width: 100%;
    max-height: 85vh;
    background: var(--base-white);
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
    animation: drawerUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
}

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

    to {
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.modal-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--base-black);
}

.close-btn {
    background: var(--base-black);
    color: var(--coffee-yellow);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

/* Cart Item lists inside Modal */
.cart-items-list {
    margin-bottom: 24px;
    max-height: 250px;
    overflow-y: auto;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid rgba(197, 168, 128, 0.1);
}

.cart-item-info {
    flex-grow: 1;
    margin-right: 12px;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--base-black);
}

.cart-item-note-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px dashed var(--border-color);
    color: var(--text-muted);
    font-size: 11px;
    padding: 4px 0;
    margin-top: 6px;
}

.cart-item-note-input:focus {
    outline: none;
    border-bottom-color: var(--coffee-yellow);
    color: var(--text-dark);
}

.cart-item-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.cart-item-price {
    font-size: 13px;
    font-weight: 700;
}

/* Quantity controls in cart */
.qty-controls {
    display: flex;
    align-items: center;
    background: var(--base-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.qty-btn {
    background: transparent;
    border: none;
    width: 24px;
    height: 24px;
    font-size: 14px;
    font-weight: 700;
    color: var(--base-black);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.qty-btn:active {
    background: rgba(197, 168, 128, 0.1);
}

.qty-value {
    padding: 0 10px;
    font-size: 12px;
    font-weight: 700;
}

/* Forms */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--coffee-yellow);
    box-shadow: 0 0 10px rgba(197, 168, 128, 0.15);
}

/* Order Totals */
.order-summary {
    background: rgba(197, 168, 128, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 8px;
}

.summary-row:last-child {
    margin-bottom: 0;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
    font-size: 16px;
    font-weight: 800;
    color: var(--base-black);
}

.btn-checkout {
    width: 100%;
    background: var(--base-black);
    color: var(--coffee-yellow);
    border: none;
    padding: 14px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.btn-checkout:active {
    transform: scale(0.98);
}

/* Order Status / Timeline tracking styles */
.status-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    margin: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.status-icon-box {
    width: 70px;
    height: 70px;
    border-radius: 22px;
    background: rgba(197, 168, 128, 0.1);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    color: var(--coffee-yellow);
    margin-bottom: 16px;
}

.timeline {
    margin-top: 30px;
    text-align: left;
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 7px;
    bottom: 5px;
    width: 2px;
    background: rgba(197, 168, 128, 0.2);
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-badge {
    position: absolute;
    left: -24px;
    top: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--base-white);
    border: 3px solid rgba(197, 168, 128, 0.4);
}

.timeline-item.active .timeline-badge {
    background: var(--coffee-yellow);
    border-color: var(--base-black);
    box-shadow: 0 0 8px var(--coffee-yellow);
}

.timeline-item.completed .timeline-badge {
    background: var(--base-black);
    border-color: var(--coffee-yellow);
}

.timeline-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
}

.timeline-item.active .timeline-title {
    color: var(--base-black);
}

.timeline-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}