/* Modern Food Delivery App Style */

:root {
    --primary: #ff6b35;
    --primary-dark: #e55a2b;
    --primary-light: #ff8c61;
    --secondary: #4a5568;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* App Header */
.app-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.app-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: white;
}

.app-logo-img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: 2px solid rgba(255,255,255,0.3);
}

.app-logo-text h1 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.app-logo-text p {
    font-size: 0.75rem;
    margin: 0;
    opacity: 0.9;
}

.app-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.header-btn {
    position: relative;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.header-btn:hover {
    background: rgba(255,255,255,0.3);
    color: white;
    transform: translateY(-1px);
}

.header-btn.primary {
    background: white;
    color: var(--primary);
    border-color: white;
}

.header-btn.primary:hover {
    background: #f8f9fa;
    color: var(--primary-dark);
}

.cart-badge-header {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    border-radius: var(--radius-full);
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Search Bar */
.search-section {
    background: white;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 74px;
    z-index: 99;
}

.search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-secondary);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.search-icon {
    position: absolute;
    left: 1.125rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.125rem;
}

.clear-search {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-tertiary);
    border: none;
    color: var(--text-muted);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.clear-search:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.search-input:not(:placeholder-shown) ~ .clear-search {
    display: flex;
}

/* Category Pills - Horizontal Scroll */
.categories-section {
    background: white;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 138px;
    z-index: 98;
}

.categories-scroll {
    display: flex;
    gap: 0.625rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.25rem 0;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-chip {
    flex-shrink: 0;
    padding: 0.625rem 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.category-chip:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.category-chip.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.category-icon {
    font-size: 1rem;
}

/* Products Grid */
.products-section {
    padding: 1.5rem 0;
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Product Card - Modern Design */
.product-card-modern {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
}

.product-card-modern:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.product-card-modern:active {
    transform: translateY(-2px);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 60%;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.product-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card-modern:hover .product-image-wrapper img {
    transform: scale(1.08);
}

.product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--success);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: var(--shadow-md);
}

.product-favorite {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
}

.product-favorite:hover {
    transform: scale(1.1);
}

.product-favorite i {
    color: var(--text-muted);
    font-size: 1.125rem;
}

.product-favorite.active i {
    color: var(--danger);
}

.product-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category-tag {
    display: inline-block;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.product-price-wrapper {
    display: flex;
    flex-direction: column;
}

.product-price-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.125rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.product-price-currency {
    font-size: 0.875rem;
    font-weight: 600;
    margin-right: 0.125rem;
}

.add-to-cart-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

.add-to-cart-btn i {
    font-size: 1rem;
}

/* Quantity Selector */
.quantity-selector-modern {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-secondary);
    padding: 0.375rem;
    border-radius: var(--radius-full);
    margin-bottom: 0.75rem;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: white;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.qty-btn:hover {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow);
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.qty-display {
    min-width: 32px;
    text-align: center;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-primary);
}

/* Floating Cart Button (FAB) */
.fab-cart {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(255, 107, 53, 0.5);
    cursor: pointer;
    transition: var(--transition);
    z-index: 1000;
    border: 3px solid white;
}

.fab-cart:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 40px rgba(255, 107, 53, 0.6);
}

.fab-cart:active {
    transform: scale(0.95);
}

.fab-cart i {
    color: white;
    font-size: 1.5rem;
}

.fab-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    font-size: 5rem;
    color: var(--text-muted);
    opacity: 0.5;
    margin-bottom: 1.5rem;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.empty-state-text {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto 2rem;
}

/* Responsive Grid */
@media (min-width: 576px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header-btn .btn-text {
        display: inline;
    }
}

@media (min-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 767.98px) {
    .fab-cart {
        display: flex;
    }
    
    .header-btn .btn-text {
        display: none;
    }
    
    .header-btn.primary .btn-text {
        display: inline;
    }
    
    .app-logo-text p {
        display: none;
    }
    
    .search-section {
        top: 66px;
    }
    
    .categories-section {
        top: 130px;
    }
}

@media (max-width: 576px) {
    .app-header {
        padding: 0.75rem 0;
    }
    
    .app-logo-img {
        width: 36px;
        height: 36px;
    }
    
    .app-logo-text h1 {
        font-size: 1.125rem;
    }
    
    .header-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.875rem;
    }
    
    .product-card-modern {
        border-radius: var(--radius);
    }
    
    .product-content {
        padding: 1rem;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .product-price {
        font-size: 1.25rem;
    }
    
    .fab-cart {
        width: 56px;
        height: 56px;
        bottom: 1.25rem;
        right: 1.25rem;
    }
    
    .fab-cart i {
        font-size: 1.35rem;
    }
}

/* Loading Animation */
.loading-skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Smooth Transitions */
* {
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
