@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;800&family=DM+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --bg: #0c0c0c;
    --bg-card: #161616;
    --bg-elevated: #1c1c1c;
    --accent: #c9a96e;
    --accent-light: #e8d5a8;
    --accent-glow: rgba(201, 169, 110, 0.15);
    --text: #f0ece4;
    --text-muted: #8a8578;
    --text-dim: #5a564e;
    --border: rgba(201, 169, 110, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
}

* { box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    margin: 0;
    padding-bottom: 90px;
    -webkit-font-smoothing: antialiased;
}

html { scroll-behavior: smooth; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, .vintage-font {
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.handwritten {
    font-family: 'DM Sans', sans-serif;
    color: var(--text-muted);
    font-weight: 300;
    font-style: italic;
    font-size: 1rem;
}

/* ===== HEADER ===== */
.container.py-4 > .text-center h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--text);
    margin-bottom: 0;
    text-transform: none;
    letter-spacing: -0.5px;
}

/* ===== STICKY CATEGORY NAV ===== */
.category-nav-container {
    position: -webkit-sticky; /* iOS Safari */
    position: sticky;
    top: 0;
    z-index: 1020;
    background: rgba(12, 12, 12, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    margin-bottom: 24px;
}

.category-scroll {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 0 16px;
    scrollbar-width: none;
}
.category-scroll::-webkit-scrollbar { display: none; }

.cat-pill {
    white-space: nowrap;
    color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.3s ease;
    background: transparent;
    text-transform: uppercase;
}

.cat-pill:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-glow);
}

.cat-pill.active {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
    font-weight: 600;
}

/* ===== SEARCH ===== */
.category-nav-container .form-control {
    background: var(--bg-card) !important;
    border: 1px solid rgba(255,255,255,0.06) !important;
    color: var(--text) !important;
    border-radius: 50px;
    font-size: 0.85rem;
    padding-left: 36px;
    transition: border-color 0.3s;
}
.category-nav-container .form-control:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-glow) !important;
}

/* ===== SECTION HEADERS ===== */
.chalk-header {
    text-align: left;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.chalk-header span {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.chalk-header h2 {
    font-size: 1.6rem;
    color: var(--text);
    text-transform: none;
    letter-spacing: -0.3px;
    font-weight: 700;
}

/* ===== MENU ITEM CARDS ===== */
.menu-item-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: row;
    transition: all 0.35s ease;
    height: 100%;
}

.menu-item-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 32px rgba(201, 169, 110, 0.08);
    transform: translateY(-2px);
}

.video-frame {
    width: 140px;
    min-height: 140px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    background: var(--bg);
}

.video-frame img, .video-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.menu-item-card:hover .video-frame img,
.menu-item-card:hover .video-frame video {
    transform: scale(1.08);
}

.item-details {
    padding: 16px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.item-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.item-price {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
    margin-left: 12px;
}

.item-desc {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.5;
    margin-top: 6px;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
    cursor: pointer; transition: all 0.2s;
}
.item-desc.expanded {
    -webkit-line-clamp: unset; display: block; overflow: visible;
}

/* ===== NOTE INPUT ===== */
.chalk-note-input {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 6px 12px;
    width: 100%;
    margin-top: 8px;
    transition: border-color 0.3s;
    outline: none;
}
.chalk-note-input:focus {
    border-color: var(--accent);
    color: var(--text);
}
.chalk-note-input::placeholder { color: var(--text-dim); }

/* ===== BUTTONS ===== */
.btn-chalk {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-chalk:hover {
    background: var(--accent);
    color: var(--bg);
}

/* ===== AI PAIRING BOX ===== */
.ai-pairing-box {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease, margin 0.3s ease;
    padding: 0;
    margin: 0;
}

.ai-pairing-box.visible {
    max-height: 300px;
    padding: 10px 0 0;
    margin-top: 8px;
}

.ai-pairing-box .handwritten {
    font-style: italic;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.ai-pairing-box .d-flex {
    background: var(--accent-glow) !important;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.ai-pairing-box .bi-stars { color: var(--accent); }

.ai-pairing-box .btn {
    background: var(--accent);
    color: var(--bg);
    border: none;
    font-weight: 600;
    font-size: 0.7rem;
}

/* ===== FEATURED SECTION ===== */
.featured-section-content {
    border: 1px solid var(--accent) !important;
    border-radius: var(--radius) !important;
    background: var(--bg-card) !important;
}

.featured-video { border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }

/* ===== FAB CART ===== */
.fab-cart {
    display: none !important; /* Replaced by cart drawer + bottom nav */
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: var(--accent);
    color: var(--bg);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 1050;
    box-shadow: 0 8px 32px rgba(201, 169, 110, 0.3);
    transition: all 0.3s ease;
}

.fab-cart:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(201, 169, 110, 0.4);
}

/* ===== MODALS ===== */
.modal-chalk .modal-content {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
}

.modal-chalk .modal-header {
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
}

.modal-chalk .modal-footer {
    border-top: 1px solid var(--border);
    padding: 16px 20px;
}

.modal-chalk .list-group-item {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}

.modal-chalk .btn-close {
    filter: invert(1);
}

.border-gold { border-color: var(--accent) !important; }
.text-gold, .text-warning { color: var(--accent) !important; }
.bg-warning { background: var(--accent) !important; }

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    bottom: 100px;
    right: 24px;
    z-index: 9999;
}

.toast-item {
    background: var(--bg-elevated);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 12px 20px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    animation: toastIn 0.3s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== ANIMATIONS ===== */
.animate-pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ===== AI TRIGGER ===== */
.ai-trigger {
    color: var(--accent) !important;
    opacity: 0.6;
    transition: opacity 0.2s;
    font-size: 0.72rem !important;
}
.ai-trigger:hover { opacity: 1; }

/* ===== QUANTITY BADGE ON CARDS ===== */
.qty-badge {
    position: absolute; top: -6px; right: -6px;
    background: #ef4444; color: #fff;
    min-width: 22px; height: 22px;
    border-radius: 50%; font-size: 0.7rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg); z-index: 5;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    pointer-events: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .video-frame { width: 110px; min-height: 110px; }
    .item-details { padding: 12px 14px; }
    .item-title { font-size: 0.95rem; }
    .item-price { font-size: 1rem; }
    .featured-video { height: 280px !important; }
}

@media (max-width: 480px) {
    .menu-item-card { flex-direction: column; }
    .video-frame { width: 100%; min-height: 180px; }
    .row-cols-lg-2 > .col { flex: 0 0 100%; max-width: 100%; }
}

/* ===== FOOTER ===== */
footer {
    border-color: var(--border) !important;
    color: var(--text-dim);
}
footer a { color: var(--accent); text-decoration: none; }
