:root {
    --background: #0d0b09;
    --foreground: #e4e1db;
    --card: #14110e;
    --border: #2a241d;
    --primary: #c29d61;
    --primary-foreground: #0d0b09;
    --secondary: #221a13;
    --muted: #28211a;
    --muted-foreground: #8e8276;
    --gold: #c29d61;
    --gold-dim: #8a6a3b;
    --radius: 0.75rem;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-color: var(--border);
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    background-color: var(--background);
    color: var(--foreground);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
.font-medieval {
    font-family: 'MedievalSharp', cursive;
}

.max-w-6xl {
    max-width: 72rem;
    margin: 0 auto;
}

.container {
    padding: 0 1.5rem;
}

/* Text & Gradients */
.text-gold-gradient {
    background: linear-gradient(135deg, #c29d61, #e6d3b3, #c29d61);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Section */
.bg-stone-texture {
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../../hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cards & Layout */
.card-float {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-float:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(194, 157, 97, 0.15);
}

.grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .grid-cols-2-md {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Menu Item Specifics */
.menu-item-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(34, 26, 19, 0.5);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(42, 36, 29, 0.3);
    transition: all 0.2s ease;
}

.menu-item-card:hover {
    background: rgba(42, 36, 29, 0.6);
    border-color: var(--gold);
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 2;
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    /* Increased z-index */
    pointer-events: auto;
}

.modal-content {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    pointer-events: auto;
}

/* Tabs */
.tabs-list {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    background: var(--secondary);
    padding: 0.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    border: none;
    background: transparent;
    color: var(--foreground);
    cursor: pointer;
    white-space: nowrap;
}

.tab-btn.active {
    background: var(--primary);
    color: var(--primary-foreground);
    font-weight: bold;
}

/* Button Reset & Premium Styles */
button {
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    cursor: pointer;
}

/* Restore Desktop Premium Styles with high specificity */
body .btn-premium-gold {
    background: #c29d61 !important;
    color: #0d0b09 !important;
    border: none !important;
    padding: 1rem 2.5rem;
    font-size: 1.25rem;
    font-weight: bold;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(194, 157, 97, 0.4) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

body .btn-premium-gold:hover,
body .btn-premium-gold:active {
    background: #d4b47a !important;
    box-shadow: 0 0 30px rgba(194, 157, 97, 0.7) !important;
    transform: translateY(-2px);
}

body .btn-premium-outline {
    background: transparent !important;
    color: #c29d61 !important;
    border: 2px solid #c29d61 !important;
    padding: 1rem 2.5rem;
    font-size: 1.25rem;
    font-weight: bold;
    border-radius: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

body .btn-premium-outline:hover,
body .btn-premium-outline:active {
    background: rgba(194, 157, 97, 0.1) !important;
    box-shadow: 0 0 20px rgba(194, 157, 97, 0.3) !important;
    transform: translateY(-2px);
}

/* Order Grid Logic */
.order-layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
}

@media (min-width: 1024px) {
    .order-layout-grid {
        grid-template-columns: 2fr 1fr;
    }
}

/* Animations */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(194, 157, 97, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(194, 157, 97, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(194, 157, 97, 0);
    }
}

/* Mobile Fixes (Strict) */
@media (max-width: 767px) {
    .bg-stone-texture {
        background-attachment: scroll !important;
        /* Fix for touch events */
    }

    .modal-content {
        padding: 1.5rem 1rem !important;
        width: calc(100% - 20px) !important;
        margin: 10px !important;
        max-height: calc(100vh - 40px) !important;
        overflow-x: hidden !important;
    }

    .grid-cols-2-md {
        grid-template-columns: 1fr !important;
    }

    .hero-btn-container {
        flex-direction: column !important;
        width: 100% !important;
        padding: 0 1.5rem !important;
        gap: 1rem !important;
    }

    .hero-btn-container button {
        width: 100% !important;
        margin: 0 !important;
    }

    /* Fixed Button visibility */
    #view-list-fab {
        z-index: 3000 !important;
    }
}