/* ==========================================================================
   EL REY DE LA EMPANADA PTY - DESIGN SYSTEM
   Palette: Mustard Yellow (#EAA221), Crimson Red (#DC2626), Dark Black (#0F0F11)
   ========================================================================== */

:root {
    --mustard-primary: #EAA221;
    --mustard-light: #F6C869;
    --mustard-dark: #C48410;
    --mustard-glow: rgba(234, 162, 33, 0.25);

    --red-accent: #DC2626;
    --red-hover: #B91C1C;
    --red-glow: rgba(220, 38, 38, 0.3);

    --bg-main: #0F0F11;
    --bg-card: #18181B;
    --bg-card-hover: #222226;
    --bg-elevated: #27272A;
    --border-color: rgba(255, 255, 255, 0.1);

    --text-primary: #FFFFFF;
    --text-secondary: #A1A1AA;
    --text-muted: #71717A;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 9999px;

    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(234, 162, 33, 0.3);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.5;
    padding-bottom: 110px;
    overflow-x: hidden;
}

/* NAVBAR */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 15, 17, 0.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 20px;
}

.nav-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.crown-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px var(--mustard-primary));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
    color: var(--mustard-primary);
}

.brand-sub {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--red-accent);
    letter-spacing: 1px;
}

.cart-btn-nav {
    background: var(--bg-card);
    border: 1px solid var(--mustard-primary);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
    transition: var(--transition-fast);
}

.cart-btn-nav:hover {
    background: var(--mustard-primary);
    color: #000;
}

.cart-badge {
    background: var(--red-accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* HERO SECTION */
.hero-section {
    position: relative;
    height: 240px;
    max-width: 900px;
    margin: 15px auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 24px;
    border: 1px solid var(--border-color);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.7);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15,15,17,0.2) 0%, rgba(15,15,17,0.95) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: #4ADE80;
    border-radius: 50%;
    box-shadow: 0 0 8px #4ADE80;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: #FFF;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    margin-bottom: 4px;
}

.hero-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--mustard-light);
    font-weight: 600;
}

/* SEARCH & FILTERS */
.filter-section {
    max-width: 900px;
    margin: 0 auto 15px;
    padding: 0 16px;
}

.search-box {
    position: relative;
    margin-bottom: 12px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 14px 44px;
    border-radius: var(--radius-md);
    color: #FFF;
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--mustard-primary);
    box-shadow: var(--mustard-glow);
}

.clear-search-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
}

.quick-tags {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
}

.quick-tags::-webkit-scrollbar {
    display: none;
}

.tag-chip {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 7px 16px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition-fast);
}

.tag-chip.active, .tag-chip:hover {
    background: var(--mustard-primary);
    color: #000;
    border-color: var(--mustard-primary);
    font-weight: 700;
}

/* CATEGORIES STICKY NAV */
.categories-nav {
    position: sticky;
    top: 60px;
    z-index: 90;
    background: rgba(15, 15, 17, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 16px;
    margin-bottom: 24px;
}

.categories-scroll {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-tab {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.88rem;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}

.category-tab.active {
    background: linear-gradient(135deg, var(--mustard-primary), var(--mustard-dark));
    color: #000;
    border-color: var(--mustard-primary);
    box-shadow: 0 4px 15px rgba(234, 162, 33, 0.3);
}

/* MENU SECTION & CARDS */
.menu-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
}

.category-group {
    margin-bottom: 36px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--red-accent);
}

.category-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

/* ITEM CARD */
.food-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.food-card:hover {
    transform: translateY(-4px);
    border-color: var(--mustard-primary);
    box-shadow: var(--shadow-card);
}

.food-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--mustard-primary);
    opacity: 0;
    transition: var(--transition-fast);
}

.food-card:hover::before {
    opacity: 1;
}

.card-top {
    display: flex;
    gap: 14px;
    margin-bottom: 12px;
}

.item-img-placeholder {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.item-info {
    flex: 1;
}

.item-badge {
    display: inline-block;
    background: rgba(220, 38, 38, 0.2);
    color: var(--red-accent);
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.item-name {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: #FFF;
    margin-bottom: 4px;
}

.item-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
}

.item-price {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--mustard-primary);
}

.add-item-btn {
    background: var(--red-accent);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-bounce);
    display: flex;
    align-items: center;
    gap: 6px;
}

.add-item-btn:hover {
    background: var(--red-hover);
    transform: scale(1.05);
    box-shadow: var(--red-glow);
}

/* FLOATING CART BAR */
.floating-cart-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    width: calc(100% - 32px);
    max-width: 600px;
    background: linear-gradient(135deg, #1C1917, #0F0F11);
    border: 2px solid var(--mustard-primary);
    border-radius: var(--radius-lg);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), var(--shadow-glow);
    z-index: 120;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-cart-bar.visible {
    transform: translateX(-50%) translateY(0);
}

.cart-count-pill {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.cart-total-price {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--mustard-primary);
}

.cart-action-btn {
    background: linear-gradient(135deg, var(--mustard-primary), var(--mustard-dark));
    color: #000;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: 0.92rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(234, 162, 33, 0.4);
    transition: var(--transition-fast);
}

.cart-action-btn:hover {
    transform: scale(1.04);
}

/* MODAL & DRAWER */
.modal-overlay, .drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay.active, .drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--mustard-primary);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    position: relative;
    padding: 24px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close, .drawer-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg-elevated);
    border: none;
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
}

/* CART DRAWER SPECIFIC */
.drawer-container {
    background: var(--bg-card);
    width: 100%;
    max-width: 520px;
    height: 85vh;
    border-radius: 24px 24px 0 0;
    position: fixed;
    bottom: 0;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: 1px solid var(--border-color);
    border-bottom: none;
    transform: translateY(100%);
    transition: transform 0.35s ease;
}

.drawer-overlay.active .drawer-container {
    transform: translateY(0);
}

.drawer-header h2 {
    font-family: var(--font-heading);
    color: var(--mustard-primary);
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.drawer-type-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: var(--bg-main);
    padding: 4px;
    border-radius: var(--radius-md);
}

.type-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.type-btn.active {
    background: var(--mustard-primary);
    color: #000;
}

.table-input-group {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-elevated);
    padding: 8px 14px;
    border-radius: var(--radius-md);
}

.table-input-group label {
    font-size: 0.85rem;
    font-weight: 600;
}

.table-input-group input {
    width: 80px;
    background: var(--bg-card);
    border: 1px solid var(--mustard-primary);
    color: white;
    padding: 6px;
    border-radius: 6px;
    text-align: center;
    font-weight: 700;
}

.drawer-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 16px;
    padding-right: 4px;
}

.cart-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #FFF;
}

.cart-item-opts {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 700;
    cursor: pointer;
}

.cart-notes input {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.85rem;
    margin-bottom: 14px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.summary-row.highlight {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--mustard-primary);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.whatsapp-send-btn {
    width: 100%;
    margin-top: 14px;
    background: #25D366;
    color: black;
    border: none;
    padding: 14px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition-fast);
}

.whatsapp-send-btn:hover {
    background: #20ba5a;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
}
