/* ========================================
   SamVal & Sushi - PWA Styles
   ======================================== */

:root {
    --primary: #dd0002;
    --primary-dark: #b10002;
    --secondary: #ffffff;
    --dark: #0d0d0d;
    --gold: #f4a261;
    --light: #1a1a1a;
    --gray: #9ca3af;
    --light-gray: #2a2a2a;
    --success: #2d6a4f;
    --white: #111111;
    --shadow: 0 2px 10px rgba(0,0,0,0.4);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.5);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: #0a0a0a;
    color: var(--secondary);
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

.hidden { display: none !important; }

/* ========================================
   Splash Screen
   ======================================== */
.splash {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #111111 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.splash.fade-out {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    text-align: center;
    color: white;
}

.splash-logo {
    margin-bottom: 20px;
    animation: bounce 1s ease infinite;
}

.splash-logo-img {
    width: 110px;
    height: 110px;
    border-radius: 22px;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(221, 0, 2, 0.4);
    border: 3px solid rgba(255,255,255,0.15);
}

.splash-content h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.splash-content p {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 32px;
}

.splash-loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ========================================
   Header
   ======================================== */
.header {
    background: var(--white);
    padding: 16px 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: none;
    border-bottom: 1px solid var(--light-gray);
}

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

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

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-icon img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 12px rgba(221, 0, 2, 0.3);
}

.logo-section h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary);
    line-height: 1.2;
}

.logo-section h1 .brand-highlight {
    color: var(--primary);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--success);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--light);
    border-radius: 50%;
    font-size: 16px;
    color: var(--secondary);
    cursor: pointer;
}

/* Mode Toggle */
.mode-toggle {
    display: flex;
    background: var(--light);
    border-radius: var(--radius);
    padding: 3px;
    margin-bottom: 12px;
}

.mode-btn {
    flex: 1;
    padding: 8px;
    border: none;
    background: none;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.3s;
}

.mode-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(221, 0, 2, 0.3);
}

/* Search */
.search-bar {
    display: flex;
    align-items: center;
    background: var(--light);
    border-radius: var(--radius);
    padding: 10px 14px;
    gap: 10px;
    margin-bottom: 12px;
}

.search-bar i {
    color: var(--gray);
    font-size: 14px;
}

.search-bar input {
    flex: 1;
    border: none;
    background: none;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    outline: none;
    color: var(--secondary);
}

.search-bar input::placeholder {
    color: #6b7280;
}

/* ========================================
   Categories Nav
   ======================================== */
.categories-nav {
    display: flex;
    gap: 8px;
    padding: 8px 16px 12px;
    overflow-x: auto;
    scrollbar-width: none;
    background: var(--white);
    position: sticky;
    top: 175px;
    z-index: 99;
}

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

.cat-btn {
    white-space: nowrap;
    padding: 8px 16px;
    border: 1.5px solid var(--light-gray);
    background: var(--white);
    border-radius: 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.cat-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ========================================
   Promo Banner
   ======================================== */
.promo-banner {
    margin: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.promo-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.promo-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.promo-content p {
    font-size: 12px;
    opacity: 0.9;
}

.promo-emoji {
    font-size: 40px;
}

/* ========================================
   Menu Content
   ======================================== */
.menu-content {
    padding: 0 16px 120px;
}

.menu-section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--secondary);
}

.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.menu-item {
    background: #151515;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--light-gray);
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
}

.menu-item:active {
    transform: scale(0.97);
}

.item-image {
    width: 100%;
    height: 120px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.item-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.item-info {
    padding: 10px;
}

.item-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-desc {
    font-size: 11px;
    color: var(--gray);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.item-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}

.add-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.add-btn:active {
    transform: scale(0.9);
    background: var(--primary-dark);
}

/* List style for some categories */
.menu-list .menu-item {
    display: flex;
    flex-direction: row;
}

.menu-list .item-image {
    width: 100px;
    height: auto;
    min-height: 90px;
    flex-shrink: 0;
}

.menu-list .item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ========================================
   Floating Cart
   ======================================== */
.cart-floating {
    position: fixed;
    bottom: 80px;
    left: 16px;
    right: 16px;
    background: #1a1a1a;
    color: white;
    border-radius: var(--radius);
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--light-gray);
    cursor: pointer;
    z-index: 90;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
}

.cart-floating.visible {
    transform: translateY(0);
    opacity: 1;
}

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

.cart-count {
    background: var(--primary);
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.cart-total {
    font-weight: 700;
    font-size: 16px;
}

/* ========================================
   Bottom Nav
   ======================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    display: flex;
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    border-top: 1px solid var(--light-gray);
    z-index: 100;
}

.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border: none;
    background: none;
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    color: var(--gray);
    cursor: pointer;
    padding: 4px;
}

.nav-btn i {
    font-size: 20px;
}

.nav-btn.active {
    color: var(--primary);
}

/* ========================================
   Modals
   ======================================== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    width: 100%;
    max-height: 90vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.modal.open .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--light-gray);
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 10;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.close-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--light);
    border-radius: 50%;
    font-size: 14px;
    color: var(--secondary);
    cursor: pointer;
}

.floating-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 20;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    color: #ffffff;
}

/* Cart Modal */
.cart-items {
    padding: 16px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--light-gray);
}

.cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 600;
}

.cart-item-price {
    font-size: 14px;
    color: var(--primary);
    font-weight: 600;
}

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

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1.5px solid #3a3a3a;
    background: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
}

.qty-btn.minus {
    color: var(--primary);
    border-color: var(--primary);
}

.qty-num {
    font-weight: 600;
    font-size: 14px;
    min-width: 20px;
    text-align: center;
}

.cart-summary {
    padding: 16px 20px;
    border-top: 1px solid var(--light-gray);
    background: var(--light);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--gray);
}

.summary-row.total {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--light-gray);
}

.order-btn {
    width: 100%;
    padding: 14px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: background 0.2s;
}

.order-btn:active {
    background: var(--primary-dark);
}

.cart-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--gray);
}

.cart-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.cart-empty p {
    font-size: 16px;
    margin-bottom: 16px;
}

.browse-btn {
    padding: 10px 24px;
    border: 2px solid var(--primary);
    background: none;
    color: var(--primary);
    border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* Item Modal */
.item-hero {
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center;
}

.item-details {
    padding: 20px;
}

.item-details h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.item-details .detail-desc {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 16px;
}

.item-details .detail-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
}

.detail-qty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.detail-qty .qty-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
}

.detail-qty .qty-num {
    font-size: 20px;
}

.add-to-cart-btn {
    width: 100%;
    padding: 14px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* ========================================
   Confirm Modal
   ======================================== */
.confirm-modal {
    text-align: center;
    padding: 40px 20px;
}

.confirm-animation {
    margin-bottom: 20px;
}

.check-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: 36px;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.confirm-modal h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.confirm-modal > p {
    color: var(--gray);
    margin-bottom: 24px;
}

.order-tracking {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 20px;
}

.track-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.track-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 14px;
}

.track-step.active .track-icon {
    background: var(--success);
    color: white;
}

.track-step span {
    font-size: 11px;
    color: var(--gray);
}

.track-line {
    width: 40px;
    height: 2px;
    background: var(--light-gray);
    margin-bottom: 20px;
}

.eta {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 20px;
}

/* ========================================
   Loyalty Tab
   ======================================== */
.loyalty-card {
    margin: 16px;
    background: linear-gradient(135deg, #1a1a1a 0%, #222222 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    color: white;
    border: 1px solid var(--light-gray);
}

.loyalty-header h2 {
    font-size: 20px;
    margin-bottom: 2px;
}

.loyalty-header p {
    font-size: 13px;
    opacity: 0.7;
    margin-bottom: 20px;
}

.points-display {
    text-align: center;
    margin-bottom: 12px;
}

.points-num {
    font-size: 48px;
    font-weight: 700;
    color: var(--gold);
}

.points-label {
    font-size: 14px;
    opacity: 0.7;
    margin-left: 4px;
}

.progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), #e76f51);
    border-radius: 4px;
    transition: width 0.5s;
}

.progress-text {
    font-size: 12px;
    opacity: 0.8;
    text-align: center;
    margin-bottom: 20px;
}

.stamps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.stamp {
    aspect-ratio: 1;
    border: 2px dashed rgba(255,255,255,0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0.5;
}

.stamp.filled {
    background: var(--success);
    border-color: var(--success);
    opacity: 1;
    color: white;
}

.stamp.gift {
    border-color: var(--gold);
    color: var(--gold);
    opacity: 1;
}

.stamp-info {
    text-align: center;
    font-size: 12px;
    opacity: 0.7;
}

.rewards-section {
    padding: 20px 16px 100px;
}

.rewards-section h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.reward-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--white);
    padding: 14px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 10px;
}

.reward-icon {
    font-size: 32px;
}

.reward-info {
    flex: 1;
}

.reward-info h4 {
    font-size: 14px;
    font-weight: 600;
}

.reward-info p {
    font-size: 12px;
    color: var(--gray);
}

.reward-btn {
    padding: 6px 14px;
    border: 1.5px solid var(--light-gray);
    background: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray);
}

/* ========================================
   Delivery Animation
   ======================================== */
.delivery-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #111111 100%);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s;
}

.delivery-overlay.active {
    opacity: 1;
    visibility: visible;
}

.delivery-scene {
    width: 100%;
    max-width: 360px;
    height: 200px;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

/* Road */
.road {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,0.15);
}

.road::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: repeating-linear-gradient(90deg, rgba(255,255,255,0.4) 0px, rgba(255,255,255,0.4) 20px, transparent 20px, transparent 40px);
    animation: roadMove 1s linear infinite;
}

@keyframes roadMove {
    from { transform: translateX(0); }
    to { transform: translateX(-40px); }
}

/* Motorcycle SVG */
.moto-container {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    animation: motoRide 0.5s ease-in-out infinite alternate;
}

@keyframes motoRide {
    from { transform: translateX(-50%) translateY(0) rotate(-1deg); }
    to { transform: translateX(-50%) translateY(-3px) rotate(1deg); }
}

.moto-svg {
    width: 120px;
    height: 80px;
}

/* Delivery bag on back */
.delivery-bag {
    position: absolute;
    bottom: 50px;
    left: 50%;
    margin-left: 20px;
    width: 36px;
    height: 32px;
    background: var(--primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    animation: bagBounce 0.5s ease-in-out infinite alternate;
    box-shadow: 0 2px 8px rgba(221, 0, 2, 0.4);
}

.delivery-bag::after {
    content: '🍣';
    font-size: 18px;
}

@keyframes bagBounce {
    from { transform: translateY(0) rotate(-2deg); }
    to { transform: translateY(-4px) rotate(2deg); }
}

/* Smoke particles */
.smoke {
    position: absolute;
    bottom: 30px;
    left: 50%;
    margin-left: -50px;
}

.smoke-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    animation: smokeAnim 0.8s ease-out infinite;
}

.smoke-particle:nth-child(2) {
    animation-delay: 0.2s;
    bottom: 4px;
}

.smoke-particle:nth-child(3) {
    animation-delay: 0.4s;
    bottom: 8px;
}

@keyframes smokeAnim {
    from { opacity: 0.6; transform: translateX(0) scale(1); }
    to { opacity: 0; transform: translateX(-30px) scale(2); }
}

/* Status text */
.delivery-status {
    color: white;
    text-align: center;
}

.delivery-status h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.delivery-status p {
    font-size: 14px;
    opacity: 0.6;
}

/* Progress dots */
.delivery-progress {
    display: flex;
    gap: 8px;
    margin-top: 24px;
}

.delivery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
}

.delivery-dot.active {
    background: var(--primary);
    animation: dotPulse 1s ease infinite;
}

.delivery-dot.done {
    background: var(--success);
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Arrival animation */
.delivery-overlay.arrived .moto-container {
    animation: motoArrive 1s ease forwards;
}

@keyframes motoArrive {
    0% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.1); }
    100% { transform: translateX(-50%) scale(1) translateY(-10px); }
}

.delivery-check {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 60px;
    height: 60px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: 0 4px 20px rgba(45, 106, 79, 0.4);
}

.delivery-overlay.arrived .delivery-check {
    animation: checkPop 0.4s 0.5s ease forwards;
}

@keyframes checkPop {
    from { transform: translateX(-50%) scale(0); }
    to { transform: translateX(-50%) scale(1); }
}

/* ========================================
   Animations
   ======================================== */
.menu-item {
    animation: fadeUp 0.4s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   Responsive (tablet)
   ======================================== */
@media (min-width: 768px) {
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .modal-content {
        max-width: 480px;
        margin: 0 auto;
        border-radius: var(--radius-xl);
    }
    .cart-floating {
        max-width: 448px;
        left: 50%;
        transform: translateX(-50%) translateY(100px);
    }
    .cart-floating.visible {
        transform: translateX(-50%) translateY(0);
    }
}

/* ========================================
   Payment Modal
   ======================================== */
.payment-modal {
    max-height: 92vh;
}

.payment-body {
    padding: 0 20px 20px;
}

.payment-subtitle {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 16px;
    text-align: center;
}

.payment-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--light);
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 15px;
}

.payment-amount strong {
    font-size: 20px;
    color: var(--primary);
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.payment-method {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--light-gray);
    background: var(--white);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
}

.payment-method:hover,
.payment-method:active {
    border-color: var(--primary);
    background: #1a1010;
    transform: scale(0.99);
}

.pm-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pm-icon {
    width: 48px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    flex-shrink: 0;
}

.card-icon {
    gap: 4px;
}

.applepay-icon {
    background: #000;
    border-radius: 6px;
    color: #fff;
}

.applepay-icon i {
    color: #fff !important;
}

.cash-icon {
    background: #1a2e1f;
    border-radius: 6px;
}

.pm-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.pm-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary);
}

.pm-desc {
    font-size: 11px;
    color: var(--gray);
}

.pm-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    flex-shrink: 0;
}

.pm-badge.popular {
    background: #2e1a00;
    color: #ffb74d;
}

.payment-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    color: var(--gray);
    font-size: 12px;
    border-top: 1px solid var(--light-gray);
}

.payment-footer i {
    color: var(--success);
    font-size: 14px;
}

.payment-processing {
    position: absolute;
    inset: 0;
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    z-index: 10;
}

.processing-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--light-gray);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}

.payment-processing h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.payment-processing p {
    font-size: 14px;
    color: var(--gray);
}

/* ========================================
   Profile Tab - Login Screen
   ======================================== */
.profile-login {
    padding: 30px 20px 100px;
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo {
    margin-bottom: 14px;
}

.login-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.login-header p {
    font-size: 14px;
    color: var(--gray);
}

.social-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 13px 20px;
    border: none;
    border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

.social-btn .social-icon {
    flex-shrink: 0;
}

.social-icon-fa {
    font-size: 18px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.google-btn {
    background: var(--white);
    color: var(--secondary);
    border: 1.5px solid var(--light-gray);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.facebook-btn {
    background: #1877F2;
    color: #fff;
}

.apple-btn {
    background: #000;
    color: #fff;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0;
    color: var(--gray);
    font-size: 13px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--light-gray);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-field label {
    font-size: 13px;
    font-weight: 500;
    color: var(--secondary);
}

.form-field input {
    padding: 12px 14px;
    border: 1.5px solid var(--light-gray);
    border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background: var(--white);
    color: var(--secondary);
}

.form-field input::placeholder {
    color: #6b7280;
}

.form-field input:focus {
    border-color: var(--primary);
}

.login-submit-btn {
    padding: 14px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    transition: background 0.2s;
}

.login-submit-btn:active {
    background: var(--primary-dark);
}

.create-account-link {
    text-align: center;
    font-size: 13px;
    color: var(--gray);
}

.create-account-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* ========================================
   Profile Tab - Logged In
   ======================================== */
.profile-logged-in {
    padding: 20px 16px 100px;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #1a1a1a 0%, #222222 100%);
    padding: 24px 20px;
    border-radius: var(--radius-lg);
    color: white;
    margin-bottom: 20px;
    border: 1px solid var(--light-gray);
}

.profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    border: 3px solid rgba(255,255,255,0.3);
}

.profile-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 2px;
}

.profile-info p {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 6px;
}

.connected-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.profile-menu {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 15px 16px;
    border: none;
    background: none;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--secondary);
    cursor: pointer;
    border-bottom: 1px solid var(--light-gray);
    text-align: left;
}

.profile-menu-item:last-child {
    border-bottom: none;
}

.profile-menu-item i:first-child {
    width: 20px;
    text-align: center;
    color: var(--gray);
    font-size: 15px;
}

.profile-menu-item span {
    flex: 1;
}

.profile-menu-item i:last-child {
    color: var(--gray);
    font-size: 12px;
}

.order-history {
    margin-bottom: 20px;
}

.order-history h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 14px;
}

.order-history-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 10px;
}

.order-history-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.order-history-number {
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary);
}

.order-history-date {
    font-size: 11px;
    color: var(--gray);
}

.order-status-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.order-status-badge.delivered {
    background: #1a2e1f;
    color: #4ade80;
}

.order-status-badge.pickup {
    background: #0d1f3c;
    color: #60a5fa;
}

.order-history-items {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 10px;
    line-height: 1.5;
}

.order-history-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-history-total {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.reorder-btn {
    padding: 7px 16px;
    border: 1.5px solid var(--primary);
    background: none;
    color: var(--primary);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.reorder-btn:active {
    background: var(--primary);
    color: white;
}

.logout-btn {
    width: 100%;
    padding: 14px;
    border: 1.5px solid var(--light-gray);
    background: var(--white);
    color: var(--gray);
    border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.logout-btn:active {
    background: #1a1010;
    color: var(--primary);
    border-color: var(--primary);
}

/* ========================================
   Orders Tab - Tracking View
   ======================================== */
.orders-empty {
    text-align: center;
    padding: 60px 20px 100px;
    color: var(--gray);
}

.orders-empty i {
    font-size: 56px;
    opacity: 0.2;
    margin-bottom: 16px;
    display: block;
}

.orders-empty h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 6px;
}

.orders-empty p {
    font-size: 14px;
    margin-bottom: 20px;
}

.orders-empty .order-btn {
    display: inline-block;
    width: auto;
    padding: 12px 28px;
}

/* Active order tracking */
.order-tracking-view {
    padding: 16px 16px 100px;
}

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

.tracking-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.tracking-order-num {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    background: #1a1010;
    padding: 4px 12px;
    border-radius: 20px;
}

/* Progress Steps */
.tracking-progress {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.tracking-steps {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    margin-bottom: 16px;
}

.tracking-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 30px;
    right: 30px;
    height: 3px;
    background: var(--light-gray);
    z-index: 0;
}

.tracking-steps .progress-line {
    position: absolute;
    top: 20px;
    left: 30px;
    height: 3px;
    background: var(--success);
    z-index: 1;
    transition: width 0.8s ease;
}

.track-step-v2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 2;
    flex: 1;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--gray);
    transition: all 0.3s;
}

.track-step-v2.completed .step-circle {
    background: var(--success);
    color: white;
}

.track-step-v2.active .step-circle {
    background: var(--primary);
    color: white;
    animation: stepPulse 1.5s ease infinite;
    box-shadow: 0 0 0 6px rgba(221, 0, 2, 0.2);
}

@keyframes stepPulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(221, 0, 2, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(221, 0, 2, 0.1); }
}

.step-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--gray);
    text-align: center;
    max-width: 70px;
}

.track-step-v2.completed .step-label,
.track-step-v2.active .step-label {
    color: var(--secondary);
    font-weight: 600;
}

.tracking-eta {
    text-align: center;
    padding: 10px;
    background: #1a1010;
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--secondary);
}

.tracking-eta i {
    color: var(--primary);
    margin-right: 6px;
}

.tracking-eta strong {
    color: var(--primary);
}

/* Simulated Map */
.tracking-map {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    position: relative;
}

.map-container {
    width: 100%;
    height: 200px;
    background: #1a2a1a;
    position: relative;
    overflow: hidden;
}

.map-svg {
    width: 100%;
    height: 100%;
}

/* Map streets */
.map-street {
    stroke: #2a3a2a;
    stroke-width: 8;
    stroke-linecap: round;
    fill: none;
}

.map-street-main {
    stroke: #3a4a3a;
    stroke-width: 12;
    stroke-linecap: round;
    fill: none;
}

.map-building {
    fill: #253025;
    rx: 2;
    ry: 2;
}

.map-route {
    stroke: var(--primary);
    stroke-width: 3;
    stroke-dasharray: 8 6;
    fill: none;
    stroke-linecap: round;
    animation: routeDash 1s linear infinite;
}

@keyframes routeDash {
    to { stroke-dashoffset: -14; }
}

/* Delivery dot on map */
.map-delivery-dot {
    fill: var(--primary);
    filter: url(#mapGlow);
}

.map-delivery-pulse {
    fill: var(--primary);
    opacity: 0.3;
    animation: mapDotPulse 1.5s ease infinite;
}

@keyframes mapDotPulse {
    0%, 100% { r: 8; opacity: 0.3; }
    50% { r: 16; opacity: 0; }
}

.map-restaurant-dot {
    fill: var(--success);
}

.map-destination-dot {
    fill: #ffffff;
}

.map-label {
    font-size: 9px;
    font-weight: 600;
    fill: #cccccc;
    font-family: 'Poppins', sans-serif;
}

/* Driver info */
.driver-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-top: 1px solid var(--light-gray);
}

.driver-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.driver-details {
    flex: 1;
}

.driver-details h4 {
    font-size: 14px;
    font-weight: 600;
}

.driver-details p {
    font-size: 12px;
    color: var(--gray);
}

.driver-call-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--success);
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.driver-call-btn:active {
    transform: scale(0.92);
}

/* Order summary in tracking */
.tracking-summary {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow);
}

.tracking-summary h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
}

.tracking-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--light-gray);
}

.tracking-summary-item:last-child {
    border-bottom: none;
}

.tracking-summary-item .item-qty {
    background: var(--light);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    margin-right: 8px;
    color: var(--gray);
}

.tracking-summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    margin-top: 4px;
    border-top: 2px solid var(--light-gray);
    font-size: 16px;
    font-weight: 700;
}
