:root { 
    --primary: #22c55e; 
    --dark: #0f172a; 
    --light: #f8fafc; 
    --white: #ffffff; 
    --danger: #ef4444; 
    --shadow: 0 4px 15px rgba(0,0,0,0.08); 
}

body { font-family: 'Inter', sans-serif; margin: 0; background: var(--light); padding-top: 175px; overflow-x: hidden; }

/* Fixed Layout Containers */
.container { max-width: 500px; margin: 0 auto; padding: 0 15px; }

.app-header { background: var(--white); padding: 12px 0; position: fixed; top: 0; left: 0; right: 0; z-index: 1000; box-shadow: var(--shadow); }
.logo-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
#app-logo { height: 35px; width: auto; }

.icon-btn { background: #f1f5f9; border: none; width: 38px; height: 38px; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; position: relative; font-size: 18px; }
#cart-count { position: absolute; top: -5px; right: -5px; background: var(--danger); color: white; font-size: 10px; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; }

#product-search { width: 100%; padding: 12px 15px; border: 1px solid #e2e8f0; border-radius: 12px; box-sizing: border-box; font-size: 14px; outline: none; }
.category-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.category-scroll::-webkit-scrollbar { display: none; }

.category-chip { background: white; padding: 8px 18px; border-radius: 50px; font-size: 13px; white-space: nowrap; cursor: pointer; border: 1px solid #e2e8f0; transition: 0.3s; }
.category-chip.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Product Cards */
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding-bottom: 30px; }
.product-card { background: white; padding: 12px; border-radius: 15px; box-shadow: var(--shadow); text-align: center; position: relative; transition: 0.2s; }
.product-img { width: 100%; height: 100px; object-fit: contain; margin-bottom: 10px; }
.status-badge { position: absolute; top: 8px; right: 8px; background: var(--danger); color: white; font-size: 9px; padding: 3px 8px; border-radius: 50px; font-weight: bold; }
.out-of-stock { opacity: 0.6; pointer-events: none; }

/* Buttons & Inputs */
.btn-primary { background: var(--primary); color: white; border: none; padding: 12px; border-radius: 10px; font-weight: 700; cursor: pointer; transition: 0.2s; }
.btn-primary:active { transform: scale(0.98); }
.btn-secondary { background: #f1f5f9; color: var(--dark); border: none; padding: 10px; border-radius: 10px; cursor: pointer; }
.capsule-input { width: 100%; padding: 14px 20px; margin-bottom: 10px; border: 1px solid #e2e8f0; border-radius: 50px; box-sizing: border-box; outline: none; font-family: inherit; }

/* Cart & Modals */
.sidebar-overlay { position: fixed; inset: 0; background: var(--white); z-index: 2000; display: none; overflow-y: auto; }
.sidebar-overlay.active { display: block; animation: slideUp 0.3s ease; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 3000; display: none; align-items: center; justify-content: center; padding: 15px; }
.modal.active { display: flex; }
.modal-content { background: white; padding: 25px; border-radius: 24px; width: 100%; max-width: 400px; position: relative; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.close-btn { position: absolute; top: 15px; right: 15px; border: none; background: none; font-size: 24px; cursor: pointer; color: #94a3b8; }

.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid #f1f5f9; }
.qty-control { display: flex; align-items: center; gap: 10px; background: #f8fafc; padding: 5px 12px; border-radius: 50px; border: 1px solid #e2e8f0; }
.qty-control button { border: none; background: transparent; font-size: 18px; font-weight: bold; cursor: pointer; width: 25px; height: 25px; }

/* Status Tags */
.status-tag { padding: 4px 10px; border-radius: 20px; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.status-pending { background: #fef3c7; color: #d97706; }
.status-delivered { background: #dcfce7; color: #16a34a; }
.status-cancelled { background: #fee2e2; color: #ef4444; }
.status-return_pending { background: #e0e7ff; color: #4338ca; }
.status-returned { background: #f1f5f9; color: #64748b; }

@keyframes slideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }