/* Common Styles */
:root {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #666666;
    --accent-primary: #ff7f50;
    --accent-secondary: #ffcc33;
    --success: #00c851;
    --warning: #ffbb33;
    --error: #ff4444;
    --border: #333333;
    --shadow: rgba(0, 0, 0, 0.3);
    --gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    max-width: 100%;
    padding: 0 16px 80px;
    margin: 0 auto;
}

/* Header Styles */
.header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    background-color: var(--bg-primary);
    z-index: 100;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--accent-primary);
    flex-shrink: 0;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.restaurant-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.restaurant-tagline {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

.location-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
}

.location-selector:hover {
    border-color: var(--accent-primary);
    background-color: var(--bg-tertiary);
}

.location-icon {
    width: 18px;
    height: 18px;
    fill: var(--accent-primary);
    flex-shrink: 0;
}

.location-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.location-label {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
}

.location-address {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-arrow {
    width: 16px;
    height: 16px;
    fill: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.location-selector:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.back-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.back-btn:hover {
    background-color: var(--bg-tertiary);
}

.back-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.search-toggle, .settings-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-toggle:hover, .settings-btn:hover {
    background-color: var(--bg-tertiary);
}

.search-toggle svg, .settings-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.clear-cart {
    background: none;
    border: none;
    color: var(--error);
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.clear-cart:hover {
    background-color: var(--bg-tertiary);
}

/* Search Styles */
.search-container {
    margin-bottom: 20px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    transition: border-color 0.2s ease;
}

.search-box:focus-within {
    border-color: var(--accent-primary);
}

.search-icon {
    width: 20px;
    height: 20px;
    fill: var(--text-muted);
    margin-right: 12px;
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.filter-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.filter-btn:hover {
    color: var(--accent-primary);
    background-color: rgba(255, 127, 80, 0.1);
}

.filter-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Button Styles */
.btn-primary {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(255, 127, 80, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.btn-secondary svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 8px 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}

.nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 12px;
    font-weight: 500;
}

.nav-item:hover, .nav-item.active {
    color: var(--accent-primary);
    background-color: rgba(255, 127, 80, 0.1);
}

.nav-item svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.cart-badge {
    position: absolute;
    top: 4px;
    right: 8px;
    background: var(--gradient);
    color: white;
    border-radius: 10px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
}

/* Loading Skeleton */
.skeleton-loader {
    display: none;
}

.skeleton-loader.show {
    display: block;
}

.skeleton-item {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    animation: skeleton-pulse 1.5s ease-in-out infinite alternate;
}

.skeleton-image {
    width: 100%;
    height: 120px;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 12px;
}

.skeleton-text {
    height: 16px;
    background-color: var(--bg-tertiary);
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

@keyframes skeleton-pulse {
    0% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 18px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 14px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

.slide-in-up {
    animation: slideInUp 0.3s ease-out;
}

/* Responsive Design */
@media (min-width: 768px) {
    .header-top {
        gap: 24px;
    }
    
    .logo {
        width: 60px;
        height: 60px;
    }
    
    .restaurant-name {
        font-size: 28px;
    }
    
    .restaurant-tagline {
        font-size: 14px;
    }
    
    .location-selector {
        min-width: 180px;
        padding: 12px 16px;
    }
    
    .location-label {
        font-size: 11px;
    }
    
    .location-address {
        font-size: 14px;
    }
    
    .container {
        max-width: 768px;
        padding: 0 24px 80px;
        margin: 0 auto;
    }
    
    .header {
        padding: 20px 0;
    }
    
    .search-container {
        margin-bottom: 24px;
    }
}

@media (min-width: 1024px) {
    .header-top {
        gap: 32px;
    }
    
    .container {
        max-width: 1024px;
        padding: 0 32px 80px;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }

.p-8 { padding: 8px; }
.p-16 { padding: 16px; }
.p-20 { padding: 20px; }
.p-24 { padding: 24px; }

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }

.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }

.rounded-8 { border-radius: 8px; }
.rounded-12 { border-radius: 12px; }
.rounded-16 { border-radius: 16px; }
