/* The Unbound Chef - Mobile App Style CSS */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f5f5f7;
    color: #1a1a1a;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Header */
.app-header {
    background: white;
    padding: 14px 16px 10px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.greeting {
    font-size: 13px;
    color: #666;
}

.greeting strong {
    color: #1a1a1a;
    font-weight: 600;
}

.deliver-to {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
    color: #1a1a1a;
}

.deliver-to span {
    color: #E31C23;
}

/* Search */
.search-bar {
    background: #f5f5f5;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    width: calc(100% - 40px);
    font-size: 14px;
    color: #999;
}

/* Categories */
.categories-section {
    padding: 0 20px 16px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.see-all {
    color: #E31C23;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.categories-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}

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

.category-item {
    min-width: 72px;
    text-align: center;
    cursor: pointer;
}

.category-icon {
    width: 64px;
    height: 64px;
    background: #fff0f0;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 28px;
    transition: transform 0.2s;
}

.category-item:hover .category-icon,
.category-item.active .category-icon {
    transform: scale(1.05);
    background: linear-gradient(135deg, #E31C23, #8B0000);
    color: white;
}

.category-name {
    font-size: 12px;
    font-weight: 500;
}

/* Restaurant / Kitchen Card */
.kitchen-card {
    background: white;
    border-radius: 16px;
    margin: 0 20px 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.kitchen-image {
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, #E31C23, #C41E3A);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.kitchen-info {
    padding: 14px 16px;
}

.kitchen-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.kitchen-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #666;
}

.rating {
    color: #E31C23;
    font-weight: 600;
}

/* Menu Items Grid */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 20px 100px;
}

.menu-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
}

.menu-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.menu-card img, .menu-placeholder {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
}

.menu-card-info {
    padding: 10px 12px 12px;
}

.menu-card-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}

.menu-card-price {
    color: #E31C23;
    font-weight: 700;
    font-size: 14px;
}

/* Floating Cart Bar */
.floating-cart {
    position: fixed;
    bottom: 68px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 456px;
    background: linear-gradient(135deg, #E31C23, #8B0000);
    color: white;
    border-radius: 14px;
    padding: 10px 14px;
    box-shadow: 0 4px 16px rgba(227, 28, 35, 0.4);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.floating-cart a.btn-primary {
    background: white !important;
    color: #E31C23 !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    border-radius: 10px !important;
    width: auto !important;
    font-weight: 600;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 10px 0 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    z-index: 100;
}

.nav-item {
    text-align: center;
    text-decoration: none;
    color: #999;
    font-size: 11px;
    font-weight: 500;
}

.nav-item.active {
    color: #E31C23;
}

.nav-item i {
    font-size: 22px;
    display: block;
    margin-bottom: 2px;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #E31C23, #8B0000);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(227, 28, 35, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #c41e3a, #6b0000);
    box-shadow: 0 6px 16px rgba(227, 28, 35, 0.4);
}

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

/* Item Detail Page */
.item-detail {
    background: white;
    min-height: 100vh;
}

.item-hero {
    width: 100%;
    height: 280px;
    background: #f5f5f5;
    position: relative;
}

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

.back-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #1a1a1a;
    font-size: 18px;
}

.item-content {
    padding: 20px;
    padding-bottom: 100px;
}

.item-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.item-restaurant {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.item-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 13px;
}

.item-price {
    font-size: 24px;
    font-weight: 700;
    color: #E31C23;
    margin: 16px 0;
}

.size-options, .ingredients {
    margin: 16px 0;
}

.size-options h4, .ingredients h4 {
    font-size: 14px;
    margin-bottom: 10px;
}

.size-btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1.5px solid #eee;
    border-radius: 20px;
    margin-right: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    cursor: pointer;
}

.size-btn.active {
    border-color: #E31C23;
    background: #fff0f0;
    color: #E31C23;
}

/* Cart */
.cart-item {
    background: white;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    gap: 12px;
}

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

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid #E31C23;
    background: white;
    color: #E31C23;
    font-weight: bold;
    cursor: pointer;
}

/* Modal / Offer */
.offer-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.offer-modal.show {
    opacity: 1;
    pointer-events: all;
}

.offer-content {
    background: linear-gradient(180deg, #FFD700, #E31C23);
    border-radius: 20px;
    padding: 30px 24px;
    text-align: center;
    color: white;
    width: 85%;
    max-width: 340px;
    position: relative;
    animation: popIn 0.4s ease;
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.offer-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.3);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
}

/* Success Modal */
.success-modal {
    position: fixed;
    inset: 0;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.success-check {
    width: 80px;
    height: 80px;
    background: #E31C23;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
    margin-bottom: 20px;
    position: relative;
}

.sparkle {
    position: absolute;
    color: #E31C23;
    font-size: 14px;
    animation: sparkle 1.5s infinite;
}

/* Admin styles */
.admin-body {
    max-width: 100%;
    background: #f4f6f9;
}

.admin-sidebar {
    background: #1a1a1a;
    color: white;
    width: 240px;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 20px 0;
}

.admin-content {
    margin-left: 240px;
    padding: 24px;
}

.admin-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.status-pending { background: #fff3cd; color: #856404; padding: 4px 8px; border-radius: 20px; font-size: 12px; }
.status-confirmed { background: #d1ecf1; color: #0c5460; padding: 4px 8px; border-radius: 20px; font-size: 12px; }
.status-delivered { background: #d4edda; color: #155724; padding: 4px 8px; border-radius: 20px; font-size: 12px; }

/* Responsive */
@media (max-width: 480px) {
    .admin-sidebar { display: none; }
    .admin-content { margin-left: 0; }
}
