* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; -webkit-tap-highlight-color: transparent; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

body { background-color: #050510; color: #fff; height: 100vh; overflow: hidden; display: flex; justify-content: center; }

/* Background Liquid Blobs */
.bg-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #000; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.8; animation: float 10s infinite alternate ease-in-out; }
.blob-1 { width: 350px; height: 350px; background: #ff007f; top: -10%; left: -10%; animation-delay: 0s; }
.blob-2 { width: 400px; height: 400px; background: #00f0ff; bottom: -20%; right: -20%; animation-delay: -3s; }
.blob-3 { width: 300px; height: 300px; background: #7f00ff; top: 40%; left: 30%; animation-delay: -6s; }
.blob-4 { width: 250px; height: 250px; background: #ffbf00; bottom: 20%; left: -10%; animation-delay: -2s; }

@keyframes float { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(50px, 50px) scale(1.2); } }

/* App Container */
.app { width: 100%; max-width: 480px; height: 100%; display: flex; flex-direction: column; position: relative; z-index: 1; }

/* Glassmorphism Utilities */
.glass { background: rgba(255, 255, 255, 0.05); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border: 1px solid rgba(255, 255, 255, 0.15); box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3); }
.glass-btn { background: rgba(255, 255, 255, 0.1); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.2); transition: 0.2s; }
.glass-btn:active { transform: scale(0.95); background: rgba(255, 255, 255, 0.2); }

/* Header */
.header { padding: calc(env(safe-area-inset-top, 10px) + 10px) 15px 10px; display: flex; gap: 10px; align-items: center; position: sticky; top: 0; z-index: 10; }
.search-bar { flex: 1; height: 44px; border-radius: 22px; display: flex; align-items: center; padding: 0 15px; color: #ccc; }
.search-bar input { background: transparent; border: none; outline: none; color: #fff; margin-left: 10px; width: 100%; font-size: 14px; }
.cart-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 20px; position: relative; }
.cart-badge { position: absolute; top: 0; right: 0; background: #ff3b30; color: white; font-size: 11px; font-weight: bold; width: 18px; height: 18px; display: flex; justify-content: center; align-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,0.5); transition: transform 0.2s; }

/* Banner */
.banner-container { padding: 10px 15px; }
.banner { width: 100%; height: 140px; border-radius: 20px; display: flex; flex-direction: column; justify-content: center; padding: 20px; background: linear-gradient(135deg, rgba(255,0,127,0.3), rgba(127,0,255,0.3)); position: relative; overflow: hidden; }
.banner::after { content: ''; position: absolute; top: -50%; right: -20%; width: 200px; height: 200px; background: rgba(255,255,255,0.1); border-radius: 50%; filter: blur(20px); }
.banner h1 { font-size: 22px; font-weight: 900; color: #fff; margin-bottom: 5px; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.banner p { font-size: 13px; color: rgba(255,255,255,0.8); }

/* Categories */
.categories { display: flex; gap: 10px; padding: 10px 15px; overflow-x: auto; scrollbar-width: none; }
.categories::-webkit-scrollbar { display: none; }
.cat-chip { padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; white-space: nowrap; color: #fff; }
.cat-chip.active { background: rgba(255,255,255,0.3); border-color: rgba(255,255,255,0.5); }

/* Product Grid */
.product-grid { flex: 1; padding: 10px 15px 100px; overflow-y: auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; scrollbar-width: none; }
.product-grid::-webkit-scrollbar { display: none; }

.product-card { border-radius: 18px; padding: 12px; display: flex; flex-direction: column; position: relative; overflow: hidden; transition: 0.3s; }
.product-card:active { transform: scale(0.97); }

/* CSS Snapdragon Chip */
.chip-wrapper { width: 100%; height: 120px; display: flex; justify-content: center; align-items: center; position: relative; margin-bottom: 10px; }
.snapdragon-chip { width: 80px; height: 80px; background: linear-gradient(135deg, #2a2a2a, #111); border-radius: 12px; border: 2px solid #444; position: relative; box-shadow: 0 4px 15px rgba(0,0,0,0.5), inset 0 0 20px rgba(255,255,255,0.1); display: flex; justify-content: center; align-items: center; }
.snapdragon-chip::before { content: ''; position: absolute; width: 40px; height: 40px; background: linear-gradient(135deg, #ff007f, #00f0ff); border-radius: 8px; box-shadow: 0 0 15px rgba(255,0,127,0.5); }
.snapdragon-chip::after { content: 'SD'; position: absolute; font-size: 14px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px #000; z-index: 2; }
.chip-pins { position: absolute; inset: -5px; border: 1px dashed rgba(255,255,255,0.2); border-radius: 15px; }

.product-title { font-size: 14px; font-weight: 600; margin-bottom: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 38px; }
.product-price-row { display: flex; align-items: baseline; gap: 5px; margin-bottom: 8px; }
.product-price { color: #ff3b30; font-size: 16px; font-weight: bold; }
.product-price small { font-size: 12px; }
.product-old-price { color: #888; font-size: 11px; text-decoration: line-through; }

.product-meta { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: #aaa; }
.flash-sale-tag { position: absolute; top: 0; right: 0; background: linear-gradient(135deg, #ff3b30, #ff9500); color: white; font-size: 10px; font-weight: bold; padding: 4px 8px; border-bottom-left-radius: 12px; z-index: 2; }

/* Bottom Navigation */
.bottom-nav { position: absolute; bottom: calc(env(safe-area-inset-bottom, 0px) + 15px); left: 15px; right: 15px; height: 65px; border-radius: 35px; display: flex; justify-content: space-around; align-items: center; z-index: 10; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #888; font-size: 10px; font-weight: 600; transition: 0.2s; }
.nav-item.active { color: #fff; transform: translateY(-5px); }
.nav-item.active .nav-icon { filter: drop-shadow(0 0 8px rgba(255,255,255,0.8)); }
.nav-icon { font-size: 20px; transition: 0.2s; }

/* Cart Modal */
#cart-modal { position: fixed; inset: 0; z-index: 100; display: none; justify-content: flex-end; flex-direction: column; background: rgba(0,0,0,0.5); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); opacity: 0; transition: opacity 0.3s; }
#cart-modal.show { display: flex; opacity: 1; }
.cart-sheet { background: rgba(20, 20, 30, 0.85); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); border-top: 1px solid rgba(255,255,255,0.2); border-radius: 30px 30px 0 0; padding: 20px; height: 70vh; transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1); display: flex; flex-direction: column; }
#cart-modal.show .cart-sheet { transform: translateY(0); }
.drag-handle { width: 40px; height: 5px; background: rgba(255,255,255,0.3); border-radius: 3px; margin: 0 auto 15px; }
.cart-items { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 10px; background: rgba(255,255,255,0.05); border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); }
.checkout-btn { margin-top: 15px; width: 100%; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, #00f0ff, #007aff); color: #000; font-weight: bold; font-size: 16px; border: none; cursor: pointer; box-shadow: 0 4px 15px rgba(0,240,255,0.4); }
.checkout-btn:active { transform: scale(0.98); }